Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -18,12 +18,12 @@ def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale,
|
|
18 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
19 |
if upscale == "Yes":
|
20 |
#n_steps = 30
|
21 |
-
int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images
|
22 |
image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=high_noise_frac).images[0]
|
23 |
-
return
|
24 |
else:
|
25 |
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
|
26 |
-
return
|
27 |
|
28 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
29 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
@@ -33,8 +33,8 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
|
|
33 |
gr.Slider(25, maximum=100, value=50, step=25, label='Number of Iterations'),
|
34 |
gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
|
35 |
gr.Radio(["Yes", "No"], label='SDXL 1.0 Refiner', value='No'),
|
36 |
-
gr.Slider(minimum=.7, maximum=.99, value=.8, step=.01, label='Refiner Denoise %')],
|
37 |
-
outputs=
|
38 |
-
title="PhotoReal V3.6 with
|
39 |
description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
|
40 |
article = "If You Enjoyed this Demo and would like to Donate, you can send to any of these Wallets. <br>BTC: bc1qzdm9j73mj8ucwwtsjx4x4ylyfvr6kp7svzjn84 <br>3LWRoKYx6bCLnUrKEdnPo3FCSPQUSFDjFP <br>DOGE: DK6LRc4gfefdCTRk9xPD239N31jh9GjKez <br>SHIB (BEP20): 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>PayPal: https://www.paypal.me/ManjushriBodhisattva <br>ETH: 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)
|
|
|
18 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
19 |
if upscale == "Yes":
|
20 |
#n_steps = 30
|
21 |
+
int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type='latent').images
|
22 |
image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=high_noise_frac).images[0]
|
23 |
+
return image
|
24 |
else:
|
25 |
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
|
26 |
+
return image
|
27 |
|
28 |
gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
|
29 |
gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
|
|
|
33 |
gr.Slider(25, maximum=100, value=50, step=25, label='Number of Iterations'),
|
34 |
gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
|
35 |
gr.Radio(["Yes", "No"], label='SDXL 1.0 Refiner', value='No'),
|
36 |
+
gr.Slider(minimum=.7, maximum=.99, value=.8, step=.01, label='Refiner Denoise Start %')],
|
37 |
+
outputs=gr.Image(label='Generated Image'),
|
38 |
+
title="PhotoReal V3.6 with SDXL 1.0 Refiner - GPU",
|
39 |
description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
|
40 |
article = "If You Enjoyed this Demo and would like to Donate, you can send to any of these Wallets. <br>BTC: bc1qzdm9j73mj8ucwwtsjx4x4ylyfvr6kp7svzjn84 <br>3LWRoKYx6bCLnUrKEdnPo3FCSPQUSFDjFP <br>DOGE: DK6LRc4gfefdCTRk9xPD239N31jh9GjKez <br>SHIB (BEP20): 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>PayPal: https://www.paypal.me/ManjushriBodhisattva <br>ETH: 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)
|