John6666 commited on
Commit
63eeae5
·
verified ·
1 Parent(s): 40ea453

Upload dc.py

Browse files
Files changed (1) hide show
  1. dc.py +2 -0
dc.py CHANGED
@@ -728,6 +728,7 @@ from modutils import (
728
  )
729
 
730
  sd_gen = GuiSD()
 
731
  def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps,
732
  model_name = load_diffusers_format_model[0], lora1 = None, lora1_wt = 1.0, lora2 = None, lora2_wt = 1.0,
733
  lora3 = None, lora3_wt = 1.0, lora4 = None, lora4_wt = 1.0, lora5 = None, lora5_wt = 1.0,
@@ -775,6 +776,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
775
  return output_image
776
 
777
 
 
778
  def _infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps,
779
  model_name = load_diffusers_format_model[0], lora1 = None, lora1_wt = 1.0, lora2 = None, lora2_wt = 1.0,
780
  lora3 = None, lora3_wt = 1.0, lora4 = None, lora4_wt = 1.0, lora5 = None, lora5_wt = 1.0,
 
728
  )
729
 
730
  sd_gen = GuiSD()
731
+ @spaces.GPU
732
  def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps,
733
  model_name = load_diffusers_format_model[0], lora1 = None, lora1_wt = 1.0, lora2 = None, lora2_wt = 1.0,
734
  lora3 = None, lora3_wt = 1.0, lora4 = None, lora4_wt = 1.0, lora5 = None, lora5_wt = 1.0,
 
776
  return output_image
777
 
778
 
779
+ @spaces.GPU
780
  def _infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps,
781
  model_name = load_diffusers_format_model[0], lora1 = None, lora1_wt = 1.0, lora2 = None, lora2_wt = 1.0,
782
  lora3 = None, lora3_wt = 1.0, lora4 = None, lora4_wt = 1.0, lora5 = None, lora5_wt = 1.0,