LPX55 commited on
Commit
6f6e2c3
·
verified ·
1 Parent(s): 3726af7

Update optimized.py

Browse files
Files changed (1) hide show
  1. optimized.py +2 -2
optimized.py CHANGED
@@ -99,8 +99,8 @@ def generate_image(prompt, scale, steps, control_image, controlnet_conditioning_
99
  controlnet_conditioning_scale=controlnet_conditioning_scale,
100
  num_inference_steps=steps,
101
  guidance_scale=guidance_scale,
102
- height=control_image.size[1],
103
- width=control_image.size[0]
104
  ).images[0]
105
  print(f"VRAM used: {torch.cuda.memory_allocated()/1e9:.2f}GB")
106
  # Aggressive memory cleanup
 
99
  controlnet_conditioning_scale=controlnet_conditioning_scale,
100
  num_inference_steps=steps,
101
  guidance_scale=guidance_scale,
102
+ height=h,
103
+ width=w
104
  ).images[0]
105
  print(f"VRAM used: {torch.cuda.memory_allocated()/1e9:.2f}GB")
106
  # Aggressive memory cleanup