wangkanai commited on
Commit
a78bcee
·
verified ·
1 Parent(s): 1e2a737

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +104 -3
README.md CHANGED
@@ -1,3 +1,104 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: diffusers
4
+ pipeline_tag: text-to-image
5
+ tags:
6
+ - text-to-image
7
+ - flux
8
+ - flux.1-dev
9
+ - image-generation
10
+ - stable-diffusion
11
+ - fp8
12
+ - quantized
13
+ - low-vram
14
+ base_model: black-forest-labs/FLUX.1-dev
15
+ ---
16
+
17
+ # FLUX.1-dev FP8 Model Collection
18
+
19
+ This repository contains the FP8 (8-bit quantized) variant of the FLUX.1-dev text-to-image generation model. This optimized collection is designed for lower VRAM usage with minimal quality loss.
20
+
21
+ ## Model Description
22
+
23
+ FLUX.1-dev is a state-of-the-art text-to-image generation model. This FP8 collection provides efficient inference with approximately 50% size reduction compared to FP16, making it ideal for systems with limited VRAM.
24
+
25
+ ## Repository Contents
26
+
27
+ **Total Size**: ~41GB
28
+
29
+ ### Diffusion Models
30
+ - `diffusion_models/flux1-dev-fp8.safetensors` (17GB) - FP8 quantized diffusion model
31
+ - `checkpoints/flux1-dev-fp8.safetensors` (12GB) - FP8 checkpoint format
32
+
33
+ ### Text Encoders
34
+ - `text_encoders/clip_g.safetensors` (1.3GB) - CLIP-G text encoder
35
+ - `text_encoders/clip_l.safetensors` (235MB) - CLIP-L text encoder
36
+ - `text_encoders/clip-vit-large.safetensors` (1.6GB) - CLIP ViT-Large encoder
37
+ - `text_encoders/t5xxl_fp8_e4m3fn.safetensors` (4.6GB) - T5-XXL FP8 quantized encoder
38
+
39
+ ### Vision Models
40
+ - `clip_vision/clip_vision_h.safetensors` (1.2GB) - CLIP Vision H model
41
+
42
+ ## Hardware Requirements
43
+
44
+ - **VRAM**: 12GB+ recommended
45
+ - **Disk Space**: 41GB
46
+ - **Precision**: FP8 (8-bit quantized)
47
+ - **Memory**: 16GB+ system RAM recommended
48
+
49
+ ## Usage
50
+
51
+ ```python
52
+ from diffusers import FluxPipeline
53
+ import torch
54
+
55
+ # Load the FP8 model
56
+ pipe = FluxPipeline.from_pretrained(
57
+ "path/to/flux-dev-fp8",
58
+ torch_dtype=torch.float8_e4m3fn
59
+ )
60
+
61
+ pipe.to("cuda")
62
+
63
+ # Generate an image
64
+ image = pipe(
65
+ prompt="a beautiful mountain landscape at sunset",
66
+ num_inference_steps=50,
67
+ guidance_scale=7.5
68
+ ).images[0]
69
+
70
+ image.save("output.png")
71
+ ```
72
+
73
+ ## Model Precision Trade-offs
74
+
75
+ **FP8 (This Collection)**:
76
+ - ~50% smaller than FP16
77
+ - Faster inference
78
+ - Minimal quality loss
79
+ - Lower VRAM requirements (12GB+)
80
+ - Recommended for: Memory-constrained systems, faster generation
81
+
82
+ **Alternatives**:
83
+ - FP16: Full precision, best quality, requires 16GB+ VRAM
84
+ - GGUF: Further quantized variants for extreme memory constraints
85
+
86
+ ## License
87
+
88
+ This model is released under the Apache 2.0 license.
89
+
90
+ ## Citation
91
+
92
+ ```bibtex
93
+ @software{flux1-dev,
94
+ author = {Black Forest Labs},
95
+ title = {FLUX.1-dev},
96
+ year = {2024},
97
+ publisher = {Hugging Face},
98
+ url = {https://huggingface.co/black-forest-labs/FLUX.1-dev}
99
+ }
100
+ ```
101
+
102
+ ## Model Card Contact
103
+
104
+ For questions or issues with this model collection, please refer to the original FLUX.1-dev model card and repository.