John6666 commited on
Commit
fbc3a29
1 Parent(s): 15704fd

Upload 3 files

Browse files
convert_url_to_diffusers_sdxl.py CHANGED
@@ -186,7 +186,7 @@ tags:
186
 
187
 
188
  def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
189
- if not lora_dict: return
190
  a_list = []
191
  w_list = []
192
  for k, v in lora_dict.items():
@@ -257,7 +257,7 @@ if __name__ == "__main__":
257
 
258
  parser.add_argument("--url", default=None, type=str, required=True, help="URL of the model to convert.")
259
  parser.add_argument("--half", default=True, help="Save weights in half precision.")
260
- parser.add_argument("--scheduler", default=None, type=str, choices=list(SCHEDULER_CONFIG_MAP.keys()), required=False, help="Scheduler name to use.")
261
  parser.add_argument("--vae", default=None, type=str, required=False, help="URL of the VAE to use.")
262
  parser.add_argument("--civitai_key", default=None, type=str, required=False, help="Civitai API Key (If you want to download file from Civitai).")
263
  parser.add_argument("--lora1", default=None, type=str, required=False, help="URL of the LoRA to use.")
 
186
 
187
 
188
  def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
189
+ if not lora_dict or not isinstance(lora_dict, dict): return
190
  a_list = []
191
  w_list = []
192
  for k, v in lora_dict.items():
 
257
 
258
  parser.add_argument("--url", default=None, type=str, required=True, help="URL of the model to convert.")
259
  parser.add_argument("--half", default=True, help="Save weights in half precision.")
260
+ parser.add_argument("--scheduler", default="Euler a", type=str, choices=list(SCHEDULER_CONFIG_MAP.keys()), required=False, help="Scheduler name to use.")
261
  parser.add_argument("--vae", default=None, type=str, required=False, help="URL of the VAE to use.")
262
  parser.add_argument("--civitai_key", default=None, type=str, required=False, help="Civitai API Key (If you want to download file from Civitai).")
263
  parser.add_argument("--lora1", default=None, type=str, required=False, help="URL of the LoRA to use.")
convert_url_to_diffusers_sdxl_gr.py CHANGED
@@ -187,7 +187,7 @@ tags:
187
 
188
 
189
  def fuse_loras(pipe, lora_dict={}, temp_dir=".", civitai_key=""):
190
- if not lora_dict: return
191
  a_list = []
192
  w_list = []
193
  for k, v in lora_dict.items():
@@ -320,7 +320,7 @@ if __name__ == "__main__":
320
 
321
  parser.add_argument("--url", default=None, type=str, required=True, help="URL of the model to convert.")
322
  parser.add_argument("--half", default=True, help="Save weights in half precision.")
323
- parser.add_argument("--scheduler", default=None, type=str, choices=list(SCHEDULER_CONFIG_MAP.keys()), required=False, help="Scheduler name to use.")
324
  parser.add_argument("--vae", default=None, type=str, required=False, help="URL of the VAE to use.")
325
  parser.add_argument("--civitai_key", default=None, type=str, required=False, help="Civitai API Key (If you want to download file from Civitai).")
326
  parser.add_argument("--lora1", default=None, type=str, required=False, help="URL of the LoRA to use.")
 
187
 
188
 
189
  def fuse_loras(pipe, lora_dict={}, temp_dir=".", civitai_key=""):
190
+ if not lora_dict or not isinstance(lora_dict, dict): return
191
  a_list = []
192
  w_list = []
193
  for k, v in lora_dict.items():
 
320
 
321
  parser.add_argument("--url", default=None, type=str, required=True, help="URL of the model to convert.")
322
  parser.add_argument("--half", default=True, help="Save weights in half precision.")
323
+ parser.add_argument("--scheduler", default="Euler a", type=str, choices=list(SCHEDULER_CONFIG_MAP.keys()), required=False, help="Scheduler name to use.")
324
  parser.add_argument("--vae", default=None, type=str, required=False, help="URL of the VAE to use.")
325
  parser.add_argument("--civitai_key", default=None, type=str, required=False, help="Civitai API Key (If you want to download file from Civitai).")
326
  parser.add_argument("--lora1", default=None, type=str, required=False, help="URL of the LoRA to use.")