In inference.py, "binay_masks" should be a list used to store binary masks. It is firstly initialized when reading the binary masks from the json file. https://github.com/frank-xwang/InstanceDiffusion/blob/73060222403b5fad27569fa1b150d85317db88ce/inference.py#L194-L220 But in the process of handling the missing binary masks, the "binay_masks" is initialized again. This would appear to cause previously read masks to be discarded, and subsequent steps that rely on binay_masks will use zero masks. https://github.com/frank-xwang/InstanceDiffusion/blob/73060222403b5fad27569fa1b150d85317db88ce/inference.py#L248-L251