Files
ComfyUI_frontend/apps/hub/knowledge/concepts/upscaling.md
dante01yoon bbd0a6b201 feat: migrate workflow template site as apps/hub
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)
2026-04-06 20:53:13 +09:00

1.7 KiB
Raw Blame History

Upscaling

Upscaling increases image resolution while adding detail, turning a small generated image into a large, sharp result. In ComfyUI, there are two main approaches: model-based upscaling, which uses trained AI models (like RealESRGAN or 4x-UltraSharp) to intelligently enlarge an image in one pass, and latent-based upscaling, which works in latent space with a KSampler to add new detail during the enlargement process. Model-based is faster, while latent-based offers more creative control.

How It Works in ComfyUI

  • Key nodes involved: UpscaleModelLoader, ImageUpscaleWithModel, ImageScaleBy, LatentUpscale, VAEDecodeTiled
  • Typical workflow pattern: Generate image → Upscale model loader → ImageUpscaleWithModel → Save image (model-based), or Generate latent → LatentUpscale → KSampler (lower denoise) → VAEDecode → Save image (latent-based)

Key Settings

  • Upscale model: The AI model used for model-based upscaling. RealESRGAN_x4plus is a reliable general-purpose choice; 4x-UltraSharp excels at photo-realistic detail.
  • Scale factor: How much to enlarge — 2x and 4x are typical. Higher factors increase VRAM usage significantly.
  • tile_size: For tiled decoding/encoding of very large images. Range 5121024; smaller tiles use less VRAM but take longer.

Tips

  • Model-based upscaling is faster but less creative; latent upscaling paired with a KSampler adds genuinely new detail.
  • Use VAEDecodeTiled for very large images to avoid out-of-memory errors.
  • Chain two 2x upscales instead of one 4x for better overall quality.
  • When using latent upscaling, set KSampler denoise to 0.30.5 to add detail without changing the composition.