Instructions to use Joypop/GDPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Joypop/GDPO with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Joypop/GDPO", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -59,6 +59,21 @@ or
|
|
| 59 |
bash scripts/test/test.sh
|
| 60 |
```
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
## π Citations
|
| 64 |
|
|
|
|
| 59 |
bash scripts/test/test.sh
|
| 60 |
```
|
| 61 |
|
| 62 |
+
## π Training Phase
|
| 63 |
+
|
| 64 |
+
### Step1: Prepare training data
|
| 65 |
+
Download the [OpenImage dataset](https://storage.googleapis.com/openimages/web/index.html) and [LSIDR dataset](https://github.com/ofsoundof/LSDIR). For each image in the LSDIR dataset, crop multiple 512Γ512 image patches using a sliding window with a stride of 64 pixels;
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
### Step2: Train NAOSD.
|
| 69 |
+
βββ
|
| 70 |
+
bash scripts/train/train_NAOSD.sh
|
| 71 |
+
βββ
|
| 72 |
+
|
| 73 |
+
### Step3: Train GDPO-SR
|
| 74 |
+
βββ
|
| 75 |
+
bash scripts/train/train_GDPOSR.sh
|
| 76 |
+
βββ
|
| 77 |
|
| 78 |
## π Citations
|
| 79 |
|