AbrahamPJ commited on
Commit
dcf634d
·
verified ·
1 Parent(s): 05c2ab6

Model card

Browse files
Files changed (1) hide show
  1. README.md +57 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ tags:
4
+ - stable-diffusion
5
+ - stable-diffusion-v1-5
6
+ - inpainting
7
+ - npuforge
8
+ base_model:
9
+ - stable-diffusion-v1-5/stable-diffusion-v1-5
10
+ - stable-diffusion-v1-5/stable-diffusion-inpainting
11
+ ---
12
+
13
+ # SD 1.5 inpainting difference (for npuforge)
14
+
15
+ One file, `sd15inp_diff_f16.safetensors`, that turns an ordinary 4-channel SD 1.5
16
+ checkpoint into a 9-channel inpainting model ("add difference"). It is used by
17
+ [npuforge](https://github.com/AbrahamPaulJ/npuforge) on Android to convert SD 1.5
18
+ checkpoints into inpainting models for Qualcomm NPUs.
19
+
20
+ ## What it contains
21
+
22
+ For every UNet tensor (`model.diffusion_model.*`, 686 tensors, 859,535,364 values):
23
+
24
+ ```
25
+ diff = sd-v1-5-inpainting − v1-5-pruned-emaonly (computed in float32, stored as float16)
26
+ ```
27
+
28
+ `input_blocks.0.0.weight` (`conv_in`) is 9 channels wide in the inpainting model and 4
29
+ in the base. Channels 0–3 hold `inpainting − base`; channels 4–8 hold the inpainting
30
+ model's own mask / masked-image weights. Applying it is therefore always:
31
+
32
+ ```
33
+ inpaint_unet = zero_pad_input_channels(custom_unet) + diff
34
+ ```
35
+
36
+ Text encoder and VAE are not included; the custom checkpoint keeps its own.
37
+
38
+ | | |
39
+ |---|---|
40
+ | File size | 1,719,165,856 bytes |
41
+ | SHA-256 | `9f08e2684fc2c6261e705e28ff437fd0fae569b1dcf62336afef5994beb6d487` |
42
+ | Largest float16 rounding error | 0.000394 (max \|diff\| 1.427) |
43
+ | 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` |
44
+
45
+ ## Scope of testing
46
+
47
+ Measured on one phone (Snapdragon 8 Elite) through npuforge's inpaint template:
48
+ DreamShaper 8 and AbsoluteReality 1.6525 with this difference applied produced
49
+ correct, cleanly blended inpaints on a five-prompt fixture, and float16 storage matched
50
+ float32 storage within ordinary build-to-build variation. Checkpoints far from base
51
+ SD 1.5 are untested.
52
+
53
+ ## License
54
+
55
+ Derived from Stable Diffusion v1.5 and Stable Diffusion Inpainting and distributed
56
+ under the same CreativeML OpenRAIL-M license, including its use-based restrictions
57
+ (Attachment A of the license). You are responsible for how you use models produced with it.