Nodes/ComfyUI Assistant Node/PVL Kontext Dev (fal.ai)
ComfyUI Node

PVL Kontext Dev (fal.ai)

Change the prompt, keep the subject

By pvlprk·Created about a year ago·Updated 8 months ago· 1
PVL Kontext Dev (fal.ai)
  • image
  • IMAGE
prompt
seed-1
num_inference_steps28
guidance_scale2.5
num_images1
output_formatjpeg
sync_modefalse
accelerationnone
resolution_modematch_input
enable_safety_checkertrue

Kontext is the Flux family member that made instruction-based editing a one-sentence thing: feed it an image and a line like "change his shirt to a denim jacket" or "put this person on a beach," and it edits the image while holding the subject together. It does that by consuming the reference image in-context rather than through an adapter embedding, which is why it keeps identity across successive edits better than most things of its era - the community found it shockingly good at watermark removal specifically. This node runs the Dev tier (fal-ai/flux-kontext/dev) on fal's cloud, so you get all of that without downloading a 12B model or spending a night fighting fp8.

It's part of the ComfyUI Assistant Node pack from pvlprk. The mechanism is the pack's standard fal flow with an image input, which is the whole point here.

How it works

Your image is base64-encoded and sent alongside prompt to the Kontext Dev endpoint, then the result is polled for and pulled back as an IMAGE tensor. The model's job is to interpret your prompt as an edit instruction on the input - not as a fresh generation. The prompt is the entire interface: write instructions as you'd say them to a human editor.

The exposed knobs are: num_inference_steps (default 28), guidance_scale (default 2.5), seed, num_images (1–4), output_format, sync_mode, acceleration (none/regular/high), and resolution_mode - the interesting one. It defaults to match_input, meaning the output keeps your image's dimensions, but you can instead pick an aspect ratio (1:1, 16:9, 21:9, …) and let Kontext reframe the edit into that shape. That's a genuinely useful trick for turning a square source into a landscape crop with the scene extended to match.

The inputs that matter

  • image - what gets edited.
  • prompt - the instruction. "Change X to Y" language works far better than tag soup.
  • resolution_mode - match_input to keep dimensions, or an aspect ratio to reframe.
  • guidance_scale - 2.5 default; nudge up if edits are drifting too far from the input.

Output: one IMAGE.

Installing it

Part of pvlprk/comfyui-pvl-api-nodes. ComfyUI Manager (search "ComfyUI Assistant Node") or:

cd ComfyUI/custom_nodes
git clone https://github.com/pvlprk/comfyui-pvl-api-nodes

Set your fal.ai key as FAL_KEY (or FAL_API_KEY / FAL_CLIENT_KEY), restart, add credits.

Where people get burned

Kontext is at its best on local edits and subject-held changes; it can get sketchy on full-body reframing, where anatomy sometimes distorts - that's a known limitation of the family, not your setup. It's also a model that remembers the Kontext license drama: Dev is open-weights but with restrictions, and the cloud API applies its own safety filtering on top, so plan prompts accordingly. As always in this pack, watch for blank-placeholder errors and check the console.

CategoryPVL_tools

Inputs (11)

NameTypeDefaultDescription
promptSTRING
imageIMAGE
seedINT-1-1–4294967295
num_inference_stepsINT281–100
guidance_scaleFLOAT2.51–20
num_imagesINT11–4
output_formatCOMBOjpeg2 options: jpeg, png
sync_modeBOOLEANfalse
accelerationCOMBOnone3 options: none, regular, high
resolution_modeCOMBOmatch_input13 options: auto, match_input, 1:1, 16:9, 21:9, 3:2, +7
enable_safety_checkeroptBOOLEANtrue

Outputs (1)

NameTypeDescription
IMAGEIMAGE