Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linxueyuanstdio/pytorch-ddpm
500 行代码实现降噪扩散模型 DDPM,干净无依赖
https://github.com/linxueyuanstdio/pytorch-ddpm
classifier-free ddpm pytorch
Last synced: about 17 hours ago
JSON representation
500 行代码实现降噪扩散模型 DDPM,干净无依赖
- Host: GitHub
- URL: https://github.com/linxueyuanstdio/pytorch-ddpm
- Owner: LinXueyuanStdio
- Created: 2022-07-17T13:34:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T04:37:28.000Z (9 months ago)
- Last Synced: 2024-03-08T05:30:58.721Z (9 months ago)
- Topics: classifier-free, ddpm, pytorch
- Language: Jupyter Notebook
- Homepage: https://timecat.notion.site/DDPM-b8e2a91927d249fdbcf7c82f2eb6f846
- Size: 5.11 MB
- Stars: 92
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyTorch-DDPM
500 行代码用 PyTorch 实现降噪扩散模型 DDPM
如何实现?可参考个人精简后的公式: https://timecat.notion.site/DDPM-b8e2a91927d249fdbcf7c82f2eb6f846
> 建议使用 codelab 打开 notebook,可以不用自己配环境了
>
> [codelab: DDPM](https://colab.research.google.com/github/LinXueyuanStdio/PyTorch-DDPM/blob/master/DDPM.ipynb)
>
> [codelab: Classifier-Free DDPM](https://colab.research.google.com/github/LinXueyuanStdio/PyTorch-DDPM/blob/master/ClassifierFreeDDPM.ipynb)## DDPM
从随机噪声中降噪生成图片
运行 `python ddpm.py` 或者打开 notebook `DDPM.ipynb`
![](assets/DDPM_each_step.png)
## Classifier-Free DDPM
条件控制 DDPM:给定一个数字,根据数字生成图片
运行 `python classifier_free_ddpm.py` 或者打开 notebook `ClassifierFreeDDPM.ipynb`
![](assets/classifier_free_DDPM_all.png)
![](assets/classifier_free_DDPM_each_step.png)