flux2 / flex / editImage
Image-to-image editing without a local checkpoint
- images
- api_config
- images
- errors
- workflow_id
- raw_json
The sibling of CivitaiImageGenFlux2FlexCreateImage that does the same thing in reverse: instead of generating from nothing, it takes an image you already have and rewrites it. Same engine (flux2, model flex), same cloud execution, same Buzz meter - but the editImage operation means the interesting input is images, not just the prompt.
Why you'd reach for it. You have a composition you like and need it changed - swap the background, alter the subject, restyle the whole thing - and either you don't own a card that can run Flux 2, or you don't want to babysit a 32B model's VRAM footprint for one edit. This node is the hosted version of that workflow, inside your existing graph. It's part of the official civitai/civitai-comfy-nodes pack, the ~160 nodes Civitai generated from its Orchestration API, so it mixes with the rest of your workflow like any local node: the result comes back as a native IMAGE and feeds straight into Preview, Save Image, or whatever you've got downstream.
How it works. Wire an image (or several) into images, tell the model what to change in prompt, run. The node serializes your image into the workflow payload, submits it to orchestration.civitai.com, and long-polls until the job finishes. Because it's cloud compute, the edit doesn't touch your GPU at all. Outputs are the pack standard: images (the edited result), errors, workflow_id, and raw_json for debugging or cost checks.
Inputs that matter. prompt is the only required field, and for edits it does double duty - be specific: "change the sky to a sunset, keep the foreground" works far better than "make it better." The guidance_scale (default 3.5) and num_inference_steps (default 28) controls are where you can loosen or tighten adherence; for an edit that should stay close to the source, a slightly higher guidance value is usually the move. width/height (512-2048) and quantity (1-4) work as you'd expect, enable_prompt_expansion lets Civitai fatten up your prompt before generating, and seed gives you reproducibility.
Install. Same as every node in the pack - you don't install this one individually:
cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt # requests
Restart ComfyUI. Or use ComfyUI Manager → Custom Nodes Manager → search Civitai Comfy Nodes → Install. No checkpoints, no VAE, no CLIP to fetch - the model lives on Civitai's side.
Auth and gotchas. Credentials come from a wired Civitai Auth node, CIVITAI_API_TOKEN, or the stored login from the Civitai sidebar connect panel. Error codes are the usual pack set: 402 = not enough Buzz, 401 = bad/expired token, 429 = rate limited. The pack is early preview and generated from the live API spec, so don't be shocked if a release moves a widget. Two things worth planning around: cloud jobs were reported slow at launch, and a long queue means your edit sits in line with everyone else's - so this is not a low-latency "live preview" tool. And both your source image and prompt go to Civitai's servers, subject to their content rules; a reference image the website would refuse is not going to sail through the edit node.
Good rule of thumb: for a one-off edit you can't run locally, this is genuinely the easiest door in ComfyUI. For anything iterative, budget for the round-trip time.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| output_formatopt | COMBO | 4 options: , jpeg, png, webP | |
| image_metadataopt | STRING | External metadata that will be stored with the image | |
| widthopt | INT | 1024512–2048 | — |
| heightopt | INT | 1024512–2048 | — |
| seedopt | INT | 00–4294967295 | — |
| quantityopt | INT | 11–4 | — |
| enable_prompt_expansionopt | BOOLEAN | false | — |
| guidance_scaleopt | FLOAT | 3.501.5–100 | — |
| num_inference_stepsopt | INT | 282–50 | — |
| imagesopt | IMAGE | — | |
| 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 | — |