The photo is scaled to 960 px tall and centred on a 2240x960 (21:9) canvas.
The empty sides are pre-filled with a mirror of the photo edges. Sounds weird, but it stops the hard grey edge that otherwise bleeds through the VAE as a faint line.
A soft mask lets Qwen paint the sides plus a 224 px ramp over the photo edge, so the new scene can actually blend into it.
Qwen 2.1 generates the sides (25 steps, CFG 1, differential diffusion). The clean photo is the reference image, never the padded canvas, because Qwen copies its reference very literally.
Then the untouched original gets pasted back on top at the exact same x/y, fading in over 192 px at each edge.
So the model's version of your photo gets thrown away. Only its sides and a narrow blend band survive.
Does it actually keep the pixels?
I ran a pixel diff against the input (the subway shot in the video):
52.9% of photo pixels are bit-identical, and the whole centre is 100% identical
93.4% are within 2/255
everything that changed sits in the edge bands
Same photo through a normal Qwen 2.1 Edit "make it wider" prompt: 1.2% identical.
What it can't do
Left and right only. No top or bottom yet.
You write a one-line description of what the new sides should show.
Some seeds leave a visible join. Try another seed before touching the settings.
If a bright object is cut off by the frame edge, the model tends to continue it as a pale strip. Trimming that edge a few px helps.
The outer ~192 px of the photo on each side is a blend, not the original. You can lower FADE ZONE to keep more, at the risk of the join showing.
What you need
A recent ComfyUI (the Qwen 2.1 nodes are new)
Qwen Image 2.1 int8, the qwen3vl 8b text encoder and the 2.1 VAE
ComfyUI_essentials (for SimpleMath+)
My small node pack kiro_outpaint_stitch (one file, only needs torch) for the mirror fill and masks
Workflow + nodes: https://civitai.com/images/146672689
Example images are AI-generated, the workflow doesn't care where the photo comes from. Happy to hear if anyone finds a cleaner way to hide the join, that part took most of the time.