Comments (6)
Hi @Suimingzhe. There's a few ways you could go about this. Possibly the easiest way would be to call train.py
with --num-classes 1
and structure your dataset so that ImageFolder thinks there's only one class. You might also want to consider passing class_dropout_prob=0
when calling the DiT constructor. We didn't experiment much with unconditional models, so this is all somewhat experimental, but hopefully it's a good starting point.
from dit.
Thank you very much for such a quick reply! I will try your suggestion and thanks again.
from dit.
@wpeebles I notice you used the pre-trained autoencoder. If I want to train an uncondition DiT on FFHQ dataset, is it right that I need to train a new autoencoder first according to latent diffusion? Thanks.
from dit.
The VAE is unconditional, so you don't necessarily need to train a new one (although you could). We just reused the LDM/Stable Diffusion VAE models in our paper. It's a good idea to check that the pre-trained VAE gives good reconstructions on FFHQ before using it though.
from dit.
hi @Suimingzhe , is it possible to get some feedback about training unconditional DiT? Are you successful? If yes, which way you use? Thanks
from dit.
hi @Suimingzhe , is it possible to get some feedback about training unconditional DiT? Are you successful? If yes, which way you use? Thanks
Just as author suggested, you can:
- set "num-classes=1", which means all your images belong to one class, so the shape of "embedding_table" is [1, hidden_size];
- set "class_dropout_prob=0.0", which means you do not use classifier-free guidance for training, and you also should use "model.forward" rather than "model.forward_with_cfg" for sampling;
from dit.
Related Issues (20)
- [Question] Why DiT-XL/2 takes 119 GFlops to generate 256x256 images? HOT 3
- Giving Prompt instead of classes HOT 1
- Prompt-conditioning model instead of class-conditioning HOT 5
- RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasLtMatmul
- How do you calculate flops? HOT 4
- image generation label doesn't match validation label
- How to condition on an image? HOT 2
- sample_ddp failed (CUDA error: device-side assert triggered) HOT 5
- Request to adapt to Ascend NPU
- possible bug for sampling script: y_null = torch.tensor([1000] * n) HOT 1
- time embedding use cat[cos, sin]
- Bugs Fixing and Supporting for Multi-nodes HOT 5
- Green image during inference.
- Clarification on Zero Initialization in FinalLayer of DiT Model HOT 2
- Do the pre-trained DiT chekpoints contain EMA weights? HOT 1
- DiT results on CIFAR10 HOT 3
- training batch
- Performance for patch size = 1
- about fused_attention
- The model could not be fitted if not predict xstart HOT 4
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 dit.