Spaces:
Runtime error
Runtime error
Efreak
commited on
Commit
·
777222d
1
Parent(s):
865ef6f
stupid python
Browse files
app.py
CHANGED
@@ -34,18 +34,18 @@ def duplicate(source_url, preview_url, model_id, dst_repo, token, dst_repo_path,
|
|
34 |
subprocess.check_call([r"curl","https://civitai.com/api/v1/model-versions/"+model_id,source_url,"-O",dir+filename+".civitai.info"])
|
35 |
subprocess.check_call([r"curl",preview_url,"-O",filename+".preview.png"])
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
|
47 |
-
|
48 |
-
|
49 |
|
50 |
api.upload_folder(
|
51 |
path_or_fileobj=dir,
|
|
|
34 |
subprocess.check_call([r"curl","https://civitai.com/api/v1/model-versions/"+model_id,source_url,"-O",dir+filename+".civitai.info"])
|
35 |
subprocess.check_call([r"curl",preview_url,"-O",filename+".preview.png"])
|
36 |
|
37 |
+
match repo_type:
|
38 |
+
case "Embedding":
|
39 |
+
repopath="/embeddings"
|
40 |
+
case "Model":
|
41 |
+
repopath="/models/Stable-diffusion"
|
42 |
+
case "Lora":
|
43 |
+
repopath="/models/Lora/Lora"
|
44 |
+
case "Lycoris":
|
45 |
+
repopath="/models/Lora/Lycoris"
|
46 |
|
47 |
+
if nsfw==True:
|
48 |
+
repopath=repopath+"/nsfw"
|
49 |
|
50 |
api.upload_folder(
|
51 |
path_or_fileobj=dir,
|