Qwen Edit Config Json Parser
Define Qwen edit image configs as JSON
- image
- configs
- mask
- configs
- config
Same job as QwenEditConfigPreparer, different door. Both build the per-image config objects that TextEncodeQwenImageEditPlusCustom eats - but where Preparer gives you a wall of dropdowns, this one gives you a single text box with a JSON blob in it. If you like editing config as text, want to paste settings someone shared, or need to script your configs from outside ComfyUI, this is the node.
For most people the widget-based Preparer is friendlier. JsonParser earns its place when you're copying a known-good config around, diffing two setups, or generating configs programmatically - text is easier to move than a cluster of node settings.
How it works
It parses the JSON string in config_json into a config object, appends it to any incoming configs list, and passes the list along - exactly the same output contract as ConfigPreparer, so the two are interchangeable and even chainable together. The JSON keys mirror the Preparer's widgets: to_ref, ref_main_image, ref_longest_edge, ref_crop, ref_upscale, to_vl, vl_resize, vl_target_size, vl_crop, vl_upscale. The node ships with a filled-in default so you're editing a working template, not staring at an empty box.
Under it all, remember what a config is for: Qwen-Image-Edit reads each image through Qwen2.5-VL for semantics and the VAE for appearance, and these keys tell it how to prep the image for each of those two passes.
The inputs and outputs that matter
Required: image. The optionals:
- config_json - the config as a JSON string. The default template is a sensible starting point; note that in the shipped default
ref_main_imageis false, so if this is your only image (or the subject), flip it to true. - configs - an upstream list to append to; leave unconnected for the first node, connect it for the rest of a chain.
- mask - an optional region-of-interest mask for this image.
Outputs: configs (the updated list, into Custom or the next parser) and config (this one image's config on its own).
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, then restart. Pure helper node, no models, no dependencies, category advanced/conditioning.
Common issues
The obvious one: it's JSON, so a stray comma or an unquoted key breaks the parse. If the node errors, paste your string into any JSON validator before blaming the workflow. The subtler trap is that default ref_main_image: false - chain a few of these and you may end up with no main reference at all, which leaves Custom's main-ref conditioning empty; make sure exactly one config in the final list has it true. Beyond that it inherits the pack's realities: keys like ref_longest_edge and the crop settings interact with a scaling pipeline that has changed across pack versions, so a config that framed perfectly on an old build is worth a second look after updating.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| configsopt | LIST | Configs list | |
| config_jsonopt | STRING | { "to_ref": true, "ref_main_image": false, "ref_longest_edge": 1024, "ref_crop": "center", "ref_upscale": "lanczos", "to_vl": true, "vl_resize": true, "vl_target_size": 384, "vl_crop": "center", "vl_upscale": "bicubic" } | Config JSON String |
| maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| configs | LIST | — |
| config | ANY | — |