Instructions to use Bl4ckSpaces/FLUX.1-dev-Transformer-Int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Bl4ckSpaces/FLUX.1-dev-Transformer-Int8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Bl4ckSpaces/FLUX.1-dev-Transformer-Int8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Quantized FLUX Transformer to Int8 (BF16 Compute) Anti-OOM
Browse files
config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FluxTransformer2DModel",
|
| 3 |
+
"_diffusers_version": "0.38.0",
|
| 4 |
+
"_name_or_path": "../checkpoints/flux-dev/transformer",
|
| 5 |
+
"attention_head_dim": 128,
|
| 6 |
+
"axes_dims_rope": [
|
| 7 |
+
16,
|
| 8 |
+
56,
|
| 9 |
+
56
|
| 10 |
+
],
|
| 11 |
+
"guidance_embeds": true,
|
| 12 |
+
"in_channels": 64,
|
| 13 |
+
"joint_attention_dim": 4096,
|
| 14 |
+
"num_attention_heads": 24,
|
| 15 |
+
"num_layers": 19,
|
| 16 |
+
"num_single_layers": 38,
|
| 17 |
+
"out_channels": null,
|
| 18 |
+
"patch_size": 1,
|
| 19 |
+
"pooled_projection_dim": 768
|
| 20 |
+
}
|
diffusion_pytorch_model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0fc1489ad830459ea06ca41489c436e43122fc6967f9652c8dfa2a6d87623d38
|
| 3 |
+
size 9974226720
|
diffusion_pytorch_model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03a995225420c69020e54ca6e7d56e68790384323cba4d751e2c72e585e83963
|
| 3 |
+
size 1936709984
|
diffusion_pytorch_model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|