Instructions to use iky1e/moebius-pretrained-mlx-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use iky1e/moebius-pretrained-mlx-q8 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir moebius-pretrained-mlx-q8 iky1e/moebius-pretrained-mlx-q8
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Add files using upload-large-folder tool
Browse files- README.md +85 -0
- manifest.json +26 -0
- unet_quantized.safetensors +3 -0
- vae_decoder.safetensors +3 -0
- vae_encoder.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: mlx
|
| 4 |
+
pipeline_tag: image-to-image
|
| 5 |
+
base_model: hustvl/Moebius
|
| 6 |
+
tags:
|
| 7 |
+
- mlx
|
| 8 |
+
- image-inpainting
|
| 9 |
+
- inpainting
|
| 10 |
+
- diffusion
|
| 11 |
+
- moebius
|
| 12 |
+
- pretrained
|
| 13 |
+
- q8
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Moebius pretrained MLX q8
|
| 17 |
+
|
| 18 |
+
This folder contains a converted MLX version of the **pretrained** Moebius checkpoint in **q8** form.
|
| 19 |
+
|
| 20 |
+
Original upstream model: [hustvl/Moebius](https://huggingface.co/hustvl/Moebius)
|
| 21 |
+
Original source repository: [hustvl/Moebius](https://github.com/hustvl/Moebius)
|
| 22 |
+
|
| 23 |
+
Base Moebius checkpoint before the dataset-specific inpainting fine-tunes. Use this when you want the upstream base model rather than a Places2 or face-specialized fine-tune.
|
| 24 |
+
|
| 25 |
+
## Identity
|
| 26 |
+
|
| 27 |
+
| Field | Value |
|
| 28 |
+
|---|---|
|
| 29 |
+
| Variant name | `pretrained-q8` |
|
| 30 |
+
| Original Moebius checkpoint family | `pretrained` |
|
| 31 |
+
| Original checkpoint type | base / pretrained checkpoint |
|
| 32 |
+
| Source PyTorch checkpoint | `Moebius-Models/pretrained/diffusion_pytorch_model.bin` |
|
| 33 |
+
| MLX precision / quantization label | `q8` |
|
| 34 |
+
| Image size | 512 x 512 |
|
| 35 |
+
| Latent size | 64 x 64 |
|
| 36 |
+
| Latent channels | 4 |
|
| 37 |
+
| Mask channels | 1 |
|
| 38 |
+
| Conditioning IDs | 20 |
|
| 39 |
+
| VAE scaling factor | 0.13025 |
|
| 40 |
+
| Noise offset | 0.0357 |
|
| 41 |
+
|
| 42 |
+
## Quantization
|
| 43 |
+
|
| 44 |
+
8-bit MLX quantized export. The manifest selects `unet_quantized.safetensors` for the UNet; VAE encoder and decoder remain regular f16 safetensors unless a quantized VAE file is explicitly listed. Quantization uses MLX grouped quantization metadata and the runtime applies the matching quantized module layout.
|
| 45 |
+
|
| 46 |
+
- UNet precision mode: `q8`.
|
| 47 |
+
- MLX grouped quantization is used for supported linear layers; grouped quantized weights are loaded through the Moebius-MLX manifest/runtime.
|
| 48 |
+
- Quantization config: 8 bits, group size 64, standard MLX quantized mode.
|
| 49 |
+
- The VAE encoder and decoder remain regular f16 safetensors for this variant.
|
| 50 |
+
|
| 51 |
+
## Manifest-selected deployment files
|
| 52 |
+
|
| 53 |
+
These are the files selected by `manifest.json` when the Moebius-MLX runtime loads this variant.
|
| 54 |
+
|
| 55 |
+
| Component | File | Size |
|
| 56 |
+
|---|---|---:|
|
| 57 |
+
| UNet | `unet_quantized.safetensors` | 432.89 MB |
|
| 58 |
+
| VAE encoder | `vae_encoder.safetensors` | 68.34 MB |
|
| 59 |
+
| VAE decoder | `vae_decoder.safetensors` | 99.00 MB |
|
| 60 |
+
|
| 61 |
+
## Files in this folder
|
| 62 |
+
|
| 63 |
+
- `unet.safetensors`
|
| 64 |
+
- `unet_quantized.safetensors` (selected by manifest)
|
| 65 |
+
- `vae_decoder.safetensors` (selected by manifest)
|
| 66 |
+
- `vae_encoder.safetensors` (selected by manifest)
|
| 67 |
+
- `manifest.json` (runtime metadata and file selection)
|
| 68 |
+
|
| 69 |
+
A minimal runtime package needs `manifest.json` and the manifest-selected files above. Extra source or fallback files are optional and are not required for inference.
|
| 70 |
+
|
| 71 |
+
## Runtime expectations
|
| 72 |
+
|
| 73 |
+
This is not a Transformers or Diffusers-native checkpoint. It is intended for the Swift/MLX runtime in [Moebius-MLX](https://github.com/kylehowells/Moebius-MLX). The runtime reads `manifest.json`, loads the selected safetensors files, builds the Moebius UNet and VAE modules, and runs the DDIM inpainting pipeline.
|
| 74 |
+
|
| 75 |
+
Pipeline constants must match the manifest:
|
| 76 |
+
|
| 77 |
+
- DDIM scheduler: `scaled_linear`, beta start 0.00085, beta end 0.012, 1000 train timesteps, clip sample false
|
| 78 |
+
- 512 x 512 image resolution and 64 x 64 latent resolution
|
| 79 |
+
- 9-channel UNet input: noisy latent, mask, and masked-image latent
|
| 80 |
+
- VAE scaling factor 0.13025
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
## Attribution
|
| 84 |
+
|
| 85 |
+
Moebius was released by the original authors as [hustvl/Moebius](https://huggingface.co/hustvl/Moebius). This folder is a format conversion and/or quantized MLX packaging of the original PyTorch weights, not a newly trained model.
|
manifest.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"conditioningIDs": 20,
|
| 3 |
+
"files": {
|
| 4 |
+
"unet": "unet.safetensors",
|
| 5 |
+
"unetQuantized": "unet_quantized.safetensors",
|
| 6 |
+
"vaeDecoder": "vae_decoder.safetensors",
|
| 7 |
+
"vaeEncoder": "vae_encoder.safetensors"
|
| 8 |
+
},
|
| 9 |
+
"formatVersion": 1,
|
| 10 |
+
"imageSize": 512,
|
| 11 |
+
"latentChannels": 4,
|
| 12 |
+
"latentSize": 64,
|
| 13 |
+
"maskChannels": 1,
|
| 14 |
+
"modelName": "pretrained",
|
| 15 |
+
"noiseOffset": 0.0357,
|
| 16 |
+
"precision": "q8",
|
| 17 |
+
"scalingFactor": 0.13025,
|
| 18 |
+
"scheduler": {
|
| 19 |
+
"betaEnd": 0.012,
|
| 20 |
+
"betaSchedule": "scaled_linear",
|
| 21 |
+
"betaStart": 0.00085,
|
| 22 |
+
"clipSample": false,
|
| 23 |
+
"trainTimesteps": 1000
|
| 24 |
+
},
|
| 25 |
+
"sourceCheckpoint": "Moebius-Models/pretrained/diffusion_pytorch_model.bin"
|
| 26 |
+
}
|
unet_quantized.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:165adf970384279df3191c7bc8a5609291d1d7b837f0fb162b42c4e97e690e9e
|
| 3 |
+
size 432889605
|
vae_decoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08778bbb4b48640ad16381904eeeb99635846eb24409f70ae7fdc8eb01a87e76
|
| 3 |
+
size 98995758
|
vae_encoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f096b397453c9d77ad935eaee614fb573d2b07fd57bde80a8986ed203f08a5de
|
| 3 |
+
size 68339216
|