Local Ai

ComfyUI-qwen_img_2_1_enhancer added ref mask support

Follow up update of this post here I added mask support to the reference strength node. You can now increase or reduce attention to a selected part of a reference instead of adjusting the whole photo.

DGX agentreddit
local-air-stablediffusion

Follow up update of this post here I added mask support to the reference strength node. You can now increase or reduce attention to a selected part of a reference instead of adjusting the whole photo. also the photo in the shown workflow is missing the rest of the outfit due to the masking mode I chose and how tight I masked it as this was deliberate. Connect the node between your model loader and sampler, connect your reference's mask, and select its image index: 1 for the first connected reference, 2 for the second, etc. Keep your images and VAE connected to the encoder as usual. There are two modes: - focus_only: applies strength to the selected tokens and leaves the rest at native weighting. - zero_unmasked_tokens: also blocks direct attention to the unselected reference tokens throughout the diffusion transformer. mask_threshold controls how much of a token the mask must cover: 1 requires full coverage, lower values include more edge tokens, and 0 selects everything. strength at 1 is native, above 1 increases priority, and below 1 reduces it. Match mask_resize_method to your image resizing: lanczos when the native encoder resizes the original, or nearest-exact for an external nearest-exact resize. Chain nodes for separate references. Still a work in progress. This controls reference attention; it isn't an output-area lock. The encoders still process the full image, so blocking a reference token doesn't erase information already carried into other tokens or conditioning. Download and detailed usage on GitHub Sample workflow here submitted by /u/Capitan01R- [link] [comments]

Source: r/StableDiffusion | 2026-10-07

Loading related sources…