ComfyUI: Flux.2 Klein and SAM 3 line art tutorial

Learn to prepare line art for SDXL LoRA training in ComfyUI with Flux.2 Klein, SAM 3 cutouts, four sampling steps and adjustable output dimensions.

Player not loading? Watch on YouTube

This ComfyUI tutorial uses Flux.2 Klein 9B and SAM 3 to prepare black outlines on a white background for SDXL LoRA training. The speaker prefers this workflow to ControlNet for this task because he finds that ControlNet retains too much detail. His prompt asks the model to remove shading, gradients, textures and colors.

SAM 3 isolates the subject with the prompt "subject," then an image composite places it on white before generation. Images that already have a clean background can bypass the cutout stage. Examples include clothing, a character and a bird, with some unwanted folds and doubled lines still requiring retouching.

The walkthrough uses a GGUF model and explains how subgraphs and ComfyUI's native switch node can alternate model loaders. The generation pipeline uses four sampling steps. Input scaling targets one megapixel, and the speaker says 1024 by 1024 works best for this model. He also tries about 1.6 megapixels, which takes longer and, he suggests, may improve quality.

For training sets that need fixed dimensions, he shows how to remove automatic scaling and set width and height directly. Composite offsets adjust subject placement. The final example still has a gap in an outline, so the workflow does not guarantee closed contours.