No CUDA GPUs are available: Tacotron2 inferencing

username: Hasan_Khan
cooked: <p>I am trying to get inferencing results of my trained <code>Text-to-Speech Tacotron2</code> model on CPU instead of GPU. The model is successfully mapped on CPU. However while inferencing I have changed the <code>cuda</code> <code>tensors</code> to CPU but still I am facing this error.</p>
<p>Please help me resolve this issue. Thanks!!</p>
<blockquote>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/3/c3fbb0f349715ca2326fa03953c2a47051cdb28e.png" data-download-href="https://discuss.pytorch.org/uploads/default/c3fbb0f349715ca2326fa03953c2a47051cdb28e" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/c/3/c3fbb0f349715ca2326fa03953c2a47051cdb28e.png" alt="image" data-base62-sha1="rXKlRFOJuyVicjXfqsNc5WULpts" width="690" height="366" data-dominant-color="EFEFF0"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">801×426 14.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
</blockquote>
<blockquote>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/9/0/905e8d39ecf87ca1ddbec6455dc9c85bc457c46d.png" data-download-href="https://discuss.pytorch.org/uploads/default/905e8d39ecf87ca1ddbec6455dc9c85bc457c46d" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/9/0/905e8d39ecf87ca1ddbec6455dc9c85bc457c46d.png" alt="image" data-base62-sha1="kB9kzg0Gh6h2U8WM8mJ2hUmcPi5" width="690" height="390" data-dominant-color="F8D9D8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1010×572 34.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
</blockquote>

username: Hasan_Khan
cooked: <p><a class="mention" href="/u/ptrblck">@ptrblck</a> please acknowledge</p>

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

username: Hasan_Khan
cooked: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/8/580ca1e1547ef7c5ed07f983fd043c7d8c24b5f5.png" data-download-href="https://discuss.pytorch.org/uploads/default/580ca1e1547ef7c5ed07f983fd043c7d8c24b5f5" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/5/8/580ca1e1547ef7c5ed07f983fd043c7d8c24b5f5.png" alt="image" data-base62-sha1="cyV55ufw1iNEsvXeE7DOFTyyvVX" width="690" height="412" data-dominant-color="13161D"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">779×466 10.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Here is the screen shot of that file where the cpu_run is defined. I have accessed it through the source code on GitHub, but I cannot access it iin my sagemaker notebook. I need to make changes in the above code provided only. Please suggest if there is any possibility to overcome this.</p>

username: ptrblck
cooked: <p>The <code>cpu_run</code> is an argument of <code>prepare_input_sequence</code>, so set it to <code>True</code> in your main script and try to rerun your code.</p>