Spaces:
Running
Running
stlaurentjr
commited on
Commit
•
e3bf97f
1
Parent(s):
b031058
Update scripts/mainrunpodA1111.py
Browse files
scripts/mainrunpodA1111.py
CHANGED
@@ -238,7 +238,7 @@ def modeldwn(model_LINK):
|
|
238 |
modelname=get_true_name(model_LINK)
|
239 |
loramodel=f'/workspace/sd/stable-diffusion-webui/models/Stable-diffusion/{modelname}'
|
240 |
if not os.path.exists(loramodel):
|
241 |
-
gdown.download(url=
|
242 |
clear_output()
|
243 |
else:
|
244 |
print('[1;33mModel already exists')
|
@@ -498,7 +498,7 @@ def getsrc(url):
|
|
498 |
return src
|
499 |
|
500 |
def get_true_name(url):
|
501 |
-
file_id = url.split('/')[-
|
502 |
gdrive_url = f'https://drive.google.com/uc?id={file_id}'
|
503 |
return gdown.download(url=gdrive_url, quiet=True)
|
504 |
|
|
|
238 |
modelname=get_true_name(model_LINK)
|
239 |
loramodel=f'/workspace/sd/stable-diffusion-webui/models/Stable-diffusion/{modelname}'
|
240 |
if not os.path.exists(loramodel):
|
241 |
+
gdown.download(url=model_LINK.replace('/file/d/', '/uc?id=').replace('/view', ''), output=loramodel, quiet=False)
|
242 |
clear_output()
|
243 |
else:
|
244 |
print('[1;33mModel already exists')
|
|
|
498 |
return src
|
499 |
|
500 |
def get_true_name(url):
|
501 |
+
file_id = url.split('/')[-1]
|
502 |
gdrive_url = f'https://drive.google.com/uc?id={file_id}'
|
503 |
return gdown.download(url=gdrive_url, quiet=True)
|
504 |
|