LPX55 commited on
Commit
5dd4601
·
verified ·
1 Parent(s): b3266d4

Update optimized.py

Browse files
Files changed (1) hide show
  1. optimized.py +1 -0
optimized.py CHANGED
@@ -84,6 +84,7 @@ print(f"VRAM used: {torch.cuda.memory_allocated()/1e9:.2f}GB")
84
  @spaces.GPU
85
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale):
86
  # Clean up input handling
 
87
  w, h = control_image.size
88
  scale = min(scale, 2.0) # Cap scale factor
89
 
 
84
  @spaces.GPU
85
  def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_scale, guidance_scale):
86
  # Clean up input handling
87
+ control_image = load_image(control_image)
88
  w, h = control_image.size
89
  scale = min(scale, 2.0) # Cap scale factor
90