r3gm commited on
Commit
5ccf4ca
1 Parent(s): 63aba14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -417,13 +417,6 @@ class GuiSD:
417
  type_model_precision=model_precision
418
  )
419
 
420
- self.model.load_pipe(
421
- model_name,
422
- task_name=task,
423
- vae_model=vae_model if vae_model != "None" else None,
424
- type_model_precision=model_precision
425
- )
426
-
427
  if task != "txt2img" and not image_control:
428
  raise ValueError("No control image found: To use this function, you have to upload an image in 'Image ControlNet/Inpaint/Img2img'")
429
 
@@ -443,11 +436,18 @@ class GuiSD:
443
 
444
  upscaler_model = f"./upscalers/{url_upscaler.split('/')[-1]}"
445
 
 
 
 
 
 
 
 
 
 
446
  if textual_inversion and self.model.class_name == "StableDiffusionXLPipeline":
447
  print("No Textual inversion for SDXL")
448
 
449
- logging.getLogger("ultralytics").setLevel(logging.INFO if adetailer_verbose else logging.ERROR)
450
-
451
  adetailer_params_A = {
452
  "face_detector_ad" : face_detector_ad_a,
453
  "person_detector_ad" : person_detector_ad_a,
 
417
  type_model_precision=model_precision
418
  )
419
 
 
 
 
 
 
 
 
420
  if task != "txt2img" and not image_control:
421
  raise ValueError("No control image found: To use this function, you have to upload an image in 'Image ControlNet/Inpaint/Img2img'")
422
 
 
436
 
437
  upscaler_model = f"./upscalers/{url_upscaler.split('/')[-1]}"
438
 
439
+ logging.getLogger("ultralytics").setLevel(logging.INFO if adetailer_verbose else logging.ERROR)
440
+
441
+ self.model.load_pipe(
442
+ model_name,
443
+ task_name=task,
444
+ vae_model=vae_model if vae_model != "None" else None,
445
+ type_model_precision=model_precision
446
+ )
447
+
448
  if textual_inversion and self.model.class_name == "StableDiffusionXLPipeline":
449
  print("No Textual inversion for SDXL")
450
 
 
 
451
  adetailer_params_A = {
452
  "face_detector_ad" : face_detector_ad_a,
453
  "person_detector_ad" : person_detector_ad_a,