FLUX.2 Klein 9B Image Inpainting
Inpainting image using Flux.2 Klein and LanPaint
Flux
Flux.2 Klein
Image2Image
Inpainting
LanPaint
1
618
Flux.2 Klein 9B + LanPaint gives you high‑quality, mask‑based inpainting on Klein without needing a special “inpaint” checkpoint, using a dedicated LanPaint sampler instead of the default KSampler.
What LanPaint is (for Klein)
LanPaint is a training‑free inpainting/outpainting sampler that plugs into ComfyUI and can work with “any” diffusion model, including Flux.2 Klein.
In practice you swap your normal sampler (KSampler/Flux sampler) for a LanPaint KSampler and keep the rest of the inpaint graph (VAE Encode for Inpainting, Set Latent Noise Mask / Crop & Stitch, etc.).
Key features relevant to Flux Klein
High‑quality masked edits: Designed specifically around the classic Set Latent Noise Mask masking flow, so it’s ideal for Klein’s masked editing/inpainting workflows.
Model‑agnostic: Works as a universal inpaint/outpaint tool for modern base models, “especially useful” when the base model (like Klein) doesn’t ship a separate inpaint finetune.
Extra “thinking” steps: LanPaint adds iterative refinement during denoising (more internal reasoning steps) to improve structure and detail in the masked region.
Supports Z‑image inpainting and integrations (e.g., with Qwen Image Edit) to help with Klein’s common issues like image shifting.
Typical use cases with Flux.2 Klein 9B
Local semantic edits: Change clothing, accessories, small objects, or facial details in a Klein‑generated or real photo using a mask and text prompt.
Object removal/cleanup: Remove logos, wires, distracting elements and have Klein fill the region cleanly with LanPaint doing the inpaint.
Segment‑based “surgical” edits: Combine SAM/segment masks + LanPaint + Klein for accurate edits to only one region (e.g., “only the shirt”, “only the background”).
Multi‑reference masked edits: Use Klein’s multi‑reference editing plus LanPaint to, for example, replace a shirt with clothing from another image inside a painted mask.
High‑level ComfyUI wiring (conceptual)
Use a normal Flux.2 Klein 9B load + VAE (or XL VAE as recommended) and an inpaint‑style prep: VAE Encode (for Inpainting) + Set Latent Noise Mask or Crop & Stitch.
Feed the masked latent into LanPaint KSampler (instead of KSampler) with your text prompt and conditioning wired exactly as you would for Flux Klein, then decode back with VAE Decode.
Read more
Nodes & Models
PrimitiveFloat
WorkflowGraphics
CLIPLoader
qwen_3_8b_fp8mixed.safetensors
VAELoader
flux2-vae.safetensors
UNETLoader
flux-2-klein-9b.safetensors
LoadImage
CLIPTextEncode
ImageScaleToTotalPixels
ConditioningZeroOut
VAEEncode
VAEDecode
GetImageSize
ImageScale
SetLatentNoiseMask
ReferenceLatent
FluxGuidance
SaveImage
PreviewImage
AddLabel
ImageConcatMulti
AddLabel
ImageConcatMulti
rookiepsi_ResizeMask
LanPaint_KSampler
Flux.2 Klein 9B + LanPaint gives you high‑quality, mask‑based inpainting on Klein without needing a special “inpaint” checkpoint, using a dedicated LanPaint sampler instead of the default KSampler.
What LanPaint is (for Klein)
LanPaint is a training‑free inpainting/outpainting sampler that plugs into ComfyUI and can work with “any” diffusion model, including Flux.2 Klein.
In practice you swap your normal sampler (KSampler/Flux sampler) for a LanPaint KSampler and keep the rest of the inpaint graph (VAE Encode for Inpainting, Set Latent Noise Mask / Crop & Stitch, etc.).
Key features relevant to Flux Klein
High‑quality masked edits: Designed specifically around the classic Set Latent Noise Mask masking flow, so it’s ideal for Klein’s masked editing/inpainting workflows.
Model‑agnostic: Works as a universal inpaint/outpaint tool for modern base models, “especially useful” when the base model (like Klein) doesn’t ship a separate inpaint finetune.
Extra “thinking” steps: LanPaint adds iterative refinement during denoising (more internal reasoning steps) to improve structure and detail in the masked region.
Supports Z‑image inpainting and integrations (e.g., with Qwen Image Edit) to help with Klein’s common issues like image shifting.
Typical use cases with Flux.2 Klein 9B
Local semantic edits: Change clothing, accessories, small objects, or facial details in a Klein‑generated or real photo using a mask and text prompt.
Object removal/cleanup: Remove logos, wires, distracting elements and have Klein fill the region cleanly with LanPaint doing the inpaint.
Segment‑based “surgical” edits: Combine SAM/segment masks + LanPaint + Klein for accurate edits to only one region (e.g., “only the shirt”, “only the background”).
Multi‑reference masked edits: Use Klein’s multi‑reference editing plus LanPaint to, for example, replace a shirt with clothing from another image inside a painted mask.
High‑level ComfyUI wiring (conceptual)
Use a normal Flux.2 Klein 9B load + VAE (or XL VAE as recommended) and an inpaint‑style prep: VAE Encode (for Inpainting) + Set Latent Noise Mask or Crop & Stitch.
Feed the masked latent into LanPaint KSampler (instead of KSampler) with your text prompt and conditioning wired exactly as you would for Flux Klein, then decode back with VAE Decode.
Read more




