Inpainting cleanup: misc fixes following PR #2309 review
- sdxl_train: drop leftover .reshape(batch["images"].shape) no-op in
masked-image VAE encode (dead since the ff7945d batched-mask fix).
- model_util.expand_unet_to_inpainting: use unet.register_to_config(in_channels=9)
so the diffusers FrozenDict stays in sync (the previous isinstance(..., dict)
guard either silently skipped or raised, depending on diffusers version).
- sample_image_inference: round resolution to mod-32 for SDXL (2 downsamples,
latent /4) and mod-64 for SD1.5/2.x (3 downsamples, latent /8); fix the
inaccurate "SDXL requires latents divisible by 8" comment.
- inpainting_minimal_inference: remove unused denoise() — the actual loop is
inlined in main().
- BaseDataset.random_mask: drop unused ratio / mask_full_image parameters and
the dead cloud_mask import.
- Rename per-prompt --img directive to --i for consistency with Musubi Tuner
(which already uses --i alongside the shared w/h/l/d/s directives).
- When --train_inpainting is set but the prompt has no --i, warn and skip the
sample instead of falling through to the standard pipeline (which would
crash the 9-channel UNet on 4-channel input). Matches the existing
missing-file skip behaviour.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>