eienmojiki commited on
Commit
3360f9f
·
verified ·
1 Parent(s): e47b8b0

Update gui.py

Browse files
Files changed (1) hide show
  1. gui.py +1 -12
gui.py CHANGED
@@ -76,7 +76,7 @@ class GuiSD:
76
  )
77
  yield f"Model loaded: {model_name}"
78
 
79
- @spaces.GPU
80
  def generate_pipeline(
81
  self,
82
  prompt,
@@ -415,17 +415,6 @@ class GuiSD:
415
  "ip_adapter_scale": params_ip_scale,
416
  }
417
 
418
- random_number: int = random.randint(1, 100)
419
- if random_number < 25 and num_images < 3:
420
- if (not upscaler_model and
421
- steps < 45 and
422
- task in ["txt2img", "img2img"] and
423
- not adetailer_active_a and
424
- not adetailer_active_b):
425
- num_images *= 2
426
- pipe_params["num_images"] = num_images
427
- gr.Info("Num images x 2 🎉")
428
-
429
  # Maybe fix lora issue: 'Cannot copy out of meta tensor; no data!''
430
  self.model.pipe.to("cuda:0" if torch.cuda.is_available() else "cpu")
431
 
 
76
  )
77
  yield f"Model loaded: {model_name}"
78
 
79
+ @spaces.GPU(duration=80)
80
  def generate_pipeline(
81
  self,
82
  prompt,
 
415
  "ip_adapter_scale": params_ip_scale,
416
  }
417
 
 
 
 
 
 
 
 
 
 
 
 
418
  # Maybe fix lora issue: 'Cannot copy out of meta tensor; no data!''
419
  self.model.pipe.to("cuda:0" if torch.cuda.is_available() else "cpu")
420