mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
Migrate workflow_templates/site into the frontend monorepo as apps/hub so the hub can use @comfyorg/design-system and shared packages. Changes to existing files: - pnpm-workspace.yaml: add @astrojs/sitemap, @astrojs/vercel, lucide-vue-next - eslint.config.ts: add hub ignores and i18n/import rule overrides - .oxlintrc.json: add hub scripts to ignore patterns - knip.config.ts: add hub workspace config apps/hub adaptations from source: - Replace local cn() with @comfyorg/tailwind-utils (19 files) - Integrate @comfyorg/design-system/css/base.css in global.css - Make TEMPLATES_DIR configurable via HUB_TEMPLATES_DIR env var - Add HUB_SKIP_SYNC flag for builds without template data - Remove Vite 8-incompatible rollupOptions.output.manualChunks - Fix stylelint violations (modern color notation, number precision) - Gitignore generated content (thumbnails, synced templates, AI cache)
1.6 KiB
1.6 KiB
VAE (Variational Autoencoder)
The VAE encodes pixel images into a compact latent representation and decodes latents back into pixel images. All diffusion in Stable Diffusion and Flux happens in latent space — the VAE is the bridge between the images you see and the mathematical space where the model actually works. Every generation workflow ends with a VAE decode step to produce a viewable image.
How It Works in ComfyUI
- Key nodes:
VAEDecode(latent → image),VAEEncode(image → latent),VAEDecodeTiled(for large images to avoid out-of-memory errors),VAELoader(load a standalone VAE file) - Typical workflow pattern: Most checkpoints include a built-in VAE, so the
VAEDecodenode can pull directly from the loaded checkpoint. To use a different VAE, add aVAELoadernode and connect it toVAEDecodeinstead.
Key Settings
- tile_size (for
VAEDecodeTiled): Size of each tile when decoding in chunks. Default is 512; reduce if you still encounter memory issues - VAE choice: VAE files are model-specific. Use
sdxl_vae.safetensorsfor SDXL,ae.safetensorsfor Flux. Place files inComfyUI/models/vae/
Tips
- If colors look washed out or slightly off, try loading an external VAE — the VAE baked into a checkpoint is not always optimal, especially for community fine-tunes
- Use
VAEDecodeTiledfor images larger than ~2048 px on either side to prevent out-of-memory crashes - SDXL and Flux each have their own VAE architecture — using the wrong one will produce corrupted output
- When doing img2img or inpainting, the
VAEEncodenode converts your input image into the latent space the model expects