Spaces:
Running
on
Zero
Running
on
Zero
Update README.md
Browse files
README.md
CHANGED
@@ -10,5 +10,74 @@ pinned: false
|
|
10 |
license: openrail++
|
11 |
short_description: '3D Style Image Generator R1: Fast & High Quality Mode'
|
12 |
---
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
license: openrail++
|
11 |
short_description: '3D Style Image Generator R1: Fast & High Quality Mode'
|
12 |
---
|
13 |
+
I'll analyze this code and provide explanations in both English and Korean.
|
14 |
|
15 |
+
## English Explanation
|
16 |
+
|
17 |
+
This is a **3D Style Image Generator** application built with Gradio and Hugging Face's Diffusers library. Here's what it does:
|
18 |
+
|
19 |
+
### Key Features:
|
20 |
+
1. **Image Generation**: Uses FLUX.1-dev model with Hyper-SD LoRA for fast, high-quality 3D-style image generation
|
21 |
+
2. **Korean Translation**: Automatically detects and translates Korean prompts to English using Helsinki-NLP translator
|
22 |
+
3. **Web Interface**: Clean Gradio interface with customizable generation parameters
|
23 |
+
4. **Gallery Display**: Shows pre-generated sample images with their prompts
|
24 |
+
|
25 |
+
### Technical Components:
|
26 |
+
- **Model**: FLUX.1-dev with Hyper-SD 8-step LoRA for accelerated inference
|
27 |
+
- **GPU Acceleration**: Uses CUDA with bfloat16 precision for efficiency
|
28 |
+
- **Caching**: Implements local model caching to avoid repeated downloads
|
29 |
+
- **Image Saving**: Automatically saves generated images with timestamps
|
30 |
+
|
31 |
+
### User Controls:
|
32 |
+
- **Prompt Input**: Text description for the desired 3D image
|
33 |
+
- **Advanced Settings**:
|
34 |
+
- Image dimensions (256-1152 pixels)
|
35 |
+
- Inference steps (6-25 steps)
|
36 |
+
- Guidance scale (0.0-5.0)
|
37 |
+
- Seed control for reproducibility
|
38 |
+
|
39 |
+
### Workflow:
|
40 |
+
1. User enters a prompt (Korean or English)
|
41 |
+
2. Korean prompts are automatically translated
|
42 |
+
3. Prompt is formatted with "wbgmsst, 3D, [prompt], white background"
|
43 |
+
4. Model generates the image using specified parameters
|
44 |
+
5. Image is displayed and saved to gallery
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
## ํ๊ธ ์ค๋ช
|
49 |
+
|
50 |
+
์ด๊ฒ์ Gradio์ Hugging Face์ Diffusers ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ ๊ตฌ์ถ๋ **3D ์คํ์ผ ์ด๋ฏธ์ง ์์ฑ๊ธฐ** ์ ํ๋ฆฌ์ผ์ด์
์
๋๋ค.
|
51 |
+
|
52 |
+
### ์ฃผ์ ๊ธฐ๋ฅ:
|
53 |
+
1. **์ด๋ฏธ์ง ์์ฑ**: FLUX.1-dev ๋ชจ๋ธ๊ณผ Hyper-SD LoRA๋ฅผ ์ฌ์ฉํ์ฌ ๋น ๋ฅด๊ณ ๊ณ ํ์ง์ 3D ์คํ์ผ ์ด๋ฏธ์ง ์์ฑ
|
54 |
+
2. **ํ๊ตญ์ด ๋ฒ์ญ**: Helsinki-NLP ๋ฒ์ญ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ ํ๊ตญ์ด ํ๋กฌํํธ๋ฅผ ์๋์ผ๋ก ๊ฐ์งํ๊ณ ์์ด๋ก ๋ฒ์ญ
|
55 |
+
3. **์น ์ธํฐํ์ด์ค**: ์ฌ์ฉ์ ์ ์ ๊ฐ๋ฅํ ์์ฑ ๋งค๊ฐ๋ณ์๊ฐ ์๋ ๊น๋ํ Gradio ์ธํฐํ์ด์ค
|
56 |
+
4. **๊ฐค๋ฌ๋ฆฌ ํ์**: ๋ฏธ๋ฆฌ ์์ฑ๋ ์ํ ์ด๋ฏธ์ง์ ํด๋น ํ๋กฌํํธ ํ์
|
57 |
+
|
58 |
+
### ๊ธฐ์ ์ ๊ตฌ์ฑ์์:
|
59 |
+
- **๋ชจ๋ธ**: ๊ฐ์ํ๋ ์ถ๋ก ์ ์ํ Hyper-SD 8๋จ๊ณ LoRA๊ฐ ์ ์ฉ๋ FLUX.1-dev
|
60 |
+
- **GPU ๊ฐ์**: ํจ์จ์ฑ์ ์ํด bfloat16 ์ ๋ฐ๋๋ก CUDA ์ฌ์ฉ
|
61 |
+
- **์บ์ฑ**: ๋ฐ๋ณต ๋ค์ด๋ก๋๋ฅผ ํผํ๊ธฐ ์ํ ๋ก์ปฌ ๋ชจ๋ธ ์บ์ฑ ๊ตฌํ
|
62 |
+
- **์ด๋ฏธ์ง ์ ์ฅ**: ์์ฑ๋ ์ด๋ฏธ์ง๋ฅผ ํ์์คํฌํ์ ํจ๊ป ์๋ ์ ์ฅ
|
63 |
+
|
64 |
+
### ์ฌ์ฉ์ ์ ์ด ๊ธฐ๋ฅ:
|
65 |
+
- **ํ๋กฌํํธ ์
๋ ฅ**: ์ํ๋ 3D ์ด๋ฏธ์ง์ ๋ํ ํ
์คํธ ์ค๋ช
|
66 |
+
- **๊ณ ๊ธ ์ค์ **:
|
67 |
+
- ์ด๋ฏธ์ง ํฌ๊ธฐ (256-1152 ํฝ์
)
|
68 |
+
- ์ถ๋ก ๋จ๊ณ (6-25 ๋จ๊ณ)
|
69 |
+
- ๊ฐ์ด๋์ค ์ค์ผ์ผ (0.0-5.0)
|
70 |
+
- ์ฌํ์ฑ์ ์ํ ์๋ ์ ์ด
|
71 |
+
|
72 |
+
### ์๋ ๊ณผ์ :
|
73 |
+
1. ์ฌ์ฉ์๊ฐ ํ๋กฌํํธ ์
๋ ฅ (ํ๊ตญ์ด ๋๋ ์์ด)
|
74 |
+
2. ํ๊ตญ์ด ํ๋กฌํํธ๋ ์๋์ผ๋ก ๋ฒ์ญ๋จ
|
75 |
+
3. ํ๋กฌํํธ๊ฐ "wbgmsst, 3D, [ํ๋กฌํํธ], white background" ํ์์ผ๋ก ํฌ๋งท๋จ
|
76 |
+
4. ๋ชจ๋ธ์ด ์ง์ ๋ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ฏธ์ง ์์ฑ
|
77 |
+
5. ์ด๋ฏธ์ง๊ฐ ํ์๋๊ณ ๊ฐค๋ฌ๋ฆฌ์ ์ ์ฅ๋จ
|
78 |
+
|
79 |
+
### ํน๋ณ ๊ธฐ๋ฅ:
|
80 |
+
- **ํ๊ตญ์ด ์ง์**: ํ๊ตญ์ด๋ก ํ๋กฌํํธ๋ฅผ ์
๋ ฅํ๋ฉด ์๋์ผ๋ก ์์ด๋ก ๋ฒ์ญ๋์ด ์ฒ๋ฆฌ
|
81 |
+
- **๋น ๋ฅธ ์์ฑ**: Hyper-SD LoRA๋ฅผ ์ฌ์ฉํ์ฌ 8๋จ๊ณ๋ง์ผ๋ก๋ ๊ณ ํ์ง ์ด๋ฏธ์ง ์์ฑ
|
82 |
+
- **๊ฐค๋ฌ๋ฆฌ**: ๋ค์ํ ์คํ์ผ์ ์ํ ์ด๋ฏธ์ง๋ฅผ ์ฐธ๊ณ ํ ์ ์๋ ๊ฐค๋ฌ๋ฆฌ ์ ๊ณต
|
83 |
+
- **์๋ ์ ์ด**: ๋์ผํ ์ด๋ฏธ์ง๋ฅผ ์ฌ์์ฑํ ์ ์๋๋ก ์๋ ๊ฐ ์ ์ด ๊ฐ๋ฅ
|