⭐ Star Qwen2 Outpainter
Turn That 1:1 Image Into 16:9 Without Redrawing It
- model
- clip
- vae
- reference_image
- options
- preview
- input_image
- image
- reference
You generated a 1:1 portrait you actually like, and now you need it as a 16:9 banner, or you just want more room around the subject. The old answer was outpainting: a mask around the edges, a Fill model, careful feathering, a visible seam if you got it slightly wrong.
The 2025-onward answer is to hand the whole thing to an instruction editor and ask. Qwen-Image-Edit is the open standard for that - you give it a picture and a sentence, no mask, no adapter, no control map. What it can't do is guess how much new canvas you wanted. ⭐ Star Qwen2 Outpainter is the harness: it builds the bigger frame, parks your image in it, paints the empty space a flat color, tells the model to fill that color in, then samples and decodes.
How it makes the new canvas
It loads the image itself - from your input folder, from output (those show up with an [output] suffix in the dropdown), or via upload and clipboard paste - and auto-rotates it according to its EXIF orientation, which matters more often than you'd think for phone shots. If the source is bigger than your megapixel budget, it gets scaled down first.
Then it builds a solid-color canvas at your chosen aspect_ratio and megapixel, and pastes the source into it at image_placement. Everything outside your image is flat fill. That fill is deliberate, not cosmetic: it's the "paint here" instruction. Which is why the default prompt reads "expand the red areas with background and scene that fits the source" - you match the color name in bg_color to the color name in your prompt, and the model out-paints exactly the surround.
The canvas is then scaled to roughly 1 megapixel and fed to the edit model twice, the way Qwen-Image-Edit wants it: as vision tokens for the text encoder and as a VAE-encoded reference latent attached to both the positive and negative conditioning. Your prompt rides along. Then it samples, decodes, and drops the alpha channel if the VAE hands one back.
The fields you'll actually touch
The required trio is the usual one - model, clip, vae - so you need the Qwen-Image-Edit stack loaded upstream. image is the source. aspect_ratio gives you fifteen presets, megapixel runs 0.1 to 10.0 in half-megapixel steps, and image_placement covers the nine anchor positions plus custom.
custom is the fun one: set it and you can drag the source image around the preview inside the node and pull the corner grip to resize it, with custom_x, custom_y and custom_scale reflecting what you dragged (custom_scale at 1.0 means the source fits the canvas edge-to-edge).
bg_color offers white, grey, black, red, blue and green. Any of them works. Red is the default purely because it's impossible to mistake for a real background.
Then there's the fine print on your model: qwen_image_2_1 is a Yes/No switch for the 2.1 architecture (64-channel, 16x latents, RGBA VAE output, image_slots conditioning). Off is the right setting for the 2509 and 2511 Edit models, which use 16-channel /8x latents. Get this wrong and you get noise or a flat image rather than a subtle-quality complaint.
cfg defaults to 1.0 for a reason - the Qwen edit family is guidance-distilled and flow-matching, and CFG 7 is exactly the SDXL habit that breaks current models. Negative prompts at CFG 1 do nothing, because there is no unconditional pass to steer. Leave the sampler on euler and the denoise at 1.0 (it's a fresh latent, you're not refining an existing picture).
The three outputs
image is your outpainted result. input_image is the source as the node actually used it - post-scaling, post-placement - which is the thing to wire into an Image Compare or a stitch node when you want to check what moved. reference is the flat-color canvas that went into the model, and it's more useful than it sounds: it shows you the real ratio of generated area to kept area, so you can tell at a glance whether the model had much to work with.
The obvious caveat
Edit models re-emit the whole frame. Nothing in the architecture pins the pixels you didn't ask about, so untouched regions come back close to identical rather than identical, and drift compounds across a chain of edits. That's the trade for not needing a mask. For "make this image wider" it's fine - keep input_image around and composite if you need the original pixels exactly.
Installing it
Same pack, same two routes.
ComfyUI Manager: search Starnodes, Install, restart.
Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt
The node needs no packages beyond the pack's requirements.txt, but the models are on you: a Qwen-Image-Edit diffusion model, its text encoder and the matching VAE in the usual folders. The pack also ships ⭐ Star Qwen Image Start(t) Settings, which loads that trio in one node if you'd rather not wire three loaders.
Where people trip
The grid pattern at big canvas sizes. Outpainting to a wide 2MP canvas is exactly the resolution where the fixed shift drifts. use_ltx_scheduler is on by default and handles it, but if you turned it off, or your model isn't a Flux-style flow model and the patch fell back, you'll see the artifacts. The console tells you which happened.
Nothing got outpainted. Check that your source doesn't already fill the canvas - if it does, there's no flat area left and nothing for the model to do. Smaller custom_scale or a different placement fixes it.
Your prompt doesn't name the color. "Expand the image" is much weaker than "expand the red areas with a matching sky." The fill color is the only signal telling the model where to draw.
You left qwen_image_2_1 on a 2509 checkpoint. Channel mismatch. Noise or mud. Match the switch to the model file you actually loaded.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| image | COMBO | Image to outpaint — from the input folder, the output folder ([output] entries), or upload / paste from clipboard. | |
| aspect_ratio | COMBO | 16:9 [1344x768 landscape] | 15 options: 1:1 [1024x1024 square], 8:5 [1216x768 landscape], 4:3 [1152x896 landscape], 3:2 [1216x832 landscape], 7:5 [1176x840 landscape], 16:9 [1344x768 landscape], +9 |
| megapixel | COMBO | 2.0 | 21 options: 0.1, 0.5, 1.0, 1.5, 2.0, 2.5, +15 |
| image_placement | COMBO | center | Where the input image sits on the new canvas — the rest is filled red and gets outpainted. 'custom' lets you drag the image inside the preview. |
| bg_color | COMBO | red | Solid fill color of the canvas surround the model expands into. Match the color name in your prompt (e.g. 'expand the red areas'). |
| prompt | STRING | expand the red areas with background and scene that fits the source <image 1>. add a fluffy purple otter with a golden star and the word "STARNODES" to the scene. | — |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 301–10000 | — |
| cfg | FLOAT | 1.000–100 | — |
| sampler_name | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | simple | Noise schedule - ignored while 'Use LTX Scheduler' is on or a ⭐ Star LTX Scheduler options node is connected. |
| use_ltx_scheduler | BOOLEAN | true | Use LTX Scheduler for Qwen 2.x: applies the resolution-aware dynamic-shift schedule (steps widget value, min 20; token count from the canvas latent) - same as connecting ⭐ Star LTX Scheduler. Fixes grid noise above ~1024px. Falls back to the widget scheduler on non-Flow models. |
| denoise | FLOAT | 1.000–1 | — |
| qwen_image_2_1 | BOOLEAN | false | Qwen-Image 2.1 mode: 64-channel /16x latents, RGBA VAE output and image_slots conditioning (reference latents on positive and negative). |
| custom_x | FLOAT | 0.500–1 | Horizontal position for 'custom' placement (0 = left edge, 1 = right edge). Set by dragging the preview. |
| custom_y | FLOAT | 0.500–1 | Vertical position for 'custom' placement (0 = top edge, 1 = bottom edge). Set by dragging the preview. |
| custom_scale | FLOAT | 1.000.1–1 | Source image size for 'custom' placement (1.0 = fit canvas). Set by dragging the corner handle in the preview. |
| reference_imageopt | IMAGE | Optional second reference image - added to the vision tokens and reference latents next to the red canvas (e.g. a style or content reference). | |
| optionsopt | * | Optional ⭐ Star options - connect ⭐ Star LTX Scheduler (Qwen Image 2.x) for the resolution-aware dynamic-shift schedule (fix for grid noise above ~1024px), or ⭐ Star Custom Sigmas (SIGMAS) to sample with an exact sigma list. | |
| previewopt | STAR_PREVIEW | Optional ⭐ Star Preview options - shows a live sampling preview on the connected ⭐ Star Preview node. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| input_image | IMAGE | — |
| image | IMAGE | — |
| reference | IMAGE | — |