ComfyUI Node

FLUX.1 Kontext [dev]

The Edit-By-Instruction Model, In the Cloud

By Runware·Created 2 years ago·Updated about a month ago· 140
FLUX.1 Kontext [dev]
  • referenceImages
  • lora
  • ultralytics
  • acceleratorOptions
  • advancedFeatures.watermark.image
  • image
positivePrompt
negativePrompt
size1K (1:1)
seed0
stepsfalse
steps_value1
scheduler(default)
CFGScalefalse
CFGScale_value0.00
trueCFGScalefalse
trueCFGScale_value0.00
numberResults1
advancedFeaturesfalse
advancedFeatures.watermark.bgColor
advancedFeatures.watermark.displayPosition(default)
advancedFeatures.watermark.fontColor
advancedFeatures.watermark.opacityfalse
advancedFeatures.watermark.opacity_value0.10
advancedFeatures.watermark.text
safetyfalse
safety.checkContentfalse
ttlfalse
ttl_value60
outputFormatJPG
outputQuality95

FLUX.1 Kontext killed the mask-based editing workflow, or at least demoted it. Kontext is the instruction-editing model: you feed it an image and say "make it raining," "change the jacket to red," "add a mountain behind the building," and it rewrites the image to match - no mask, no inpaint, no denoise dial. By 2026 the community verdict was settled: Kontext (and its siblings Qwen-Image-Edit and FLUX.2 klein) took over most of the job people used masks for, because editing from a sentence beats editing from a hand-painted region for almost everything.

The catch is that "dev" is the open-weights tier, and dev weights are non-commercial with BFL's tightening license. This node sidesteps the whole thing: it's the Kontext dev model running on Runware's cloud, so you get the capability without hosting the weights or shipping a fork of them anywhere.

What you set

Required is positivePrompt - and that's the entire editing instruction. Then wire referenceImages with the image you want changed. From there it behaves like a full image node:

  • negativePrompt - has a tooltip warning worth taking seriously: it's ignored when guidance is disabled (CFGScale ≤ 1). Kontext-family guidance-distilled models run low-CFG by default, so your negative may do nothing at all. As the photorealism crowd put it, write constraints as presence ("clean studio background, sharp focus") instead.
  • steps - a toggle plus steps_value (flip the switch, then set 1–50). Default "off" means the model picks.
  • CFGScale / trueCFGScale - both gated toggles with _value siblings; leave them off unless you know why you're overriding.
  • scheduler - the full 76-entry dropdown. Leave it on (default).

The typed sockets are where this node earns its keep: lora, ultralytics (object-detection guidance), acceleratorOptions (caching/distillation speedups), and watermark. These come from the pack's builder nodes under Runware/Params and wire straight in. Output is one image.

The gotcha that defines this model

Kontext edits the whole image. That's the trade: an edit model takes everything into context and emits a whole new image, so the parts you didn't want touched come back close-but-not-identical. Community wisdom is that drift compounds across a chain of edits - each pass nudges the background a bit more. If you need bit-identical unmasked pixels (a logo, a face you must not change), the mask still owns that job; run your instruction edit, then composite the edited region back over the original with a mask.

Install

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt

Restart, or just install "Runware" via ComfyUI Manager. API key required (Settings → Runware API key or RUNWARE_API_KEY); cost shows on the node title bar. No model files download - everything runs on BFL's weights hosted by Runware, which is the whole point when the local path means either 12GB of weights and a licensing headache or a GPU you don't own.

CategoryRunware/Image/runware

Inputs (30)

NameTypeDefaultDescription
positivePromptSTRINGText prompt describing elements to include in the generated output.
referenceImagesoptIMAGE
loraoptRUNWARE_LORA
ultralyticsoptRUNWARE_ULTRALYTICS
acceleratorOptionsoptRUNWARE_ACCELERATOROPTIONS
advancedFeatures.watermark.imageoptIMAGE
negativePromptoptSTRINGPrompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).
sizeoptCOMBO1K (1:1)Output size. Only one of resolution or dimensions is sent.
seedoptINT00–9223372036854776000Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
stepsoptBOOLEANfalseEnable to set steps. Off uses the model's default.
steps_valueoptINT11–50Total number of denoising steps. Higher values generally produce more detailed results but take longer.
scheduleroptCOMBO(default)Scheduler to use for the diffusion process.
CFGScaleoptBOOLEANfalseEnable to set CFGScale. Off uses the model's default.
CFGScale_valueoptFLOAT0.000–20Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.
trueCFGScaleoptBOOLEANfalseEnable to set trueCFGScale. Off uses the model's default.
trueCFGScale_valueoptFLOAT0.00True Classifier-Free Guidance scale. Higher values increase prompt adherence at the cost of quality.
numberResultsoptINT11–20Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
advancedFeaturesoptBOOLEANfalseEnable to set advancedFeatures. Off uses the model's default.
advancedFeatures.watermark.bgColoroptSTRINGBackground color in hex format.
advancedFeatures.watermark.displayPositionoptCOMBO(default)Watermark position.
advancedFeatures.watermark.fontColoroptSTRINGText color in hex format.
advancedFeatures.watermark.opacityoptBOOLEANfalseEnable to set advancedFeatures.watermark.opacity. Off uses the model's default.
advancedFeatures.watermark.opacity_valueoptFLOAT0.100.1–1Watermark opacity.
advancedFeatures.watermark.textoptSTRINGWatermark text.
safetyoptBOOLEANfalseEnable to set safety. Off uses the model's default.
safety.checkContentoptBOOLEANfalseEnable or disable content safety checking.
ttloptBOOLEANfalseEnable to set ttl. Off uses the model's default.
ttl_valueoptINT60Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.
outputFormatoptCOMBOJPGFile format for the generated image.
outputQualityoptINT9520–99Compression quality of the output. Higher values preserve quality but increase file size.

Outputs (1)

NameTypeDescription
imageIMAGE