Conversation
|
Target version: Target version adds Additional FindingsGPU/ML Operations: All changes are CPU-side mask preprocessing; GPU inference pipeline (text encoding, denoising, VAE operations) completely unaffected. The 70 µs CPU overhead does not impact GPU utilization or inference performance. Commits: Two commits implement inpainting quality improvements: mask inflation via 3×3 max-pooling (50974ff) and max-pooling downsampling to prevent single-pixel sampling artifacts (f2fb03b). Performance cost is justified by significant visual quality improvements at mask boundaries. 🔎 Full breakdown: Loci Inspector |


Note
Source pull request: leejet/stable-diffusion.cpp#1357
For all models in inpaint mode: Improve mask downsampling to latent size by taking the maximum over the 8x8 patch instead of a single sample in the corner
For inpaint models: Use masked diffusion for inpaint models too, to reduce color shift. That was previously disabled because of some artifacting near the edges of the mask, it is fixed by inflating the mask by 1 latent pixel for diffusion.
Example:
.\build\bin\sd-cli.exe --model ..\ComfyUI\models\checkpoints\sdxl\dreamshaperXL_lightningInpaint.safetensors -p "a dog sitting on a bench" --color --steps 16 --cfg-scale 1 --sampling-method euler_a --preview proj --preview-noisy --img-cfg-scale 1 -i .\bench.png --mask .\bench_mask.png --strength 1(not very noticable difference in that specific example, but there are some noticable "floaters" around the masked areas in the image on the right if you look closely)