mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
fix(recipe): validate modelVersionId before fetching hash from cache or Civitai
This commit is contained in:
@@ -424,6 +424,8 @@ class RecipeScanner:
|
|||||||
# If has modelVersionId but no hash, look in lora cache first, then fetch from Civitai
|
# If has modelVersionId but no hash, look in lora cache first, then fetch from Civitai
|
||||||
if 'modelVersionId' in lora and not lora.get('hash'):
|
if 'modelVersionId' in lora and not lora.get('hash'):
|
||||||
model_version_id = lora['modelVersionId']
|
model_version_id = lora['modelVersionId']
|
||||||
|
# Check if model_version_id is an integer and > 0
|
||||||
|
if isinstance(model_version_id, int) and model_version_id > 0:
|
||||||
|
|
||||||
# Try to find in lora cache first
|
# Try to find in lora cache first
|
||||||
hash_from_cache = await self._find_hash_in_lora_cache(model_version_id)
|
hash_from_cache = await self._find_hash_in_lora_cache(model_version_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user