Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdded Bells and Whistles
app.py
CHANGED
@@ -11,7 +11,7 @@ upscaler = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-
|
|
11 |
upscaler = upscaler.to(device)
|
12 |
pipe = pipe.to(device)
|
13 |
|
14 |
-
def genie (Prompt, negative_prompt, scale, steps,
|
15 |
generator = torch.Generator(device=device).manual_seed(Seed)
|
16 |
if upscale == "Yes":
|
17 |
low_res_latents = pipe(Prompt, negative_prompt=negative_prompt, num_inference_steps=steps, guidance_scale=scale, generator=generator, output_type="latent").images
|
@@ -22,12 +22,17 @@ def genie (Prompt, negative_prompt, scale, steps, Seed, upscale, upscale_iter):
|
|
22 |
|
23 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
24 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
25 |
-
gr.Slider(
|
26 |
-
gr.Slider(
|
27 |
-
gr.Slider(
|
|
|
|
|
28 |
gr.Radio(["Yes", "No"], label='Upscale?'),
|
29 |
-
gr.
|
30 |
-
|
|
|
|
|
|
|
31 |
],
|
32 |
outputs=gr.Image(label='Generated Image'),
|
33 |
title="PhotoReal V2 with SD x2 Upscaler - GPU",
|
|
|
11 |
upscaler = upscaler.to(device)
|
12 |
pipe = pipe.to(device)
|
13 |
|
14 |
+
def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale, upscale_prompt, upscale_neg, upscale_scale, upscale_steps):
|
15 |
generator = torch.Generator(device=device).manual_seed(Seed)
|
16 |
if upscale == "Yes":
|
17 |
low_res_latents = pipe(Prompt, negative_prompt=negative_prompt, num_inference_steps=steps, guidance_scale=scale, generator=generator, output_type="latent").images
|
|
|
22 |
|
23 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
24 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
25 |
+
gr.Slider(512, 1024, 768, step=128, label='Height'),
|
26 |
+
gr.Slider(512, 1024, 768, step=128, label='Width'),
|
27 |
+
gr.Slider(1, maximum=15, value=10, step=.25),
|
28 |
+
gr.Slider(25, maximum=100, value=50, step=25),
|
29 |
+
gr.Slider(minimum=1, step=1, maximum=9999999999999999, randomize=True),
|
30 |
gr.Radio(["Yes", "No"], label='Upscale?'),
|
31 |
+
gr.Textbox(label='Upscaler Prompt: Optional'),
|
32 |
+
gr.Textbox(label='Upscaler Negative Prompt: Both Optional And Experimental'),
|
33 |
+
gr.Slider(minimum=0, maximum=15, value=0, step=1, label='Upscale Guidance Scale'),
|
34 |
+
gr.Slider(minimum=5, maximum=25, value=5, step=5, label='Upscaler Iterations')],
|
35 |
+
|
36 |
],
|
37 |
outputs=gr.Image(label='Generated Image'),
|
38 |
title="PhotoReal V2 with SD x2 Upscaler - GPU",
|