Sign In

Qwen Image 2.1 Inpainting Workflow

Download

1 variant available

Config Other

Qwen_image_2.1_SAM-Inpaint.json

54.95 KB

Verified:

Type
Workflows
Stats

81

Reviews
Published

Sep 22, 2026

Base Model

Qwen 2

Hash
AutoV2
9A19AA251F
default creator card background decoration
Followers - 165

165

Likes - 1700

1.7K

Screenshot 2026-09-22 131556.png

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.