Comments (3)
Hi! I don't have any immediate plan to write the training code, especially because this code is meant for learning the model and not to be used in production. If you'd like to train the model for fine-tuning or for production, I highly recommend using Hugging Face.
If you want to learn how training works for Stable Diffusion, then, given that we are using the DDPM formulation in my video, you only need to train the using the Algorithm described in my video on Diffusion Models, in which I also provide the code for the training algorithm. The implementation of that video can be found in my repository about the DDPM paper.
The only difference is that you also need to provide the time step and the caption of the image you're training the model upon, since they're both inputs for the UNet.
But as I've said before, for training a model from scratch, I highly recommend using open source libraries like Hugging Face, because it also takes into consideration all the data augmentation needed for the model. Be aware that to train a working Stable Diffusion from scratch that can generate meaningful outputs, it needs millions of images, which may take forever if you're using your personal computer/laptop.
from pytorch-stable-diffusion.
yesss, appreciate that if anyone can give a simple training code
from pytorch-stable-diffusion.
I'm also looking forward to finding a training code from scratch @hkproj
from pytorch-stable-diffusion.
Related Issues (14)
- Duplicated links HOT 1
- Issue about in-painting
- why do we need set causal_mask =True in clip HOT 1
- PDF Slides
- RuntimeError: Error(s) in loading state_dict for VAE_Encoder: HOT 2
- Not an Issue
- Parallel Computing HOT 1
- Question about the output of the Unet HOT 1
- How to run this project ? HOT 1
- Question about model training. HOT 5
- training code HOT 1
- Small Typo HOT 1
- Not realy issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-stable-diffusion.