IOPaint
IOPaint copied to clipboard
MAT fp16
Hi, SANSTER. Thanks for providing this awesome project, could you share MAT fp16 training code?
I did not train MAT model, I fixed the issue of fp16 overflow in the inference code. The related modifications are 7e028c39082cef45fcb8ce23cb871c121c763dd6 and the following two commits.
I did not train MAT model, I fixed the issue of fp16 overflow in the inference code. The related modifications are 7e028c3 and the following two commits.
Thanks. Is it possible to retrain the model with fp16 in this way to get fp16 weight.
You don't need to train to obtain fp16 weights, just load the weights and convert them to fp16 before saving.
You don't need to train to obtain fp16 weights, just load the weights and convert them to fp16 before saving.
I modified MAT original project according to your modification and used fp16 method for inference with fp32weight. However, the output will appear nan. I found that it is because nan in the output of _conv2d_wrapper layer or conv2d_resample.
Did you get a normal inpainting result in the end?
Did you use the changes in this commit? https://github.com/Sanster/lama-cleaner/commit/eb304ba69680a5c534ca07fe713baf100436dc5b
The fp16 result I tested in lama-cleaner was normal.