Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,10 @@ import gradio as gr
|
|
2 |
import spaces
|
3 |
import torch
|
4 |
from clip_slider_pipeline import CLIPSliderXL
|
5 |
-
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
|
6 |
|
7 |
-
|
8 |
-
flash_pipe = StableDiffusionXLPipeline.from_pretrained("sd-community/sdxl-flash").to("cuda", torch.float16)
|
9 |
flash_pipe.scheduler = EulerDiscreteScheduler.from_config(flash_pipe.scheduler.config)
|
10 |
clip_slider = CLIPSliderXL(flash_pipe, device=torch.device("cuda"), iterations=50)
|
11 |
|
|
|
2 |
import spaces
|
3 |
import torch
|
4 |
from clip_slider_pipeline import CLIPSliderXL
|
5 |
+
from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler, AutoencoderKL
|
6 |
|
7 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
8 |
+
flash_pipe = StableDiffusionXLPipeline.from_pretrained("sd-community/sdxl-flash", vae=vae).to("cuda", torch.float16)
|
9 |
flash_pipe.scheduler = EulerDiscreteScheduler.from_config(flash_pipe.scheduler.config)
|
10 |
clip_slider = CLIPSliderXL(flash_pipe, device=torch.device("cuda"), iterations=50)
|
11 |
|