Manjushri commited on
Commit
0de1ba7
1 Parent(s): b677c5f

Update app.py

Browse files

Man, not sure why rnd wasn't working, coping my known working code now...

Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -16,9 +16,10 @@ upscaler = upscaler.to(device)
16
  upscaler.enable_xformers_memory_efficient_attention()
17
 
18
 
19
- def genie (Prompt, negative_prompt, height, width, scale, steps, Seed, upscale):
20
- generator = torch.manual_seed(Seed)
21
- random.seed(0)
 
22
  if upscale == "Yes":
23
  image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, generator=generator).images[0]
24
  upscaled = upscaler(Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0, generator=generator).images[0]
 
16
  upscaler.enable_xformers_memory_efficient_attention()
17
 
18
 
19
+ def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale):
20
+
21
+ generator = torch.Generator(device).manual_seed(seed)
22
+
23
  if upscale == "Yes":
24
  image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, generator=generator).images[0]
25
  upscaled = upscaler(Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0, generator=generator).images[0]