Spaces:
Running on Zero
Running on Zero
Commit ·
c4a367a
1
Parent(s): 5762a81
Fix AsianRealistic rainbow noise: override VAE with sd-vae-ft-mse (#20)
Browse files- Fix AsianRealistic rainbow noise: override VAE with sd-vae-ft-mse (66482eb213c52c965c34ad2ea91a9d429b4ea7d3)
Co-authored-by: pormungtailaw <pormungtai@users.noreply.huggingface.co>
- models.json +1 -0
- pipeline_manager.py +6 -0
models.json
CHANGED
|
@@ -66,6 +66,7 @@
|
|
| 66 |
"type": "checkpoint",
|
| 67 |
"repo_id": "stablediffusionapi/asianrealisticsdlifechias",
|
| 68 |
"single_file_url": null,
|
|
|
|
| 69 |
"preview": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/9c67da8b-5e57-413c-a5ca-135f5ed9af18/width=450/1743066.jpeg",
|
| 70 |
"trigger": "",
|
| 71 |
"clip_skip": 2,
|
|
|
|
| 66 |
"type": "checkpoint",
|
| 67 |
"repo_id": "stablediffusionapi/asianrealisticsdlifechias",
|
| 68 |
"single_file_url": null,
|
| 69 |
+
"vae": "stabilityai/sd-vae-ft-mse",
|
| 70 |
"preview": "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/9c67da8b-5e57-413c-a5ca-135f5ed9af18/width=450/1743066.jpeg",
|
| 71 |
"trigger": "",
|
| 72 |
"clip_skip": 2,
|
pipeline_manager.py
CHANGED
|
@@ -262,6 +262,12 @@ def _build_base_pipeline(cfg):
|
|
| 262 |
except Exception as e: # noqa
|
| 263 |
print(f"[lora] fuse skipped: {e}")
|
| 264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
# SD1.5 / SDXL community checkpoints are tuned for the Euler Ancestral sampler;
|
| 266 |
# it matches the look people get in A1111 / ComfyUI far better than the default.
|
| 267 |
if base in ("sd15", "sdxl"):
|
|
|
|
| 262 |
except Exception as e: # noqa
|
| 263 |
print(f"[lora] fuse skipped: {e}")
|
| 264 |
|
| 265 |
+
# Optional VAE override — some merged checkpoints ship a broken fp16 VAE that
|
| 266 |
+
# decodes to rainbow noise; a known-good VAE fixes it.
|
| 267 |
+
if cfg.get("vae"):
|
| 268 |
+
from diffusers import AutoencoderKL
|
| 269 |
+
pipe.vae = AutoencoderKL.from_pretrained(cfg["vae"], torch_dtype=DTYPE_SD)
|
| 270 |
+
|
| 271 |
# SD1.5 / SDXL community checkpoints are tuned for the Euler Ancestral sampler;
|
| 272 |
# it matches the look people get in A1111 / ComfyUI far better than the default.
|
| 273 |
if base in ("sd15", "sdxl"):
|