# gitee_classifier_free_diffusion **Repository Path**: liu-zhiyong-wx/gitee_classifier_free_diffusion ## Basic Information - **Project Name**: gitee_classifier_free_diffusion - **Description**: classifier-free-diffusion 的一个小实现。 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-07-21 - **Last Updated**: 2023-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README <<<<<<< HEAD # Unofficial Implementation of [Classifier-free Diffusion Guidance](https://arxiv.org/abs/2207.12598) The Pytorch implementation is adapted from [openai/guided-diffusion](https://github.com/openai/guided-diffusion) with modifications for classifier-free conditioned generation. The dataset used for training is cifar-10. The platform I use is Ubuntu 20.04. During the training porcess, I adapt the file *Scheduler.py* from [zoubohao/DenoisingDiffusionProbabilityModel-ddpm-](https://github.com/zoubohao/DenoisingDiffusionProbabilityModel-ddpm-), which is different from my implementation mainly on one technical detail : **How to represent the embeddings of null token of class identifier**. According to another academic paper [Video Diffusion Models](https://arxiv.org/abs/2204.03458) by the same authors, I use the same method as theirs in this detail. ## How to run First, you need to do some preparations: ```bash mkdir sample mkdir model ln -s absolute/path/to/cifar-10 ./cifar-10-batches-py ``` ### How to train ```bash make train ``` **NOTICE** : hyperparameter settings are in the file *train.py* ### How to sample To get pictures, you need to excute the following command: ```bash make samplepict ``` To get .npz files(used for FID calculation), you need to excute the following command: ```bash make samplenpz ``` **NOTICE** : hyperparameter settings are in the file *sample.py* ## Performance ![generated_740_pict](generated_1400_pict.png) ======= # gitee_classifier_free_diffusion #### 介绍 {**以下是 Gitee 平台说明,您可以替换此简介** 好 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) >>>>>>> b35cf82c7e58a88f88cc1c9c837ba8b4bcf8acc5