Based on the error message by guess is that this example/model/util might use a default GPU dependency. You could check, if the prepare_input_sequence method accepts a device argument or else you might want to check the Tacotron2 source code and see where and how cpu_run can be defined.