Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,14 +18,14 @@ upscaler.enable_xformers_memory_efficient_attention()
|
|
18 |
|
19 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale):
|
20 |
|
21 |
-
generator = torch.
|
22 |
-
|
23 |
if upscale == "Yes":
|
24 |
-
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale
|
25 |
-
upscaled = upscaler(Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0
|
26 |
return (image, upscaled)
|
27 |
else:
|
28 |
-
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale
|
29 |
return (image, image)
|
30 |
|
31 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
|
|
18 |
|
19 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale):
|
20 |
|
21 |
+
generator = torch.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).images[0]
|
25 |
+
upscaled = upscaler(Prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0).images[0]
|
26 |
return (image, upscaled)
|
27 |
else:
|
28 |
+
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
|
29 |
return (image, image)
|
30 |
|
31 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|