Skip to content

Commit 74fc614

Browse files
committed
Add ZeroGPU Gradio Space UI
1 parent ad38532 commit 74fc614

5 files changed

Lines changed: 392 additions & 15 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.pt
44
*.safetensors
55
*.png
6+
stable_fast-*.whl
67
.venv
78
node_modules/
89
frontend/node_modules/

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
---
2-
title: LightDiffusion-Next
3-
emoji: 🚀
4-
colorFrom: blue
5-
colorTo: gray
6-
sdk: docker
7-
app_port: 7860
8-
---
9-
101
<div align="center">
112

123
# Say hi to LightDiffusion-Next 👋
@@ -17,7 +8,7 @@ app_port: 7860
178
</br>
189
</br>
1910
<a href="https://github.com/LightDiffusion/LightDiffusion-Next">
20-
<img src="./HomeImage.png" alt="Logo">
11+
<img src="https://github.com/user-attachments/assets/b994fe0d-3a2e-44ff-93a4-46919cf865e3" alt="Logo">
2112

2213
</a>
2314
</br>
@@ -138,6 +129,12 @@ python server.py --frontend
138129
python server.py --port 7860
139130
```
140131

132+
**ZeroGPU / Gradio launch:**
133+
```bash
134+
# Launch the Hugging Face ZeroGPU-compatible Gradio UI
135+
python app.py
136+
```
137+
141138
### 🌌 Flux Support
142139

143140
LightDiffusion-Next now features first-class support for **Flux2 Klein**. To get started, you need to download the required model components (Diffusion Model, Text Encoder, and VAE).
@@ -148,11 +145,23 @@ python download_flux.py
148145
```
149146
This will download approximately 16GB of weights into the `include/` directory.
150147

148+
### 🤗 ZeroGPU / Gradio Space
149+
150+
This repository now includes a Gradio `app.py` entrypoint for Hugging Face
151+
**ZeroGPU**. ZeroGPU is only supported for Gradio SDK Spaces, and the
152+
GPU-bound generation function is wrapped with `@spaces.GPU`.
153+
154+
Recommended defaults for ZeroGPU:
155+
- keep `Keep Models Loaded` disabled
156+
- use 512x512 or 768x768 resolutions
157+
- generate 1 image at a time
158+
- prefer 10-25 steps with `ays`
159+
151160
### 🐳 Docker Setup
152161

153162
Run LightDiffusion-Next in a containerized environment with GPU acceleration.
154-
This repository is configured for **Hugging Face Docker Spaces** and serves the
155-
built React frontend from the FastAPI backend on port `7860`.
163+
The Docker path remains available for local or dedicated GPU deployments and
164+
serves the built React frontend from the FastAPI backend on port `7860`.
156165

157166
> [!IMPORTANT]
158167
> Confirm you have Docker Desktop configured with the NVIDIA Container Toolkit and at least 12-16GB of memory. Builds expect an NVIDIA GPU with compute capability 8.0 or higher and CUDA 12.0+ support for SageAttention/SpargeAttn.

0 commit comments

Comments
 (0)