Repository navigation
[schedulers] hanlde dtype in add_noise - #767
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|
@patil-suraj should i add tests for fp16 schedulers? |
There was a problem hiding this comment.
I believe that
if self.alphas_cumprod.dtype != original_samples.dtype:
self.alphas_cumprod = self.alphas_cumprod.to(original_samples.dtype)is equivalent to just doing
self.alphas_cumprod = self.alphas_cumprod.to(original_samples.dtype)Same for device. And that could cut off the lines of code quite a bit
|
Removed the if as suggested by @NouamaneTazi ! The |
According to this comment it may have a penalty https://github.com/huggingface/diffusers/pull/511/files#r987896215. Is there any way we can now for sure? |
* handle dtype in vae and image2image pipeline * handle dtype in add noise * don't modify vae and pipeline * remove the if
* handle dtype in vae and image2image pipeline * handle dtype in add noise * don't modify vae and pipeline * remove the if
* handle dtype in vae and image2image pipeline * handle dtype in add noise * don't modify vae and pipeline * remove the if
Make sure that the
alphas/sigmashave the samedtypeas the input samples.