Skip to content

Commit 8da0287

Browse files
committed
small changes
1 parent 4a0b1bb commit 8da0287

File tree

3 files changed

+1111
-90
lines changed

3 files changed

+1111
-90
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This repository is a collection of simple scripts that can be used to generate i
77
To start using Stable Diffusion, you first need to create an account on [Huggin's Face](https://huggingface.co/) and generate a [token](https://huggingface.co/docs/hub/security-tokens). Afterwards, if you have access to a GPU server, you can follow the basic tutorial in the [model card](https://huggingface.co/CompVis/stable-diffusion-v1-4).
88
If you don't have a GPU server to run the model, you can try out Stable Diffusion using one of the Colab notebooks below.
99

10-
- Text to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
10+
- Text to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1MyESLsR8D5l_EBqumwxL0eMzNmd3uqs6?usp=sharing)
1111
- Image to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1zjr9n60q3G8Qd87WG3ZnjDgI-D1YBCbG?usp=sharing)
1212
- Sketch to image [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1MyESLsR8D5l_EBqumwxL0eMzNmd3uqs6?usp=sharing)
1313

@@ -51,8 +51,11 @@ Pytorch implementation of the diffussion model presented in [].
5151
**Colab notebooks**
5252
- Introduction to diffusers 🧨, the Hugging Face 🤗 library for diffusion models [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/diffusers_intro.ipynb)
5353
- Introduction to Stable Diffusion with diffusers 🧨 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb)
54-
- Image2Image pipeline for Stabel Diffusion using diffusers 🧨 [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/patil-suraj/Notebooks/blob/master/image_2_image_using_diffusers.ipynb)
55-
- Denoising Diffusion Implicit Models in Tensorflow [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/keras-team/keras-io/blob/master/examples/generative/ipynb/ddim.ipynb)
54+
- Image2Image pipeline for Stable Diffusion [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/patil-suraj/Notebooks/blob/master/image_2_image_using_diffusers.ipynb)
55+
- Denoising Diffusion Implicit Models in Tensorflow/Keras [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/keras-team/keras-io/blob/master/examples/generative/ipynb/ddim.ipynb)
56+
- Generation of videos [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deforum/stable-diffusion/blob/main/Deforum_Stable_Diffusion.ipynb) (you need to download the weights from [here](https://huggingface.co/CompVis/stable-diffusion-v-1-4-original) and upload them to your Google Drive)
57+
58+
5659

5760
**Blogs**
5861
- [What are Diffusion Models?](https://lilianweng.github.io/posts/2021-07-11-diffusion-models/#nice) introduction to Diffusion models and mathematical derivations.

diffusion_from_scratch.ipynb

Lines changed: 1104 additions & 82 deletions
Large diffs are not rendered by default.

scripts/unet.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ def __init__(
234234
dim_mults=(1, 2, 4, 8),
235235
channels=3,
236236
with_time_emb=True,
237-
resnet_block_groups=8,
238237
use_convnext=True,
239238
convnext_mult=2,
240239
):
@@ -249,10 +248,7 @@ def __init__(
249248
dims = [init_dim, *map(lambda m: dim * m, dim_mults)]
250249
in_out = list(zip(dims[:-1], dims[1:]))
251250

252-
if use_convnext:
253-
block_klass = partial(ConvNextBlock, mult=convnext_mult)
254-
else:
255-
block_klass = partial(ResnetBlock, groups=resnet_block_groups)
251+
block_klass = partial(ConvNextBlock, mult=convnext_mult)
256252

257253
# time embeddings
258254
if with_time_emb:

0 commit comments

Comments
 (0)