latent-diffusion icon indicating copy to clipboard operation
latent-diffusion copied to clipboard

predicted_indices not found in losses

Open zhihongp opened this issue 3 years ago • 1 comments

predicted_indices is required for loss in ldm/models/autoencoder.py but none of the loss types seems to support that. Anything I missed?

zhihongp avatar Feb 18 '22 04:02 zhihongp

Hey @zhihongp, thanks for catching this! I have just added the VQGAN loss in f13bf9bf463d95b5a16aeadd2b02abde31f769f8. It is the same as in the taming-transformers repo, but provides some additional information about the learned codebook, such as cluster-usage and perplexity (evaluated online, i.e. per batch). Hope this helps!

rromb avatar Feb 21 '22 14:02 rromb

Hey @zhihongp, thanks for catching this! I have just added the VQGAN loss in f13bf9b. It is the same as in the taming-transformers repo, but provides some additional information about the learned codebook, such as cluster-usage and perplexity (evaluated online, i.e. per batch). Hope this helps!

No, It doesnt help. I got a lot of errors. :D Did u try it ?

SerdarHelli avatar Oct 29 '22 10:10 SerdarHelli

You can try to delete predicted_indices on autoencoder.py. I did on this https://github.com/SerdarHelli/latent-diffusion/blob/main/ldm/models/autoencoder.py . Then, probably you will get an error about version which is undefined. I just deleted. :D . Also, you can get an error about torch_metrics. You should add torchmetrics correct version to enviroment.yaml

SerdarHelli avatar Oct 30 '22 09:10 SerdarHelli

You can try to delete predicted_indices on autoencoder.py. I did on this https://github.com/SerdarHelli/latent-diffusion/blob/main/ldm/models/autoencoder.py . Then, probably you will get an error about version which is undefined. I just deleted. :D . Also, you can get an error about torch_metrics. You should add torchmetrics correct version to enviroment.yaml

which version should we use?

CreamyLong avatar Apr 14 '23 08:04 CreamyLong