ComfyUI Node
Qwen Image Edit Latent Krs
A ComfyUI node in utils with 22 inputs and 4 outputs.
Qwen Image Edit Latent Krs
- image
- model
- vae
- preview
- latent
- viz_image
- padded_image
◄width_latent1024►
◄height_latent1024►
◄locked_axiswidth►
◄snap_modemultiple_of_16►
◄use_exact_input_dimsfalse►
◄use_target_megapixelsfalse►
◄target_megapixels1.00►
◄fit_modepad_only►
◄snap_strategynearest►
◄background_colorgray►
◄latent_scale8►
◄latent_channels4►
◄latent_modezeros►
◄latent_seed-1►
◄upscale_methodlanczos►
◄cropcenter►
◄force_5dfalse►
◄normalize_modenone►
◄pad_plus_2false►
Categoryutils
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The input image tensor to snap dimensions and process. | |
| width_latent | INT | 102416–4096 | Desired output width in pixels. Snapped to valid values based on snap_mode. |
| height_latent | INT | 102416–4096 | Desired output height in pixels. Snapped to valid values based on snap_mode. |
| locked_axis | COMBO | width | Which axis to lock when snapping dimensions. 'independent' allows both to snap separately. |
| snap_mode | COMBO | multiple_of_16 | How to snap dimensions: multiples of 16, 32, 64, or powers of 2 divisible by 16. |
| use_exact_input_dims | BOOLEAN | false | If enabled, use exact input dimensions without snapping. |
| use_target_megapixels | BOOLEAN | false | If enabled, snap dimensions to match the target megapixels instead of user width/height. |
| target_megapixels | FLOAT | 1.000.1–8 | Target total megapixels for the output image when use_target_megapixels is enabled. |
| fit_mode | COMBO | pad_only | How to fit the image: pad only (no cropping) or allow cropping to match snapped dimensions. |
| snap_strategy | COMBO | nearest | Strategy for snapping: round up, down, or to nearest valid value. |
| background_color | COMBO | gray | Background color for padding areas: black, gray, or white. |
| latent_scale | COMBO | 8 | Downscale factor for latent space, typically 8 for SD1.5 or 16 for SDXL. |
| latent_channels | INT | 41–32 | Number of channels in the latent tensor. Auto-detected from model if provided. |
| latent_mode | COMBO | zeros | How to initialize the custom latent: all zeros or random noise. |
| latent_seed | INT | -1-1–2147483647 | Seed for random latent generation. -1 for random seed. |
| upscale_method | COMBO | lanczos | Interpolation method for upscaling the image. |
| crop | COMBO | center | Cropping method during upscaling: disabled or center crop. |
| force_5d | BOOLEAN | false | Force 5D tensor for VAE encoding (for specific models like SVD). |
| normalize_mode | COMBO | none | Normalization mode for VAE input: [-1,1], [0,1], or none. |
| pad_plus_2 | BOOLEAN | false | Add 2 pixels padding to VAE input (for specific requirements). |
| modelopt | MODEL | Optional model to auto-detect latent channels from. | |
| vaeopt | VAE | Optional VAE for encoding the image into latent space. If provided, switches output to VAE latent. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| preview | STRING | — |
| latent | LATENT | — |
| viz_image | IMAGE | — |
| padded_image | IMAGE | — |