Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Add pad and cropping options to the Latent Diffusion Inferer (+ test).#421

Merged
marksgraham merged 2 commits into
mainfrom
420-crop-and-pad-in-latentdiffusioninferer
Oct 26, 2023
Merged

Add pad and cropping options to the Latent Diffusion Inferer (+ test).#421
marksgraham merged 2 commits into
mainfrom
420-crop-and-pad-in-latentdiffusioninferer

Conversation

@virginiafdez

Copy link
Copy Markdown
Contributor

Add padding and cropping options to the Latent Diffusion Inferer. Includes:

  • Modification of the init, call and sample methods, allowing to pad and then crop the LDM latent space
  • If these shape parameters aren't specified, this works as usual (they are defaulted to None).
  • Added a test on the test_latent_diffusion_inferer trying this new scenario both with VAE+DM and VQVAE+DM.
@virginiafdez virginiafdez linked an issue Sep 19, 2023 that may be closed by this pull request

@marksgraham marksgraham left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @virginiafdez , looks good! Some suggestions about the naming of things and a request for more tests.

Comment thread generative/inferers/inferer.py Outdated
Comment thread generative/inferers/inferer.py Outdated
Comment thread generative/inferers/inferer.py Outdated
Comment thread generative/inferers/inferer.py Outdated
…uting VAE > autoencoder for generalisation purposes, as well as padder and cropper by ldm_resizer and autoencoder_resizer.
@virginiafdez

Copy link
Copy Markdown
Contributor Author

All suggestions incorporated into the code and pushed.

@marksgraham marksgraham merged commit 1b34e60 into main Oct 26, 2023
@marksgraham marksgraham deleted the 420-crop-and-pad-in-latentdiffusioninferer branch October 26, 2023 14:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants