fix(processing): round init images to a pipeline-declared multiple

The init-image snap rounds to the VAE factor, but the LLaDA pipeline needs
16 for its transformer patch and 32 when editing, since the source image is
halved for the semantic encoder. The pipeline now declares patch_size for
the shared rounding and init_image_multiple for input images, and
get_vae_scale_factor honours the latter when an init image is present.
check_inputs reads the same attributes.
This commit is contained in:
CalamitousFelicitousness
2026-09-08 02:32:47 +01:00
parent 51320d0289
commit fa7243b239
5 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -738,7 +738,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
def init(self, all_prompts=None, all_seeds=None, all_subseeds=None):
if self.init_images is not None and len(self.init_images) > 0:
vae_scale_factor = sd_vae.get_vae_scale_factor()
vae_scale_factor = sd_vae.get_vae_scale_factor(init_image=True)
if self.width is None or self.width == 0:
self.width = int(vae_scale_factor * (self.init_images[0].width * self.scale_by // vae_scale_factor))
if self.height is None or self.height == 0: