emotions not working with CPU #6

Closed
opened 2023-02-07 10:34:36 +00:00 by cplays · 1 comment

Heres the error it gives

Reading from latent: D:\tortoise-tts\tortoise\utils\../voices\Phil Swift\cond_latents.pth
[1/1] Generating line: [I am really sad,] l.
Generating autoregressive samples
Computing best candidates using CLVP
Transforming autoregressive outputs into audio..
Traceback (most recent call last):
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\routes.py", line 350, in run_predict
    event_id=event_id,
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api
    fn_index, inputs, iterator, request, event_id
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\blocks.py", line 831, in call_function
    fn, *processed_input, limiter=self.limiter
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\to_thread.py", line 32, in run_sync
    func, *args, cancellable=cancellable, limiter=limiter
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File ".\app.py", line 88, in generate
    gen, additionals = tts.tts(cut_text, **settings )
  File "D:\tortoise-tts\tortoise\api.py", line 586, in tts
    wav_candidates = [potentially_redact(wav_candidate, text) for wav_candidate in wav_candidates]
  File "D:\tortoise-tts\tortoise\api.py", line 586, in <listcomp>
    wav_candidates = [potentially_redact(wav_candidate, text) for wav_candidate in wav_candidates]
  File "D:\tortoise-tts\tortoise\api.py", line 584, in potentially_redact
    return self.aligner.redact(clip.squeeze(1), text).unsqueeze(1)
  File "D:\tortoise-tts\tortoise\utils\wav2vec_alignment.py", line 143, in redact
    alignments = self.align(audio, bare_text, audio_sample_rate)
  File "D:\tortoise-tts\tortoise\utils\wav2vec_alignment.py", line 61, in align
    self.model = self.model.to(self.device)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 989, in to
    return self._apply(convert)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply
    module._apply(fn)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply
    module._apply(fn)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 664, in _apply
    param_applied = fn(param)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 987, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
  File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\cuda\__init__.py", line 221, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Heres the error it gives ``` Reading from latent: D:\tortoise-tts\tortoise\utils\../voices\Phil Swift\cond_latents.pth [1/1] Generating line: [I am really sad,] l. Generating autoregressive samples Computing best candidates using CLVP Transforming autoregressive outputs into audio.. Traceback (most recent call last): File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\routes.py", line 350, in run_predict event_id=event_id, File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\blocks.py", line 1013, in process_api fn_index, inputs, iterator, request, event_id File "D:\tortoise-tts\tortoise-venv\lib\site-packages\gradio\blocks.py", line 831, in call_function fn, *processed_input, limiter=self.limiter File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\to_thread.py", line 32, in run_sync func, *args, cancellable=cancellable, limiter=limiter File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "D:\tortoise-tts\tortoise-venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File ".\app.py", line 88, in generate gen, additionals = tts.tts(cut_text, **settings ) File "D:\tortoise-tts\tortoise\api.py", line 586, in tts wav_candidates = [potentially_redact(wav_candidate, text) for wav_candidate in wav_candidates] File "D:\tortoise-tts\tortoise\api.py", line 586, in <listcomp> wav_candidates = [potentially_redact(wav_candidate, text) for wav_candidate in wav_candidates] File "D:\tortoise-tts\tortoise\api.py", line 584, in potentially_redact return self.aligner.redact(clip.squeeze(1), text).unsqueeze(1) File "D:\tortoise-tts\tortoise\utils\wav2vec_alignment.py", line 143, in redact alignments = self.align(audio, bare_text, audio_sample_rate) File "D:\tortoise-tts\tortoise\utils\wav2vec_alignment.py", line 61, in align self.model = self.model.to(self.device) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 989, in to return self._apply(convert) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply module._apply(fn) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply module._apply(fn) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 641, in _apply module._apply(fn) [Previous line repeated 2 more times] File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 664, in _apply param_applied = fn(param) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\nn\modules\module.py", line 987, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) File "D:\tortoise-tts\tortoise-venv\lib\site-packages\torch\cuda\__init__.py", line 221, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled ```
Owner

Should be fixed in commit 5f934c5feb. I say should, because, while I did force TorToiSe to use my CPU, I'm not sure how guaranteed it was, even with compute time being noticeably slower. But it does seem to work in CPU-only mode.

There was some rather careless assumption from either the original TorToiSe dev, or whoever provided wav2vec_alignment.py, to use a CUDA device without even querying for it in the first place in a section of code that I suppose only gets hit when using emotions/prompt engineering/prompt redactions.

Should be fixed in commit 5f934c5feb05e10e021bd631ebb0f3905001c679. I say should, because, while I did force TorToiSe to use my CPU, I'm not sure how guaranteed it was, even with compute time being noticeably slower. But it does seem to work in CPU-only mode. There was some rather careless assumption from either the original TorToiSe dev, or whoever provided `wav2vec_alignment.py`, to use a CUDA device without even querying for it in the first place in a section of code that I suppose only gets hit when using emotions/prompt engineering/prompt redactions.
mrq closed this issue 2023-02-09 20:44:35 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrq/tortoise-tts#6
No description provided.