mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
fix: Improve error logging and update lora monitor path handling
This commit is contained in:
@@ -789,7 +789,7 @@ class ApiRoutes:
|
|||||||
})
|
})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error getting model metadata: {e}", exc_info=True)
|
logger.error(f"Error getting model metadata: {e}")
|
||||||
return web.json_response({
|
return web.json_response({
|
||||||
'success': False,
|
'success': False,
|
||||||
'error': str(e)
|
'error': str(e)
|
||||||
@@ -921,11 +921,14 @@ class ApiRoutes:
|
|||||||
|
|
||||||
# Notify file monitor to ignore these events
|
# Notify file monitor to ignore these events
|
||||||
main_file_path = os.path.join(target_dir, f"{old_file_name}.safetensors")
|
main_file_path = os.path.join(target_dir, f"{old_file_name}.safetensors")
|
||||||
if os.path.exists(main_file_path) and self.download_manager.file_monitor:
|
if os.path.exists(main_file_path):
|
||||||
# Add old and new paths to ignore list
|
# Get lora monitor through ServiceRegistry instead of download_manager
|
||||||
file_size = os.path.getsize(main_file_path)
|
lora_monitor = await ServiceRegistry.get_lora_monitor()
|
||||||
self.download_manager.file_monitor.handler.add_ignore_path(main_file_path, file_size)
|
if lora_monitor:
|
||||||
self.download_manager.file_monitor.handler.add_ignore_path(new_file_path, file_size)
|
# Add old and new paths to ignore list
|
||||||
|
file_size = os.path.getsize(main_file_path)
|
||||||
|
lora_monitor.handler.add_ignore_path(main_file_path, file_size)
|
||||||
|
lora_monitor.handler.add_ignore_path(new_file_path, file_size)
|
||||||
|
|
||||||
for old_path, pattern in existing_files:
|
for old_path, pattern in existing_files:
|
||||||
# Get the file extension like .safetensors or .metadata.json
|
# Get the file extension like .safetensors or .metadata.json
|
||||||
|
|||||||
@@ -216,7 +216,6 @@ export async function resetAndReload(options = {}) {
|
|||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
const pageState = getCurrentPageState();
|
const pageState = getCurrentPageState();
|
||||||
console.log('Resetting with state:', { ...pageState });
|
|
||||||
|
|
||||||
// Reset pagination and load more models
|
// Reset pagination and load more models
|
||||||
if (typeof loadMoreFunction === 'function') {
|
if (typeof loadMoreFunction === 'function') {
|
||||||
|
|||||||
Reference in New Issue
Block a user