relax checks for resources string to support older strings from civitai

This commit is contained in:
James 2024-05-05 06:48:45 -04:00
parent 6e686f7392
commit 5df03632a4

View File

@ -254,9 +254,7 @@ Civitai resources: [{"type":"checkpoint","modelVersionId":290640},{"type":"Image
prompt_resources = []
for resource in resources:
if "type" not in resource or "weight" not in resource or "modelVersionId" not in resource:
continue
if "ImageJobNetworkParams" not in resource["type"]:
if "weight" not in resource or "modelVersionId" not in resource:
continue
weight = resource["weight"]