Publish HQ three-style manifest and validation
Browse files- README.md +40 -47
- manifest.json +33 -123
README.md
CHANGED
|
@@ -4,71 +4,64 @@ pipeline_tag: image-to-image
|
|
| 4 |
base_model: neonforestmist/Clover-Image-Tiny-Inpaint
|
| 5 |
license: creativeml-openrail-m
|
| 6 |
tags:
|
| 7 |
-
- clover-image
|
| 8 |
-
- inpainting
|
| 9 |
- coreml
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Clover Image Tiny Inpaint — Core ML
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
Clover.
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
```
|
| 22 |
-
|
| 23 |
-
VAEEncoder.mlmodelc
|
| 24 |
-
VAEDecoder.mlmodelc
|
| 25 |
-
SafetyChecker.mlmodelc
|
| 26 |
-
UnetChunk1.mlmodelc
|
| 27 |
-
UnetChunk2.mlmodelc
|
| 28 |
-
vocab.json
|
| 29 |
-
merges.txt
|
| 30 |
-
```
|
| 31 |
|
| 32 |
-
|
| 33 |
-
and masked-image latent. White mask pixels are regenerated; black pixels are
|
| 34 |
-
preserved. The VAE encoder creates the masked-image latent locally.
|
| 35 |
|
| 36 |
-
|
| 37 |
-
context margin around focused mask crops. Composite the result through the
|
| 38 |
-
exact mask to preserve all source pixels outside the edit.
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
the independent fixed-shape Core ML smoke test at **46.2 dB**, above the 35 dB
|
| 46 |
-
release threshold. The manifest records every runtime file's size and SHA-256.
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
.venv-coreml/bin/python coreml-tools/manifest_inpaint.py \
|
| 54 |
-
coreml-inpaint-release-v2 \
|
| 55 |
-
--model-dir artifacts/clover-image-tiny-inpaint-v2
|
| 56 |
-
```
|
| 57 |
|
| 58 |
-
|
| 59 |
-
perform classifier-free guidance as two serial passes to reduce peak memory.
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## Citation
|
| 66 |
|
| 67 |
```bibtex
|
| 68 |
-
@software{
|
| 69 |
author = {Lukas Lozada Perez},
|
| 70 |
-
title = {Clover Image Tiny Inpaint
|
| 71 |
year = {2026},
|
| 72 |
-
url = {https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint}
|
| 73 |
}
|
| 74 |
```
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
base_model: neonforestmist/Clover-Image-Tiny-Inpaint
|
| 5 |
license: creativeml-openrail-m
|
| 6 |
tags:
|
|
|
|
|
|
|
| 7 |
- coreml
|
| 8 |
+
- ios
|
| 9 |
+
- inpainting
|
| 10 |
+
- lora
|
| 11 |
+
- stable-diffusion
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Clover Image Tiny Inpaint HQ — Core ML
|
| 15 |
|
| 16 |
+
Core ML resources for the high-quality Clover Image Tiny inpainting pipeline.
|
| 17 |
+
The iOS 18 batch-one U-Net accepts `[1, 9, 64, 64]`, runs classifier-free
|
| 18 |
+
guidance as two serial passes, and exposes 144 mutable Core ML states for exact
|
| 19 |
+
runtime composition of up to three Clover styles.
|
| 20 |
|
| 21 |
+
The HQ U-Net is under `hq-v3/Unet.mlmodelc`. Shared Clover resources remain at
|
| 22 |
+
the repository root so app upgrades only download files whose checksums
|
| 23 |
+
changed. `hq-v3/adapter-schema.json` maps each small `.safetensors` style into
|
| 24 |
+
one of three independent state slots.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
## Validation
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
PyTorch/Core ML parity on deterministic inputs:
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
| Configuration | PSNR |
|
| 31 |
+
|---|---:|
|
| 32 |
+
| Base HQ inpainting U-Net | **78.56 dB** |
|
| 33 |
+
| Monet 0.70 + Pointillism 0.45 + Watercolor Anime 1.10 | **78.47 dB** |
|
| 34 |
|
| 35 |
+
The release gate is 35 dB. The three-style result validates the exact
|
| 36 |
+
block-concatenated LoRA sum rather than a UI-only approximation.
|
| 37 |
|
| 38 |
+
Held-out 24-case inpainting quality relative to the previous release:
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
| Metric | Previous | HQ |
|
| 41 |
+
|---|---:|---:|
|
| 42 |
+
| Masked prompt CLIP similarity | 0.2642 | **0.2768** |
|
| 43 |
+
| Masked target MAE | 0.2510 | **0.2231** |
|
| 44 |
+
| Changed pixels outside the mask | 0 | **0** |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
## Runtime contract
|
|
|
|
| 47 |
|
| 48 |
+
- Minimum OS: iOS 18
|
| 49 |
+
- Resolution: 512×512
|
| 50 |
+
- U-Net input: noisy latent (4) + mask (1) + masked image latent (4)
|
| 51 |
+
- Mask: white regenerates, black preserves
|
| 52 |
+
- Maximum simultaneous styles: 3
|
| 53 |
+
- Safety checker: not constructed by the Clover iOS pipeline
|
| 54 |
|
| 55 |
## Citation
|
| 56 |
|
| 57 |
```bibtex
|
| 58 |
+
@software{lozadaperez2026cloverimagetinyinpaintcoreml,
|
| 59 |
author = {Lukas Lozada Perez},
|
| 60 |
+
title = {Clover Image Tiny Inpaint HQ Core ML},
|
| 61 |
year = {2026},
|
| 62 |
+
url = {https://huggingface.co/neonforestmist/Clover-Image-Tiny-Inpaint-CoreML}
|
| 63 |
}
|
| 64 |
```
|
| 65 |
+
|
| 66 |
+
Designed and developed independently by Lukas Lozada Perez. Open weights under
|
| 67 |
+
the CreativeML Open RAIL-M license; inference runs completely on device.
|
manifest.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
{
|
| 2 |
-
"schema_version":
|
| 3 |
"model": "neonforestmist/Clover-Image-Tiny-Inpaint",
|
| 4 |
"base_model": "neonforestmist/Clover-Image-Tiny",
|
| 5 |
"minimum_ios": "18.0",
|
|
|
|
| 6 |
"resolution": [
|
| 7 |
512,
|
| 8 |
512
|
| 9 |
],
|
|
|
|
| 10 |
"unet_input": {
|
| 11 |
"shape": [
|
| 12 |
1,
|
|
@@ -28,131 +30,43 @@
|
|
| 28 |
"mask_crop_padding": 96,
|
| 29 |
"composite_outside_mask": "exact source pixels"
|
| 30 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
"resources": [
|
| 32 |
{
|
| 33 |
-
"path": "
|
| 34 |
-
"
|
| 35 |
-
"sha256": "8211508a22331e6868fa9d207c6532ae5fc11791e8ceac6bf6fa4c7dd89004e8"
|
| 36 |
-
},
|
| 37 |
-
{
|
| 38 |
-
"path": "SafetyChecker.mlmodelc/coremldata.bin",
|
| 39 |
-
"size": 1549,
|
| 40 |
-
"sha256": "f57494e9bc01a089c73ba6b1b9554e1a3df155efbf7cf36223ba10ae494f0d58"
|
| 41 |
-
},
|
| 42 |
-
{
|
| 43 |
-
"path": "SafetyChecker.mlmodelc/metadata.json",
|
| 44 |
-
"size": 4687,
|
| 45 |
-
"sha256": "4af6e1bd32288fd5e6e6f171d7e63a8a3f3ec776b45c16bb7e3fe352e36158f0"
|
| 46 |
-
},
|
| 47 |
-
{
|
| 48 |
-
"path": "SafetyChecker.mlmodelc/model.mil",
|
| 49 |
-
"size": 318080,
|
| 50 |
-
"sha256": "aacdc5f65afa08beec17ab2f0f04d866ce6df14dab7845ebe6465ffd25790ea3"
|
| 51 |
-
},
|
| 52 |
-
{
|
| 53 |
-
"path": "SafetyChecker.mlmodelc/weights/weight.bin",
|
| 54 |
-
"size": 607990114,
|
| 55 |
-
"sha256": "ffdfb1a4774feb816dd2ccc3e304d109013bc9591e188dcab840789583fdc1b4"
|
| 56 |
-
},
|
| 57 |
-
{
|
| 58 |
-
"path": "TextEncoder.mlmodelc/analytics/coremldata.bin",
|
| 59 |
"size": 243,
|
| 60 |
-
"sha256": "
|
| 61 |
},
|
| 62 |
{
|
| 63 |
-
"path": "
|
| 64 |
-
"
|
| 65 |
-
"
|
|
|
|
| 66 |
},
|
| 67 |
{
|
| 68 |
-
"path": "
|
| 69 |
-
"
|
| 70 |
-
"
|
|
|
|
| 71 |
},
|
| 72 |
{
|
| 73 |
-
"path": "
|
| 74 |
-
"
|
| 75 |
-
"
|
|
|
|
| 76 |
},
|
| 77 |
{
|
| 78 |
-
"path": "
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
|
| 82 |
-
{
|
| 83 |
-
"path": "UnetChunk1.mlmodelc/analytics/coremldata.bin",
|
| 84 |
-
"size": 243,
|
| 85 |
-
"sha256": "7ee3483e4486c1bdc21299013aa9d3a25fcafb3d064750294c822cf8d6708151"
|
| 86 |
-
},
|
| 87 |
-
{
|
| 88 |
-
"path": "UnetChunk1.mlmodelc/coremldata.bin",
|
| 89 |
-
"size": 532,
|
| 90 |
-
"sha256": "f1ebbe33a5324d71a517efe9d5f5b8f9bbcb9bd2e991a57171840161b3a63430"
|
| 91 |
-
},
|
| 92 |
-
{
|
| 93 |
-
"path": "UnetChunk1.mlmodelc/metadata.json",
|
| 94 |
-
"size": 5242,
|
| 95 |
-
"sha256": "54c3b23ff2d46f00cbe5e3b03e79abf4e3fbb2bc811fd440219107c79dde2ef1"
|
| 96 |
-
},
|
| 97 |
-
{
|
| 98 |
-
"path": "UnetChunk1.mlmodelc/model.mil",
|
| 99 |
-
"size": 359479,
|
| 100 |
-
"sha256": "6067c2cbbb7f35ca3f3811ded8191fab58ddd1c27ee3de5e8249fa6e9c0d7581"
|
| 101 |
-
},
|
| 102 |
-
{
|
| 103 |
-
"path": "UnetChunk1.mlmodelc/weights/weight.bin",
|
| 104 |
-
"size": 324651584,
|
| 105 |
-
"sha256": "091529bc9e2b2bdda0508614e223570f7a8a4fe288bc510ec844635ba2f01046"
|
| 106 |
-
},
|
| 107 |
-
{
|
| 108 |
-
"path": "UnetChunk2.mlmodelc/analytics/coremldata.bin",
|
| 109 |
-
"size": 243,
|
| 110 |
-
"sha256": "1f7d7cba85c9edd629d133c0224baf71e989ad4bfe1da89f37706f1d6cab45ea"
|
| 111 |
-
},
|
| 112 |
-
{
|
| 113 |
-
"path": "UnetChunk2.mlmodelc/coremldata.bin",
|
| 114 |
-
"size": 513,
|
| 115 |
-
"sha256": "94ea7e153dab4f55ad8a40d12f9853422f8bdce240f5b608f3ae72ac3229fb35"
|
| 116 |
-
},
|
| 117 |
-
{
|
| 118 |
-
"path": "UnetChunk2.mlmodelc/metadata.json",
|
| 119 |
-
"size": 4926,
|
| 120 |
-
"sha256": "4c3b0ad1527a1b457d22a70385ad3d8424d72d4cecb825a12e996539de649a16"
|
| 121 |
-
},
|
| 122 |
-
{
|
| 123 |
-
"path": "UnetChunk2.mlmodelc/model.mil",
|
| 124 |
-
"size": 460764,
|
| 125 |
-
"sha256": "82541a2df3d6b955984b151f66dc7b48f44773c1c4a3ad81b64c474bea56ba9e"
|
| 126 |
-
},
|
| 127 |
-
{
|
| 128 |
-
"path": "UnetChunk2.mlmodelc/weights/weight.bin",
|
| 129 |
-
"size": 322211328,
|
| 130 |
-
"sha256": "04910ba6d4ca88b34dd1202c848aebfc33e339010d203573ebc4138a4e9f78ba"
|
| 131 |
-
},
|
| 132 |
-
{
|
| 133 |
-
"path": "VAEDecoder.mlmodelc/analytics/coremldata.bin",
|
| 134 |
-
"size": 243,
|
| 135 |
-
"sha256": "ff20b000564aa02c66b7e254258a5c8ba7d34fdb99c54be3c85a42d8eea45a62"
|
| 136 |
-
},
|
| 137 |
-
{
|
| 138 |
-
"path": "VAEDecoder.mlmodelc/coremldata.bin",
|
| 139 |
-
"size": 879,
|
| 140 |
-
"sha256": "7bb1f9ddd844d6c8e14c6e52a1e05d7c493e71091d788798d065141bbe3e131b"
|
| 141 |
-
},
|
| 142 |
-
{
|
| 143 |
-
"path": "VAEDecoder.mlmodelc/metadata.json",
|
| 144 |
-
"size": 2690,
|
| 145 |
-
"sha256": "72a20fd0a1db9e6d3395c6be9ab3c91b70fb771c138d8b7fef5ccc6b9153539c"
|
| 146 |
-
},
|
| 147 |
-
{
|
| 148 |
-
"path": "VAEDecoder.mlmodelc/model.mil",
|
| 149 |
-
"size": 173366,
|
| 150 |
-
"sha256": "db77ff85f06e97d687f09b9e1ba478f7573a3e0e344137d71cb57f1f4f28c25b"
|
| 151 |
-
},
|
| 152 |
-
{
|
| 153 |
-
"path": "VAEDecoder.mlmodelc/weights/weight.bin",
|
| 154 |
-
"size": 98993280,
|
| 155 |
-
"sha256": "ca45a093443d3a9719c5f7c61010315e94ffc8019eff27a0eeb52075a05ac752"
|
| 156 |
},
|
| 157 |
{
|
| 158 |
"path": "VAEEncoder.mlmodelc/analytics/coremldata.bin",
|
|
@@ -180,14 +94,10 @@
|
|
| 180 |
"sha256": "71bf826e5ee1b455462aff0b34e3a469f5f58955ae715708962b1d81db92dc64"
|
| 181 |
},
|
| 182 |
{
|
| 183 |
-
"path": "
|
| 184 |
-
"
|
| 185 |
-
"
|
| 186 |
-
|
| 187 |
-
{
|
| 188 |
-
"path": "vocab.json",
|
| 189 |
-
"size": 1098502,
|
| 190 |
-
"sha256": "4e6a66b6903c12d273a1a6645f761a2de07e239facfc52fd797b83a75014ca78"
|
| 191 |
}
|
| 192 |
]
|
| 193 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"schema_version": 2,
|
| 3 |
"model": "neonforestmist/Clover-Image-Tiny-Inpaint",
|
| 4 |
"base_model": "neonforestmist/Clover-Image-Tiny",
|
| 5 |
"minimum_ios": "18.0",
|
| 6 |
+
"requires_base_model": true,
|
| 7 |
"resolution": [
|
| 8 |
512,
|
| 9 |
512
|
| 10 |
],
|
| 11 |
+
"max_adapter_count": 3,
|
| 12 |
"unet_input": {
|
| 13 |
"shape": [
|
| 14 |
1,
|
|
|
|
| 30 |
"mask_crop_padding": 96,
|
| 31 |
"composite_outside_mask": "exact source pixels"
|
| 32 |
},
|
| 33 |
+
"validation": {
|
| 34 |
+
"samples": 24,
|
| 35 |
+
"masked_clip_similarity": 0.27676651254296303,
|
| 36 |
+
"masked_target_mae": 0.2230850402265787,
|
| 37 |
+
"base_psnr_db": 78.55727510619732,
|
| 38 |
+
"three_style_psnr_db": 78.4737949968816
|
| 39 |
+
},
|
| 40 |
"resources": [
|
| 41 |
{
|
| 42 |
+
"path": "Unet.mlmodelc/analytics/coremldata.bin",
|
| 43 |
+
"remote_path": "hq-v3/Unet.mlmodelc/analytics/coremldata.bin",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
"size": 243,
|
| 45 |
+
"sha256": "0776280c592bd31e478eecd0cac5918984d48e629d1ffa5a9d6432a698448c9e"
|
| 46 |
},
|
| 47 |
{
|
| 48 |
+
"path": "Unet.mlmodelc/coremldata.bin",
|
| 49 |
+
"remote_path": "hq-v3/Unet.mlmodelc/coremldata.bin",
|
| 50 |
+
"size": 14009,
|
| 51 |
+
"sha256": "4cb24ed826e3e090138e99e3eb334e706d6b8bf733771fe034355268456e6834"
|
| 52 |
},
|
| 53 |
{
|
| 54 |
+
"path": "Unet.mlmodelc/metadata.json",
|
| 55 |
+
"remote_path": "hq-v3/Unet.mlmodelc/metadata.json",
|
| 56 |
+
"size": 50802,
|
| 57 |
+
"sha256": "54a5d730ce8790f028faacfe44cf9b555fb3109153cb5ffd8016ff5deb0375d8"
|
| 58 |
},
|
| 59 |
{
|
| 60 |
+
"path": "Unet.mlmodelc/model.mil",
|
| 61 |
+
"remote_path": "hq-v3/Unet.mlmodelc/model.mil",
|
| 62 |
+
"size": 1206218,
|
| 63 |
+
"sha256": "2f7238a5825ae16c9dc054536d9a5dd7cf0963af2423979b4f84ae9121c6606a"
|
| 64 |
},
|
| 65 |
{
|
| 66 |
+
"path": "Unet.mlmodelc/weights/weight.bin",
|
| 67 |
+
"remote_path": "hq-v3/Unet.mlmodelc/weights/weight.bin",
|
| 68 |
+
"size": 1719146496,
|
| 69 |
+
"sha256": "0f6a88bcd1ae4f36c076d46d404373c2f5c44bf85975ed2737b23643b9040826"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
},
|
| 71 |
{
|
| 72 |
"path": "VAEEncoder.mlmodelc/analytics/coremldata.bin",
|
|
|
|
| 94 |
"sha256": "71bf826e5ee1b455462aff0b34e3a469f5f58955ae715708962b1d81db92dc64"
|
| 95 |
},
|
| 96 |
{
|
| 97 |
+
"path": "adapter-schema.json",
|
| 98 |
+
"remote_path": "hq-v3/adapter-schema.json",
|
| 99 |
+
"size": 55773,
|
| 100 |
+
"sha256": "b356bae467a4e60cb26151c5b2cad2d2dc298b057f44b71479096036ca53c1d9"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
]
|
| 103 |
}
|