Spaces:
Runtime error
Runtime error
Create dl.py
Browse files
dl.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests as rq
|
2 |
+
import json
|
3 |
+
|
4 |
+
opt=rq.get("https://civitai.com/api/v1/model-versions/by-hash/0666CC88F7")
|
5 |
+
j:dict=opt.json()
|
6 |
+
opt =rq.get(j.get("files")[0].get("downloadUrl"))
|
7 |
+
with open("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/calicomix.safetensors","wb") as f:
|
8 |
+
f.write(opt.content)
|
9 |
+
opt=rq.get("https://civitai.com/api/v1/model-versions/by-hash/B56CE717")
|
10 |
+
j:dict=opt.json()
|
11 |
+
opt =rq.get(j.get("files")[0].get("downloadUrl"))
|
12 |
+
with open("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/mienamix.safetensors","wb") as f:
|
13 |
+
f.write(opt.content)
|
14 |
+
|
15 |
+
|