Spaces:
Runtime error
Runtime error
add vae
Browse files
app.py
CHANGED
@@ -11,6 +11,10 @@ model_id = "segmind/Segmind-Vega"
|
|
11 |
adapter_id = "segmind/Segmind-VegaRT"
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
pipe = AutoPipelineForImage2Image.from_pretrained(model_id, torch_dtype=torch.float16) if torch.cuda.is_available() else AutoPipelineForImage2Image.from_pretrained(model_id)
|
|
|
|
|
|
|
|
|
14 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
15 |
|
16 |
pipe = pipe.to(device)
|
|
|
11 |
adapter_id = "segmind/Segmind-VegaRT"
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
pipe = AutoPipelineForImage2Image.from_pretrained(model_id, torch_dtype=torch.float16) if torch.cuda.is_available() else AutoPipelineForImage2Image.from_pretrained(model_id)
|
14 |
+
pipe.vae = AutoencoderTiny.from_pretrained(
|
15 |
+
"madebyollin/taesd",
|
16 |
+
use_safetensors=True,
|
17 |
+
)
|
18 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
19 |
|
20 |
pipe = pipe.to(device)
|