ComfyUI Node
π Qwen Image Scale
A ComfyUI node in ArchAi3d/Qwen/Image with 19 inputs and 6 outputs.
π Qwen Image Scale
- image
- mask
- image_vl
- image_latent
- mask
- latent_width
- latent_height
- debug_text
βaspect_ratio_modeautoβΊ
βpreferred_aspect_ratio16:9 (Panorama)βΊ
βvl_target_area147456βΊ
βvl_divisible_by32βΊ
βlatent_target_area1763584βΊ
βlatent_divisible_by32βΊ
βlatent_area_tolerance0.30βΊ
βvl_use_latent_sourcetrueβΊ
βvl_ignore_latent_letterboxtrueβΊ
βvl_ignore_latent_croptrueβΊ
βvl_upscale_methodareaβΊ
βvl_cropdisabledβΊ
βvl_letterboxfalseβΊ
βlatent_upscale_methodlanczosβΊ
βlatent_cropcenterβΊ
βlatent_letterboxfalseβΊ
βdebugtrueβΊ
CategoryArchAi3d/Qwen/Image
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| aspect_ratio_modeopt | COMBO | auto | Auto: Automatically find closest preferred aspect ratio to input image. Manual: Choose specific preferred ratio (ignores input aspect). |
| preferred_aspect_ratioopt | COMBO | 16:9 (Panorama) | Manually select preferred aspect ratio (only used in manual mode). These ratios are optimized for QwenVL's training data. |
| vl_target_areaopt | INT | 1474563000β500000 | Target pixel area for QwenVL output (e.g., 147456 = ~147K = 384Γ384). VL dimensions are calculated using preferred aspect ratio to match QwenVL's optimal training ratios. QwenVL works best with ~150K pixels. |
| vl_divisible_byopt | INT | 321β256 | Ensures VL width and height are divisible by this number. Recommended: 32 for optimal AI processing. |
| latent_target_areaopt | INT | 17635843000β4500000 | Target pixel area for latent output (e.g., 1048576 = ~1M = ~1024Γ1024). Latent dimensions will EXACTLY match VL's preferred aspect ratio while staying within tolerance range. Higher = better quality but slower. |
| latent_divisible_byopt | INT | 321β256 | Ensures latent width and height are divisible by this number. Recommended: 32 for VAE compatibility. Must achieve exact aspect match with VL. |
| latent_area_toleranceopt | FLOAT | 0.300.1β0.8 | Flexibility for latent pixel count (Β±%). Default 0.3 = Β±30%, allowing 700K-1.3M when target is 1M. Gives algorithm room to find dimensions that EXACTLY match VL aspect ratio while meeting divisibility constraints. Higher tolerance = easier to find perfect aspect match. |
| vl_use_latent_sourceopt | BOOLEAN | true | VL source selection. True (recommended): Use processed Latent as source for pixel-perfect alignment and guaranteed aspect match. False: Use original Input for traditional independent processing. |
| vl_ignore_latent_letterboxopt | BOOLEAN | true | When using Latent source, ignore vl_letterbox setting. Latent is already letterboxed if needed, prevents double padding. |
| vl_ignore_latent_cropopt | BOOLEAN | true | When using Latent source, ignore vl_crop setting. Latent is already cropped if needed, prevents double cropping. |
| vl_upscale_methodopt | COMBO | area | Resampling algorithm for VL. Area=best for downscaling (sharp), Lanczos=best for upscaling (smooth). Default 'area' optimal since VL is typically downscaled. |
| vl_cropopt | COMBO | disabled | How to handle aspect ratio mismatch. Usually keep disabled as VL aspect matches Latent exactly. NOTE: Ignored when vl_use_latent_source=True and vl_ignore_latent_crop=True. |
| vl_letterboxopt | BOOLEAN | false | Add black bars to preserve exact aspect ratio. Usually keep disabled as VL aspect matches Latent exactly. NOTE: Ignored when vl_use_latent_source=True and vl_ignore_latent_letterbox=True. |
| latent_upscale_methodopt | COMBO | lanczos | Resampling algorithm for latent. Lanczos=best for upscaling (smooth, high quality), Area=best for downscaling (sharp). Default 'lanczos' optimal since latent is usually upscaled. |
| latent_cropopt | COMBO | center | How to handle aspect ratio mismatch for latent. Center (recommended): Crops input image to fill latent frame completely with preferred aspect ratio. Disabled: Stretches to fit (may distort). |
| latent_letterboxopt | BOOLEAN | false | Add black bars to latent instead of cropping. Enable to preserve entire input image with preferred aspect ratio. |
| debugopt | BOOLEAN | true | Show detailed info: aspect ratio selection (auto/manual), preferred ratio match quality, dimensions, tolerance checks, and pixel alignment status. |
| maskopt | MASK | Optional mask to scale alongside image_latent. Will be resized to match latent dimensions using bilinear interpolation. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image_vl | IMAGE | β |
| image_latent | IMAGE | β |
| mask | MASK | β |
| latent_width | INT | β |
| latent_height | INT | β |
| debug_text | STRING | β |