Spaces:
Paused
Paused
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,9 +4,72 @@ emoji: ๐ฆ๐๐ฆ
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 5.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: mcp_server & FLUX 4-bit Quantization(just 8GB VRAM)
|
| 12 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.35.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: mcp_server & FLUX 4-bit Quantization(just 8GB VRAM)
|
| 12 |
---
|
| 13 |
+
## English Description
|
| 14 |
+
|
| 15 |
+
### FluxLLama - NF4 Quantized FLUX.1-dev Image Generator
|
| 16 |
+
|
| 17 |
+
FluxLLama is an optimized implementation of the FLUX.1-dev model using 4-bit quantization (NF4) for efficient GPU memory usage. This application allows you to generate high-quality images from text prompts while using significantly less VRAM than the full-precision model.
|
| 18 |
+
|
| 19 |
+
#### Key Features:
|
| 20 |
+
- **4-bit NF4 Quantization**: Reduces model size from ~24GB to ~6GB VRAM requirement
|
| 21 |
+
- **Text-to-Image Generation**: Create images from detailed text descriptions
|
| 22 |
+
- **Image-to-Image Generation**: Transform existing images based on text prompts
|
| 23 |
+
- **Customizable Parameters**: Control image dimensions, guidance scale, inference steps, and seed
|
| 24 |
+
- **Efficient Memory Usage**: Uses bitsandbytes for optimized 4-bit operations
|
| 25 |
+
- **Web Interface**: Easy-to-use Gradio interface for image generation
|
| 26 |
+
|
| 27 |
+
#### Technical Details:
|
| 28 |
+
- Uses T5-XXL encoder for text understanding
|
| 29 |
+
- CLIP encoder for additional text conditioning
|
| 30 |
+
- Custom NF4 (Normal Float 4-bit) quantization implementation
|
| 31 |
+
- Supports resolutions from 128x128 to 2048x2048
|
| 32 |
+
- Adjustable inference steps (1-30) for quality/speed tradeoff
|
| 33 |
+
- Guidance scale control (1.0-5.0) for prompt adherence
|
| 34 |
+
|
| 35 |
+
#### How to Use:
|
| 36 |
+
1. Enter your text prompt describing the desired image
|
| 37 |
+
2. Adjust width and height for your preferred resolution
|
| 38 |
+
3. Set guidance scale (higher = closer to prompt)
|
| 39 |
+
4. Choose number of inference steps (more = better quality, slower)
|
| 40 |
+
5. Optionally set a seed for reproducible results
|
| 41 |
+
6. For image-to-image mode, upload an initial image and adjust the noising strength
|
| 42 |
+
7. Click "Generate" to create your image
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## ํ๊ธ ์ค๋ช
|
| 47 |
+
|
| 48 |
+
### FluxLLama - NF4 ์์ํ FLUX.1-dev ์ด๋ฏธ์ง ์์ฑ๊ธฐ
|
| 49 |
+
|
| 50 |
+
FluxLLama๋ ํจ์จ์ ์ธ GPU ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ์ ์ํด 4๋นํธ ์์ํ(NF4)๋ฅผ ์ฌ์ฉํ๋ FLUX.1-dev ๋ชจ๋ธ์ ์ต์ ํ๋ ๊ตฌํ์
๋๋ค. ์ด ์ ํ๋ฆฌ์ผ์ด์
์ ์ฌ์ฉํ๋ฉด ์ ์ฒด ์ ๋ฐ๋ ๋ชจ๋ธ๋ณด๋ค ํจ์ฌ ์ ์ VRAM์ ์ฌ์ฉํ๋ฉด์๋ ํ
์คํธ ํ๋กฌํํธ๋ก๋ถํฐ ๊ณ ํ์ง ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
|
| 51 |
+
|
| 52 |
+
#### ์ฃผ์ ๊ธฐ๋ฅ:
|
| 53 |
+
- **4๋นํธ NF4 ์์ํ**: ๋ชจ๋ธ ํฌ๊ธฐ๋ฅผ ~24GB์์ ~6GB VRAM ์๊ตฌ์ฌํญ์ผ๋ก ๊ฐ์
|
| 54 |
+
- **ํ
์คํธ-์ด๋ฏธ์ง ์์ฑ**: ์์ธํ ํ
์คํธ ์ค๋ช
์ผ๋ก๋ถํฐ ์ด๋ฏธ์ง ์์ฑ
|
| 55 |
+
- **์ด๋ฏธ์ง-์ด๋ฏธ์ง ์์ฑ**: ํ
์คํธ ํ๋กฌํํธ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ๊ธฐ์กด ์ด๋ฏธ์ง ๋ณํ
|
| 56 |
+
- **์ฌ์ฉ์ ์ ์ ๊ฐ๋ฅํ ๋งค๊ฐ๋ณ์**: ์ด๋ฏธ์ง ํฌ๊ธฐ, ๊ฐ์ด๋์ค ์ค์ผ์ผ, ์ถ๋ก ๋จ๊ณ, ์๋ ์ ์ด
|
| 57 |
+
- **ํจ์จ์ ์ธ ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ**: ์ต์ ํ๋ 4๋นํธ ์ฐ์ฐ์ ์ํ bitsandbytes ์ฌ์ฉ
|
| 58 |
+
- **์น ์ธํฐํ์ด์ค**: ์ด๋ฏธ์ง ์์ฑ์ ์ํ ์ฌ์ฉํ๊ธฐ ์ฌ์ด Gradio ์ธํฐํ์ด์ค
|
| 59 |
+
|
| 60 |
+
#### ๊ธฐ์ ์ ์ธ๋ถ์ฌํญ:
|
| 61 |
+
- ํ
์คํธ ์ดํด๋ฅผ ์ํ T5-XXL ์ธ์ฝ๋ ์ฌ์ฉ
|
| 62 |
+
- ์ถ๊ฐ ํ
์คํธ ์กฐ๊ฑดํ๋ฅผ ์ํ CLIP ์ธ์ฝ๋
|
| 63 |
+
- ์ปค์คํ
NF4 (Normal Float 4๋นํธ) ์์ํ ๊ตฌํ
|
| 64 |
+
- 128x128๋ถํฐ 2048x2048๊น์ง์ ํด์๋ ์ง์
|
| 65 |
+
- ํ์ง/์๋ ๊ท ํ์ ์ํ ์กฐ์ ๊ฐ๋ฅํ ์ถ๋ก ๋จ๊ณ (1-30)
|
| 66 |
+
- ํ๋กฌํํธ ์ค์๋ฅผ ์ํ ๊ฐ์ด๋์ค ์ค์ผ์ผ ์ ์ด (1.0-5.0)
|
| 67 |
+
|
| 68 |
+
#### ์ฌ์ฉ ๋ฐฉ๋ฒ:
|
| 69 |
+
1. ์ํ๋ ์ด๋ฏธ์ง๋ฅผ ์ค๋ช
ํ๋ ํ
์คํธ ํ๋กฌํํธ ์
๋ ฅ
|
| 70 |
+
2. ์ํ๋ ํด์๋์ ๋ง๊ฒ ๋๋น์ ๋์ด ์กฐ์
|
| 71 |
+
3. ๊ฐ์ด๋์ค ์ค์ผ์ผ ์ค์ (๋์์๋ก ํ๋กฌํํธ์ ๋ ๊ฐ๊น๊ฒ)
|
| 72 |
+
4. ์ถ๋ก ๋จ๊ณ ์ ์ ํ (๋ง์์๋ก ํ์ง ํฅ์, ์๋ ์ ํ)
|
| 73 |
+
5. ์ฌํ ๊ฐ๋ฅํ ๊ฒฐ๊ณผ๋ฅผ ์ํด ์ ํ์ ์ผ๋ก ์๋ ์ค์
|
| 74 |
+
6. ์ด๋ฏธ์ง-์ด๋ฏธ์ง ๋ชจ๋์ ๊ฒฝ์ฐ, ์ด๊ธฐ ์ด๋ฏธ์ง๋ฅผ ์
๋ก๋ํ๊ณ ๋
ธ์ด์ง ๊ฐ๋ ์กฐ์
|
| 75 |
+
7. "Generate" ํด๋ฆญํ์ฌ ์ด๋ฏธ์ง ์์ฑ
|