CivArchive
    Qwen Image 2.1 Inpainting Workflow - v1.0
    Preview 143490764

    This ComfyUI workflow leverages the power of Qwen Image 2.1, a state-of-the-art vision-language model for understanding and generating images, combined with SAM 3.1 (Segment Anything Model), for precise object segmentation. Together, they enable intelligent, context-aware inpainting — the process of removing unwanted objects or editing specific regions of an image with high fidelity.

    Workflow Overview

    1. Image Input: The workflow begins by loading the source image that requires inpainting.

    2. SAM 3.1 Segmentation: SAM 3.1 is used to automatically segment the region(s) to be inpainted. Users can provide prompts (e.g., text-based or point-click) to define the target area with pixel-level accuracy.

    3. Qwen Image 2.1 Context Understanding: Qwen Image 2.1 analyzes the surrounding context, the segmented region, and any user-provided text prompt to understand what should replace the masked area. It generates a detailed description or latent representation of the desired output.

    4. Inpainting Generation: The masked image, context understanding from Qwen, and segmentation mask are fed into an inpainting model. The model generates a seamless replacement for the masked region, guided by Qwen’s semantic understanding.

    5. Output: The final image is displayed, showing the inpainted result with the unwanted object removed or the desired content added naturally.

    Description

    FAQ

    Comments (1)

    CogDiffusionOct 11, 2026
    CivitAI

    You are running the whole image through the Vae instead of stitching. Which makes it lossy and unreliable.

    Workflows
    Qwen 2

    Details

    Downloads
    1,321
    Platform
    CivitAI
    Platform Status
    Available
    Created
    9/22/2026
    Updated
    11/7/2026
    Deleted
    -

    Files

    Qwen_image_2.1_SAM-Inpaint.json

    Mirrors