stablediffusion icon indicating copy to clipboard operation
stablediffusion copied to clipboard

Fixes an issue when training embedding

Open Gazzoo-byte opened this issue 3 years ago • 1 comments

In certain cases (most notably on Colab using Automatic1111's WebUI, but not limited to that example) trying to train an embedding would cause https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5821#issue-1501645853 this error.

Gazzoo-byte avatar Dec 23 '22 21:12 Gazzoo-byte

@Gazzoo-byte thanks for the PR ❤ maybe this is a better solution

https://github.com/Stability-AI/stablediffusion/blob/d55bcd4d31d0316fcbdf552f2fd2628fdc812500/ldm/models/diffusion/ddpm.py#L903

logvar_t = self.logvar[t].to(self.device) to logvar_t = self.logvar[t.item()].to(self.device)

camenduru avatar Jan 01 '23 04:01 camenduru