Spaces:
Running
on
Zero
Running
on
Zero
Update README.md
Browse files
README.md
CHANGED
@@ -4,10 +4,115 @@ emoji: ๐ผ
|
|
4 |
colorFrom: purple
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: other
|
11 |
---
|
|
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
colorFrom: purple
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.35.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: other
|
11 |
---
|
12 |
+
## FLUX.1-dev ControlNet Union Pro: Advanced Image Generation with Multiple Control Modes
|
13 |
|
14 |
+
This application implements a sophisticated image generation system using FLUX.1-dev with ControlNet Union Pro, offering multiple control modes for precise image generation guidance. The system allows users to generate high-quality images while maintaining specific structural or stylistic constraints from reference images.
|
15 |
+
|
16 |
+
### Key Features
|
17 |
+
|
18 |
+
**1. Multiple Control Modes**
|
19 |
+
- **Canny**: Edge-based control using Canny edge detection
|
20 |
+
- **Depth**: 3D depth information guidance using Depth Anything V2
|
21 |
+
- **OpenPose**: Human pose-based generation
|
22 |
+
- **Grayscale**: Luminance-based control
|
23 |
+
- **Blur**: Gaussian blur for soft guidance
|
24 |
+
- **Tile**: Resolution-independent tiling control
|
25 |
+
- **LowQuality**: Noise-based control for enhancement tasks
|
26 |
+
|
27 |
+
**2. Flexible Input Options**
|
28 |
+
- Direct upload of pre-processed control images
|
29 |
+
- Automatic extraction of control conditions from reference images
|
30 |
+
- Support for various image formats and resolutions
|
31 |
+
- Intelligent image resizing and preprocessing
|
32 |
+
|
33 |
+
**3. Advanced Generation Parameters**
|
34 |
+
- **Control Strength (0-1.0)**: Adjust how strongly the control influences generation
|
35 |
+
- **Inference Steps (1-50)**: Balance between quality and speed
|
36 |
+
- **Guidance Scale (1-10)**: Control prompt adherence
|
37 |
+
- **Seed Control**: Reproducible results with manual or random seeds
|
38 |
+
|
39 |
+
**4. Technical Architecture**
|
40 |
+
- Based on FLUX.1-dev diffusion model
|
41 |
+
- Multi-ControlNet support for combined control modes
|
42 |
+
- Depth Anything V2 (Large) for accurate depth estimation
|
43 |
+
- GPU-accelerated processing with CUDA support
|
44 |
+
- Memory-optimized with VAE tiling and CPU offloading
|
45 |
+
|
46 |
+
### How It Works
|
47 |
+
|
48 |
+
1. **Control Image Input**: Either upload a pre-processed control image or let the system extract it from a reference image
|
49 |
+
2. **Control Mode Selection**: Choose the appropriate control type for your use case
|
50 |
+
3. **Prompt Input**: Describe the desired output (defaults to "Highest Quality")
|
51 |
+
4. **Parameter Tuning**: Adjust control strength and generation settings
|
52 |
+
5. **Generation**: The model creates an image following both the prompt and control guidance
|
53 |
+
|
54 |
+
### Use Cases
|
55 |
+
|
56 |
+
- **Image Enhancement**: Use LowQuality mode to enhance degraded images
|
57 |
+
- **Style Transfer**: Apply artistic styles while preserving structure (Canny/Depth)
|
58 |
+
- **Pose-Guided Generation**: Create images with specific human poses
|
59 |
+
- **Consistent Character Design**: Maintain structural consistency across variations
|
60 |
+
- **Architectural Visualization**: Use depth control for accurate spatial representations
|
61 |
+
- **Texture Synthesis**: Tile mode for seamless pattern generation
|
62 |
+
|
63 |
+
The system provides real-time feedback by showing both the generated result and the preprocessed control condition, helping users understand and refine their control inputs for optimal results.
|
64 |
+
|
65 |
+
---
|
66 |
+
|
67 |
+
## FLUX.1-dev ControlNet Union Pro: ๋ค์ค ์ ์ด ๋ชจ๋๋ฅผ ํ์ฉํ ๊ณ ๊ธ ์ด๋ฏธ์ง ์์ฑ
|
68 |
+
|
69 |
+
์ด ์ ํ๋ฆฌ์ผ์ด์
์ FLUX.1-dev์ ControlNet Union Pro๋ฅผ ์ฌ์ฉํ์ฌ ์ ๊ตํ ์ด๋ฏธ์ง ์์ฑ ์์คํ
์ ๊ตฌํํ๋ฉฐ, ์ ๋ฐํ ์ด๋ฏธ์ง ์์ฑ ๊ฐ์ด๋๋ฅผ ์ํ ๋ค์ํ ์ ์ด ๋ชจ๋๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ฌ์ฉ์๋ ์ฐธ์กฐ ์ด๋ฏธ์ง์ ํน์ ๊ตฌ์กฐ๋ ์คํ์ผ ์ ์ฝ์ ์ ์งํ๋ฉด์ ๊ณ ํ์ง ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
|
70 |
+
|
71 |
+
### ์ฃผ์ ๊ธฐ๋ฅ
|
72 |
+
|
73 |
+
**1. ๋ค์ค ์ ์ด ๋ชจ๋**
|
74 |
+
- **Canny**: Canny ์ฃ์ง ๊ฒ์ถ์ ์ฌ์ฉํ ์ฃ์ง ๊ธฐ๋ฐ ์ ์ด
|
75 |
+
- **Depth**: Depth Anything V2๋ฅผ ์ฌ์ฉํ 3D ๊น์ด ์ ๋ณด ๊ฐ์ด๋
|
76 |
+
- **OpenPose**: ์ธ์ฒด ํฌ์ฆ ๊ธฐ๋ฐ ์์ฑ
|
77 |
+
- **Grayscale**: ๋ช
๋ ๊ธฐ๋ฐ ์ ์ด
|
78 |
+
- **Blur**: ๋ถ๋๋ฌ์ด ๊ฐ์ด๋๋ฅผ ์ํ ๊ฐ์ฐ์์ ๋ธ๋ฌ
|
79 |
+
- **Tile**: ํด์๋ ๋
๋ฆฝ์ ์ธ ํ์ผ๋ง ์ ์ด
|
80 |
+
- **LowQuality**: ํฅ์ ์์
์ ์ํ ๋
ธ์ด์ฆ ๊ธฐ๋ฐ ์ ์ด
|
81 |
+
|
82 |
+
**2. ์ ์ฐํ ์
๋ ฅ ์ต์
**
|
83 |
+
- ์ฌ์ ์ฒ๋ฆฌ๋ ์ ์ด ์ด๋ฏธ์ง ์ง์ ์
๋ก๋
|
84 |
+
- ์ฐธ์กฐ ์ด๋ฏธ์ง์์ ์ ์ด ์กฐ๊ฑด ์๋ ์ถ์ถ
|
85 |
+
- ๋ค์ํ ์ด๋ฏธ์ง ํ์ ๋ฐ ํด์๋ ์ง์
|
86 |
+
- ์ง๋ฅ์ ์ธ ์ด๋ฏธ์ง ํฌ๊ธฐ ์กฐ์ ๋ฐ ์ ์ฒ๋ฆฌ
|
87 |
+
|
88 |
+
**3. ๊ณ ๊ธ ์์ฑ ๋งค๊ฐ๋ณ์**
|
89 |
+
- **Control Strength (0-1.0)**: ์ ์ด๊ฐ ์์ฑ์ ๋ฏธ์น๋ ์ํฅ ์กฐ์
|
90 |
+
- **Inference Steps (1-50)**: ํ์ง๊ณผ ์๋ ๊ฐ ๊ท ํ ์กฐ์
|
91 |
+
- **Guidance Scale (1-10)**: ํ๋กฌํํธ ์ค์๋ ์ ์ด
|
92 |
+
- **Seed Control**: ์๋ ๋๋ ๋๋ค ์๋๋ก ์ฌํ ๊ฐ๋ฅํ ๊ฒฐ๊ณผ
|
93 |
+
|
94 |
+
**4. ๊ธฐ์ ์ ๊ตฌ์กฐ**
|
95 |
+
- FLUX.1-dev ํ์ฐ ๋ชจ๋ธ ๊ธฐ๋ฐ
|
96 |
+
- ๊ฒฐํฉ๋ ์ ์ด ๋ชจ๋๋ฅผ ์ํ Multi-ControlNet ์ง์
|
97 |
+
- ์ ํํ ๊น์ด ์ถ์ ์ ์ํ Depth Anything V2 (Large)
|
98 |
+
- CUDA ์ง์ GPU ๊ฐ์ ์ฒ๋ฆฌ
|
99 |
+
- VAE ํ์ผ๋ง๊ณผ CPU ์คํ๋ก๋ฉ์ผ๋ก ๋ฉ๋ชจ๋ฆฌ ์ต์ ํ
|
100 |
+
|
101 |
+
### ์๋ ๋ฐฉ์
|
102 |
+
|
103 |
+
1. **์ ์ด ์ด๋ฏธ์ง ์
๋ ฅ**: ์ฌ์ ์ฒ๋ฆฌ๋ ์ ์ด ์ด๋ฏธ์ง ์
๋ก๋ ๋๋ ์ฐธ์กฐ ์ด๋ฏธ์ง์์ ์๋ ์ถ์ถ
|
104 |
+
2. **์ ์ด ๋ชจ๋ ์ ํ**: ์ฌ์ฉ ๋ชฉ์ ์ ๋ง๋ ๏ฟฝ๏ฟฝ์ ํ ์ ์ด ์ ํ ์ ํ
|
105 |
+
3. **ํ๋กฌํํธ ์
๋ ฅ**: ์ํ๋ ์ถ๋ ฅ ์ค๋ช
(๊ธฐ๋ณธ๊ฐ: "Highest Quality")
|
106 |
+
4. **๋งค๊ฐ๋ณ์ ์กฐ์ **: ์ ์ด ๊ฐ๋ ๋ฐ ์์ฑ ์ค์ ์กฐ์
|
107 |
+
5. **์์ฑ**: ๋ชจ๋ธ์ด ํ๋กฌํํธ์ ์ ์ด ๊ฐ์ด๋๋ฅผ ๋ชจ๋ ๋ฐ๋ฅด๋ ์ด๋ฏธ์ง ์์ฑ
|
108 |
+
|
109 |
+
### ํ์ฉ ์ฌ๋ก
|
110 |
+
|
111 |
+
- **์ด๋ฏธ์ง ํฅ์**: LowQuality ๋ชจ๋๋ก ์ดํ๋ ์ด๋ฏธ์ง ๊ฐ์
|
112 |
+
- **์คํ์ผ ์ ์ก**: ๊ตฌ์กฐ๋ฅผ ๋ณด์กดํ๋ฉด์ ์์ ์ ์คํ์ผ ์ ์ฉ (Canny/Depth)
|
113 |
+
- **ํฌ์ฆ ๊ธฐ๋ฐ ์์ฑ**: ํน์ ์ธ์ฒด ํฌ์ฆ๋ก ์ด๋ฏธ์ง ์์ฑ
|
114 |
+
- **์ผ๊ด๋ ์บ๋ฆญํฐ ๋์์ธ**: ๋ณํ ๊ฐ ๊ตฌ์กฐ์ ์ผ๊ด์ฑ ์ ์ง
|
115 |
+
- **๊ฑด์ถ ์๊ฐํ**: ์ ํํ ๊ณต๊ฐ ํํ์ ์ํ ๊น์ด ์ ์ด ์ฌ์ฉ
|
116 |
+
- **ํ
์ค์ฒ ํฉ์ฑ**: ๋งค๋๋ฌ์ด ํจํด ์์ฑ์ ์ํ ํ์ผ ๋ชจ๋
|
117 |
+
|
118 |
+
์ด ์์คํ
์ ์์ฑ๋ ๊ฒฐ๊ณผ์ ์ ์ฒ๋ฆฌ๋ ์ ์ด ์กฐ๊ฑด์ ๋ชจ๋ ๋ณด์ฌ์ค์ผ๋ก์จ ์ค์๊ฐ ํผ๋๋ฐฑ์ ์ ๊ณตํ๋ฉฐ, ์ฌ์ฉ์๊ฐ ์ต์ ์ ๊ฒฐ๊ณผ๋ฅผ ์ํด ์ ์ด ์
๋ ฅ์ ์ดํดํ๊ณ ๊ฐ์ ํ๋ ๋ฐ ๋์์ ์ค๋๋ค.
|