🎨 Qwen Image 2512 + SAM3 Face Inpainting Workflow
Perfil de execução
Descrição da fonte
🎨 Qwen Image 2512 + SAM3 Face Inpainting Workflow
Generate stunning portraits with automatic face detail enhancement — using single prompts or batch scheduling.
This ComfyUI workflow combines Qwen Image 2512 (a powerful text-to-image model) with SAM3 Smart Inpainter to:
Fontes
1 fonteTrechos de fonte
1 trechoSource context: 1096 downloads · Type Workflows · Base model Qwen
🖼️ Generate high-quality images from text prompts
👤 Automatically find and enhance faces (man + woman) using AI segmentation
🔁 Support single prompt OR batch prompt scheduling for creative variations
⚡ Speed up generation with CacheDiT acceleration
🎯 Use advanced sampling for better results
Perfect for: character portraits, fashion shoots, story illustration, face refinement, and creative batch generation.
Replaced the old PrimitiveInt node with my new AutoResetInt node
✅ Automatically resets to 0 after each generation
✅ Also resets if you cancel a generation
✅ Want to run multiple batches? Just wait for the first image to finish — the counter resets itself!
🎯 No more forgetting to reset — just click "Queue" and go
Added a simple toggle to choose your model format:
GGUF — for lower VRAM / quantized setups
FP8 / BF16 — for full quality on powerful GPUs
🎯 Pick what works best for your hardware — no need to edit the workflow
Install these in your ComfyUI/custom_nodes/ folder:
| Node Pack | Purpose | Link |
|-----------|---------|------|
| RES4LYF | Advanced sampler with better quality control | https://github.com/ClownsharkBatwing/RES4LYF |
| SAM3_SmartInpainter | Auto-detect & inpaint faces using SAM3 | https://github.com/majidfida/SAM3_SmartInpainter |
| ComfyUI-CacheDiT | Speed up Qwen Image generation | https://github.com/Jasonzzt/ComfyUI-CacheDiT |
| comfyui_auto_prompt_schedule | Run multiple prompts in one batch | https://github.com/ReinerBforartists/comfyui_auto_prompt_schedule |
ComfyUI-Easy-Sam3 or ComfyUI-RMBG (provides the sam3 Python package for SAM3_SmartInpainter)
Qwen Image model files : qwen_image_vae.safetensors , qwen_2.5_vl_7b_fp8_scaled.safetensors , and your chosen checkpoint (e.g., Qwen-Overcooked_fp8_V2.safetensors )
SAM3 model : Download sam3.pt from https://huggingface.co/Majidfida/Sam3/tree/main → place in ComfyUI/models/sam3/
Clone all required node packs into custom_nodes/
Install Python requirements (see each repo's README)
Download models and place them in correct folders
Restart ComfyUI
Drag the .json file into ComfyUI
Wait for nodes to load (missing nodes will show red)
Set the toggle true=Single Prompt | false=Batch Prompts → true
Edit the prompt in the ⚡Single Prompt⚡ node
Click Queue Prompt
Set the toggle → false
Edit prompts in the Input Prompts for Schedule node (format: "0": "prompt text", "30": "next prompt", ... )
Set max_frames in PromptSchedule node to control how many to generate
Click Queue Prompt — it will auto-run through your list
The workflow automatically:
Finds the woman's face → enhances it with prompt: "woman, exquisite detailed face..."
Finds the man's face → enhances it with prompt: "man with dark beard, exquisite detailed face..."
Blends both back into the main image
💡 Tip : To inpaint different subjects, chain more SAM_SmartInpainter nodes and change the prompt field (e.g., "hat" , "eyes" , "scarf" ).
| Parameter | Recommended | What It Does |
|-----------|-------------|--------------|
| min_mask_area | 0.001 | Allows tiny faces to be detected |
| crop_padding | 32–128 | Extra space around face for better inpainting |
| inpaint_resolution | 1280 | Higher = more detail in repainted face |
| denoise | 0.3–0.5 | Lower = subtle changes, higher = more creative |
| steps | 6 | Qwen Image works well with low steps |
| cfg | 1.0 | Keep low for Qwen Image |
🔹 Small or distant faces not detected?
→ Lower min_mask_area to 0.0005 and text_threshold to 0.25
🔹 Inpainting looks blurry?
→ Raise inpaint_resolution to 1280 or 1536
🔹 Edges look harsh?
→ Use blend_mode: feather and increase mask_blur
🔹 Want to inpaint more than faces?
→ Change the SAM prompt to "hat" , "logo" , "hands" — it will find and repaint that area
🔹 Batch generation too slow?
→ Enable CacheDiT and use fp8 models for faster runs
🔸 This workflow is designed for Qwen Image 2512 — other models may need parameter adjustments
🔸 I do not monitor this post — I may not reply to comments or issues. This is shared for the community to use and improve.
🔸 Always test with one image first before running large batches
Qwen Image 2512 — Alibaba Cloud / Qwen Team
SAM3 Model — Meta AI Research / Majidfida (HuggingFace)
RES4LYF — @ClownsharkBatwing
SAM3_SmartInpainter — @majidfida
CacheDiT — @Jasonzzt
Auto Prompt Schedule — @ReinerBforartists
🎨 Simple rule : Start with single prompt → get it perfect → then try batch mode for variations.
If faces aren't found → lower min_mask_area . If results look soft → raise inpaint_resolution .
Happy creating! ✨👫🖼️
Remaining hardware or download-size estimates are not available yet.
Requisitos
qwen_2.5_vl_7b_fp8_scaled.safetensors
EncontradoText encoder · 8.74 GB · Hugging Face · Majidfida/Sam3
VAE · Hugging Face · Majidfida/Sam3
Qwen-Overcooked_fp8_V2.safetensors
Arquivo não verificadoCheckpoint · Hugging Face · Majidfida/Sam3
sam3.pt
Não resolvidoSegmentation · Unknown
Pacote de nós · Registry
comfyui_nvidia_rtx_nodes
Não resolvidoPacote de nós · Registry
ComfyUI-Chibi-Nodes
EncontradoPacote de nós · Registry
comfyui-custom-scripts
EncontradoPacote de nós · Registry
comfyui-impact-pack
EncontradoPacote de nós · Registry
comfyui-workflow-encrypt
EncontradoPacote de nós · Registry
RES4LYF
EncontradoPacote de nós · Registry
rgthree-comfy
EncontradoPacote de nós · Registry