Bug Report: Incorrect VAE Used in Pipeline
π Bug Report: Incorrect VAE Used in Pipeline
Title: Fix default VAE: Use AutoencoderKL
instead of AutoencoderTiny
Repository: FLUX.1-Krea-dev-Pinokio
π Description
The app currently loads a high-quality AutoencoderKL
from the FLUX.1-Krea-dev
model, but uses taef1
(AutoencoderTiny
) as the VAE in the pipeline by default.
This causes:
- Noticeable drop in image quality
- Runtime warning:
Expected types for vae: (<class 'AutoencoderKL'>,), got <class 'AutoencoderTiny'>.
- Wasted memory (loading two VAEs)
- Misalignment with expected FLUX.1-level output quality
π Root Cause
In app.py
, the pipeline is initialized with taef1
(a low-fidelity decoder), even though a full AutoencoderKL
is available:
pipe = DiffusionPipeline.from_pretrained("PierrunoYT/FLUX.1-Krea-dev", ..., vae=taef1)
But taef1
is not appropriate for high-quality generation.
β Expected Behavior
By default, the pipeline should use the included AutoencoderKL
for accurate, high-fidelity image reconstruction.
π‘ Solution
Update the pipeline to use the correct VAE:
pipe = DiffusionPipeline.from_pretrained(
"PierrunoYT/FLUX.1-Krea-dev",
torch_dtype=dtype,
vae=good_vae # β AutoencoderKL (high quality), not taef1
).to(device)
π οΈ Suggested Fix
Replace this line:
pipe = DiffusionPipeline.from_pretrained(..., vae=taef1)
With:
pipe = DiffusionPipeline.from_pretrained(..., vae=good_vae)
Optionally, remove loading taef1
unless offering a "fast decode" mode.
π Impact
- β Higher image quality
- β No more VAE type mismatch warnings
- β Better utilization of the trained model
Thank you for your excellent work on bringing FLUX.1-Krea-dev to Pinokio!
This small fix ensures users get the full quality they expect.
β One-sentence summary for maintainers:
The pipeline currently usesAutoencoderTiny
(taef1
) instead of the higher-qualityAutoencoderKL
available in the model, reducing output fidelity.
Let me know if you'd like a pull request (PR) for this fix β I can write the exact code change for app.py
.