Model card
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657---license: creativeml-openrail-mtags: - stable-diffusion - stable-diffusion-v1-5 - inpainting - npuforgebase_model: - stable-diffusion-v1-5/stable-diffusion-v1-5 - stable-diffusion-v1-5/stable-diffusion-inpainting---
# SD 1.5 inpainting difference (for npuforge)
One file, `sd15inp_diff_f16.safetensors`, that turns an ordinary 4-channel SD 1.5checkpoint into a 9-channel inpainting model ("add difference"). It is used by[npuforge](https://github.com/AbrahamPaulJ/npuforge) on Android to convert SD 1.5checkpoints 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 4in the base. Channels 0–3 hold `inpainting − base`; channels 4–8 hold the inpaintingmodel'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 producedcorrect, cleanly blended inpaints on a five-prompt fixture, and float16 storage matchedfloat32 storage within ordinary build-to-build variation. Checkpoints far from baseSD 1.5 are untested.
## License
Derived from Stable Diffusion v1.5 and Stable Diffusion Inpainting and distributedunder 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.README.mdAdded+57