Text this: Variational modeling adapted to the medium with gradient properties