Manjushri commited on
Commit
ad4bf66
1 Parent(s): 9d351e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -20,18 +20,18 @@ torch.cuda.empty_cache()
20
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
21
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
22
  #generator=np.random.seed(0)
23
- image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
24
  #image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
25
  torch.cuda.empty_cache()
26
 
27
  return image
28
 
29
- gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
30
- gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
31
  gr.Slider(512, 1536, 1024, step=128, label='Height'),
32
  gr.Slider(512, 1536, 1024, step=128, label='Width'),
33
- gr.Slider(.5, maximum=15, value=7, step=.25, label='Guidance Scale'),
34
- gr.Slider(10, maximum=50, value=25, step=5, label='Number of Prior Iterations'),
35
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random')],
36
  outputs=gr.Image(label='Generated Image'),
37
  title="Manju Dream Booth V3.0 with Stable Diffusion 3.5-Medium - GPU",
 
20
  def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
21
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
22
  #generator=np.random.seed(0)
23
+ image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, max_sequence_length=512).images[0]
24
  #image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
25
  torch.cuda.empty_cache()
26
 
27
  return image
28
 
29
+ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 512 Token Limit.'),
30
+ gr.Textbox(label='What you Do Not want the AI to generate. 512 Token Limit'),
31
  gr.Slider(512, 1536, 1024, step=128, label='Height'),
32
  gr.Slider(512, 1536, 1024, step=128, label='Width'),
33
+ gr.Slider(.5, maximum=15, value=5, step=.25, label='Guidance Scale'),
34
+ gr.Slider(10, maximum=60, value=28, step=2, label='Number of Iterations'),
35
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random')],
36
  outputs=gr.Image(label='Generated Image'),
37
  title="Manju Dream Booth V3.0 with Stable Diffusion 3.5-Medium - GPU",