Small changes

This commit is contained in:
oobabooga 2025-06-04 11:11:23 -07:00
parent 142c4eb1a6
commit 20649b9730
2 changed files with 6 additions and 6 deletions

View file

@ -398,7 +398,6 @@ class LlamaServer:
def stop(self): def stop(self):
"""Stop the server process.""" """Stop the server process."""
if self.process: if self.process:
logger.info("Terminating llama-server...")
self.process.terminate() self.process.terminate()
try: try:
self.process.wait(timeout=5) self.process.wait(timeout=5)

View file

@ -61,7 +61,8 @@ from modules.utils import gradio
def signal_handler(sig, frame): def signal_handler(sig, frame):
logger.info("Received Ctrl+C. Shutting down Text generation web UI gracefully.") logger.info("Received Ctrl+C. Shutting down Text generation web UI gracefully.")
# Try to stop the model if loaded # Explicitly stop LlamaServer to avoid __del__ cleanup issues during shutdown
if shared.model and shared.model.__class__.__name__ == 'LlamaServer':
try: try:
shared.model.stop() shared.model.stop()
except: except: