Update README.md
Browse files
README.md
CHANGED
|
@@ -174,12 +174,10 @@ The dataset we trained our model on can be found here. We used 11 Renaissance po
|
|
| 174 |
When launching training, a diffusion model checkpoint is generated epoch-wise only if the current loss is lower than the previous one. To avoid OOM and faster training, we used an A100 GPU in Google Colab.
|
| 175 |
We fine-tuned the model on two different resolutions: 256x256 and 512x512. We only varied the batch size and number of epochs for fine-tuning with these two different resolutions. The best results were obtained with 512 x 512 pixels, 72 epochs, batch size of 1 and mixed precision set to True.
|
| 176 |
|
| 177 |
-
Hardware: A100
|
| 178 |
|
| 179 |
Optimizer: AdamW
|
| 180 |
|
| 181 |
-
Gradient Accumulations: 2
|
| 182 |
-
|
| 183 |
Batch: 1
|
| 184 |
|
| 185 |
Learning rate: warmup to 0.0001 for 10,000 steps and then kept constant
|
|
@@ -300,12 +298,12 @@ my_base_model = keras_cv.models.StableDiffusion(img_width=512, img_height=512)
|
|
| 300 |
```
|
| 301 |
### 4. Load Weights from the h5 model which is hosted on Hugging Face:
|
| 302 |
```python
|
| 303 |
-
my_base_model.diffusion_model.load_weights(
|
| 304 |
```
|
| 305 |
### 5. Create a variable to hold the values of the to-be-generated image such as prompt, batch size, iterations, and seed
|
| 306 |
```python
|
| 307 |
img = my_base_model.text_to_image(
|
| 308 |
-
prompt
|
| 309 |
batch_size=1, # How many images to generate at once
|
| 310 |
num_steps=25, # Number of iterations (controls image quality)
|
| 311 |
seed=123, # Set this to always get the same image from the same prompt
|
|
|
|
| 174 |
When launching training, a diffusion model checkpoint is generated epoch-wise only if the current loss is lower than the previous one. To avoid OOM and faster training, we used an A100 GPU in Google Colab.
|
| 175 |
We fine-tuned the model on two different resolutions: 256x256 and 512x512. We only varied the batch size and number of epochs for fine-tuning with these two different resolutions. The best results were obtained with 512 x 512 pixels, 72 epochs, batch size of 1 and mixed precision set to True.
|
| 176 |
|
| 177 |
+
Hardware: A100 GPU
|
| 178 |
|
| 179 |
Optimizer: AdamW
|
| 180 |
|
|
|
|
|
|
|
| 181 |
Batch: 1
|
| 182 |
|
| 183 |
Learning rate: warmup to 0.0001 for 10,000 steps and then kept constant
|
|
|
|
| 298 |
```
|
| 299 |
### 4. Load Weights from the h5 model which is hosted on Hugging Face:
|
| 300 |
```python
|
| 301 |
+
my_base_model.diffusion_model.load_weights(path/to/file/renaissance_model.h5)
|
| 302 |
```
|
| 303 |
### 5. Create a variable to hold the values of the to-be-generated image such as prompt, batch size, iterations, and seed
|
| 304 |
```python
|
| 305 |
img = my_base_model.text_to_image(
|
| 306 |
+
prompt=A woman with an enigmatic smile against a dark background,
|
| 307 |
batch_size=1, # How many images to generate at once
|
| 308 |
num_steps=25, # Number of iterations (controls image quality)
|
| 309 |
seed=123, # Set this to always get the same image from the same prompt
|