KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
DiffusionModels
★ 15
Open GitHub ↗
Diffusion Models Tutorials
Download README (.md)
Explore Similar Repositories
Obsidian-Template
:
My Obsidian template with all needed plugins and customizations.
cm-callsign
:
No description available.
pcb_stator_v2
:
No description available.
JetpackCompose-AppDrawerExample
:
Example code for the App drawer with Jetpack Compose
solara-examples
:
Some simple apps in solara
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
DiffusionModels
?
Download (.md)
# Diffusion Models Tutorials [](https://opensource.org/licenses/MIT) ## Description This is a PyTorch-based tutorial for Diffusion Models. ## setup environment ### setup environment (step by step) ```bash # step1. create anaconda environment conda create -n DiffusionModels python=3.8 # step2. then activate this environment conda activate DiffusionModels # step3. install pytorch # if on MacOSX pip install torch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 # if on Linux/Windows, CUDA 11.6 pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116 # if on Linux/Windows, CUDA 11.7 pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117 # if on Linux/Windows, CPU Only pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu # step4. install other packages pip install diffusers ``` ### setup environment (on Linux/Windows, CUDA 11.7) ```shell # step1. create anaconda environment conda create -n DiffusionModels python=3.8 # step2. then activate this environment conda activate DiffusionModels # step3. using requirements.txt pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu117 ``` ## Files * `models.py` is Neural Networks. * `train.py` * function `train_vae` shows how to train AutoEncoderKL or AutoEncoderVQ. * function `make_conditions` shows how to make timesteps and condition for Diffusion. * function `train_diffusion` shows how to train an Unet for Diffusion. * function `sampling_diffusion` shows how to sample using a pretrained U-Net.