maskbit
maskbit copied to clipboard
Method reconstructed_and_predicted_images called with incorrect arguments
This is just a small remark that in the script train_maskbit.py on L473, you are calling the method reconstructed_and_predicted_images as following:
reconstructed_and_predicted_images(
vqgan_model,
config,
input_tokens[:config.training.num_generated_images],
predicted_tokens[:config.training.num_generated_images],
masks[:config.training.num_generated_images],
fnames[:config.training.num_generated_images],
accelerator,
global_step+1,
output_dir
)
While the signature of that function a bit further below is;
def reconstructed_and_predicted_images(
vqgan_model: torch.nn.Module,
config,
tokens: torch.Tensor,
predicted_tokens: torch.Tensor,
accelerator,
global_step: int,
)
Which causes the script to crash when during training when it comes to the if-check block.
Thank you for sharing the code!
Thanks Aleksander! It should be fixed now.