Skip to content

ROCm not working in repaint: No soundfile backend in process_reference_audio #665

Description

@shipped-it

Describe the bug
torchaudio relies on torchcodec, so we can't use an AMD GPU for repainting.

2026-02-21 20:25:02.418 | ERROR    | acestep.core.generation.handler.generate_music:generate_music:183 - [generate_music] Generation failed
Traceback (most recent call last):

  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/torchaudio/_torchcodec.py", line 82, in load_with_torchcodec
    from torchcodec.decoders import AudioDecoder

ModuleNotFoundError: No module named 'torchcodec'


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/home/user/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f1710ee5c60>
    └ <WorkerThread(AnyIO worker thread, started daemon 139710781454016)>
  File "/home/user/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7f11d5706a20>
    └ <WorkerThread(AnyIO worker thread, started daemon 139710781454016)>
  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 986, in run
    result = context.run(func, *args)
             │       │   │      └ (<generator object register_generation_run_handlers.<locals>.generation_wrapper at 0x7f11d8ba1000>,)
             │       │   └ <function run_sync_iterator_async at 0x7f1302f76d40>
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7f11dd1fb280>
  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/gradio/utils.py", line 833, in run_sync_iterator_async
    return next(iterator)
                └ <generator object register_generation_run_handlers.<locals>.generation_wrapper at 0x7f11d8ba1000>
  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/gradio/utils.py", line 1017, in gen_wrapper
    response = next(iterator)
                    └ <generator object register_generation_run_handlers.<locals>.generation_wrapper at 0x7f11d573a260>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/ui/gradio/events/wiring/generation_run_wiring.py", line 45, in generation_wrapper
    yield from res_h.generate_with_batch_management(dit_handler, llm_handler, *args)
               │     │                              │            │             └ ('', '[Instrumental]', None, '', '', 'unknown', 8, 7, False, '1829544894', '/tmp/gradio/5f72c94c1ec50b94e223adbcbb25840953861...
               │     │                              │            └ <acestep.llm_inference.LLMHandler object at 0x7f13022057d0>
               │     │                              └ <acestep.handler.AceStepHandler object at 0x7f13022f1ad0>
               │     └ <function generate_with_batch_management at 0x7f154d97d1c0>
               └ <module 'acestep.ui.gradio.events.results_handlers' from '/mnt/HeavyData/AI/ACE-Step-1.5/acestep/ui/gradio/events/results_han...

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/ui/gradio/events/results/batch_management.py", line 76, in generate_with_batch_management
    for partial_result in generator:
                          └ <generator object generate_with_progress at 0x7f0ed405d970>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/ui/gradio/events/results/generation_progress.py", line 159, in generate_with_progress
    result = generate_music(dit_handler, llm_handler, params=gen_params, config=gen_config, progress=progress)
             │              │            │                   │                  │                    └ <gradio.helpers.Progress object at 0x7f154d988dd0>
             │              │            │                   │                  └ GenerationConfig(batch_size=2, allow_lm_batch=True, use_random_seed=False, seeds=[1829544894], lm_batch_chunk_size=8, constra...
             │              │            │                   └ GenerationParams(task_type='text2music', instruction='Fill the audio semantic mask based on the given conditions:', reference...
             │              │            └ <acestep.llm_inference.LLMHandler object at 0x7f13022057d0>
             │              └ <acestep.handler.AceStepHandler object at 0x7f13022f1ad0>
             └ <function generate_music at 0x7f154d959800>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/inference.py", line 581, in generate_music
    result = dit_handler.generate_music(
             │           └ <function GenerateMusicMixin.generate_music at 0x7f1550d8a660>
             └ <acestep.handler.AceStepHandler object at 0x7f13022f1ad0>

> File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/core/generation/handler/generate_music.py", line 111, in generate_music
    refer_audios, processed_src_audio, audio_error = self._prepare_reference_and_source_audio(
                                                     │    └ <function GenerateMusicRequestMixin._prepare_reference_and_source_audio at 0x7f1550dc44a0>
                                                     └ <acestep.handler.AceStepHandler object at 0x7f13022f1ad0>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/core/generation/handler/generate_music_request.py", line 97, in _prepare_reference_and_source_audio
    processed_ref_audio = self.process_reference_audio(reference_audio)
                          │    │                       └ '/tmp/gradio/5f72c94c1ec50b94e223adbcbb25840953861f08e9c9d9df9f21286dcdb0d65c/flight.wav'
                          │    └ <function IoAudioMixin.process_reference_audio at 0x7f1550dc76a0>
                          └ <acestep.handler.AceStepHandler object at 0x7f13022f1ad0>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/acestep/core/generation/handler/io_audio.py", line 78, in process_reference_audio
    audio, sr = torchaudio.load(audio_file)
                │          │    └ '/tmp/gradio/5f72c94c1ec50b94e223adbcbb25840953861f08e9c9d9df9f21286dcdb0d65c/flight.wav'
                │          └ <function load at 0x7f1550b35ee0>
                └ <module 'torchaudio' from '/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/torchaudio/__init__.py'>

  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/torchaudio/__init__.py", line 86, in load
    return load_with_torchcodec(
           └ <function load_with_torchcodec at 0x7f1550bb8720>
  File "/mnt/HeavyData/AI/ACE-Step-1.5/.venv/lib/python3.11/site-packages/torchaudio/_torchcodec.py", line 84, in load_with_torchcodec
    raise ImportError(


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions