Nodes/ComfyUI_RunpodNodes/RunPod Flux Kontext (Image Edit)
ComfyUI Node

RunPod Flux Kontext (Image Edit)

Edit by sentence — no mask, no inpaint, no local GPU

By tcarwash·Created 8 months ago·Updated 8 months ago· 0
RunPod Flux Kontext (Image Edit)
  • input_image
  • image
api_key
promptEdit the image to change the background
negative_prompt
image
size1024*1024
num_inference_steps28
guidance2.0
seed-1
output_formatpng
enable_safety_checkertrue

Flux Kontext started the whole "just tell it what to change" school of image editing: hand it a picture and a sentence, and the change just happens. No mask, no inpaint, no ControlNet, no IP-Adapter dance. This node is that model - Black Forest Labs' black-forest-labs-flux-1-kontext-dev - as a RunPod public endpoint, so you get Kontext's editing without needing to find the open weights a home.

Kontext works the way the name suggests: your reference image is fed in context rather than through adapter embeddings, which is exactly why it's so good at keeping identity and layout intact while swapping a background or a shirt. It's the mechanism behind the whole family's "shockingly effective" reputation, and it's a closed endpoint here - there's no local fallback unless you're running the open-weights version yourself.

How it works

Same skeleton as every node in this pack: it POSTs to the RunPod API, polls until the job completes, and decodes the returned base64 into an IMAGE tensor. The difference is the payload - you get an optional input_image wire plus an image text field, and the node turns whichever you give it into a data URL the endpoint can read. Your edited result comes back as a normal image you can save or keep piping through the graph.

The inputs that matter

  • input_image - the thing to edit, wired from a Load Image node. This is the input you'll actually use; it beats the image URL field for anything already in your graph.
  • prompt - your instruction, e.g. "change the background to a rainy Tokyo street at night." Natural language, not a tags soup.
  • size - a string like 1024*1024; it's the endpoint's expected format, so leave the shape alone unless you know what you're doing.
  • num_inference_steps - default 28, fine to leave.
  • guidance - default 2.0, which is about right for Kontext; you're editing, not generating from scratch.
  • negative_prompt - sent but of limited use on a guidance-distilled model, same caveat as Flux Dev.
  • seed - -1 random; set it to reproduce an edit.
  • output_format - png or jpeg.
  • enable_safety_checker - on by default; the endpoint filters at the source, and since it's a closed model there's no local bypass.

What comes out

One image output (IMAGE). Edit, preview, save, or chain to an upscaler - it behaves like any local image node.

Installing it

This is one of the 27 nodes in tcarwash/ComfyUI_RunpodNodes, so the install is the pack install. In ComfyUI Manager search ComfyUI_RunpodNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/tcarwash/ComfyUI_RunpodNodes

Restart and you're done - no requirements.txt to fight, since the pack only needs requests, Pillow, and torch, all already present. Add a RunPod API key from runpod.io.

Gotchas

  • It looks frozen - it's polling. Kontext jobs queue like any public endpoint; give it 30–120 seconds and watch the console for [RunPod] Status: lines.
  • Prompt both the image and the change - Kontext is strongest when the instruction names what stays and what moves ("keep the person, change the background"). Vague prompts come back vague.
  • Safety checker - it's on by default and it refuses at the source. If you're doing anything the vendor's policy would bounce, this isn't the node for it.
  • Cost + privacy - per-call billing, and your reference image leaves the machine. For sensitive source images that's a real consideration, not a theoretical one.

If you already run Qwen-Image-Edit locally, this is a competitor to that workflow, not an upgrade - but if you want Kontext-style editing without hosting the model, it's a one-node path that Just Works.

CategoryRunPod/Image

Inputs (11)

NameTypeDefaultDescription
api_keySTRING
promptSTRINGEdit the image to change the background
negative_promptSTRING
imageSTRING
sizeSTRING1024*1024
num_inference_stepsINT281–50
guidanceFLOAT2.00–10
seedINT-1-1–2147483647
output_formatCOMBOpng2 options: png, jpeg
enable_safety_checkerBOOLEANtrue
input_imageoptIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE