Qwen Edit Any2Image
Tell ComfyUI that ANY wire is actually an IMAGE
- item
- item
This is a type cast, nothing more. Parts of the QwenEditUtils pack pass data around as the generic ANY type - list items, extracted config pieces - and ComfyUI's image nodes want a real IMAGE socket, not an ANY one. Any2Image is the little adapter that says "trust me, this ANY is an image," so the connection turns valid and the wire goes green. If you've ever had a node refuse a link because the types didn't match, this is that problem's fix, aimed specifically at images.
You reach for it mostly after QwenEditListExtractor. Pull an item out of the vae_images list and it comes out as ANY; run it through Any2Image and now you can feed it into a VAE Decode, a preview, an upscaler - anything that expects an IMAGE.
How it works
There's no processing. The node passes the data straight through and only changes how ComfyUI labels the socket - ANY in, IMAGE out. The bytes are untouched; you're reassuring the type system, not converting a format. That's why it's instant and costs nothing.
The inputs and outputs that matter
Input: item - the ANY-typed value you know is an image.
Output: item - the same thing, now typed IMAGE.
That's the whole node. No settings, no options.
Where it fits in a real graph
The concrete chain looks like this. TextEncodeQwenImageEditPlusCustom produces a custom_output dictionary; QwenEditOutputExtractor unpacks that into, among other things, a vae_images list; QwenEditListExtractor with index 0 pulls the first image out of that list - but it comes out typed ANY, because a list can hold anything. Drop QwenEditAny2Image on the end and now it's a proper IMAGE you can send to a VAE Decode, a Preview Image, a Save Image, or an upscaler. Without this cast, ComfyUI won't even let you draw the link - the socket colors don't match and the connection is rejected before you ever hit run.
Installing it
Ships with the pack. ComfyUI Manager: search Comfyui-QwenEditUtils, install, restart. Or cd ComfyUI/custom_nodes && git clone https://github.com/lrzjason/Comfyui-QwenEditUtils, restart. No models, no dependencies.
Common issues
The one way to misuse it: cast something that isn't actually an image. This node only relabels the socket - it doesn't validate or convert - so if the ANY value is really a latent or a config, the downstream image node will still choke, just a step later and with a more confusing error. Make sure the thing you're casting genuinely is an image (it usually is, if it came out of a vae_images, vl_images, or main_image path). Need a latent instead of an image? That's the sibling node, QwenEditAny2Latent, and it's the same idea pointed at a different type.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| item | ANY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| item | IMAGE | — |