stlaurentjr commited on
Commit
e3bf97f
1 Parent(s): b031058

Update scripts/mainrunpodA1111.py

Browse files
Files changed (1) hide show
  1. scripts/mainrunpodA1111.py +2 -2
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=LoRA_LINK.replace('/file/d/', '/uc?id=').replace('/view', ''), output=loramodel, quiet=False)
242
  clear_output()
243
  else:
244
  print('Model already exists')
@@ -498,7 +498,7 @@ def getsrc(url):
498
  return src
499
 
500
  def get_true_name(url):
501
- file_id = url.split('/')[-2]
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('Model 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