When applying safe_inv to a vector A with a very small maximum entry, the tolerance should be scaled by the vector’s infinity norm (i.e. set to tol * norm(A, Inf)) rather than using the default pullback_gaugetol value. Otherwise, you would need to renormalize A prior to calling safe_inv.