huggingface / huggingface/diffusers
Combined loss term for VQ-VAE (`diffusers.VQModel`)
- Langage dominant
- Python
- Étoiles
- 34.5k
- Forks
- 7.3k
- Merge moyen
- 3 j 3 h
- PR mergées (30 j)
- 91
Description
For training the VQ-VAE component of a latent diffusion model a la `CompVis/ldm-celebahq-256` (which uses `diffusers.VQModel`), is there a combined loss term for each of the losses as described by the authors: reconstruction loss, vq loss, and commitment loss?
I see the vq loss term is collected in `VectorQuantizer`, but it does not seem to be used anywhere else.
https://github.com/huggingface/diffusers/blob/ebc99a77aad647c5d33eb36a33c23f7b3949cb40/src/diffusers/models/autoencoders/vae.py#L726-L730
I'm also open to alternatives to `VQModel` like `AutoEncoderKL`, if they can collect the loss terms more easily.
Thank you!
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the linked lines in src/diffusers/models/autoencoders/vae.py and trace how VectorQuantizer's VQ loss is handled by VQModel. Determine whether reconstruction, VQ, and commitment losses can be collected together, and verify that the resulting loss terms are available for the stated VQ-VAE training use case.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, pytorch
- Domaine
- machine-learning
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100