Nodes/civitai-comfy-nodes/flux2-dev-edit
ComfyUI Node

flux2-dev-edit

Training a LoRA that edits — Flux 2 Dev edit, minus the 48GB card

By civitai·Created 2 months ago·Updated about a month ago· 42
flux2-dev-edit
  • model
  • api_config
  • moderation_status
  • epochs
  • sample_images_prompts
  • sample_input_images
  • stored_as_assets
  • eta
  • workflow_id
  • raw_json
training_data
training_data_images_count0
lora_namemy-lora
sample_prompts_json
negative_prompt
steps1000
learning_rate0.00
default_caption
reference_image_count1

The Flux 2 family's party trick is editing - single- and multi-reference edits in one checkpoint, with a level of understanding the community still calls "unparalleled" for local models. And the people who swear by it agree on one thing: you need a monster card to run it, let alone train on it. This node is the edit-flavored training recipe: it trains a LoRA for the Flux 2 Dev edit variant, in the cloud, so the "RTX 6000 or nothing" wall disappears.

If you've got a character or a product that keeps needing consistent edits across a set of reference images, this is the node built for exactly that job - and it's one of the most specialized things in the whole Civitai pack.

How it works

Same hosted-training machinery as the plain Flux2Dev node: model (CIVITAI_AIR, wired from a Civitai Model Selector), training_data (a URL to your dataset), and training_data_images_count (cost input). What's different is the extra knob that makes it "edit" training:

  • reference_image_count - default 1, range 1–4. The number of reference images per training pair, and the tooltip is upfront about what that means: "Affects cost calculation via reference multiplier." Edit training is pair-based - an input image, a target edit, and reference(s) that anchor the identity - so more references per pair trains better consistency but multiplies the bill.

The rest mirrors the Dev node: steps (default 1000, increments of 100), learning_rate (5e-05), lora_name, sample_prompts_json, negative_prompt, default_caption.

Outputs are the training status set: moderation_status, epochs, sample_images_prompts, sample_input_images, stored_as_assets, eta, workflow_id, raw_json.

Inputs you actually touch

  • reference_image_count - the edit-specific decision. Start at 1 to validate your dataset and costs; raise toward 4 once you know the pipeline works and want stronger identity anchoring.
  • steps - the main quality/cost lever.
  • lora_name - name the artifact something you'll recognize.

Install

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. Authenticate (CIVITAI_API_TOKEN or sidebar); training bills in Buzz, and edit training with the reference multiplier bills more.

Gotchas

The reference multiplier is the trap, and it's a real one: reference_image_count isn't a quality dial you can ignore, it's a cost multiplier wired straight into the price. Read the tooltip before you bump it. Also, edit training needs a paired dataset - input/target pairs, not just a folder of pretty images - and the captions (via default_caption or caption files) matter more than in plain LoRA training because the model has to learn the edit relationship, not just the subject. The KB's training doc holds: auto-caption a large set, audit a small one by hand. And it's early preview - training recipes are the pack's newest and most likely-to-change corner, so don't be surprised if output shapes shift between releases.

CategoryCivitai/Training/flux2-dev-edit

Inputs (11)

NameTypeDefaultDescription
modelCIVITAI_AIRThe primary model to train upon.
training_dataSTRINGA url referring data to use in training.
training_data_images_countINT00–2147483647The number of images embedded in this training data. This is used to calculate the cost of training.
lora_nameoptSTRINGmy-loraThe desired lora name.
sample_prompts_jsonoptSTRINGA selection of sample prompts.
negative_promptoptSTRINGAn optional negative prompt that will get applied when generating samples
stepsoptINT1000100–10000Number of training steps. Must be in increments of 100.
learning_rateoptFLOAT0.000–2147483647Learning rate for training.
default_captionoptSTRINGDefault caption to use if caption files are missing from training data.
reference_image_countoptINT11–4Number of reference images per training pair (1-4). Affects cost calculation via reference multiplier.
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (8)

NameTypeDescription
moderation_statusSTRING
epochsSTRING
sample_images_promptsSTRING
sample_input_imagesSTRING
stored_as_assetsSTRING
etaSTRING
workflow_idSTRING
raw_jsonSTRING