A two-dimensional continuum model is developed for stress relaxation in thin films through grain boundary (GB) diffusion. When a thin film with columnar grains is subjected to thermal stress, stress gradients along the GBs are relaxed by diffusion of material from the film surface into the GBs. The transported material constitutes a wedge and becomes the source of stress inside the adjacent elastic grains that are perfectly bonded to the substrate. In the model, the coupling between diffusion and elasticity is obtained by numerically solving the governing equations in a staggered manner. A finite difference scheme is used to solve the diffusion equations, modified in order to implement realistic boundary conditions, while the elasticity problem is solved with the finite element method. The solutions reveal the existence of a universal power law scaling between the unrelaxed fraction of stress and the grain aspect ratio. For slender grains, the GB wedge attains a more uniform shape and relaxation is more effective. The kinetics of the process depends not only on the grain aspect ratio but also strongly on the thickness of the film. In case there is no adhesion between film and substrate, complete stress relaxation is attained albeit at a slightly slower rate.