Manjushri commited on
Commit
571b468
1 Parent(s): b2007fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -25,16 +25,16 @@ else:
25
  #refiner = refiner.to(device)
26
  #refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
27
 
28
- def genie (prompt, height, width, steps, seed):
29
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
30
- int_image = pipe(prompt, height=height, width=width, num_inference_steps=steps, num_images_per_prompt=1, generator=generator, guidance_scale=0.0).images[0]
31
  #image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image, denoising_start=high_noise_frac).images[0]
32
  return int_image
33
 
34
  gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
35
  gr.Textbox(label='What you Do Not want the AI to generate.'),
36
- gr.Slider(512, 1024, 768, step=128, label='Height'),
37
- gr.Slider(512, 1024, 768, step=128, label='Width'),
38
  #gr.Slider(1, 15, 10, label='Guidance Scale'),
39
  gr.Slider(1, maximum=5, value=2, step=1, label='Number of Iterations'),
40
  gr.Slider(minimum=1, step=1, maximum=999999999999999999, randomize=True),
 
25
  #refiner = refiner.to(device)
26
  #refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
27
 
28
+ def genie (prompt, steps, seed):
29
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
30
+ int_image = pipe(prompt, num_inference_steps=steps, generator=generator, guidance_scale=0.0).images[0]
31
  #image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image, denoising_start=high_noise_frac).images[0]
32
  return int_image
33
 
34
  gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
35
  gr.Textbox(label='What you Do Not want the AI to generate.'),
36
+ #gr.Slider(512, 1024, 768, step=128, label='Height'),
37
+ #gr.Slider(512, 1024, 768, step=128, label='Width'),
38
  #gr.Slider(1, 15, 10, label='Guidance Scale'),
39
  gr.Slider(1, maximum=5, value=2, step=1, label='Number of Iterations'),
40
  gr.Slider(minimum=1, step=1, maximum=999999999999999999, randomize=True),