Generative Modeling for Inverse Problems in Materials Science