facebookincubator / AITemplate

AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code. Specialized for FP16 TensorCore (NVIDIA GPU) and MatrixCore (AMD GPU) inference.
Apache License 2.0
4.54k stars 363 forks source link

Add StableDiffusion Dreambooth example #102

Open 0xdevalias opened 1 year ago

0xdevalias commented 1 year ago

Currently there are StableDiffusion examples here:

But it would be awesome if there was also examples of using this for Dreambooth:

See also:

And similar end-goal but these aren't based on AITemplate:

0xdevalias commented 1 year ago

AITemplate is for inference. I don't think it would provide any speedup during training. EDIT: nevermind. You can still accelerate the frozen parts of the model.

Originally posted by @matteoserva in https://github.com/ShivamShrirao/diffusers/issues/32#issuecomment-1275067312

It is just for inference so won't be helpful in training. I also tested it, it's good for inference but also takes a really long time to compile.

Originally posted by @ShivamShrirao in https://github.com/ShivamShrirao/diffusers/issues/32#issuecomment-1279625711

chenyang78 commented 1 year ago

It is just for inference so won't be helpful in training. I also tested it, it's good for inference but also takes a really long time to compile.

Just FYI - The compilation time with the latest open-source version has been improved a lot from our first release. In our experiences, it can be 4X faster for the models where computation-intensive ops are mostly GEMM-family ops. We've made similar improvement for Conv ops in our internal version, which will be sync-ed to the open-source repo later. Stay tuned. Thanks.