ginipick commited on
Commit
2ef7034
ยท
verified ยท
1 Parent(s): 889048e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -1
README.md CHANGED
@@ -4,9 +4,72 @@ emoji: ๐Ÿฆ€๐Ÿ†๐Ÿฆ€
4
  colorFrom: gray
5
  colorTo: pink
6
  sdk: gradio
7
- sdk_version: 5.30.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
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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" ํด๋ฆญํ•˜์—ฌ ์ด๋ฏธ์ง€ ์ƒ์„ฑ