fantos commited on
Commit
ac28453
·
verified ·
1 Parent(s): f0ba3c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -135
README.md CHANGED
@@ -1,153 +1,37 @@
1
  ---
2
- title: FLUX Fast & Furious
3
- emoji: 🖼🏆
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: openrail++
11
  short_description: 'FLUX 8 Step Fast & High Quality Mode'
12
  ---
13
- I'll create comprehensive documentation for this FLUX Fast & Furious image generation code in both English and Korean.
 
14
 
15
- ## English Documentation
16
 
17
- ### FLUX: Fast & Furious - Hyper-Speed Image Generation
 
 
18
 
19
- This application implements an accelerated version of the FLUX.1-dev image generation model, optimized by ByteDance's AutoML team using their Hyper-SD technology to achieve high-quality image generation in just 8 steps instead of the typical 20-50 steps.
20
 
21
- #### Key Features
 
 
22
 
23
- 1. **Hyper-Speed Generation**
24
- - Utilizes Hyper-SD LoRA (Low-Rank Adaptation) technology from ByteDance
25
- - Reduces inference steps from 20-50 to just 6-25 steps (default: 8)
26
- - Maintains high image quality while dramatically reducing generation time
27
- - Optimized for CUDA with TF32 precision enabled for maximum performance
28
 
29
- 2. **Neon-Themed User Interface**
30
- - Custom cyberpunk-inspired design with glowing neon effects
31
- - Animated hover effects and dynamic visual feedback
32
- - Dark theme with blue, cyan, and magenta color accents
33
- - Responsive layout optimized for both desktop and mobile devices
34
 
35
- 3. **User-Friendly Features**
36
- - **Example Prompts**: Five pre-written creative prompts covering various genres:
37
- - Cyberpunk cityscapes
38
- - Fantasy fairy scenes
39
- - Epic dragon imagery
40
- - Sci-fi space stations
41
- - Underwater ancient cities
42
- - **Click-to-Use Examples**: Simply click any example to instantly populate the prompt field
43
- - **Advanced Settings**: Collapsible panel for fine-tuning generation parameters
44
 
45
- 4. **Customizable Generation Parameters**
46
- - **Image Dimensions**: Adjustable width and height (256-1152 pixels)
47
- - **Inference Steps**: Control speed vs. quality trade-off (6-25 steps)
48
- - **Guidance Scale**: Adjust prompt adherence (0.0-5.0)
49
- - **Seed Control**: Reproducible results with manual seed input
50
 
