Spaces:
Runtime error
Runtime error
File size: 655 Bytes
ece01f5 f6dd00b ece01f5 f6dd00b 6c2e282 1c9c8a6 f6dd00b ece01f5 f6dd00b 6c2e282 f6dd00b 6c2e282 09219e2 ece01f5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import requests as rq
import json
opt=rq.get("https://civitai.com/api/v1/model-versions/by-hash/0666CC88F7")
j:dict=opt.json()
opt =rq.get(j.get("files")[0].get("downloadUrl"))
print("0 of 2")
print(opt)
with open("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/calicomix.safetensors","wb") as f:
f.write(opt.content)
opt=rq.get("https://civitai.com/api/v1/model-versions/by-hash/B56CE717")
j:dict=opt.json()
opt =rq.get(j.get("files")[0].get("downloadUrl"))
print("1 of 2")
with open("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/mienamix.safetensors","wb") as f:
f.write(opt.content)
print("2 of 2")
|