EditUtils: Model Config lrzjason
One config node to rule the model switcher — until you switch to Flux2Klein
- model_config
ComfyUI-EditUtils is a multi-model editing pack, and ModelConfig_EditUtils is the node that picks which model you're targeting. It outputs a model_config dict that drives the encode path - the text encoder, the VAE alignment, the system prompt - so the same EditTextEncode node can work with Qwen, Flux2Klein, or Boogu by just swapping this config. That's the whole "unified interface" claim in the README, and this node is its switcher.
Inputs: model_choice (dropdown: qwen / flux2klein / boogu, default qwen), model_name (a STRING, default empty - leave it empty and it just uses model_choice), vae_unit (an INT, default 8, step 8, range 8–64), and an optional instruction (multiline string for a custom system prompt, empty by default). The output is a single model_config dict that plugs into EditTextEncode_EditUtils.
Here's the trap, and it's a real one: the vae_unit default is 8, which is correct for Qwen and Boogu but wrong for Flux2Klein, which needs 16. The author's own docs warn you: if you flip model_choice to flux2klein and forget to change vae_unit, your reference latents get padded on the wrong grid. Why does the unit matter? The VAE's latent space is spatially quantized - a Qwen VAE encodes in 8×8 pixel blocks, Flux2Klein's in 16×16. Padding your reference image to the wrong multiple means the VAE has to encode awkward leftover edges, and you get alignment drift in the edit. The node will happily let you do this; it won't fix it for you.
The instruction field feeds the system prompt via a llama chat template. For Qwen, empty means a sensible built-in default (roughly: describe the input, then apply the user's instruction while keeping consistency). For Boogu it's ignored entirely, because Boogu's tokenizer auto-selects its system prompt. Flux2Klein with a non-empty instruction will build a custom template, but the docs call it "not recommended".
Honest take: if you only run one model, skip this and use the model-specific config nodes (QwenModelConfig_EditUtils, etc.) - they hard-code the right vae_unit so you can't misconfigure it. This node is for the person who genuinely swaps between Qwen and Flux2Klein in one workflow and wants a single dropdown to switch. Just remember the unit.
Install
Part of lrzjason/ComfyUI-EditUtils. Install via ComfyUI Manager (search "ComfyUI-EditUtils") or cd ComfyUI/custom_nodes && git clone https://github.com/lrzjason/ComfyUI-EditUtils, then restart. No pip dependencies. The models themselves are separate downloads - Qwen-Image / Flux2Klein checkpoints loaded with your normal UNETLoader/CLIPLoader/VAELoader, not bundled here.
Troubleshooting
The classic mistake is the vae_unit one above - flux2klein + 8 = misaligned refs. The other common surprise: this node only makes a config dict. It loads no weights, so a config pointing at qwen does nothing until you actually load a Qwen CLIP + VAE and wire them into the encode node. If your output looks like the reference was ignored entirely, you usually have a config pointing at one model and weights for another.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model_choice | COMBO | qwen | 3 options: qwen, flux2klein, boogu |
| model_name | STRING | — | |
| vae_unit | INT | 88–64 | — |
| instructionopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model_config | DICT | — |