Manjushri commited on
Commit
e923469
1 Parent(s): bb9a542

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -301,7 +301,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, re
301
  image = sdxl(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
302
  torch.cuda.empty_cache()
303
 
304
- if Model == 'Test':
305
 
306
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-fusionXL-v1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1")
307
  pipe.enable_xformers_memory_efficient_attention()
@@ -342,11 +342,11 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, re
342
 
343
  return image
344
 
345
- gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Anime', 'Disney', 'StoryBook', 'SemiReal', 'Animagine XL 3.0', 'SDXL 1.0', 'Test'], value='PhotoReal', label='Choose Model'),
346
  gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
347
  gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
348
- gr.Slider(512, 1024, 768, step=128, label='Height'),
349
- gr.Slider(512, 1024, 768, step=128, label='Width'),
350
  gr.Slider(1, maximum=15, value=5, step=.25, label='Guidance Scale'),
351
  gr.Slider(25, maximum=100, value=50, step=25, label='Number of Iterations'),
352
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
@@ -354,6 +354,6 @@ gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Anime', 'Disney', 'StoryB
354
  gr.Slider(minimum=.9, maximum=.99, value=.95, step=.01, label='Refiner Denoise Start %'),
355
  gr.Radio(["Yes", "No"], label = 'SD X2 Latent Upscaler?', value="No")],
356
  outputs=gr.Image(label='Generated Image'),
357
- title="Manju Dream Booth V1.7 with SDXL 1.0 Refiner and SD X2 Latent Upscaler - GPU",
358
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
359
  article = "If You Enjoyed this Demo and would like to Donate, you can send any amount to any of these Wallets. <br><br>SHIB (BEP20): 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>PayPal: https://www.paypal.me/ManjushriBodhisattva <br>ETH: 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>DOGE: D9QdVPtcU1EFH8jDC8jhU9uBcSTqUiA8h6<br><br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)
 
301
  image = sdxl(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
302
  torch.cuda.empty_cache()
303
 
304
+ if Model == 'FusionXL':
305
 
306
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-fusionXL-v1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1")
307
  pipe.enable_xformers_memory_efficient_attention()
 
342
 
343
  return image
344
 
345
+ gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Anime', 'Disney', 'StoryBook', 'SemiReal', 'Animagine XL 3.0', 'SDXL 1.0', 'FusionXL','Test'], value='PhotoReal', label='Choose Model'),
346
  gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
347
  gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
348
+ gr.Slider(512, 2048, 768, step=128, label='Height'),
349
+ gr.Slider(512, 2048, 768, step=128, label='Width'),
350
  gr.Slider(1, maximum=15, value=5, step=.25, label='Guidance Scale'),
351
  gr.Slider(25, maximum=100, value=50, step=25, label='Number of Iterations'),
352
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
 
354
  gr.Slider(minimum=.9, maximum=.99, value=.95, step=.01, label='Refiner Denoise Start %'),
355
  gr.Radio(["Yes", "No"], label = 'SD X2 Latent Upscaler?', value="No")],
356
  outputs=gr.Image(label='Generated Image'),
357
+ title="Manju Dream Booth V1.8 with SDXL 1.0 Refiner and SD X2 Latent Upscaler - GPU",
358
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
359
  article = "If You Enjoyed this Demo and would like to Donate, you can send any amount to any of these Wallets. <br><br>SHIB (BEP20): 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>PayPal: https://www.paypal.me/ManjushriBodhisattva <br>ETH: 0xbE8f2f3B71DFEB84E5F7E3aae1909d60658aB891 <br>DOGE: D9QdVPtcU1EFH8jDC8jhU9uBcSTqUiA8h6<br><br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)