arpitbansal297 / Universal-Guided-Diffusion

442 stars 38 forks source link

TypeError: cannot unpack non-iterable NoneType object #15

Open Nd-sole opened 9 months ago

Nd-sole commented 9 months ago

For face detection, when sampling, the image reconstructed from recons_image = self.model.decode_first_stage_with_grad(pred_x0) in ddim_with_grad.py produces recons_image which has values higher than 1 instead of [0,1]. I was wondering did you also face this problem? Due to which mtcnn is unable to produce any valid bounding box and gives error TypeError: cannot unpack non-iterable NoneType object

Also, I changed self.model.module.decode_first_stage_with_grad(pred_x0) to self.model.decode_first_stage_with_grad(pred_x0) as it was giving an error as model.modules doesn't exist.

Thanks.