Skip to content

Commit b0c39ee

Browse files
authored
Update generate_images_with_stable_diffusion.py (#1171)
* Update generate_images_with_stable_diffusion.py * add: modified ipynb and md.
1 parent a035d2a commit b0c39ee

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

guides/ipynb/keras_cv/generate_images_with_stable_diffusion.ipynb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
]
162162
},
163163
{
164-
"attachments": {},
165164
"cell_type": "markdown",
166165
"metadata": {
167166
"colab_type": "text"
@@ -206,8 +205,8 @@
206205
"- A decoder, which turns the final 64x64 latent patch into a higher-resolution 512x512 image.\n",
207206
"\n",
208207
"First, your text prompt gets projected into a latent vector space by the text encoder,\n",
209-
"which is simply a pretrained, frozen language model. Then that prompt vector is concatenate\n",
210-
"to a randomly generated noise patch, which is repeatedly \"denoised\" by the decoder over a series\n",
208+
"which is simply a pretrained, frozen language model. Then that prompt vector is concatenated\n",
209+
"to a randomly generated noise patch, which is repeatedly \"denoised\" by the diffusion model over a series\n",
211210
"of \"steps\" (the more steps you run the clearer and nicer your image will be -- the default value is 50 steps).\n",
212211
"\n",
213212
"Finally, the 64x64 latent image is sent through the decoder to properly render it in high resolution.\n",
@@ -630,7 +629,7 @@
630629
"toc_visible": true
631630
},
632631
"kernelspec": {
633-
"display_name": "Python 3.10.7 64-bit",
632+
"display_name": "Python 3 (ipykernel)",
634633
"language": "python",
635634
"name": "python3"
636635
},
@@ -644,7 +643,7 @@
644643
"name": "python",
645644
"nbconvert_exporter": "python",
646645
"pygments_lexer": "ipython3",
647-
"version": "3.10.7"
646+
"version": "3.8.2"
648647
},
649648
"vscode": {
650649
"interpreter": {
@@ -653,5 +652,5 @@
653652
}
654653
},
655654
"nbformat": 4,
656-
"nbformat_minor": 0
655+
"nbformat_minor": 1
657656
}

guides/keras_cv/generate_images_with_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def plot_images(images):
126126
- A decoder, which turns the final 64x64 latent patch into a higher-resolution 512x512 image.
127127
128128
First, your text prompt gets projected into a latent vector space by the text encoder,
129-
which is simply a pretrained, frozen language model. Then that prompt vector is concatenate
130-
to a randomly generated noise patch, which is repeatedly "denoised" by the decoder over a series
129+
which is simply a pretrained, frozen language model. Then that prompt vector is concatenated
130+
to a randomly generated noise patch, which is repeatedly "denoised" by the diffusion model over a series
131131
of "steps" (the more steps you run the clearer and nicer your image will be -- the default value is 50 steps).
132132
133133
Finally, the 64x64 latent image is sent through the decoder to properly render it in high resolution.

guides/md/keras_cv/generate_images_with_stable_diffusion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ This gives rise to the Stable Diffusion architecture. Stable Diffusion consists
154154
- A decoder, which turns the final 64x64 latent patch into a higher-resolution 512x512 image.
155155

156156
First, your text prompt gets projected into a latent vector space by the text encoder,
157-
which is simply a pretrained, frozen language model. Then that prompt vector is concatenate
158-
to a randomly generated noise patch, which is repeatedly "denoised" by the decoder over a series
157+
which is simply a pretrained, frozen language model. Then that prompt vector is concatenated
158+
to a randomly generated noise patch, which is repeatedly "denoised" by the diffusion model over a series
159159
of "steps" (the more steps you run the clearer and nicer your image will be -- the default value is 50 steps).
160160

161161
Finally, the 64x64 latent image is sent through the decoder to properly render it in high resolution.

0 commit comments

Comments
 (0)