mageflow / 4b-edit / editImage
Instruction editing in the cloud
- images
- loras
- diffusion_model
- api_config
- images
- errors
- workflow_id
- raw_json
Everything interesting about MageFlow is in the edit variant. Microsoft built the 4B model to both generate and edit from the same weights, and the community's take was unanimous: for editing it outclasses Krea 2, which was never trained for it. This node is the 4B-edit model running on Civitai's cloud - feed it an image and a sentence, get back the edited IMAGE, no local weights and no VRAM.
It's the right tool when you want clean instruction editing ("move the subject right", "turn this into a night scene") without standing up a Qwen-Edit or Kontext chain locally. The 4B size keeps it cheap to host, which is why this specific editor is worth trying even if you've got a big GPU sitting idle - the hosted job often beats the effort of running a 20B editor locally.
How it works
The civitai-comfy-nodes pattern: upload your source image and prompt to the Civitai Orchestration API, run MageFlow 4B-edit on Civitai's fleet, long-poll, and return the result as a native IMAGE tensor. This is the non-turbo edit variant - default 30 steps at CFG 5.0. That's the quality-oriented setting; the turbo sibling does 4 steps if you want speed.
The inputs that matter
- prompt and images are both required - an editor without a source is just a generator.
- steps / cfg_scale - 30 / 5.0 defaults. If edits come back rough, this is where you'd nudge quality up; if they're slow, the turbo variant is the speed lever.
- diffusion_model (
CIVITAI_AIR) and loras (CIVITAI_LORAS) - optional typed sockets. Wire Civitai Model Selector / LoRA Selector nodes to swap in a MageFlow finetune or stack LoRAs on the cloud job. - sampler / scheduler / seed / width / height / quantity (max 4) - standard.
Outputs
images wires into Preview/Save Image. errors, workflow_id, and raw_json are diagnostics; raw_json has the full workflow result when you need to audit cost or behavior.
Installing and authenticating
Pack-wide install - no separate MageFlow package:
cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt
or ComfyUI Manager → "Civitai Comfy Nodes" → Install → restart. Dependencies are just requests and python-socketio[client].
Auth: Civitai Auth node → CIVITAI_API_TOKEN → stored key/OAuth in ~/.civitai/ → browser login. Headless:
export CIVITAI_API_TOKEN=your_token
Where people get burned
- 30 steps is the quality default, and it's billed per job. The non-turbo edit is the expensive end of the MageFlow family. If you're iterating on prompts, use the turbo edit for drafts and this one for finals.
- Edits re-emit the whole frame. Like all instruction editors, unedited regions come back close but not identical, and drift compounds across a chain of edits. Keep your source clean and consider re-cropping.
- Your image leaves the machine. Standard API-node deal - the reference and prompt go to Civitai's servers, subject to hosted moderation.
- Don't confuse the create and edit nodes - if you've wired
imagesinto the createImage variant expecting it to matter, you're on the wrong node.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| steps | INT | 301–150 | — |
| cfg_scale | FLOAT | 5.000–30 | — |
| quantity | INT | 11–4 | — |
| images | IMAGE | — | |
| output_formatopt | COMBO | 4 options: , jpeg, png, webP | |
| image_metadataopt | STRING | External metadata that will be stored with the image | |
| negative_promptopt | STRING | — | |
| sampleropt | COMBO | 32 options: , euler, euler_ancestral, euler_cfg_pp, euler_ancestral_cfg_pp, heun, +26 | |
| scheduleropt | COMBO | 8 options: , normal, karras, exponential, sgm_uniform, simple, +2 | |
| seedopt | INT | 00–4294967295 | — |
| lorasopt | CIVITAI_LORAS | — | |
| diffusion_modelopt | CIVITAI_AIR | — | |
| widthopt | INT | 1024512–2048 | — |
| heightopt | INT | 1024512–2048 | — |
| api_configopt | CIVITAI_CONFIG | Optional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| errors | STRING | — |
| workflow_id | STRING | — |
| raw_json | STRING | — |