Open tianqyun111 opened 2 months ago
When processing some pictures, most of them are normal, but a few of them will have a black screen and an error message: *image_processor.py:111: RuntimeWarning: invalid value encountered in cast, images = (images 255).round().astype("uint8")**
solved it. Because of the unstable calculation of fp16,at inversion preprocess it will calculate [nan,nan,nan] tensor, which leads to the black image,change it to fp32, and solve it
Hi @tianqyun111 . Thanks for sharing your experience. do you think i can use bf16 instead of fp32? best regard.
Hi @tianqyun111 . Thanks for sharing your experience. do you think i can use bf16 instead of fp32? best regard.
yeah,i think you can try
When processing some pictures, most of them are normal, but a few of them will have a black screen and an error message: *image_processor.py:111: RuntimeWarning: invalid value encountered in cast, images = (images 255).round().astype("uint8")**