Spaces:
Runtime error
Runtime error
| title: FLUX.1 Dev ControlNet Union Pro | |
| emoji: ๐ผ | |
| colorFrom: purple | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 5.35.0 | |
| app_file: app.py | |
| pinned: false | |
| license: other | |
| ## FLUX.1-dev ControlNet Union Pro: Advanced Image Generation with Multiple Control Modes | |
| 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. | |
| ### Key Features | |
| **1. Multiple Control Modes** | |
| - **Canny**: Edge-based control using Canny edge detection | |
| - **Depth**: 3D depth information guidance using Depth Anything V2 | |
| - **OpenPose**: Human pose-based generation | |
| - **Grayscale**: Luminance-based control | |
| - **Blur**: Gaussian blur for soft guidance | |
| - **Tile**: Resolution-independent tiling control | |
| - **LowQuality**: Noise-based control for enhancement tasks | |
| **2. Flexible Input Options** | |
| - Direct upload of pre-processed control images | |
| - Automatic extraction of control conditions from reference images | |
| - Support for various image formats and resolutions | |
| - Intelligent image resizing and preprocessing | |
| **3. Advanced Generation Parameters** | |
| - **Control Strength (0-1.0)**: Adjust how strongly the control influences generation | |
| - **Inference Steps (1-50)**: Balance between quality and speed | |
| - **Guidance Scale (1-10)**: Control prompt adherence | |
| - **Seed Control**: Reproducible results with manual or random seeds | |
| **4. Technical Architecture** | |
| - Based on FLUX.1-dev diffusion model | |
| - Multi-ControlNet support for combined control modes | |
| - Depth Anything V2 (Large) for accurate depth estimation | |
| - GPU-accelerated processing with CUDA support | |
| - Memory-optimized with VAE tiling and CPU offloading | |
| ### How It Works | |
| 1. **Control Image Input**: Either upload a pre-processed control image or let the system extract it from a reference image | |
| 2. **Control Mode Selection**: Choose the appropriate control type for your use case | |
| 3. **Prompt Input**: Describe the desired output (defaults to "Highest Quality") | |
| 4. **Parameter Tuning**: Adjust control strength and generation settings | |
| 5. **Generation**: The model creates an image following both the prompt and control guidance | |
| ### Use Cases | |
| - **Image Enhancement**: Use LowQuality mode to enhance degraded images | |
| - **Style Transfer**: Apply artistic styles while preserving structure (Canny/Depth) | |
| - **Pose-Guided Generation**: Create images with specific human poses | |
| - **Consistent Character Design**: Maintain structural consistency across variations | |
| - **Architectural Visualization**: Use depth control for accurate spatial representations | |
| - **Texture Synthesis**: Tile mode for seamless pattern generation | |
| 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. | |
| --- | |
| ## FLUX.1-dev ControlNet Union Pro: ๋ค์ค ์ ์ด ๋ชจ๋๋ฅผ ํ์ฉํ ๊ณ ๊ธ ์ด๋ฏธ์ง ์์ฑ | |
| ์ด ์ ํ๋ฆฌ์ผ์ด์ ์ FLUX.1-dev์ ControlNet Union Pro๋ฅผ ์ฌ์ฉํ์ฌ ์ ๊ตํ ์ด๋ฏธ์ง ์์ฑ ์์คํ ์ ๊ตฌํํ๋ฉฐ, ์ ๋ฐํ ์ด๋ฏธ์ง ์์ฑ ๊ฐ์ด๋๋ฅผ ์ํ ๋ค์ํ ์ ์ด ๋ชจ๋๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ฌ์ฉ์๋ ์ฐธ์กฐ ์ด๋ฏธ์ง์ ํน์ ๊ตฌ์กฐ๋ ์คํ์ผ ์ ์ฝ์ ์ ์งํ๋ฉด์ ๊ณ ํ์ง ์ด๋ฏธ์ง๋ฅผ ์์ฑํ ์ ์์ต๋๋ค. | |
| ### ์ฃผ์ ๊ธฐ๋ฅ | |
| **1. ๋ค์ค ์ ์ด ๋ชจ๋** | |
| - **Canny**: Canny ์ฃ์ง ๊ฒ์ถ์ ์ฌ์ฉํ ์ฃ์ง ๊ธฐ๋ฐ ์ ์ด | |
| - **Depth**: Depth Anything V2๋ฅผ ์ฌ์ฉํ 3D ๊น์ด ์ ๋ณด ๊ฐ์ด๋ | |
| - **OpenPose**: ์ธ์ฒด ํฌ์ฆ ๊ธฐ๋ฐ ์์ฑ | |
| - **Grayscale**: ๋ช ๋ ๊ธฐ๋ฐ ์ ์ด | |
| - **Blur**: ๋ถ๋๋ฌ์ด ๊ฐ์ด๋๋ฅผ ์ํ ๊ฐ์ฐ์์ ๋ธ๋ฌ | |
| - **Tile**: ํด์๋ ๋ ๋ฆฝ์ ์ธ ํ์ผ๋ง ์ ์ด | |
| - **LowQuality**: ํฅ์ ์์ ์ ์ํ ๋ ธ์ด์ฆ ๊ธฐ๋ฐ ์ ์ด | |
| **2. ์ ์ฐํ ์ ๋ ฅ ์ต์ ** | |
| - ์ฌ์ ์ฒ๋ฆฌ๋ ์ ์ด ์ด๋ฏธ์ง ์ง์ ์ ๋ก๋ | |
| - ์ฐธ์กฐ ์ด๋ฏธ์ง์์ ์ ์ด ์กฐ๊ฑด ์๋ ์ถ์ถ | |
| - ๋ค์ํ ์ด๋ฏธ์ง ํ์ ๋ฐ ํด์๋ ์ง์ | |
| - ์ง๋ฅ์ ์ธ ์ด๋ฏธ์ง ํฌ๊ธฐ ์กฐ์ ๋ฐ ์ ์ฒ๋ฆฌ | |
| **3. ๊ณ ๊ธ ์์ฑ ๋งค๊ฐ๋ณ์** | |
| - **Control Strength (0-1.0)**: ์ ์ด๊ฐ ์์ฑ์ ๋ฏธ์น๋ ์ํฅ ์กฐ์ | |
| - **Inference Steps (1-50)**: ํ์ง๊ณผ ์๋ ๊ฐ ๊ท ํ ์กฐ์ | |
| - **Guidance Scale (1-10)**: ํ๋กฌํํธ ์ค์๋ ์ ์ด | |
| - **Seed Control**: ์๋ ๋๋ ๋๋ค ์๋๋ก ์ฌํ ๊ฐ๋ฅํ ๊ฒฐ๊ณผ | |
| **4. ๊ธฐ์ ์ ๊ตฌ์กฐ** | |
| - FLUX.1-dev ํ์ฐ ๋ชจ๋ธ ๊ธฐ๋ฐ | |
| - ๊ฒฐํฉ๋ ์ ์ด ๋ชจ๋๋ฅผ ์ํ Multi-ControlNet ์ง์ | |
| - ์ ํํ ๊น์ด ์ถ์ ์ ์ํ Depth Anything V2 (Large) | |
| - CUDA ์ง์ GPU ๊ฐ์ ์ฒ๋ฆฌ | |
| - VAE ํ์ผ๋ง๊ณผ CPU ์คํ๋ก๋ฉ์ผ๋ก ๋ฉ๋ชจ๋ฆฌ ์ต์ ํ | |
| ### ์๋ ๋ฐฉ์ | |
| 1. **์ ์ด ์ด๋ฏธ์ง ์ ๋ ฅ**: ์ฌ์ ์ฒ๋ฆฌ๋ ์ ์ด ์ด๋ฏธ์ง ์ ๋ก๋ ๋๋ ์ฐธ์กฐ ์ด๋ฏธ์ง์์ ์๋ ์ถ์ถ | |
| 2. **์ ์ด ๋ชจ๋ ์ ํ**: ์ฌ์ฉ ๋ชฉ์ ์ ๋ง๋ ์ ์ ํ ์ ์ด ์ ํ ์ ํ | |
| 3. **ํ๋กฌํํธ ์ ๋ ฅ**: ์ํ๋ ์ถ๋ ฅ ์ค๋ช (๊ธฐ๋ณธ๊ฐ: "Highest Quality") | |
| 4. **๋งค๊ฐ๋ณ์ ์กฐ์ **: ์ ์ด ๊ฐ๋ ๋ฐ ์์ฑ ์ค์ ์กฐ์ | |
| 5. **์์ฑ**: ๋ชจ๋ธ์ด ํ๋กฌํํธ์ ์ ์ด ๊ฐ์ด๋๋ฅผ ๋ชจ๋ ๋ฐ๋ฅด๋ ์ด๋ฏธ์ง ์์ฑ | |
| ### ํ์ฉ ์ฌ๋ก | |
| - **์ด๋ฏธ์ง ํฅ์**: LowQuality ๋ชจ๋๋ก ์ดํ๋ ์ด๋ฏธ์ง ๊ฐ์ | |
| - **์คํ์ผ ์ ์ก**: ๊ตฌ์กฐ๋ฅผ ๋ณด์กดํ๋ฉด์ ์์ ์ ์คํ์ผ ์ ์ฉ (Canny/Depth) | |
| - **ํฌ์ฆ ๊ธฐ๋ฐ ์์ฑ**: ํน์ ์ธ์ฒด ํฌ์ฆ๋ก ์ด๋ฏธ์ง ์์ฑ | |
| - **์ผ๊ด๋ ์บ๋ฆญํฐ ๋์์ธ**: ๋ณํ ๊ฐ ๊ตฌ์กฐ์ ์ผ๊ด์ฑ ์ ์ง | |
| - **๊ฑด์ถ ์๊ฐํ**: ์ ํํ ๊ณต๊ฐ ํํ์ ์ํ ๊น์ด ์ ์ด ์ฌ์ฉ | |
| - **ํ ์ค์ฒ ํฉ์ฑ**: ๋งค๋๋ฌ์ด ํจํด ์์ฑ์ ์ํ ํ์ผ ๋ชจ๋ | |
| ์ด ์์คํ ์ ์์ฑ๋ ๊ฒฐ๊ณผ์ ์ ์ฒ๋ฆฌ๋ ์ ์ด ์กฐ๊ฑด์ ๋ชจ๋ ๋ณด์ฌ์ค์ผ๋ก์จ ์ค์๊ฐ ํผ๋๋ฐฑ์ ์ ๊ณตํ๋ฉฐ, ์ฌ์ฉ์๊ฐ ์ต์ ์ ๊ฒฐ๊ณผ๋ฅผ ์ํด ์ ์ด ์ ๋ ฅ์ ์ดํดํ๊ณ ๊ฐ์ ํ๋ ๋ฐ ๋์์ ์ค๋๋ค. |