ComfyUI-DeepExtractV2 icon indicating copy to clipboard operation
ComfyUI-DeepExtractV2 copied to clipboard

TTS Audio Suite collision - cannot import name 'center_trim' from 'utils'

Open mykeehu opened this issue 5 months ago • 2 comments

When I try to use the node, I get an error like this:

got prompt
!!! Exception during processing !!! cannot import name 'center_trim' from 'utils' (I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\__init__.py)
Traceback (most recent call last):
  File "I:\ComfyUI_windows_portable\ComfyUI\execution.py", line 496, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\execution.py", line 315, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "I:\ComfyUI_windows_portable\ComfyUI\execution.py", line 277, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\node.py", line 98, in separate
    separator = Separator(
                ^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\helper.py", line 46, in __init__
    self._load_model()
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\helper.py", line 86, in _load_model
    self._model = get_model(name=self._name, repo=self._repo)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\pretrained.py", line 41, in get_model
    model = any_repo.get_model(name)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\repo.py", line 104, in get_model
    return self.bag_repo.get_model(name_or_sig)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\repo.py", line 83, in get_model
    models = [self.model_repo.get_model(sig) for sig in signatures]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\repo.py", line 53, in get_model
    pkg = torch.hub.load_state_dict_from_url(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\hub.py", line 875, in load_state_dict_from_url
    return torch.load(cached_file, map_location=map_location, weights_only=weights_only)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-RMBG\AILab_SAM2Segment.py", line 47, in patched_torch_load
    return original_torch_load(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Subpack\modules\subcore.py", line 216, in torch_wrapper
    return orig_torch_load(*args, **load_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 1525, in load
    return _load(
           ^^^^^^
  File "I:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 2114, in _load
    result = unpickler.load()
             ^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 2103, in find_class
    return super().find_class(mod_name, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\demucs\htdemucs.py", line 14, in <module>
    from .demucs import rescale_module
  File "I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-DeepExtractV2\demucs\demucs.py", line 10, in <module>
    from utils import center_trim, unfold
ImportError: cannot import name 'center_trim' from 'utils' (I:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\__init__.py)

I don't want to disable TTS Audio Suite. How can I solve this problem?

mykeehu avatar Oct 08 '25 20:10 mykeehu

Image

You can try moving the utils file into the demucs folder using VS Code’s move feature, which will automatically update the import statements, and also update the __init__.py file as shown in the image. I’m not sure if this will fully fix the issue, but it’s worth a try.

abdozmantar avatar Oct 08 '25 20:10 abdozmantar

I can confirm moving the utils file into the demucs folder using VS Code's move feature works along with the change to the init.py file.

dcarpy avatar Oct 14 '25 00:10 dcarpy