mokady commited on
Commit
54845dd
·
verified ·
1 Parent(s): a6ab172

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -106,7 +106,7 @@ def process(input_image, prompt, negative_prompt, num_steps, controlnet_conditio
106
  @spaces.GPU
107
  def generate_(prompt, negative_prompt, canny_image, num_steps, controlnet_conditioning_scale, seed):
108
  pipe.to('cuda')
109
- generator = torch.manual_seed(seed)
110
  images = pipe(
111
  prompt, negative_prompt=negative_prompt, image=canny_image, num_inference_steps=num_steps, controlnet_conditioning_scale=float(controlnet_conditioning_scale),
112
  generator=generator,
 
106
  @spaces.GPU
107
  def generate_(prompt, negative_prompt, canny_image, num_steps, controlnet_conditioning_scale, seed):
108
  pipe.to('cuda')
109
+ generator = torch.Generator("cuda").manual_seed(seed)
110
  images = pipe(
111
  prompt, negative_prompt=negative_prompt, image=canny_image, num_inference_steps=num_steps, controlnet_conditioning_scale=float(controlnet_conditioning_scale),
112
  generator=generator,