File size: 626 Bytes
5dfbeea d9655bd 5e77440 5dfbeea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import requests as rq
import json
import os
import sys
tkn=sys.argv[1]
opt=rq.get("https://civitai.com/api/v1/model-versions/by-hash/F32CC1F1")
j:dict=opt.json()
opt =rq.get(j.get("files")[0].get("downloadUrl")+"?token="+tkn)
print("0 of 2")
#print(opt)
with open("/home/user/app/fastsdcpu/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/fastsdcpu/mienamix.safetensors","wb") as f:
f.write(opt.content)
print("2 of 2")
|