Update app.py
Browse files
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("
|
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("
|
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.
|
|
|
|
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)
|