Manjushri commited on
Commit
4267b27
·
verified ·
1 Parent(s): 3505da7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -23,8 +23,8 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed):
23
  torch.cuda.empty_cache()
24
  return image
25
 
26
- if Model == "Animagine XL 3.0":
27
- animagine = DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.0", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.0")
28
  animagine.enable_xformers_memory_efficient_attention()
29
  animagine = animagine.to(device)
30
  torch.cuda.empty_cache()
@@ -36,7 +36,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed):
36
 
37
  return image
38
 
39
- gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Animagine XL 3.0',], value='PhotoReal', label='Choose Model'),
40
  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, 1024, 768, step=128, label='Height'),
@@ -46,6 +46,6 @@ gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Animagine XL 3.0',], valu
46
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
47
  ],
48
  outputs=gr.Image(label='Generated Image'),
49
- title="Manju Dream Booth V2.2 - GPU",
50
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
51
  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: DL5qRkGCzB2ENBKfEhHarvKm1qas3wyHx7<br><br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)
 
23
  torch.cuda.empty_cache()
24
  return image
25
 
26
+ if Model == "Animagine XL 3.1":
27
+ animagine = DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-3.0")
28
  animagine.enable_xformers_memory_efficient_attention()
29
  animagine = animagine.to(device)
30
  torch.cuda.empty_cache()
 
36
 
37
  return image
38
 
39
+ gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Animagine XL 3.1',], value='PhotoReal', label='Choose Model'),
40
  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, 1024, 768, step=128, label='Height'),
 
46
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed: 0 is Random'),
47
  ],
48
  outputs=gr.Image(label='Generated Image'),
49
+ title="Manju Dream Booth V2.3 - GPU",
50
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
51
  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: DL5qRkGCzB2ENBKfEhHarvKm1qas3wyHx7<br><br>Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=80)