51
- #### Technical Implementation
52
-
53
- The application leverages cutting-edge technologies:
54
- - **FLUX.1-dev**: State-of-the-art diffusion model from Black Forest Labs
55
- - **Hyper-SD LoRA**: ByteDance's acceleration technology achieving 5-10x speedup
56
- - **BFloat16 Precision**: Reduced memory usage while maintaining quality
57
- - **Gradio Spaces**: GPU-accelerated deployment with automatic resource management
58
- - **Custom CSS**: Neon-themed styling with glow effects and animations
59
-
60
- The generation pipeline:
61
- 1. Loads the base FLUX.1-dev model in bfloat16 precision
62
- 2. Applies Hyper-SD LoRA weights with 0.125 scaling factor
63
- 3. Fuses LoRA weights for optimal performance
64
- 4. Generates images using accelerated inference with custom parameters
65
- 5. Outputs high-quality 1024x1024 images (default) in seconds
66
-
67
- #### Performance Optimization
68
-
69
- - **GPU Acceleration**: Automatic CUDA optimization with @spaces.GPU decorator
70
- - **Memory Efficiency**: BFloat16 precision reduces VRAM usage by 50%
71
- - **Inference Mode**: Torch inference mode and autocast for maximum speed
72
- - **TF32 Support**: Enabled for compatible GPUs for additional speedup
73
- - **Cached Models**: Local model caching to reduce loading times
74
-
75
- #### Use Cases
76
-
77
- Perfect for:
78
- - Rapid prototyping of visual concepts
79
- - Creative exploration with instant feedback
80
- - Production of high-quality images for various projects
81
- - Testing different artistic styles and compositions
82
- - Educational purposes to understand AI image generation
83
-
84
- ---
85
-
86
- ## 한글 설명서
87
-
88
- ### FLUX: Fast & Furious - 초고속 이미지 생성기
89
-
90
- 이 애플리케이션은 ByteDance의 AutoML 팀이 개발한 Hyper-SD 기술을 활용하여 FLUX.1-dev 이미지 생성 모델을 가속화한 버전으로, 기존 20-50단계가 필요했던 과정을 단 8단계로 줄여 고품질 이미지를 생성합니다.
91
-
92
- #### 주요 기능
93
-
94
- 1. **초고속 생성**
95
- - ByteDance의 Hyper-SD LoRA(Low-Rank Adaptation) 기술 활용
96
- - 추론 단계를 20-50단계에서 6-25단계로 대폭 축소 (기본값: 8단계)
97
- - 생성 시간을 획기적으로 단축하면서도 높은 이미지 품질 유지
98
- - 최대 성능을 위한 TF32 정밀도가 활성화된 CUDA 최적화
99
-
100
- 2. **네온 테마 사용자 인터페이스**
101
- - 발광 네온 효과가 적용된 사이버펑크 스타일의 맞춤형 디자인
102
- - 애니메이션 호버 효과와 동적 시각 피드백
103
- - 파란색, 청록색, 마젠타 색상 악센트가 있는 다크 테마
104
- - 데스크톱과 모바일 기기 모두에 최적화된 반응형 레이아웃
105
-
106
- 3. **사용자 친화적 기능**
107
- - **예시 프롬프트**: 다양한 장르를 다루는 5개의 창의적인 프롬프트 제공:
108
- - 사이버펑크 도시 풍경
109
- - 판타지 요정 장면
110
- - 웅장한 드래곤 이미지
111
- - SF 우주 정거장
112
- - 수중 고대 도시
113
- - **클릭하여 사용**: 예시를 클릭하면 즉시 프롬프트 필드에 입력
114
- - **고급 설정**: 생성 매개변수 미세 조정을 위한 접을 수 있는 패널
115
-
116
- 4. **맞춤형 생성 매개변수**
117
- - **이미지 크기**: 조정 가능한 너비와 높이 (256-1152 픽셀)
118
- - **추론 단계**: 속도 대 품질 균형 조절 (6-25단계)
119
- - **가이던스 스케일**: 프롬프트 준수도 조정 (0.0-5.0)
120
- - **시드 제어**: 수동 시드 입력으로 재현 가능한 결과
121
-
122
- #### 기술적 구현
123
-
124
- 애플리케이션은 최첨단 기술을 활용합니다:
125
- - **FLUX.1-dev**: Black Forest Labs의 최신 확산 모델
126
- - **Hyper-SD LoRA**: 5-10배 속도 향상을 달성하는 ByteDance의 가속 기술
127
- - **BFloat16 정밀도**: 품질을 유지하면서 메모리 사용량 감소
128
- - **Gradio Spaces**: 자동 리소스 관리가 포함된 GPU 가속 배포
129
- - **커스텀 CSS**: 발광 효과와 애니메이션이 있는 네온 테마 스타일링
130
-
131
- 생성 파이프라인:
132
- 1. bfloat16 정밀도로 기본 FLUX.1-dev 모델 로드
133
- 2. 0.125 스케일링 팩터로 Hyper-SD LoRA 가중치 적용
134
- 3. 최적 성능을 위한 LoRA 가중치 융합
135
- 4. 사용자 정의 매개변수로 가속화된 추론을 사용하여 이미지 생성
136
- 5. 몇 초 만에 고품질 1024x1024 이미지(기본값) 출력
137
-
138
- #### 성능 최적화
139
-
140
- - **GPU 가속**: @spaces.GPU 데코레이터로 자동 CUDA 최적화
141
- - **메모리 효율성**: BFloat16 정밀도로 VRAM 사용량 50% 감소
142
- - **추론 모드**: 최대 속도를 위한 Torch 추론 모드와 자동 캐스트
143
- - **TF32 지원**: 호환 GPU에서 추가 속도 향상을 위해 활성화
144
- - **캐시된 모델**: 로딩 시간 단축을 위한 로컬 모델 캐싱
145
-
146
- #### 사용 사례
147
-
148
- 다음과 같은 용도에 적합합니다:
149
- - 시각적 컨셉의 신속한 프로토타이핑
150
- - 즉각적인 피드백으로 창의적 탐색
151
- - 다양한 프로젝트를 위한 고품질 이미지 제작
152
- - 다양한 예술적 스타일과 구성 테스트
153
- - AI 이미지 생성 이해를 위한 교육 목적
 
