ComfyUI Node
π¦ RS Image to Latent
Converts any image to latent with automatic size optimization for models
π¦ 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)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to convert to latent | |
| vae | VAE | VAE model for encoding (auto-detects divisibility) | |
| mode | COMBO | auto | Size selection mode: - auto: Preserve image size with minimal rounding - preset: Use predefined resolution - custom: Manually enter width/height - megapixels: Set target megapixels |
| preset | COMBO | Square - 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 |
| width | INT | 102464β4096 | β |
| height | INT | 102464β4096 | β |
| megapixels | FLOAT | 1.00.1β16 | β |
| aspect_ratio | COMBO | 1:1 | 9 options: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, +3 |
| divisibility_mode | COMBO | auto | Divisibility requirement (auto = detect from VAE) |
| upscale_method | COMBO | lanczos | 4 options: lanczos, bilinear, nearest-exact, bicubic |
| rounding_mode | COMBO | auto | How to adjust size for divisibility: - auto: pick nearest valid size - shrink: only reduce (never increase) - expand: only increase (never reduce) |
| batch_size | INT | 11β64 | Number of identical latents in batch (useful for batch processing) |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | β |
| width_px | INT | β |
| height_px | INT | β |
| width_latent | INT | β |
| height_latent | INT | β |