Rikan Qwen Custom Image Size
Pad the canvas and get the right prompt written for you
- pixels
- vae
- latent
- combined_prompt
Qwen-Image-Edit is the open instruction editor - you hand it a picture and a sentence and the change happens, no mask, no ControlNet. Its one structural weakness is that it re-emits the whole frame, so outpainting - extending the image beyond its edges - needs you to set up a bigger canvas, place your image on it, and give the model a prompt that tells it what's missing. Rikan Qwen Custom Image Size is a prep node that does all three at once: it sizes your image onto the target canvas, encodes it, and writes the continuation prompt for you, so your job is just to pick a resolution and a vibe.
That's the real selling point: the node builds the prompt. Depending on your choices it appends something like "Seamlessly extend the frame… matching existing textures and lighting while maintaining the central original image as an untouched anchor" - and it even detects whether the empty space is top-and-bottom or left-and-right and words the prompt accordingly. The combined_prompt output is your original text plus that addon, ready to feed the edit model. No more writing the same outpaint sentence nine times a day.
The controls
pixelsandvae- your image and Qwen-Image-Edit's VAE.text- your edit instruction. The node appends its auto-written continuation to it.- resize_mode -
Crop to Fit(scale up and crop, no padding, plain resize),Generative Fill(center the image on a gray canvas and extend the empty areas), orZoom Out(same but scales the image down to 70% so there's more to generate around it - a literal "zoom out" effect). - prompt_theme -
Technical Precision(your text + a technically-worded extend instruction),Artistic Continuity(adds color-grade/depth-of-field matching language), orFull Body(locks the orientation to portrait, pins the image at the top, and extends downward to generate a full body). - resolution_preset - 512p (SD 1.5), 720p (HD), 1080p (FHD), 1024p (SDXL), or Custom; with orientation (landscape/portrait/square).
custom_width/custom_heightapply when preset is Custom.
Outputs: latent (your resized-and-padded image encoded) and combined_prompt.
Honest notes
The padding is a flat 0.5 gray, and the whole approach banks on the edit model's generative fill being good enough - which, for Qwen-Edit, it usually is, but it does not preserve your original pixels byte-for-byte. If you need the original absolutely untouched (commercial outpainting, multi-pass extension), the Inpaint Crop & Stitch pattern still wins; this is the fast path when "good enough and one node" beats "pristine and three nodes." Also note the UI hides the prompt_theme selector in plain Crop to Fit mode - it only matters for the fill/zoom paths - which trips people up until they switch modes.
It also expects Qwen-Edit's VAE. Feed it an SDXL or Flux VAE and the encode silently goes sideways, same as any cross-architecture VAE mistake.
Install: ComfyUI Manager → search Rikannodes, or git clone https://github.com/rikanrino/Rikannodes into custom_nodes, pip install -r Rikannodes/requirements.txt, restart, and look under Rikannodes. Young pack, thin README - but if you outpaint with Qwen-Edit regularly, the prompt autowriter alone is worth the install.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| pixels | IMAGE | — | |
| vae | VAE | — | |
| text | STRING | — | |
| resize_mode | COMBO | Crop to Fit | 3 options: Crop to Fit, Generative Fill, Zoom Out |
| prompt_theme | COMBO | Technical Precision | 3 options: Technical Precision, Artistic Continuity, Full Body |
| resolution_preset | COMBO | 720p (HD) | 5 options: Custom, 512p (SD 1.5), 720p (HD), 1080p (FHD), 1024p (SDXL) |
| orientation | COMBO | Horizontal (Landscape) | 3 options: Horizontal (Landscape), Vertical (Portrait), Square (1:1) |
| custom_width | INT | 128016–8192 | — |
| custom_height | INT | 72016–8192 | — |
| batch_size | INT | 11–4096 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| combined_prompt | STRING | — |