GithubHelp home page GithubHelp logo

Comments (5)

bghira avatar bghira commented on June 14, 2024 2

you might also want to try generating a flame graph on a Linux system.

from diffusers.

tolgacangoz avatar tolgacangoz commented on June 14, 2024 1

In addition to what Sayak said, to my knowledge, PyTorch makes calculations asynchronously in GPU. So, could you put torch.cuda.synchronise() before each time.time()? Also, time.perf_counter() is recommended most of the time instead of time.time().

from diffusers.

FEIFEIEIAr avatar FEIFEIEIAr commented on June 14, 2024 1

To my knowledge, PyTorch makes calculations asynchronously in GPU. So, could you put torch.cuda.synchronise() before each time.time()? Also, time.perf_counter() is recommended most of the time instead of time.time().

Thanks!
I add torch.cuda.synchronize() after UNet, and the time seems right!

Also, I'm curious about what happened during torch.cuda.synchronize().
And it goes strange when I remove if self.do_classifier_free_guidance:, will that cause any problem?
Thanks again!

from diffusers.

sayakpaul avatar sayakpaul commented on June 14, 2024

Thanks for the detailed thread. Might be a good candidate for discussions.

Have you tried warming up the GPU before reporting the numbers? If not, I would suggest running a few warm-up steps first before reporting the numbers.

from diffusers.

FEIFEIEIAr avatar FEIFEIEIAr commented on June 14, 2024

Thanks for the detailed thread. Might be a good candidate for discussions.

Have you tried warming up the GPU before reporting the numbers? If not, I would suggest running a few warm-up steps first before reporting the numbers.

I also tried num_inference_steps=50, even in the last loop, the time did not change alot (even a little slower). So, I didn't try warming up.

from diffusers.

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.