Spaces:
Running
Running
Upload civitai_to_hf.py
Browse files- civitai_to_hf.py +1 -0
civitai_to_hf.py
CHANGED
@@ -110,6 +110,7 @@ def get_civitai_sha256(dl_url: str, api_key=""):
|
|
110 |
for d in json["files"]:
|
111 |
if is_invalid_file(qs, d, "type") or is_invalid_file(qs, d, "format") or is_invalid_file(qs, d, "size") or is_invalid_file(qs, d, "fp"): continue
|
112 |
hash = d["hashes"]["SHA256"].lower()
|
|
|
113 |
return hash
|
114 |
except Exception as e:
|
115 |
print(e)
|
|
|
110 |
for d in json["files"]:
|
111 |
if is_invalid_file(qs, d, "type") or is_invalid_file(qs, d, "format") or is_invalid_file(qs, d, "size") or is_invalid_file(qs, d, "fp"): continue
|
112 |
hash = d["hashes"]["SHA256"].lower()
|
113 |
+
break
|
114 |
return hash
|
115 |
except Exception as e:
|
116 |
print(e)
|