SD 1.5 inpainting difference (for npuforge)
One file, sd15inp_diff_f16.safetensors, that turns an ordinary 4-channel SD 1.5
checkpoint into a 9-channel inpainting model ("add difference"). It is used by
npuforge on Android to convert SD 1.5
checkpoints into inpainting models for Qualcomm NPUs.
What it contains
For every UNet tensor (model.diffusion_model.*, 686 tensors, 859,535,364 values):
diff = sd-v1-5-inpainting โ v1-5-pruned-emaonly (computed in float32, stored as float16)
input_blocks.0.0.weight (conv_in) is 9 channels wide in the inpainting model and 4
in the base. Channels 0โ3 hold inpainting โ base; channels 4โ8 hold the inpainting
model's own mask / masked-image weights. Applying it is therefore always:
inpaint_unet = zero_pad_input_channels(custom_unet) + diff
Text encoder and VAE are not included; the custom checkpoint keeps its own.
| File size | 1,719,165,856 bytes |
| SHA-256 | 9f08e2684fc2c6261e705e28ff437fd0fae569b1dcf62336afef5994beb6d487 |
| Largest float16 rounding error | 0.000394 (max |diff| 1.427) |
| Sources | stable-diffusion-v1-5/stable-diffusion-inpainting sd-v1-5-inpainting.ckpt; stable-diffusion-v1-5/stable-diffusion-v1-5 v1-5-pruned-emaonly.safetensors |
Scope of testing
Measured on one phone (Snapdragon 8 Elite) through npuforge's inpaint template: DreamShaper 8 and AbsoluteReality 1.6525 with this difference applied produced correct, cleanly blended inpaints on a five-prompt fixture, and float16 storage matched float32 storage within ordinary build-to-build variation. Checkpoints far from base SD 1.5 are untested.
License
Derived from Stable Diffusion v1.5 and Stable Diffusion Inpainting and distributed under the same CreativeML OpenRAIL-M license, including its use-based restrictions (Attachment A of the license). You are responsible for how you use models produced with it.