The way equalize_clahe() function's parameters being auto generated based on image size was resulting in errors.
Issue seems to be some kind of dimensional mismatch which was required to be the same by the kornia function.
Reverting back to a working method.
Plus some minor fixes.