Closed exponentialXP closed 4 months ago
Hello , Just wanted to check if this you are getting this error after installing the required versions as mentioned in requirements.txt ? Specifically What pytorch version do you have ?
Hello , Just wanted to check if this you are getting this error after installing the required versions as mentioned in requirements.txt ? Specifically What pytorch version do you have ?
I have PyTorch version 2.2.0+cu121 and have all the libraries installed
Ahh got it yeah so thats the cause of the issue, the different pytorch version. This should not be happening with the pytorch version which is there in requirements.txt. The LDM repo moves the alphas to the same device before indexing with time - https://github.com/explainingai-code/StableDiffusion-PyTorch/blob/main/scheduler/linear_noise_scheduler.py#L34 Will do similar change here which is basically doing the same thing as what you are doing here.
The better change would be to move it by passing device in the scheduler initialization itself, but will take that up later.
Ahh got it yeah so thats the cause of the issue, the different pytorch version. This should not be happening with the pytorch version which is there in requirements.txt. The LDM repo moves the alphas to the same device before indexing with time - https://github.com/explainingai-code/StableDiffusion-PyTorch/blob/main/scheduler/linear_noise_scheduler.py#L34 Will do similar change here which is basically doing the same thing as what you are doing here.
The better change would be to move it by passing device in the scheduler initialization itself, but will take that up later.
Ahhh, yeah that's way better. Also in line 58 it says return mean, mean instead of return mean, x0. Also should I close the issue now?
Yes. Thank you @exponentialXP . Have pushed the changes for both of these. Feel free to re-open in case you find any issue with this.
I get this error when using this repository. This seems to fix it, but it's probably not the most efficient way to do it: