Manjushri commited on
Commit
2c339b8
1 Parent(s): e64da99

Update app.py

Browse files

Updating info and title

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -14,7 +14,7 @@ torch.cuda.empty_cache()
14
 
15
  def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, upscale, high_noise_frac):
16
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
17
- if Model == "Real":
18
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1")
19
  pipe = pipe.to(device)
20
  pipe.enable_xformers_memory_efficient_attention()
@@ -59,7 +59,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, up
59
  torch.cuda.empty_cache()
60
  return image
61
 
62
- if Model == "Story":
63
  story = DiffusionPipeline.from_pretrained("circulus/canvers-story-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-story-v3.8.1")
64
  story = story.to(device)
65
  story.enable_xformers_memory_efficient_attention()
@@ -74,7 +74,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, up
74
  torch.cuda.empty_cache()
75
  return image
76
 
77
- if Model == "Semi":
78
  semi = DiffusionPipeline.from_pretrained("circulus/canvers-semi-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-semi-v3.8.1")
79
  semi = semi.to(device)
80
  semi.enable_xformers_memory_efficient_attention()
@@ -90,7 +90,7 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, up
90
 
91
  return image
92
 
93
- gr.Interface(fn=genie, inputs=[gr.Radio(['Real', 'Anime', 'Disney', 'Story', 'Semi'], value='Real', label='Choose Canvers Model'),
94
  gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
95
  gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
96
  gr.Slider(512, 1024, 768, step=128, label='Height'),
@@ -101,6 +101,6 @@ gr.Interface(fn=genie, inputs=[gr.Radio(['Real', 'Anime', 'Disney', 'Story', 'Se
101
  gr.Radio(["Yes", "No"], label='SDXL 1.0 Refiner: Use if the Image has too much Noise', value='No'),
102
  gr.Slider(minimum=.9, maximum=.99, value=.95, step=.01, label='Refiner Denoise Start %')],
103
  outputs=gr.Image(label='Generated Image'),
104
- title="Canvers Dream Booth V3.8.1 with SDXL 1.0 Refiner - GPU",
105
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
106
  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)
 
14
 
15
  def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed, upscale, high_noise_frac):
16
  generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
17
+ if Model == "PhotoReal":
18
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-real-v3.8.1")
19
  pipe = pipe.to(device)
20
  pipe.enable_xformers_memory_efficient_attention()
 
59
  torch.cuda.empty_cache()
60
  return image
61
 
62
+ if Model == "StoryBook":
63
  story = DiffusionPipeline.from_pretrained("circulus/canvers-story-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-story-v3.8.1")
64
  story = story.to(device)
65
  story.enable_xformers_memory_efficient_attention()
 
74
  torch.cuda.empty_cache()
75
  return image
76
 
77
+ if Model == "SemiReal":
78
  semi = DiffusionPipeline.from_pretrained("circulus/canvers-semi-v3.8.1", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("circulus/canvers-semi-v3.8.1")
79
  semi = semi.to(device)
80
  semi.enable_xformers_memory_efficient_attention()
 
90
 
91
  return image
92
 
93
+ gr.Interface(fn=genie, inputs=[gr.Radio(['PhotoReal', 'Anime', 'Disney', 'StoryBook', 'SemiReal'], value='Real', label='Choose Canvers Model'),
94
  gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
95
  gr.Textbox(label='What you Do Not want the AI to generate. 77 Token Limit'),
96
  gr.Slider(512, 1024, 768, step=128, label='Height'),
 
101
  gr.Radio(["Yes", "No"], label='SDXL 1.0 Refiner: Use if the Image has too much Noise', value='No'),
102
  gr.Slider(minimum=.9, maximum=.99, value=.95, step=.01, label='Refiner Denoise Start %')],
103
  outputs=gr.Image(label='Generated Image'),
104
+ title="Manju Dream Booth V3.8.1 with SDXL 1.0 Refiner - GPU",
105
  description="<br><br><b/>Warning: This Demo is capable of producing NSFW content.",
106
  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)