Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse filesAdded SDXL VAE
app.py
CHANGED
|
@@ -6,8 +6,11 @@ from PIL import Image
|
|
| 6 |
from diffusers import DiffusionPipeline, StableDiffusionLatentUpscalePipeline
|
| 7 |
|
| 8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
upscaler = upscaler.to(device)
|
| 12 |
pipe = pipe.to(device)
|
| 13 |
|
|
|
|
| 6 |
from diffusers import DiffusionPipeline, StableDiffusionLatentUpscalePipeline
|
| 7 |
|
| 8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 9 |
+
|
| 10 |
+
vae = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", torch_dtype=torch.float16)
|
| 11 |
+
|
| 12 |
+
pipe = DiffusionPipeline.from_pretrained("dreamlike-art/dreamlike-photoreal-2.0", torch_dtype=torch.float16, safety_checker=None, vae=vae)
|
| 13 |
+
upscaler = StableDiffusionLatentUpscalePipeline.from_pretrained("stabilityai/sd-x2-latent-upscaler", torch_dtype=torch.float16, vae=vae)
|
| 14 |
upscaler = upscaler.to(device)
|
| 15 |
pipe = pipe.to(device)
|
| 16 |
|