Nodes/civitai-comfy-nodes/mageflow / 4b-edit / editImage
ComfyUI Node

mageflow / 4b-edit / editImage

Instruction editing in the cloud

By civitai·Created 3 months ago·Updated 2 days ago· 44
mageflow / 4b-edit / editImage
  • images
  • loras
  • diffusion_model
  • api_config
  • images
  • errors
  • workflow_id
  • raw_json
prompt
steps30
cfg_scale5.00
quantity1
output_format
image_metadata
negative_prompt
sampler
scheduler
seed0
width1024
height1024

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 images into the createImage variant expecting it to matter, you're on the wrong node.
CategoryCivitai/Image/mageflow

Inputs (16)

NameTypeDefaultDescription
promptSTRING
stepsINT301–150
cfg_scaleFLOAT5.000–30
quantityINT11–4
imagesIMAGE
output_formatoptCOMBO4 options: , jpeg, png, webP
image_metadataoptSTRINGExternal metadata that will be stored with the image
negative_promptoptSTRING
sampleroptCOMBO32 options: , euler, euler_ancestral, euler_cfg_pp, euler_ancestral_cfg_pp, heun, +26
scheduleroptCOMBO8 options: , normal, karras, exponential, sgm_uniform, simple, +2
seedoptINT00–4294967295
lorasoptCIVITAI_LORAS
diffusion_modeloptCIVITAI_AIR
widthoptINT1024512–2048
heightoptINT1024512–2048
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (4)

NameTypeDescription
imagesIMAGE
errorsSTRING
workflow_idSTRING
raw_jsonSTRING