Giter VIP home page Giter VIP logo

Comments (6)

wpeebles avatar wpeebles commented on August 25, 2024

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.

Suimingzhe avatar Suimingzhe commented on August 25, 2024

Thank you very much for such a quick reply! I will try your suggestion and thanks again.

from dit.

Suimingzhe avatar Suimingzhe commented on August 25, 2024

@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.

wpeebles avatar wpeebles commented on August 25, 2024

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.

hdjsjyl avatar hdjsjyl commented on August 25, 2024

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.

Suimingzhe avatar Suimingzhe commented on August 25, 2024

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:

  1. set "num-classes=1", which means all your images belong to one class, so the shape of "embedding_table" is [1, hidden_size];
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.