ComfyUI Qwen img2img enhancer adds per-region reference mask control
Capitan01R- · reddit · 2026-10-07
Developer Capitan01R added mask support to the reference strength node in ComfyUI-qwenimg21enhancer, letting users raise or lower attention on selected regions of a reference image instead of the whole photo.
- The node sits between the model loader and sampler; connect the reference's mask and set its image index (1 for the first connected reference, etc.).
- Two modes: focusonly applies strength to selected tokens while keeping the rest at native weighting; zerounmaskedtokens also blocks direct attention to unselected reference tokens across the diffusion transformer.
- maskthreshold controls how much of a token the mask must cover (1 = full coverage); strength above 1 raises priority, below 1 reduces it.
- Match maskresizemethod to your resizing (lanczos vs nearest-exact); chain nodes for separate references.
- The author notes this controls reference attention, not output-area locking: encoders still process the full image, so blocking a token doesn't erase information already carried into other tokens.
Sample workflow and downloads available on GitHub.
Related event: ComfyUI Qwen Image Enhancer Adds Reference Mask Support(2 posts)→
More from coding & agent
- Uber's Persona Guardrail lifts agent defense accuracy to 95.9%, cuts false approvals to 4.7% — amaarora · 2026-10-07
- steipete wires team agent to X: one prompt triggers PR reviews and pings the last code author — steipete · 2026-10-07
- Derive MCP Server Serves Market Data via Derive.xyz, No Auth Needed — modelcontextprotocol · 2026-10-07
- Open-Source Unreal Agent Cuts SWE Marathon Costs 48% vs Codex+Sol 6.1 — sull · 2026-10-07
- User Ditches Gmail Inbox: Grok Bot Cleans 2,000+ Emails via Text Commands — elonmusk · 2026-10-07
- Inside DoorDash, Stripe, Shopify: software factories running 130K agent tasks/month — Pavan_Belagatti · 2026-10-07