Instructions to use SceneWorks/realvisxl-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use SceneWorks/realvisxl-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir realvisxl-mlx SceneWorks/realvisxl-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: openrail++
|
| 3 |
+
tags:
|
| 4 |
+
- mlx
|
| 5 |
+
- apple-silicon
|
| 6 |
+
- diffusion
|
| 7 |
+
- stable-diffusion-xl
|
| 8 |
+
- sdxl
|
| 9 |
+
- text-to-image
|
| 10 |
+
base_model: SG161222/RealVisXL_V5.0
|
| 11 |
+
library_name: mlx-gen
|
| 12 |
+
pipeline_tag: text-to-image
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# RealVisXL V5.0 — MLX pre-quantized tiers
|
| 16 |
+
|
| 17 |
+
Pre-quantized, packed-load tiers of [SG161222/RealVisXL_V5.0](https://huggingface.co/SG161222/RealVisXL_V5.0)
|
| 18 |
+
for on-device Apple-Silicon inference with [SceneWorks / `mlx-gen`](https://github.com/SceneWorks/mlx-gen)
|
| 19 |
+
(the `sdxl` generator). Each tier is a **self-contained diffusers turnkey snapshot** (U-Net + both
|
| 20 |
+
CLIP text encoders + VAE + tokenizers + scheduler + `model_index.json`) that loads directly — no
|
| 21 |
+
in-app quantization pass, no dense transient.
|
| 22 |
+
|
| 23 |
+
RealVisXL V5.0 is a photoreal SDXL finetune (openrail++, commercial-OK, ungated). Same architecture
|
| 24 |
+
as SDXL base: dual CLIP-L + OpenCLIP-bigG text encoders, real classifier-free guidance + negative
|
| 25 |
+
prompt, sdxl-family LoRA support. ~30 steps at guidance 7.0, native 1024×1024.
|
| 26 |
+
|
| 27 |
+
## Tiers
|
| 28 |
+
|
| 29 |
+
| dir | precision | what's quantized |
|
| 30 |
+
|----------|-----------|------------------|
|
| 31 |
+
| `q4/` (default) | group-wise affine Q4, group size 64 | U-Net Linears + both CLIP encoders |
|
| 32 |
+
| `q8/` | group-wise affine Q8, group size 64 | U-Net Linears + both CLIP encoders |
|
| 33 |
+
| `bf16/` | dense (full-precision master) | nothing — verbatim source mirror |
|
| 34 |
+
|
| 35 |
+
The **VAE stays dense (f32)** in every tier — the SDXL VAE is int8/fp16-unstable, so it is never
|
| 36 |
+
quantized. Convolutions, GroupNorms, and the CLIP token/position embeddings also stay dense (gather
|
| 37 |
+
lookups and convs, not matmuls); only the true Linear projections are packed.
|
| 38 |
+
|
| 39 |
+
Quantization is byte-identical to `mlx-gen`'s load-time `nn.quantize` (bf16 cast, group 64), so a
|
| 40 |
+
tier loaded here matches an in-app-quantized dense checkpoint bit-for-bit.
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
|
| 44 |
+
```rust
|
| 45 |
+
use mlx_gen::{LoadSpec, WeightsSource, Quant};
|
| 46 |
+
let spec = LoadSpec::new(WeightsSource::Dir("…/realvisxl-mlx/q4".into())).with_quant(Quant::Q4);
|
| 47 |
+
let g = mlx_gen::load("sdxl", &spec)?;
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## License
|
| 51 |
+
|
| 52 |
+
openrail++ — inherited from the source model
|
| 53 |
+
[SG161222/RealVisXL_V5.0](https://huggingface.co/SG161222/RealVisXL_V5.0). See `LICENSE`.
|