LoRA Manager Version
Issue Description
- If there is a write issue, crash, or the drive fills while LoRA manager is writing to the cache this can break the LoRA cache.
Steps to Reproduce
Corrupt the LoRA cache and try to load LoRA manager.
Expected Behavior
There should be a check to see if the cache is not loading correctly/corrupted and an auto-rebuild should take place as a fallback.
Logs
Errors look like: LoRAs do not show thumbnails/do not show up in the main window.
Temporary Patch to resolve issue
Note: This is only a temporary workaround, not a proper fix.
- Comment out line 827 of custom_nodes\comfyui-lora-manager\py\services\model_scanner.py
- Change line 26 of custom_nodes\comfyui-lora-manager\py\services\lora_service.py to: "model_name": lora_data.get("model_name", "CORRUPT_FILE"),
- Restart, refresh LoRAs
- Manually remove any LoRAs that still refuse to load thumbnails and delete their metadata.
- Return both edited files to their original configuration
- Reimport LoRAs that were removed
Suggested full fix
1.) Update the format response method of lora_service.py so that if data is bad, it reports failure (returns None).):
2.) Update the list comprehension in model_handlers.py to filter out the None values returned by the new lora_service.py logic:
LoRA Manager Version
v0.9.11Issue Description
Steps to Reproduce
Corrupt the LoRA cache and try to load LoRA manager.
Expected Behavior
There should be a check to see if the cache is not loading correctly/corrupted and an auto-rebuild should take place as a fallback.
Logs
Errors look like: LoRAs do not show thumbnails/do not show up in the main window.
Temporary Patch to resolve issue
Note: This is only a temporary workaround, not a proper fix.
Suggested full fix
1.) Update the format response method of lora_service.py so that if data is bad, it reports failure (returns None).):
2.) Update the list comprehension in model_handlers.py to filter out the None values returned by the new lora_service.py logic: