Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,6 @@ def genie (Prompt, negative_prompt, height, width, scale, steps, d_steps, seed):
|
|
28 |
guidance_scale=scale,
|
29 |
num_images_per_prompt=1,
|
30 |
num_inference_steps=steps)
|
31 |
-
#torch.cuda.empty_cache()
|
32 |
image=decoder(
|
33 |
image_embeddings=prior_image.image_embeddings.to(torch.float16),
|
34 |
prompt=Prompt,
|
@@ -36,13 +35,12 @@ def genie (Prompt, negative_prompt, height, width, scale, steps, d_steps, seed):
|
|
36 |
guidance_scale=0.0,
|
37 |
output_type="pil",
|
38 |
num_inference_steps=d_steps).images[0]
|
39 |
-
#torch.cuda.empty_cache()
|
40 |
return image
|
41 |
|
42 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
43 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
44 |
-
gr.Slider(512,
|
45 |
-
gr.Slider(512,
|
46 |
gr.Slider(.5, maximum=10, value=3, step=.25, label='Guidance Scale'),
|
47 |
gr.Slider(10, maximum=40, value=20, step=5, label='Number of Prior Iterations'),
|
48 |
gr.Slider(5, maximum=20, value=10, step=5, label="Number of Decoder Iterations"),
|
|
|
28 |
guidance_scale=scale,
|
29 |
num_images_per_prompt=1,
|
30 |
num_inference_steps=steps)
|
|
|
31 |
image=decoder(
|
32 |
image_embeddings=prior_image.image_embeddings.to(torch.float16),
|
33 |
prompt=Prompt,
|
|
|
35 |
guidance_scale=0.0,
|
36 |
output_type="pil",
|
37 |
num_inference_steps=d_steps).images[0]
|
|
|
38 |
return image
|
39 |
|
40 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
41 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
42 |
+
gr.Slider(512, 2048, 1024, step=128, label='Height'),
|
43 |
+
gr.Slider(512, 2048, 1024, step=128, label='Width'),
|
44 |
gr.Slider(.5, maximum=10, value=3, step=.25, label='Guidance Scale'),
|
45 |
gr.Slider(10, maximum=40, value=20, step=5, label='Number of Prior Iterations'),
|
46 |
gr.Slider(5, maximum=20, value=10, step=5, label="Number of Decoder Iterations"),
|