Upload folder using huggingface_hub
Browse files- .DS_Store +0 -0
- README.md +90 -0
- metadata.json +13 -0
- text_encoder/flux1_mlx_model.safetensors +3 -0
- text_encoder_2/flux1_mlx_model-00001-of-00003.safetensors +3 -0
- text_encoder_2/flux1_mlx_model-00002-of-00003.safetensors +3 -0
- text_encoder_2/flux1_mlx_model-00003-of-00003.safetensors +3 -0
- transformer/flux1_mlx_model-00001-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00002-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00003-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00004-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00005-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00006-of-00007.safetensors +3 -0
- transformer/flux1_mlx_model-00007-of-00007.safetensors +3 -0
- vae/flux1_mlx_model.safetensors +3 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
README.md
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: mlx
|
3 |
+
tags:
|
4 |
+
- mlx
|
5 |
+
- flux
|
6 |
+
- text-to-image
|
7 |
+
- quantized
|
8 |
+
- swift
|
9 |
+
pipeline_tag: text-to-image
|
10 |
+
license: other
|
11 |
+
license_name: flux-1-dev-non-commercial-license
|
12 |
+
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
13 |
+
---
|
14 |
+
|
15 |
+
# FLUX.1-dev 8-bit Quantized for MLX
|
16 |
+
|
17 |
+
This is an 8-bit quantized version of the FLUX.1-dev model optimized for use with MLX and flux.swift. The model size has been reduced from ~24GB to 17GB while maintaining excellent image generation quality.
|
18 |
+
|
19 |
+
Quantized using [flux.swift](https://github.com/mzbac/flux.swift), a Swift implementation of FLUX models for Apple Silicon.
|
20 |
+
|
21 |
+
## Model Details
|
22 |
+
- **Quantization**: 8-bit with group size 128
|
23 |
+
- **Total Size**: 17GB
|
24 |
+
- **Original Model**: [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev)
|
25 |
+
- **Framework**: MLX (Metal Performance Shaders)
|
26 |
+
- **Components**: Transformer, VAE, CLIP text encoder, T5 text encoder
|
27 |
+
|
28 |
+
## Usage
|
29 |
+
|
30 |
+
This model requires the [flux.swift](https://github.com/mzbac/flux.swift) implementation. Please refer to the repository for installation and usage instructions.
|
31 |
+
|
32 |
+
### Quick Start
|
33 |
+
```bash
|
34 |
+
# Load and use the quantized model
|
35 |
+
flux.swift.cli \
|
36 |
+
--load-quantized-path /path/to/this/model \
|
37 |
+
--hf-token YOUR_HF_TOKEN \
|
38 |
+
--prompt "Your prompt here" \
|
39 |
+
--output output.png
|
40 |
+
```
|
41 |
+
|
42 |
+
### Recommended Parameters
|
43 |
+
- **Steps**: 10+ (for quality)
|
44 |
+
- **Guidance Scale**: 7.5
|
45 |
+
- **Authentication**: Requires Hugging Face token
|
46 |
+
- **Use Case**: High-quality generation
|
47 |
+
|
48 |
+
### Example with Parameters
|
49 |
+
```bash
|
50 |
+
flux.swift.cli \
|
51 |
+
--load-quantized-path /path/to/this/model \
|
52 |
+
--hf-token YOUR_HF_TOKEN \
|
53 |
+
--prompt "A futuristic robot in a cyberpunk city" \
|
54 |
+
--steps 20 \
|
55 |
+
--guidance 7.5 \
|
56 |
+
--width 768 \
|
57 |
+
--height 768 \
|
58 |
+
--seed 42 \
|
59 |
+
--output cyberpunk_robot.png
|
60 |
+
```
|
61 |
+
|
62 |
+
## License
|
63 |
+
|
64 |
+
This model is a quantized version of FLUX.1-dev, which is licensed under the FLUX.1 [dev] Non-Commercial License. Please review the original license terms:
|
65 |
+
- Original model: https://huggingface.co/black-forest-labs/FLUX.1-dev
|
66 |
+
- License: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
67 |
+
- Commercial licensing available at: https://bfl.ai/pricing/licensing
|
68 |
+
|
69 |
+
## Performance
|
70 |
+
- **Memory Usage**: Reduced from ~24GB to 17GB
|
71 |
+
- **Quality**: Excellent preservation of generation quality
|
72 |
+
- **Platform**: Optimized for Apple Silicon Macs
|
73 |
+
|
74 |
+
## Citation
|
75 |
+
```bibtex
|
76 |
+
@misc{flux-dev,
|
77 |
+
author = {Black Forest Labs},
|
78 |
+
title = {FLUX.1-dev},
|
79 |
+
publisher = {Black Forest Labs},
|
80 |
+
year = {2024},
|
81 |
+
url = {https://huggingface.co/black-forest-labs/FLUX.1-dev}
|
82 |
+
}
|
83 |
+
|
84 |
+
@software{flux-swift,
|
85 |
+
author = {mzbac},
|
86 |
+
title = {flux.swift: Swift implementation of FLUX models},
|
87 |
+
url = {https://github.com/mzbac/flux.swift},
|
88 |
+
year = {2024}
|
89 |
+
}
|
90 |
+
```
|
metadata.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"quantizationBits" : 8,
|
3 |
+
"components" : [
|
4 |
+
"vae",
|
5 |
+
"transformer",
|
6 |
+
"text_encoder",
|
7 |
+
"text_encoder_2"
|
8 |
+
],
|
9 |
+
"groupSize" : 128,
|
10 |
+
"createdAt" : "2025-07-04T08:42:06Z",
|
11 |
+
"fluxSwiftVersion" : "1.0.0",
|
12 |
+
"modelType" : "FluxPipeline"
|
13 |
+
}
|
text_encoder/flux1_mlx_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:10f5f0f8c48c1c9b1c81a975467942328ffc551a2af052f5a6d5c83a7c9111e7
|
3 |
+
size 163881330
|
text_encoder_2/flux1_mlx_model-00001-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc3a3e824502ca416784bfec881cd5689b18b0208c5490b81e7f4600323348a0
|
3 |
+
size 1989865312
|
text_encoder_2/flux1_mlx_model-00002-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4511524bb44cfdf2c0becbf3c47952cc912ec89b69f7bc9c58dd9e4ba08ef34
|
3 |
+
size 1989865632
|
text_encoder_2/flux1_mlx_model-00003-of-00003.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5cab52ffc49ae0f305dcbe7c9987218fd296bb2d48c6c4b14686857c6f62c98
|
3 |
+
size 1059151447
|
transformer/flux1_mlx_model-00001-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:794ea1af35fdbd5c155e7cf0568bd81a69de6b840d019b0a3d138a9d753af787
|
3 |
+
size 1989779386
|
transformer/flux1_mlx_model-00002-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e0c2c864229c35f923a05619c2e96eee4388f9dfe16367cbf5de6e68a6bec40
|
3 |
+
size 1996044734
|
transformer/flux1_mlx_model-00003-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3cb0e29d7e48c6ac912a95759045037cc5e955086ed7f194ef4c323aceb05e0b
|
3 |
+
size 2000002418
|
transformer/flux1_mlx_model-00004-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81d9be3f48cc2329def9b0ade95a9f2c8a51e260f69c23152a332118225b47f9
|
3 |
+
size 1967103524
|
transformer/flux1_mlx_model-00005-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5fd4ca73c7b2d66a1907114c498ade6dfb471e8876447bede1d336765f0d709
|
3 |
+
size 1986463512
|
transformer/flux1_mlx_model-00006-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1ab4cdb3f89817757dfcf8b6b7f4599841b8a005c1f4b4768c744b185ea4394a
|
3 |
+
size 1996161499
|
transformer/flux1_mlx_model-00007-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ea93caf78b2928829b869115c6c1c6d4e380c90a3b7d0265275f01e6d94ea61
|
3 |
+
size 341208850
|
vae/flux1_mlx_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7a0cf1ca5d1bce36aab5176d84185adcdf8287214c8ffc5b4247b57de0932e45
|
3 |
+
size 165637306
|