DiffusionModels
Diffusion Models Tutorials
Install / Use
/learn @OvJat/DiffusionModelsREADME
Diffusion Models Tutorials
Description
This is a PyTorch-based tutorial for Diffusion Models.
setup environment
setup environment (step by step)
# 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)
# 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.pyis Neural Networks.train.py- function
train_vaeshows how to train AutoEncoderKL or AutoEncoderVQ. - function
make_conditionsshows how to make timesteps and condition for Diffusion. - function
train_diffusionshows how to train an Unet for Diffusion. - function
sampling_diffusionshows how to sample using a pretrained U-Net.
- function
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
