Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ import spaces
|
|
| 12 |
import torch
|
| 13 |
from diffusers import AutoencoderKL, DiffusionPipeline
|
| 14 |
|
| 15 |
-
DESCRIPTION = "#
|
| 16 |
if not torch.cuda.is_available():
|
| 17 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 18 |
|
|
@@ -27,12 +27,13 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
| 27 |
if torch.cuda.is_available():
|
| 28 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
| 29 |
pipe = DiffusionPipeline.from_pretrained(
|
| 30 |
-
"
|
| 31 |
vae=vae,
|
| 32 |
torch_dtype=torch.float16,
|
| 33 |
use_safetensors=True,
|
| 34 |
variant="fp16",
|
| 35 |
)
|
|
|
|
| 36 |
if ENABLE_REFINER:
|
| 37 |
refiner = DiffusionPipeline.from_pretrained(
|
| 38 |
"stabilityai/stable-diffusion-xl-refiner-1.0",
|
|
@@ -130,8 +131,7 @@ def generate(
|
|
| 130 |
|
| 131 |
|
| 132 |
examples = [
|
| 133 |
-
"
|
| 134 |
-
"An astronaut riding a green horse",
|
| 135 |
]
|
| 136 |
|
| 137 |
with gr.Blocks(css="style.css") as demo:
|
|
|
|
| 12 |
import torch
|
| 13 |
from diffusers import AutoencoderKL, DiffusionPipeline
|
| 14 |
|
| 15 |
+
DESCRIPTION = "# RussianVibe XL 1.0"
|
| 16 |
if not torch.cuda.is_available():
|
| 17 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
| 18 |
|
|
|
|
| 27 |
if torch.cuda.is_available():
|
| 28 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
| 29 |
pipe = DiffusionPipeline.from_pretrained(
|
| 30 |
+
"0x7o/RussianVibe-XL-v1.0",
|
| 31 |
vae=vae,
|
| 32 |
torch_dtype=torch.float16,
|
| 33 |
use_safetensors=True,
|
| 34 |
variant="fp16",
|
| 35 |
)
|
| 36 |
+
pipeline.load_lora_weights("0x7o/RussianVibe-XL-v1.0")
|
| 37 |
if ENABLE_REFINER:
|
| 38 |
refiner = DiffusionPipeline.from_pretrained(
|
| 39 |
"stabilityai/stable-diffusion-xl-refiner-1.0",
|
|
|
|
| 131 |
|
| 132 |
|
| 133 |
examples = [
|
| 134 |
+
"The sun is setting through a window, casting a warm glow on the cityscape beyond. The sun casts a warm orange glow on the buildings in the distance, creating a beautiful and serene atmosphere.",
|
|
|
|
| 135 |
]
|
| 136 |
|
| 137 |
with gr.Blocks(css="style.css") as demo:
|