Nodes/JLC Flux2 ControlNet/ JLC Flux2 ControlNet Inpaint Adapter - Experimental
ComfyUI Node

 JLC Flux2 ControlNet Inpaint Adapter - Experimental

Mask-aware in/out-painting for FLUX.2, bolted onto the ControlNet path

By Damkohler·Created 2 months ago·Updated 26 days ago· 20
 JLC Flux2 ControlNet Inpaint Adapter - Experimental
  • conditioning
  • vae
  • image
  • mask
  • conditioning
  • vae
diagnosticstrue

The FLUX.2-dev Fun ControlNet Union has a mask-aware path built in, but nothing in ComfyUI core wires it up for you. JLC Flux2 ControlNet Inpaint Adapter - Experimental is that wiring: you put it after a JLC ControlNet Apply or Orchestrator node, hand it a source image and a mask, and it packs the keep-mask context plus the masked-source latent into the ControlNet stream so the first active branch does mask-aware in/out-painting. Every "Experimental" in the name is there on purpose - this is the least settled corner of an otherwise stable pack.

How it works

The mask convention is the thing to memorize, because it's inverted from what a lot of tools teach: white = editable/regenerate, black = preserve/retain. The adapter takes conditioning (the output of an Apply or Orchestrator), the vae, an image, and a mask, and builds the 260-channel packed context - the control latent, the four-channel hard keep-mask, and the masked-source Flux2 latent. Release 1.0.1 uses a hard binary mask thresholded at 0.5, and the source image and mask must already match the active sampling canvas exactly; mismatched dimensions are rejected with a clear error rather than silently resized.

Two structural rules matter. Only the first active ControlNet branch carries the shared inpaint context; additional branches stay ordinary full-frame controls and are not mask-gated. And the sampling side must use the validated clean/empty Flux2 latent - the adapter preserves that workflow rather than replacing it. Outputs are conditioning (mask-aware, into your guider) and a pass-through vae.

When you'd reach for it

Classic mask-based editing, done with ControlNet precision instead of an edit model's whole-frame drift. The author's tested recipe: OpenPose/DWPose as the host control (since a human pose map survives the mask well), auxiliary dense controls like depth or luminance kept weak and short-ranged, and reduced-size reference images for context. The pack's example is 1024×1536 output with warmed caches, which is where the inpaint path stops feeling experimental.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/Damkohler/JLC-Flux2-ControlNet.git

Restart ComfyUI or install "JLC Flux2 ControlNet" via Manager. Needs current ComfyUI with native FLUX.2 support, Python 3.10+, a FLUX.2-dev model stack, and the Fun ControlNet Union checkpoint in ComfyUI/models/controlnet/. No preprocessors included.

What to expect going in

Read this twice: the adapter is experimental and the author says so in every channel. Hard mask boundaries can produce seed-variable edge or contour artifacts - run multiple seeds before you trust a result. Dense or high-strength auxiliary branches can compete with the inpaint guidance and imprint source structure into the region you're trying to regenerate. If you see mask-shaped grey artifacts, that's the removed mask-expansion/feathering feature doing its ghost. For a stable inpainting alternative on FLUX.2, the community still leans on FLUX.1 Fill dev or the edit models; this is for when you specifically want ControlNet-strength control over the mask-aware path.

CategoryFlux2 Controlnet

Inputs (5)

NameTypeDefaultDescription
conditioningCONDITIONING
vaeVAE
imageIMAGE
maskMASK
diagnosticsBOOLEANtrue

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
vaeVAE