Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAE interpolating latents #152

Open
Clement-Lelievre opened this issue Sep 16, 2024 · 0 comments
Open

VAE interpolating latents #152

Clement-Lelievre opened this issue Sep 16, 2024 · 0 comments

Comments

@Clement-Lelievre
Copy link

Clement-Lelievre commented Sep 16, 2024

Hi,

I’ve been trying to use FLUX dev and schnell VAE in order to decode averaged latents.
A full, example workflow is:

  1. Open two images
  2. Get their respective latents with the VAE
  3. Average the latents
  4. Decode the result with the VAE

With close enough input images this can produce decent enough outputs, effectively interpolating between the two images.
so far I’ve been getting some blur and/or some patches at best in my results, though.

Another experiment I've been doing is sampling from the latent distribution to try and get close variations of an image.

The workflow is:

  1. get an image
  2. encode it with the VAE, get the underlying gaussian distributions tensor
  3. pick several samples from it
  4. decode the samples

Hopefully this produces different images. In practice this is not the case with FLUX VAE. The stds are very small relative to the mean, and perturbing the samples by adding many stds does not help in my xp.

Does anyone have knowledge about the FLUX VAE? That could help me refine this, eg knowledge about the latent space (I know the shape of the latents Il thinking more of its statistical properties). For example knowing the KL loss weight.
I understand that in an image generation context, the VAE is used mostly for performance reasons and priority is given to the reconstruction loss over the KL loss.

Happy to provide a snippet.

thanks,

@apolinario maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant