Inpainting
Hi, thanks for sharing this work! I am interested about how to to process Inpainting for VAR/Control VAR. Are the masked image regions set to 0, and fed to VAR for inference directly?
Thanks for your interest. We teacher-force some regions in the image and predict the remaining to achieve the inpainting.
hi, thanks for ur reply! However, I still got confused about this. VAR will generate the output tokens, e.g., 680 tokens, with inputing and scaling the whole image tokenized features, and perform next-scale-token prediction. So how to specifically teacher-force some regions? Theoretically, all image region should serve as the input to generate the corresponding scale-level tokens, thereafter performing reconstruction.
In our implementation, we start from a 256x256 size binary mask and then resize it (nearest) to low resolution to teacher-force the unmasked regions.
I believe VAR uses the same way to conduct the inpainting.
Thanks for ur reply! I have tried to implement what you said, and the code line shall look like:
Here I interpolate the an extra binary mask as the scale increases, and directly erasing the corresponding f_hat in idxBl_to_var_input function, is this implementation correct?
The code looks reasonable to me. You may verify it with visualized images.
@Ferenas I have same issue for inpaint. Have you tried this ?
@Ferenas the performace?