tellurion commited on
Commit
e2ea72f
Β·
verified Β·
1 Parent(s): a5e6506

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -0
README.md CHANGED
@@ -18,6 +18,9 @@ license: cc-by-nc-sa-4.0
18
 
19
  (April. 2025)
20
  Official implementation of Colorize Diffusion.
 
 
 
21
  Fundamental issue for this repository: [ColorizeDiffusion (e-print)](https://arxiv.org/abs/2401.01456).
22
  ***Version 1*** - Base training, 512px. Released, ckpt starts with **mult**.
23
  ***Version 1.5*** - Solving spatial entanglement, 512px. Released, ckpt starts with **switch**.
@@ -101,6 +104,52 @@ As you can see, the manipluation unavoidably changed some unrelated regions as i
101
  | \>Threshold3 | Select most unrelated regions. Indicated by brown. |
102
  |Add| Click add to save current manipulation in the sequence. |
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  ## Code reference
105
  1. [Stable Diffusion v2](https://github.com/Stability-AI/stablediffusion)
106
  2. [Stable Diffusion XL](https://github.com/Stability-AI/generative-models)
 
18
 
19
  (April. 2025)
20
  Official implementation of Colorize Diffusion.
21
+
22
+ Colorize Diffusion is a SD-based colorization framework that can achieve high-quality colorization results with arbitrary input pairs.
23
+
24
  Fundamental issue for this repository: [ColorizeDiffusion (e-print)](https://arxiv.org/abs/2401.01456).
25
  ***Version 1*** - Base training, 512px. Released, ckpt starts with **mult**.
26
  ***Version 1.5*** - Solving spatial entanglement, 512px. Released, ckpt starts with **switch**.
 
104
  | \>Threshold3 | Select most unrelated regions. Indicated by brown. |
105
  |Add| Click add to save current manipulation in the sequence. |
106
 
107
+
108
+ ## Training
109
+ Our implementation is based on Accelerate and Deepspeed.
110
+ Before starting a training, first collect data and organize your training dataset as follows:
111
+
112
+ ```
113
+ [dataset_path]
114
+ β”œβ”€β”€ image_list.json # Optionally for image indexing
115
+ β”œβ”€β”€ color/ # Color images
116
+ β”‚ β”œβ”€β”€ 0001.zip
117
+ | | β”œβ”€β”€ 10001.png
118
+ | | β”œβ”€β”€ 100001.jpg
119
+ β”‚ | └── ...
120
+ β”‚ β”œβ”€β”€ 0002.zip
121
+ β”‚ └── ...
122
+ β”œβ”€β”€ sketch # Sketch images
123
+ β”‚ β”œβ”€β”€ 0001.zip
124
+ | | β”œβ”€β”€ 10001.png
125
+ | | β”œβ”€β”€ 100001.jpg
126
+ β”‚ | └── ...
127
+ β”‚ β”œβ”€β”€ 0002.zip
128
+ β”‚ └── ...
129
+ └── mask # Mask images (required for fg-bg training)
130
+ β”œβ”€β”€ 0001.zip
131
+ | β”œβ”€β”€ 10001.png
132
+ | β”œβ”€β”€ 100001.jpg
133
+ | └── ...
134
+ β”œβ”€β”€ 0002.zip
135
+ └── ...
136
+ ```
137
+ For details of dataset organization, check `data/dataloader.py`.
138
+ Training command example:
139
+ ```
140
+ accelerate launch --config_file [accelerate_config_file] \
141
+ train.py \
142
+ --name base \
143
+ --dataroot [dataset_path] \
144
+ --batch_size 64 \
145
+ --num_threads 8 \
146
+ -cfg configs/train/sd2.1/mult.yaml \
147
+ -pt [pretrained_model_path]
148
+ ```
149
+ Refer to `options.py` for training/inference/validation arguments.
150
+ Note that the `batch size` here is micro batch size per gpu. If you run the command on 8 gpus, the total batch size is 512.
151
+
152
+
153
  ## Code reference
154
  1. [Stable Diffusion v2](https://github.com/Stability-AI/stablediffusion)
155
  2. [Stable Diffusion XL](https://github.com/Stability-AI/generative-models)