Skip to content

fix: restore image mask for non-inpaint image to image#1390

Open
wbruna wants to merge 1 commit intoleejet:masterfrom
wbruna:sd_mask_i2i
Open

fix: restore image mask for non-inpaint image to image#1390
wbruna wants to merge 1 commit intoleejet:masterfrom
wbruna:sd_mask_i2i

Conversation

@wbruna
Copy link
Copy Markdown
Contributor

@wbruna wbruna commented Apr 5, 2026

No description provided.

latents.ref_latents = std::move(ref_latents);

if (sd_version_is_inpaint(sd_ctx->sd->version)) {
if (!latents.init_latent.empty()) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially did the full check:

sd_version_is_inpaint(sd_ctx->sd->version) || (!latents.init_latent.empty() && !latent_mask.empty())

but inpaint models always need an input image anyway, and moving an empty mask over the empty result won't affect anything.

@stduhpf
Copy link
Copy Markdown
Contributor

stduhpf commented Apr 5, 2026

This is also addressed by the updated version of #1357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants