Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
29 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
30 |
-
int_image = pipe(prompt,
|
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),
|