Nodes/ComfyUI_RaykoStudio/🦊 RS Image to Latent
ComfyUI Node

🦊 RS Image to Latent

Converts any image to latent with automatic size optimization for models

By RaykosanΒ·Created about a year agoΒ·Updated 23 days agoΒ· 72
🦊 RS Image to Latent
  • image
  • vae
  • latent
  • width_px
  • height_px
  • width_latent
  • height_latent
β—„modeautoβ–Ί
β—„presetSquare - 1024x1024 (1:1)β–Ί
β—„width1024β–Ί
β—„height1024β–Ί
β—„megapixels1.0β–Ί
β—„aspect_ratio1:1β–Ί
β—„divisibility_modeautoβ–Ί
β—„upscale_methodlanczosβ–Ί
β—„rounding_modeautoβ–Ί
β—„batch_size1β–Ί
Category🦊 RaykoStudio

Inputs (12)

NameTypeDefaultDescription
imageIMAGEInput image to convert to latent
vaeVAEVAE model for encoding (auto-detects divisibility)
modeCOMBOautoSize selection mode: - auto: Preserve image size with minimal rounding - preset: Use predefined resolution - custom: Manually enter width/height - megapixels: Set target megapixels
presetCOMBOSquare - 1024x1024 (1:1)54 options: Square - 512x512 (1:1), Square - 640x640 (1:1), Square - 768x768 (1:1), Square - 1024x1024 (1:1), Square - 1280x1280 (1:1), Square - 1536x1536 (1:1), +48
widthINT102464–4096β€”
heightINT102464–4096β€”
megapixelsFLOAT1.00.1–16β€”
aspect_ratioCOMBO1:19 options: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, +3
divisibility_modeCOMBOautoDivisibility requirement (auto = detect from VAE)
upscale_methodCOMBOlanczos4 options: lanczos, bilinear, nearest-exact, bicubic
rounding_modeCOMBOautoHow to adjust size for divisibility: - auto: pick nearest valid size - shrink: only reduce (never increase) - expand: only increase (never reduce)
batch_sizeINT11–64Number of identical latents in batch (useful for batch processing)

Outputs (5)

NameTypeDescription
latentLATENTβ€”
width_pxINTβ€”
height_pxINTβ€”
width_latentINTβ€”
height_latentINTβ€”