Thafx commited on
Commit
1aaabc3
1 Parent(s): 2b98ab4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -8,7 +8,7 @@ if torch.cuda.is_available():
8
  PYTORCH_CUDA_ALLOC_CONF={'max_split_size_mb': 6000}
9
  torch.cuda.max_memory_allocated(device=device)
10
  torch.cuda.empty_cache()
11
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
12
  pipe.enable_xformers_memory_efficient_attention()
13
  pipe = pipe.to(device)
14
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
@@ -18,7 +18,7 @@ if torch.cuda.is_available():
18
  refiner.enable_sequential_cpu_offload()
19
  refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
20
  else:
21
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", use_safetensors=True)
22
  pipe = pipe.to(device)
23
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
24
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
@@ -44,4 +44,5 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
44
  outputs='image',
45
  title="Stable Diffusion XL 1.0 CPU or GPU",
46
  description="SDXL 1.0 CPU or GPU. Currently running on CPU. <br><br><b>WARNING:</b> Extremely Slow. 65s/Iteration. Expect 25-50mins an image for 25-50 iterations respectively. This model is capable of producing NSFW (Softcore) images.",
47
- 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)
 
 
8
  PYTORCH_CUDA_ALLOC_CONF={'max_split_size_mb': 6000}
9
  torch.cuda.max_memory_allocated(device=device)
10
  torch.cuda.empty_cache()
11
+ pipe = DiffusionPipeline.from_pretrained("SG161222/RealVisXL_V1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
12
  pipe.enable_xformers_memory_efficient_attention()
13
  pipe = pipe.to(device)
14
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
 
18
  refiner.enable_sequential_cpu_offload()
19
  refiner.unet = torch.compile(refiner.unet, mode="reduce-overhead", fullgraph=True)
20
  else:
21
+ pipe = DiffusionPipeline.from_pretrained("SG161222/RealVisXL_V1.0", use_safetensors=True)
22
  pipe = pipe.to(device)
23
  pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
24
  refiner = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", use_safetensors=True)
 
44
  outputs='image',
45
  title="Stable Diffusion XL 1.0 CPU or GPU",
46
  description="SDXL 1.0 CPU or GPU. Currently running on CPU. <br><br><b>WARNING:</b> Extremely Slow. 65s/Iteration. Expect 25-50mins an image for 25-50 iterations respectively. This model is capable of producing NSFW (Softcore) images.",
47
+ article = "If You Enjoyed this Demo and would like to Donate, you can send to any of these Wallets.
48
+ <br>Code Monkey: <a href="https://huggingface.co/Thafx\"><Thafx</a>").launch(debug=True, max_threads=80)