fuxiao0719/GeoWizard

Logical bug of `self.img_embed`

hubert0527 opened this issue · 1 comments

The persistent attribute self.img_embed is assigned to the current image latent here:

if self.img_embed is None:
self.__encode_img_embed(input_rgb)

It is understandable to save AE computation, but the variable is not reset after the depth/normal ensemble. Thus, making a second call to the pipeline inference will result in the wrong input condition.

A simple (but not so clean) fix is to assign self.img_embed=None before return:

normal_colored_img = Image.fromarray(normal_colored)
return DepthNormalPipelineOutput(

Thanks, we have fixed it.