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

Train framework without autoencoder not working #79

Open
nilsleh opened this issue Jul 5, 2024 · 3 comments
Open

Train framework without autoencoder not working #79

nilsleh opened this issue Jul 5, 2024 · 3 comments

Comments

@nilsleh
Copy link

nilsleh commented Jul 5, 2024

In your paper you mention that using the autoencoder is optional. I would like to try this for a different domain, however, the code base does not seem to support this out of the box, when using the suggested training pipeline and specifying autoencoder: null in the config file and running python main.py with that config file.

In the trainer.py file:

  • Line 732 assumes that autoencoder is used

In gaussian_diffusion.py:

  • Line 502 should be moved inside the if block

However, fixing the above two yields:
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 256 but got size 64 for tensor number 1 in the list. in Line 882 of the Unet. So I suppose, the LQ image needs to be upsampled to a correct shape some time before? However, I am not sure about the other missing details, so hoping that you could take a look at it. Thanks in advance.

@nilsleh
Copy link
Author

nilsleh commented Jul 11, 2024

@zsyOAOA sorry to comment again, but would you have any input on this matter? I am in the process of opening a PR with possible fixes, so that the community can try running the method without the autoencoder, but would like to get your thoughts on the above. Thanks in advance.

@zsyOAOA
Copy link
Owner

zsyOAOA commented Jul 11, 2024

My codebase is borrowed from guided diffusion, which is a diffusion on pixel space. You need to take some time going through the whole training process and replace the autoencoder with an identity function.

@nilsleh
Copy link
Author

nilsleh commented Jul 18, 2024

Just replacing the autoencoder with an identity does not work, since the code relies on an instantiated autoencoder and its attributes in numerous places. Also the config files need to change since the image dimension of the "image" and "lq" do not align anymore.

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

2 participants