Easily fixed by copying the same code above it for the init_image: `if(init_mask == '' or init_mask == 'None'): init_mask = None`