Skip to content

The model trained on my own dataset gives an error when using inference_resshift.py for inference. #95

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

Open
zwt811 opened this issue Sep 25, 2024 · 4 comments

Comments

@zwt811
Copy link

zwt811 commented Sep 25, 2024

I used autoencoder_vq_f4.pth as the VQGAN model to train my own dataset, but during inference, I encountered the error KeyError: 'vae'.

@zsyOAOA
Copy link
Owner

zsyOAOA commented Sep 25, 2024

For the task of deblurring, I finetuned the autoencoder with LoRA, which requires the key "vae". Please carefully read the code of this part.

https://github.com/zsyOAOA/ResShift/blob/journal/sampler.py#L103

@Mark-Dou
Copy link

For the task of deblurring, I finetuned the autoencoder with LoRA, which requires the key "vae". Please carefully read the code of this part.

https://github.com/zsyOAOA/ResShift/blob/journal/sampler.py#L103

It seems the config file for deblurring task is set 'tune_decoder' is True rather than lora_tune_decoder is True, besides, the 'save_ckpt' also do not save the fine-tuned decoder part, so that raise the error when inference with custom datasets re-training.

@Mark-Dou
Copy link

Also, the re-training part do not contain any logic for fine-tuning the decoder part, while set all params in autoencoder to False

@zsyOAOA
Copy link
Owner

zsyOAOA commented Dec 30, 2024

I have updated the configs for fine-tuning the decoder. FYI. @Mark-Dou

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

3 participants