1
  ---
2
+ title: GLM Image
3
+ emoji: 🏆
4
  colorFrom: purple
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 6.3.0
8
  app_file: app.py
9
  pinned: false
10
  license: openrail++
11
  short_description: 'FLUX 8 Step Fast & High Quality Mode'
12
  ---
13
+ Introduction
14
+ GLM-Image is an image generation model adopts a hybrid autoregressive + diffusion decoder architecture. In general image generation quality, GLM‑Image aligns with mainstream latent diffusion approaches, but it shows significant advantages in text-rendering and knowledge‑intensive generation scenarios. It performs especially well in tasks requiring precise semantic understanding and complex information expression, while maintaining strong capabilities in high‑fidelity and fine‑grained detail generation. In addition to text‑to‑image generation, GLM‑Image also supports a rich set of image‑to‑image tasks including image editing, style transfer, identity‑preserving generation, and multi‑subject consistency.
15
 
16
+ Model architecture: a hybrid autoregressive + diffusion decoder design.
17
 
18
+ Autoregressive generator: a 9B-parameter model initialized from GLM-4-9B-0414, with an expanded vocabulary to incorporate visual tokens. The model first generates a compact encoding of approximately 256 tokens, then expands to 1K–4K tokens, corresponding to 1K–2K high-resolution image outputs.
19
+ Diffusion Decoder: a 7B-parameter decoder based on a single-stream DiT architecture for latent-space image decoding. It is equipped with a Glyph Encoder text module, significantly improving accurate text rendering within images.
20
+ architecture_2
21
 
22
+ Post-training with decoupled reinforcement learning: the model introduces a fine-grained, modular feedback strategy using the GRPO algorithm, substantially enhancing both semantic understanding and visual detail quality.
23
 
24
+ Autoregressive module: provides low-frequency feedback signals focused on aesthetics and semantic alignment, improving instruction following and artistic expressiveness.
25
+ Decoder module: delivers high-frequency feedback targeting detail fidelity and text accuracy, resulting in highly realistic textures as well as more precise text rendering.
26
+ GLM-Image supports both text-to-image and image-to-image generation within a single model.
27
 
28
+ Text-to-image: generates high-detail images from textual descriptions, with particularly strong performance in information-dense scenarios.
29
+ Image-to-image: supports a wide range of tasks, including image editing, style transfer, multi-subject consistency, and identity-preserving generation for people and objects.
 
 
 
30
 
31
+ License
32
+ The overall GLM-Image model is released under the MIT License.
 
 
 
33
 
34
+ This project incorporates the VQ tokenizer weights and VIT weights from X-Omni/X-Omni-En, which are licensed under the Apache License, Version 2.0.
 
 
 
 
 
 
 
 
35
 
36
+ The VQ tokenizer and VIT weights remains subject to the original Apache-2.0 terms. Users should comply with the respective licenses when using this component.
 
 
 
 
37