Skip to content

Commit 7f47d31

Browse files
author
mkshing
committed
add gradio
1 parent d8f969e commit 7f47d31

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "scripts/gradio"]
2+
path = scripts/gradio
3+
url = https://huggingface.co/spaces/svdiff-library/SVDiff-Training-UI

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SVDiff-pytorch
2-
<a href="https://colab.research.google.com/github/mkshing/svdiff-pytorch/blob/main/scripts/svdiff_pytorch.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
3-
[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/svdiff-library/SVDiff-Training-UI)
2+
<a href="https://colab.research.google.com/github/mkshing/svdiff-pytorch/blob/main/scripts/svdiff_pytorch.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
3+
[![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/svdiff-library/SVDiff-Training-UI)
44

55

66
An implementation of [SVDiff: Compact Parameter Space for Diffusion Fine-Tuning](https://arxiv.org/abs/2303.11305) by using d🧨ffusers.
@@ -89,6 +89,20 @@ python inference.py \
8989
--num_images_per_prompt=2
9090
```
9191

92+
## Gradio
93+
You can also try SVDiff-pytorch in a UI with [gradio](https://gradio.app/). This demo supports both training and inference!
94+
95+
[![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/svdiff-library/SVDiff-Training-UI)
96+
97+
If you want to run it locally, run the following commands step by step.
98+
```bash
99+
$ git clone --recursive https://github.com/mkshing/svdiff-pytorch.git
100+
$ cd scripts/gradio
101+
$ pip install -r requirements.txt
102+
$ export HF_TOKEN="YOUR_HF_TOKEN_HERE"
103+
$ python app.py
104+
```
105+
92106
## Additional Features
93107
### Spectral Shift Scaling
94108

scripts/gradio

Submodule gradio added at e2a20af

0 commit comments

Comments
 (0)