neil-code commited on
Commit
b941568
1 Parent(s): 0a9138d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -7,6 +7,7 @@ from diffusers import DiffusionPipeline
7
  device = "cuda" if torch.cuda.is_available() else "cpu"
8
 
9
  if torch.cuda.is_available():
 
10
  torch.cuda.max_memory_allocated(device=device)
11
  torch.cuda.empty_cache()
12
  pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
@@ -14,6 +15,7 @@ if torch.cuda.is_available():
14
  pipe = pipe.to(device)
15
  torch.cuda.empty_cache()
16
  else:
 
17
  pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", use_safetensors=True)
18
  pipe = pipe.to(device)
19
 
@@ -27,6 +29,6 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
27
  gr.Slider(minimum=0, step=1, maximum=999999999999999999, randomize=True),
28
  ],
29
  outputs='image',
30
- title="Stable Diffusion Turbo CPU or GPU",
31
- description="SDXL Turbo CPU or GPU. Currently running on CPU. <br><br><b>WARNING: This model is capable of producing NSFW (Softcore) images.</b>",
32
- 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)
 
7
  device = "cuda" if torch.cuda.is_available() else "cpu"
8
 
9
  if torch.cuda.is_available():
10
+ print("cuda")
11
  torch.cuda.max_memory_allocated(device=device)
12
  torch.cuda.empty_cache()
13
  pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
 
15
  pipe = pipe.to(device)
16
  torch.cuda.empty_cache()
17
  else:
18
+ print("cpu")
19
  pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", use_safetensors=True)
20
  pipe = pipe.to(device)
21
 
 
29
  gr.Slider(minimum=0, step=1, maximum=999999999999999999, randomize=True),
30
  ],
31
  outputs='image',
32
+ title="Stable Diffusion Turbo",
33
+ description="SDXL Turbo. <br><br><b>WARNING: This model is capable of producing NSFW (Softcore) images.</b>",
34
+ article = "Hosted on gitee-ai").launch(debug=True, max_threads=80)