mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Remove unused monitor cleanup logic from LoraManager and DownloadManager
This commit is contained in:
@@ -167,17 +167,6 @@ class LoraManager:
|
|||||||
try:
|
try:
|
||||||
logger.info("LoRA Manager: Cleaning up services")
|
logger.info("LoRA Manager: Cleaning up services")
|
||||||
|
|
||||||
# Get monitors from ServiceRegistry
|
|
||||||
lora_monitor = await ServiceRegistry.get_service("lora_monitor")
|
|
||||||
if lora_monitor:
|
|
||||||
lora_monitor.stop()
|
|
||||||
logger.info("Stopped LoRA monitor")
|
|
||||||
|
|
||||||
checkpoint_monitor = await ServiceRegistry.get_service("checkpoint_monitor")
|
|
||||||
if checkpoint_monitor:
|
|
||||||
checkpoint_monitor.stop()
|
|
||||||
logger.info("Stopped checkpoint monitor")
|
|
||||||
|
|
||||||
# Close CivitaiClient gracefully
|
# Close CivitaiClient gracefully
|
||||||
civitai_client = await ServiceRegistry.get_service("civitai_client")
|
civitai_client = await ServiceRegistry.get_service("civitai_client")
|
||||||
if civitai_client:
|
if civitai_client:
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ class DownloadManager:
|
|||||||
self._civitai_client = await ServiceRegistry.get_civitai_client()
|
self._civitai_client = await ServiceRegistry.get_civitai_client()
|
||||||
return self._civitai_client
|
return self._civitai_client
|
||||||
|
|
||||||
async def _get_checkpoint_monitor(self):
|
|
||||||
"""Get the checkpoint file monitor from registry"""
|
|
||||||
return await ServiceRegistry.get_checkpoint_monitor()
|
|
||||||
|
|
||||||
async def _get_lora_scanner(self):
|
async def _get_lora_scanner(self):
|
||||||
"""Get the lora scanner from registry"""
|
"""Get the lora scanner from registry"""
|
||||||
return await ServiceRegistry.get_lora_scanner()
|
return await ServiceRegistry.get_lora_scanner()
|
||||||
@@ -132,9 +128,6 @@ class DownloadManager:
|
|||||||
file_name = file_info['name']
|
file_name = file_info['name']
|
||||||
save_path = os.path.join(save_dir, file_name)
|
save_path = os.path.join(save_dir, file_name)
|
||||||
|
|
||||||
# 4. Notify file monitor - use normalized path and file size
|
|
||||||
# file monitor is despreted, so we don't need to use it
|
|
||||||
|
|
||||||
# 5. Prepare metadata based on model type
|
# 5. Prepare metadata based on model type
|
||||||
if model_type == "checkpoint":
|
if model_type == "checkpoint":
|
||||||
metadata = CheckpointMetadata.from_civitai_info(version_info, file_info, save_path)
|
metadata = CheckpointMetadata.from_civitai_info(version_info, file_info, save_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user