Commit ·
a13a56b
0
Parent(s):
Duplicate from darkmaniac7/TokForge-CyberRealistic-V9-CoreML-6bit
Browse filesCo-authored-by: Ivan M <darkmaniac7@users.noreply.huggingface.co>
- .gitattributes +35 -0
- CyberRealistic-V9_palettized_split_einsum_v2_compiled.zip +3 -0
- README.md +86 -0
- Resources/TextEncoder.mlmodelc/analytics/coremldata.bin +3 -0
- Resources/TextEncoder.mlmodelc/coremldata.bin +3 -0
- Resources/TextEncoder.mlmodelc/metadata.json +89 -0
- Resources/TextEncoder.mlmodelc/model.mil +0 -0
- Resources/TextEncoder.mlmodelc/weights/weight.bin +3 -0
- Resources/Unet.mlmodelc/analytics/coremldata.bin +3 -0
- Resources/Unet.mlmodelc/coremldata.bin +3 -0
- Resources/Unet.mlmodelc/metadata.json +110 -0
- Resources/Unet.mlmodelc/model.mil +0 -0
- Resources/Unet.mlmodelc/weights/weight.bin +3 -0
- Resources/VAEDecoder.mlmodelc/analytics/coremldata.bin +3 -0
- Resources/VAEDecoder.mlmodelc/coremldata.bin +3 -0
- Resources/VAEDecoder.mlmodelc/metadata.json +81 -0
- Resources/VAEDecoder.mlmodelc/model.mil +0 -0
- Resources/VAEDecoder.mlmodelc/weights/weight.bin +3 -0
- Resources/VAEEncoder.mlmodelc/analytics/coremldata.bin +3 -0
- Resources/VAEEncoder.mlmodelc/coremldata.bin +3 -0
- Resources/VAEEncoder.mlmodelc/metadata.json +81 -0
- Resources/VAEEncoder.mlmodelc/model.mil +0 -0
- Resources/VAEEncoder.mlmodelc/weights/weight.bin +3 -0
- Resources/merges.txt +0 -0
- Resources/vocab.json +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
CyberRealistic-V9_palettized_split_einsum_v2_compiled.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5be529fad89d05d8609b2a6bc2d77a3a9cb93e8a30cb8d7a3ef74b61590ecb33
|
| 3 |
+
size 917040559
|
README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: creativeml-openrail-m
|
| 3 |
+
tags:
|
| 4 |
+
- text-to-image
|
| 5 |
+
- stable-diffusion
|
| 6 |
+
- cyberrealistic
|
| 7 |
+
- photorealistic
|
| 8 |
+
- coreml
|
| 9 |
+
- apple-neural-engine
|
| 10 |
+
- palettized
|
| 11 |
+
- tokforge
|
| 12 |
+
base_model:
|
| 13 |
+
- cyberdelia/CyberRealistic
|
| 14 |
+
pipeline_tag: text-to-image
|
| 15 |
+
library_name: ml-stable-diffusion
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## TokForge
|
| 19 |
+
|
| 20 |
+
- **Website:** https://tokforge.ai
|
| 21 |
+
- **Discord:** https://discord.gg/Acv3CBtfVm
|
| 22 |
+
- **Google Play:** https://play.google.com/store/apps/details?id=dev.tokforge
|
| 23 |
+
- **iOS TestFlight:** https://testflight.apple.com/join/jnufjzRr
|
| 24 |
+
|
| 25 |
+
Runs on-device in the TokForge app.
|
| 26 |
+
|
| 27 |
+
# TokForge — CyberRealistic V9 · CoreML 6-bit (Apple Neural Engine)
|
| 28 |
+
|
| 29 |
+
A **6-bit palettized Apple CoreML** conversion of **CyberRealistic V9**
|
| 30 |
+
([cyberdelia/CyberRealistic](https://huggingface.co/cyberdelia/CyberRealistic), the
|
| 31 |
+
`CyberRealistic_V9_FP16` checkpoint by **cyberdelia** — an SD-1.5 photorealistic finetune
|
| 32 |
+
with best-in-class faces and an integrated VAE), built for on-device image generation in the
|
| 33 |
+
**[TokForge](https://tokforge.ai)** iOS app. Converted with Apple
|
| 34 |
+
**[`ml-stable-diffusion`](https://github.com/apple/ml-stable-diffusion)** (`torch2coreml`)
|
| 35 |
+
using **`SPLIT_EINSUM_V2`** attention and **`--quantize-nbits 6`** (6-bit palettized weights),
|
| 36 |
+
so it compiles **fast on the Apple Neural Engine**.
|
| 37 |
+
|
| 38 |
+
Part of the **[TokForge iOS · CoreML Image Models](https://huggingface.co/collections/darkmaniac7/tokforge-ios-coreml-image-models-6a38cca9b57803e6168ce232)** collection.
|
| 39 |
+
|
| 40 |
+
## Files
|
| 41 |
+
|
| 42 |
+
| File | Size | Contents |
|
| 43 |
+
|------|------|----------|
|
| 44 |
+
| `Resources/` | ~913 MB | `TextEncoder.mlmodelc` / `Unet.mlmodelc` / `VAEDecoder.mlmodelc` / `VAEEncoder.mlmodelc` + `vocab.json` + `merges.txt` |
|
| 45 |
+
|
| 46 |
+
The `Resources/` tree holds the compiled `.mlmodelc` models plus the CLIP `vocab.json` +
|
| 47 |
+
`merges.txt` — the exact layout Apples `StableDiffusionPipeline` (and the TokForge installer)
|
| 48 |
+
loads.
|
| 49 |
+
|
| 50 |
+
## Recommended render settings
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
attention: split_einsum_v2 (Apple Neural Engine)
|
| 54 |
+
compute: .cpuAndNeuralEngine (palettized -> fast ANE compile)
|
| 55 |
+
steps: 25-30 (CyberRealistic photoreal sweet spot)
|
| 56 |
+
cfg-scale: 7.0
|
| 57 |
+
resolution: 512x512 (SD-1.5 native; baked into the compiled model)
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## How this was built
|
| 61 |
+
|
| 62 |
+
1. Loaded `CyberRealistic_V9_FP16.safetensors` from `cyberdelia/CyberRealistic` via diffusers
|
| 63 |
+
`StableDiffusionPipeline.from_single_file` and re-exported to SD-1.5 diffusers format.
|
| 64 |
+
2. Converted UNet + text encoder + VAE decoder + VAE encoder to CoreML with Apple
|
| 65 |
+
`ml-stable-diffusion` `python_coreml_stable_diffusion.torch2coreml`,
|
| 66 |
+
`--attention-implementation SPLIT_EINSUM_V2`.
|
| 67 |
+
3. Applied **6-bit palettization** (`--quantize-nbits 6`).
|
| 68 |
+
4. Bundled the compiled resources for the Swift CLI (`--bundle-resources-for-swift-cli`).
|
| 69 |
+
|
| 70 |
+
Conversion peaked at ~10.5 GB RAM (no `--chunk-unet` needed). Runs on iOS **17+** (6-bit
|
| 71 |
+
palettized weights require the iOS-17 ANE runtime); on iOS-16 the app falls back to an FP16 model.
|
| 72 |
+
|
| 73 |
+
## License & attribution
|
| 74 |
+
|
| 75 |
+
- **License:** [CreativeML OpenRAIL-M](https://huggingface.co/spaces/CompVis/stable-diffusion-license),
|
| 76 |
+
inherited from CyberRealistic / Stable Diffusion 1.5. Use is subject to the OpenRAIL-M restrictions.
|
| 77 |
+
- **Base model:** **CyberRealistic V9** by **cyberdelia** —
|
| 78 |
+
https://huggingface.co/cyberdelia/CyberRealistic. All credit for the model weights is cyberdelias.
|
| 79 |
+
- **Conversion tooling:** Apple **`ml-stable-diffusion`** —
|
| 80 |
+
https://github.com/apple/ml-stable-diffusion (6-bit palettization, `SPLIT_EINSUM_V2` attention).
|
| 81 |
+
- Built on top of Stable Diffusion 1.5 (Runway/CompVis/Stability).
|
| 82 |
+
|
| 83 |
+
This repository is a **redistribution for on-device use** — a format conversion (PyTorch ->
|
| 84 |
+
CoreML) and 6-bit palettization of cyberdelias CyberRealistic V9. No weights were retrained.
|
| 85 |
+
The original OpenRAIL-M terms and attribution requirements propagate to this conversion and any
|
| 86 |
+
images generated with it. No additional restrictions are imposed by this repackaging.
|
Resources/TextEncoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7b1b8aef5cc0e40734d1110a6f8b9db13d47e46569a84712b5a218d39d42b66
|
| 3 |
+
size 243
|
Resources/TextEncoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4112353c996bbec5e878feef1da00330f7cdf8c616d9a4f1cce0ece0c8ff8c0c
|
| 3 |
+
size 970
|
Resources/TextEncoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
|
| 4 |
+
"metadataOutputVersion" : "3.0",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 77 × 768)",
|
| 11 |
+
"shortDescription" : "The token embeddings as encoded by the Transformer model",
|
| 12 |
+
"shape" : "[1, 77, 768]",
|
| 13 |
+
"name" : "last_hidden_state",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"hasShapeFlexibility" : "0",
|
| 18 |
+
"isOptional" : "0",
|
| 19 |
+
"dataType" : "Float32",
|
| 20 |
+
"formattedType" : "MultiArray (Float32 1 × 768)",
|
| 21 |
+
"shortDescription" : "The version of the `last_hidden_state` output after pooling",
|
| 22 |
+
"shape" : "[1, 768]",
|
| 23 |
+
"name" : "pooled_outputs",
|
| 24 |
+
"type" : "MultiArray"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"version" : "\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 28 |
+
"modelParameters" : [
|
| 29 |
+
|
| 30 |
+
],
|
| 31 |
+
"author" : "Please refer to the Model Card available at huggingface.co\/\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 32 |
+
"specificationVersion" : 7,
|
| 33 |
+
"storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
|
| 34 |
+
"license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
|
| 35 |
+
"mlProgramOperationTypeHistogram" : {
|
| 36 |
+
"Ios16.cast" : 3,
|
| 37 |
+
"Ios16.mul" : 36,
|
| 38 |
+
"Ios16.layerNorm" : 25,
|
| 39 |
+
"Ios16.constexprLutToDense" : 74,
|
| 40 |
+
"Transpose" : 48,
|
| 41 |
+
"Stack" : 1,
|
| 42 |
+
"Ios16.sigmoid" : 12,
|
| 43 |
+
"Ios16.linear" : 72,
|
| 44 |
+
"Ios16.add" : 37,
|
| 45 |
+
"Ios16.softmax" : 12,
|
| 46 |
+
"Ios16.matmul" : 24,
|
| 47 |
+
"Ios16.gatherNd" : 1,
|
| 48 |
+
"Ios16.gather" : 1,
|
| 49 |
+
"Ios16.reshape" : 48,
|
| 50 |
+
"Ios16.reduceArgmax" : 1
|
| 51 |
+
},
|
| 52 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 53 |
+
"stateSchema" : [
|
| 54 |
+
|
| 55 |
+
],
|
| 56 |
+
"isUpdatable" : "0",
|
| 57 |
+
"availability" : {
|
| 58 |
+
"macOS" : "13.0",
|
| 59 |
+
"tvOS" : "16.0",
|
| 60 |
+
"visionOS" : "1.0",
|
| 61 |
+
"watchOS" : "9.0",
|
| 62 |
+
"iOS" : "16.0",
|
| 63 |
+
"macCatalyst" : "16.0"
|
| 64 |
+
},
|
| 65 |
+
"modelType" : {
|
| 66 |
+
"name" : "MLModelType_mlProgram"
|
| 67 |
+
},
|
| 68 |
+
"inputSchema" : [
|
| 69 |
+
{
|
| 70 |
+
"hasShapeFlexibility" : "0",
|
| 71 |
+
"isOptional" : "0",
|
| 72 |
+
"dataType" : "Float32",
|
| 73 |
+
"formattedType" : "MultiArray (Float32 1 × 77)",
|
| 74 |
+
"shortDescription" : "The token ids that represent the input text",
|
| 75 |
+
"shape" : "[1, 77]",
|
| 76 |
+
"name" : "input_ids",
|
| 77 |
+
"type" : "MultiArray"
|
| 78 |
+
}
|
| 79 |
+
],
|
| 80 |
+
"userDefinedMetadata" : {
|
| 81 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-22",
|
| 82 |
+
"com.github.apple.coremltools.source" : "torch==2.8.0",
|
| 83 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 84 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 85 |
+
},
|
| 86 |
+
"generatedClassName" : "Stable_Diffusion_version__Users_m1_cyberrealistic_v9_diffusers_text_encoder",
|
| 87 |
+
"method" : "predict"
|
| 88 |
+
}
|
| 89 |
+
]
|
Resources/TextEncoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Resources/TextEncoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ff9e8cb03fb475cdf38c5417f1498c28e527ab882824e2dfb39b07dcbb03153
|
| 3 |
+
size 139910080
|
Resources/Unet.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97152e21b43fa5c6fddc6b19492ee847d28cc7d62b869f2284ed2b1308991844
|
| 3 |
+
size 243
|
Resources/Unet.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b629d60086332c9fe0bf479dd9565f9a253f32a964601c751c8700de7065986e
|
| 3 |
+
size 1403
|
Resources/Unet.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"shortDescription" : "Stable Diffusion generates images conditioned on text or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
|
| 4 |
+
"metadataOutputVersion" : "3.0",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 2 × 4 × 64 × 64)",
|
| 11 |
+
"shortDescription" : "Same shape and dtype as the `sample` input. The predicted noise to facilitate the reverse diffusion (denoising) process",
|
| 12 |
+
"shape" : "[2, 4, 64, 64]",
|
| 13 |
+
"name" : "noise_pred",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"version" : "\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "Please refer to the Model Card available at huggingface.co\/\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 22 |
+
"specificationVersion" : 7,
|
| 23 |
+
"storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
|
| 24 |
+
"license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
|
| 25 |
+
"mlProgramOperationTypeHistogram" : {
|
| 26 |
+
"Transpose" : 32,
|
| 27 |
+
"UpsampleNearestNeighbor" : 3,
|
| 28 |
+
"Ios16.reduceMean" : 122,
|
| 29 |
+
"Ios16.sin" : 1,
|
| 30 |
+
"Ios16.softmax" : 896,
|
| 31 |
+
"Split" : 16,
|
| 32 |
+
"Ios16.add" : 169,
|
| 33 |
+
"Concat" : 206,
|
| 34 |
+
"Ios16.realDiv" : 61,
|
| 35 |
+
"Ios16.square" : 61,
|
| 36 |
+
"ExpandDims" : 3,
|
| 37 |
+
"Ios16.sub" : 61,
|
| 38 |
+
"Ios16.sqrt" : 61,
|
| 39 |
+
"Ios16.conv" : 282,
|
| 40 |
+
"Ios16.constexprLutToDense" : 282,
|
| 41 |
+
"Ios16.einsum" : 1792,
|
| 42 |
+
"Ios16.layerNorm" : 48,
|
| 43 |
+
"SliceByIndex" : 1570,
|
| 44 |
+
"Ios16.batchNorm" : 61,
|
| 45 |
+
"Ios16.reshape" : 154,
|
| 46 |
+
"Ios16.silu" : 47,
|
| 47 |
+
"Ios16.gelu" : 16,
|
| 48 |
+
"Ios16.mul" : 913,
|
| 49 |
+
"Ios16.cos" : 1,
|
| 50 |
+
"Ios16.cast" : 1
|
| 51 |
+
},
|
| 52 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 53 |
+
"stateSchema" : [
|
| 54 |
+
|
| 55 |
+
],
|
| 56 |
+
"isUpdatable" : "0",
|
| 57 |
+
"availability" : {
|
| 58 |
+
"macOS" : "13.0",
|
| 59 |
+
"tvOS" : "16.0",
|
| 60 |
+
"visionOS" : "1.0",
|
| 61 |
+
"watchOS" : "9.0",
|
| 62 |
+
"iOS" : "16.0",
|
| 63 |
+
"macCatalyst" : "16.0"
|
| 64 |
+
},
|
| 65 |
+
"modelType" : {
|
| 66 |
+
"name" : "MLModelType_mlProgram"
|
| 67 |
+
},
|
| 68 |
+
"inputSchema" : [
|
| 69 |
+
{
|
| 70 |
+
"hasShapeFlexibility" : "0",
|
| 71 |
+
"isOptional" : "0",
|
| 72 |
+
"dataType" : "Float16",
|
| 73 |
+
"formattedType" : "MultiArray (Float16 2 × 4 × 64 × 64)",
|
| 74 |
+
"shortDescription" : "The low resolution latent feature maps being denoised through reverse diffusion",
|
| 75 |
+
"shape" : "[2, 4, 64, 64]",
|
| 76 |
+
"name" : "sample",
|
| 77 |
+
"type" : "MultiArray"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"hasShapeFlexibility" : "0",
|
| 81 |
+
"isOptional" : "0",
|
| 82 |
+
"dataType" : "Float16",
|
| 83 |
+
"formattedType" : "MultiArray (Float16 2)",
|
| 84 |
+
"shortDescription" : "A value emitted by the associated scheduler object to condition the model on a given noise schedule",
|
| 85 |
+
"shape" : "[2]",
|
| 86 |
+
"name" : "timestep",
|
| 87 |
+
"type" : "MultiArray"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"hasShapeFlexibility" : "0",
|
| 91 |
+
"isOptional" : "0",
|
| 92 |
+
"dataType" : "Float16",
|
| 93 |
+
"formattedType" : "MultiArray (Float16 2 × 768 × 1 × 77)",
|
| 94 |
+
"shortDescription" : "Output embeddings from the associated text_encoder model to condition to generated image on text. A maximum of 77 tokens (~40 words) are allowed. Longer text is truncated. Shorter text does not reduce computation.",
|
| 95 |
+
"shape" : "[2, 768, 1, 77]",
|
| 96 |
+
"name" : "encoder_hidden_states",
|
| 97 |
+
"type" : "MultiArray"
|
| 98 |
+
}
|
| 99 |
+
],
|
| 100 |
+
"userDefinedMetadata" : {
|
| 101 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-22",
|
| 102 |
+
"com.github.apple.ml-stable-diffusion.version" : "1.1.0",
|
| 103 |
+
"com.github.apple.coremltools.source" : "torch==2.8.0",
|
| 104 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 105 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 106 |
+
},
|
| 107 |
+
"generatedClassName" : "Stable_Diffusion_version__Users_m1_cyberrealistic_v9_diffusers_unet",
|
| 108 |
+
"method" : "predict"
|
| 109 |
+
}
|
| 110 |
+
]
|
Resources/Unet.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Resources/Unet.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb94804f746db7f42e05e3cee74edab7fd4af0848e829f845a34523b9e19294a
|
| 3 |
+
size 645325440
|
Resources/VAEDecoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5fde75218c3071d85fbeb5807160cb2f9aed134372f1dc821a31c762e326f73e
|
| 3 |
+
size 243
|
Resources/VAEDecoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ceb8f902866f001c484353af8133c4986d1519a672cc5d54b10fbbb9a2335b07
|
| 3 |
+
size 897
|
Resources/VAEDecoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
|
| 4 |
+
"metadataOutputVersion" : "3.0",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 3 × 512 × 512)",
|
| 11 |
+
"shortDescription" : "Generated image normalized to range [-1, 1]",
|
| 12 |
+
"shape" : "[1, 3, 512, 512]",
|
| 13 |
+
"name" : "image",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"version" : "\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "Please refer to the Model Card available at huggingface.co\/\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 22 |
+
"specificationVersion" : 7,
|
| 23 |
+
"storagePrecision" : "Float16",
|
| 24 |
+
"license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
|
| 25 |
+
"mlProgramOperationTypeHistogram" : {
|
| 26 |
+
"Ios16.cast" : 1,
|
| 27 |
+
"Ios16.mul" : 2,
|
| 28 |
+
"Ios16.sub" : 30,
|
| 29 |
+
"Transpose" : 6,
|
| 30 |
+
"Ios16.sqrt" : 30,
|
| 31 |
+
"UpsampleNearestNeighbor" : 3,
|
| 32 |
+
"Ios16.square" : 30,
|
| 33 |
+
"Ios16.add" : 46,
|
| 34 |
+
"Ios16.reduceMean" : 60,
|
| 35 |
+
"Ios16.realDiv" : 30,
|
| 36 |
+
"Ios16.conv" : 36,
|
| 37 |
+
"Ios16.linear" : 4,
|
| 38 |
+
"Ios16.matmul" : 2,
|
| 39 |
+
"Ios16.batchNorm" : 29,
|
| 40 |
+
"Ios16.softmax" : 1,
|
| 41 |
+
"Ios16.reshape" : 65,
|
| 42 |
+
"Ios16.silu" : 29
|
| 43 |
+
},
|
| 44 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 45 |
+
"stateSchema" : [
|
| 46 |
+
|
| 47 |
+
],
|
| 48 |
+
"isUpdatable" : "0",
|
| 49 |
+
"availability" : {
|
| 50 |
+
"macOS" : "13.0",
|
| 51 |
+
"tvOS" : "16.0",
|
| 52 |
+
"visionOS" : "1.0",
|
| 53 |
+
"watchOS" : "9.0",
|
| 54 |
+
"iOS" : "16.0",
|
| 55 |
+
"macCatalyst" : "16.0"
|
| 56 |
+
},
|
| 57 |
+
"modelType" : {
|
| 58 |
+
"name" : "MLModelType_mlProgram"
|
| 59 |
+
},
|
| 60 |
+
"inputSchema" : [
|
| 61 |
+
{
|
| 62 |
+
"hasShapeFlexibility" : "0",
|
| 63 |
+
"isOptional" : "0",
|
| 64 |
+
"dataType" : "Float16",
|
| 65 |
+
"formattedType" : "MultiArray (Float16 1 × 4 × 64 × 64)",
|
| 66 |
+
"shortDescription" : "The denoised latent embeddings from the unet model after the last step of reverse diffusion",
|
| 67 |
+
"shape" : "[1, 4, 64, 64]",
|
| 68 |
+
"name" : "z",
|
| 69 |
+
"type" : "MultiArray"
|
| 70 |
+
}
|
| 71 |
+
],
|
| 72 |
+
"userDefinedMetadata" : {
|
| 73 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-22",
|
| 74 |
+
"com.github.apple.coremltools.source" : "torch==2.8.0",
|
| 75 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 76 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 77 |
+
},
|
| 78 |
+
"generatedClassName" : "Stable_Diffusion_version__Users_m1_cyberrealistic_v9_diffusers_vae_decoder",
|
| 79 |
+
"method" : "predict"
|
| 80 |
+
}
|
| 81 |
+
]
|
Resources/VAEDecoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Resources/VAEDecoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c82c58d79c8f612c14437df9b7d354c68c66061242f2e9d9cbfedd1e2b2264e
|
| 3 |
+
size 98993280
|
Resources/VAEEncoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74a9ddd93b65c207948038f7d95c4e5e86658071e02d4abd593aa3bccc5aa5ac
|
| 3 |
+
size 243
|
Resources/VAEEncoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d52b977ac743580eebe9d1a97bc7b80271b2b5dc60fd2eb5f2316eb6533943b
|
| 3 |
+
size 901
|
Resources/VAEEncoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
|
| 4 |
+
"metadataOutputVersion" : "3.0",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 8 × 64 × 64)",
|
| 11 |
+
"shortDescription" : "The latent embeddings from the unet model from the input image.",
|
| 12 |
+
"shape" : "[1, 8, 64, 64]",
|
| 13 |
+
"name" : "latent",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"version" : "\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "Please refer to the Model Card available at huggingface.co\/\/Users\/m1\/cyberrealistic-v9-diffusers",
|
| 22 |
+
"specificationVersion" : 7,
|
| 23 |
+
"storagePrecision" : "Float16",
|
| 24 |
+
"license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
|
| 25 |
+
"mlProgramOperationTypeHistogram" : {
|
| 26 |
+
"Pad" : 3,
|
| 27 |
+
"Ios16.cast" : 1,
|
| 28 |
+
"Ios16.mul" : 2,
|
| 29 |
+
"Ios16.sub" : 22,
|
| 30 |
+
"Ios16.sqrt" : 22,
|
| 31 |
+
"Transpose" : 6,
|
| 32 |
+
"Ios16.square" : 22,
|
| 33 |
+
"Ios16.add" : 34,
|
| 34 |
+
"Ios16.reduceMean" : 44,
|
| 35 |
+
"Ios16.realDiv" : 22,
|
| 36 |
+
"Ios16.conv" : 28,
|
| 37 |
+
"Ios16.linear" : 4,
|
| 38 |
+
"Ios16.matmul" : 2,
|
| 39 |
+
"Ios16.batchNorm" : 21,
|
| 40 |
+
"Ios16.softmax" : 1,
|
| 41 |
+
"Ios16.reshape" : 49,
|
| 42 |
+
"Ios16.silu" : 21
|
| 43 |
+
},
|
| 44 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 45 |
+
"stateSchema" : [
|
| 46 |
+
|
| 47 |
+
],
|
| 48 |
+
"isUpdatable" : "0",
|
| 49 |
+
"availability" : {
|
| 50 |
+
"macOS" : "13.0",
|
| 51 |
+
"tvOS" : "16.0",
|
| 52 |
+
"visionOS" : "1.0",
|
| 53 |
+
"watchOS" : "9.0",
|
| 54 |
+
"iOS" : "16.0",
|
| 55 |
+
"macCatalyst" : "16.0"
|
| 56 |
+
},
|
| 57 |
+
"modelType" : {
|
| 58 |
+
"name" : "MLModelType_mlProgram"
|
| 59 |
+
},
|
| 60 |
+
"inputSchema" : [
|
| 61 |
+
{
|
| 62 |
+
"hasShapeFlexibility" : "0",
|
| 63 |
+
"isOptional" : "0",
|
| 64 |
+
"dataType" : "Float16",
|
| 65 |
+
"formattedType" : "MultiArray (Float16 1 × 3 × 512 × 512)",
|
| 66 |
+
"shortDescription" : "The input image to base the initial latents on normalized to range [-1, 1]",
|
| 67 |
+
"shape" : "[1, 3, 512, 512]",
|
| 68 |
+
"name" : "x",
|
| 69 |
+
"type" : "MultiArray"
|
| 70 |
+
}
|
| 71 |
+
],
|
| 72 |
+
"userDefinedMetadata" : {
|
| 73 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-22",
|
| 74 |
+
"com.github.apple.coremltools.source" : "torch==2.8.0",
|
| 75 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 76 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 77 |
+
},
|
| 78 |
+
"generatedClassName" : "Stable_Diffusion_version__Users_m1_cyberrealistic_v9_diffusers_vae_encoder",
|
| 79 |
+
"method" : "predict"
|
| 80 |
+
}
|
| 81 |
+
]
|
Resources/VAEEncoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Resources/VAEEncoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71bf826e5ee1b455462aff0b34e3a469f5f58955ae715708962b1d81db92dc64
|
| 3 |
+
size 68338112
|
Resources/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Resources/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|