eigenpunk / ComfyUI-audio

some generative audio tools for ComfyUI
GNU General Public License v3.0
75 stars 17 forks source link

'None' error in _move_and_recurse #7

Closed drewp closed 8 months ago

drewp commented 8 months ago

MusicgenGenerate fails with this:


got prompt
MusicgenLoader: loading musicgen-small
/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
moved MusicGen.compression_model to cuda
moved MusicGen.lm to cuda
moved MusicGen.cfg._metadata.ref_type.__new__ to cuda
moved MusicGen.cfg._metadata.ref_type to cuda
moved MusicGen.cfg._metadata.object_type to cuda
moved MusicGen.cfg._metadata.key_type.__new__ to cuda
moved MusicGen.cfg._metadata.key_type to cuda
moved MusicGen.cfg._metadata.element_type.__new__ to cuda
moved MusicGen.cfg._metadata.element_type to cuda
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/home/drewp/Downloads/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/custom_nodes/ComfyUI-audio/musicgen_nodes.py", line 108, in generate
    with torch.random.fork_rng(), obj_on_device(model, dst=device, verbose_move=True) as m:
  File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/custom_nodes/ComfyUI-audio/util.py", line 94, in obj_on_device
    model = object_to(model, dst, exclude=exclude, empty_cuda_cache=empty_cuda_cache, verbose=verbose_move)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/custom_nodes/ComfyUI-audio/util.py", line 86, in object_to
    obj = _move_and_recurse(obj)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/custom_nodes/ComfyUI-audio/util.py", line 77, in _move_and_recurse
    v = _move_and_recurse(v, name=cur_name)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/Downloads/ComfyUI/custom_nodes/ComfyUI-audio/util.py", line 78, in _move_and_recurse
    setattr(o, k, v)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 337, in __setattr__
    raise e
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 334, in __setattr__
    self.__set_impl(key, value)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 318, in __set_impl
    self._set_item_impl(key, value)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/basecontainer.py", line 620, in _set_item_impl
    self._wrap_value_and_set(key, value, target_type_hint)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/basecontainer.py", line 628, in _wrap_value_and_set
    wrapped = _maybe_wrap(
              ^^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/omegaconf.py", line 1105, in _maybe_wrap
    return _node_wrap(
           ^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/omegaconf.py", line 1027, in _node_wrap
    node = DictConfig(
           ^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 111, in __init__
    format_and_raise(node=None, key=key, value=None, cause=ex, msg=str(ex))
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 819, in format_and_raise
    _raise(ex, cause)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 94, in __init__
    self._set_value(content, flags=flags)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 647, in _set_value
    raise e
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 644, in _set_value
    self._set_value_impl(value, flags)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/dictconfig.py", line 674, in _set_value_impl
    data = get_structured_config_data(value, allow_objects=ao)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 495, in get_structured_config_data
    return get_dataclass_data(obj, allow_objects=allow_objects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 411, in get_dataclass_data
    format_and_raise(node=None, key=None, value=value, cause=e, msg=str(e))
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 899, in format_and_raise
    _raise(ex, cause)
  File "/home/drewp/.local/share/pdm/venvs/ComfyUI-kHMZhrrp-3.11/lib/python3.11/site-packages/omegaconf/_utils.py", line 797, in _raise
    raise ex.with_traceback(sys.exc_info()[2])  # set env var OC_CAUSE=1 for full trace
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
omegaconf.errors.ConfigValueError: Unions of containers are not supported:
ref_type: Union[Type[Any], Any]
    full_key: 
    object_type=None

Prompt executed in 2.50 seconds

I had to slip some versions around to get it to install:

% pdm list

╭───────────────────────────┬─────────────┬──────────────────────────────────────────────╮
│ name                      │ version     │ location                                     │
├───────────────────────────┼─────────────┼──────────────────────────────────────────────┤
│ accelerate                │ 0.27.2      │                                              │
│ aiofiles                  │ 23.2.1      │                                              │
│ aiohttp                   │ 3.9.3       │                                              │
│ aiosignal                 │ 1.3.1       │                                              │
│ albumentations            │ 1.4.0       │                                              │
│ altair                    │ 5.2.0       │                                              │
│ annotated-types           │ 0.6.0       │                                              │
│ antlr4-python3-runtime    │ 4.9.3       │                                              │
│ anyio                     │ 4.3.0       │                                              │
│ atlastk                   │ 0.13.3      │                                              │
│ attrs                     │ 23.2.0      │                                              │
│ audiocraft                │ 1.3.0a1     │ /home/drewp/Downloads/ComfyUI/dep/audiocraft │
│ audioread                 │ 3.0.1       │                                              │
│ av                        │ 11.0.0      │                                              │
│ black                     │ 24.2.0      │                                              │
│ blinker                   │ 1.7.0       │                                              │
│ blis                      │ 0.7.11      │                                              │
│ cachetools                │ 5.3.3       │                                              │
│ catalogue                 │ 2.0.10      │                                              │
│ certifi                   │ 2024.2.2    │                                              │
│ cffi                      │ 1.16.0      │                                              │
│ charset-normalizer        │ 3.3.2       │                                              │
│ click                     │ 8.1.7       │                                              │
│ cloudpathlib              │ 0.16.0      │                                              │
│ cloudpickle               │ 3.0.0       │                                              │
│ cn2an                     │ 0.5.22      │                                              │
│ color-matcher             │ 0.5.0       │                                              │
│ colorama                  │ 0.4.6       │                                              │
│ coloredlogs               │ 15.0.1      │                                              │
│ colorlog                  │ 6.8.2       │                                              │
│ confection                │ 0.1.4       │                                              │
│ contourpy                 │ 1.2.0       │                                              │
│ cupy-cuda12x              │ 13.0.0      │                                              │
│ cycler                    │ 0.12.1      │                                              │
│ cymem                     │ 2.0.8       │                                              │
│ Cython                    │ 3.0.8       │                                              │
│ cytoolz                   │ 0.12.3      │                                              │
│ ddt                       │ 1.7.1       │                                              │
│ decorator                 │ 5.1.1       │                                              │
│ deepspeed                 │ 0.13.4      │                                              │
│ demucs                    │ 4.0.1       │                                              │
│ diffusers                 │ 0.26.3      │                                              │
│ docopt                    │ 0.6.2       │                                              │
│ docutils                  │ 0.20.1      │                                              │
│ dora_search               │ 0.1.12      │                                              │
│ easydict                  │ 1.12        │                                              │
│ einops                    │ 0.7.0       │                                              │
│ encodec                   │ 0.1.1       │                                              │
│ eng_to_ipa                │ 0.0.2       │                                              │
│ fastapi                   │ 0.110.0     │                                              │
│ fastrlock                 │ 0.8.2       │                                              │
│ ffmpy                     │ 0.3.2       │                                              │
│ filelock                  │ 3.13.1      │                                              │
│ flashy                    │ 0.0.2       │                                              │
│ flatbuffers               │ 23.5.26     │                                              │
│ fonttools                 │ 4.49.0      │                                              │
│ frozenlist                │ 1.4.1       │                                              │
│ fsspec                    │ 2024.2.0    │                                              │
│ ftfy                      │ 6.1.3       │                                              │
│ gitdb                     │ 4.0.11      │                                              │
│ GitPython                 │ 3.1.42      │                                              │
│ glitch-this               │ 1.0.2       │                                              │
│ gradio                    │ 3.41.2      │                                              │
│ gradio_client             │ 0.5.0       │                                              │
│ gray2color                │ 0.4.3       │                                              │
│ h11                       │ 0.14.0      │                                              │
│ hjson                     │ 3.1.0       │                                              │
│ httpcore                  │ 1.0.4       │                                              │
│ httpx                     │ 0.27.0      │                                              │
│ huggingface-hub           │ 0.20.3      │                                              │
│ humanfriendly             │ 10.0        │                                              │
│ hydra-colorlog            │ 1.2.0       │                                              │
│ hydra-core                │ 1.3.2       │                                              │
│ idna                      │ 3.6         │                                              │
│ imageio                   │ 2.34.0      │                                              │
│ imageio-ffmpeg            │ 0.4.9       │                                              │
│ importlib-metadata        │ 7.0.1       │                                              │
│ importlib_resources       │ 6.1.2       │                                              │
│ inflect                   │ 7.0.0       │                                              │
│ insightface               │ 0.7.3       │                                              │
│ intervaltree              │ 3.1.0       │                                              │
│ jieba                     │ 0.42.1      │                                              │
│ Jinja2                    │ 3.1.3       │                                              │
│ joblib                    │ 1.3.2       │                                              │
│ jsonschema                │ 4.21.1      │                                              │
│ jsonschema-specifications │ 2023.12.1   │                                              │
│ julius                    │ 0.2.7       │                                              │
│ kiwisolver                │ 1.4.5       │                                              │
│ kornia                    │ 0.7.1       │                                              │
│ lameenc                   │ 1.7.0       │                                              │
│ langcodes                 │ 3.3.0       │                                              │
│ langid                    │ 1.1.6       │                                              │
│ lazy_loader               │ 0.3         │                                              │
│ lhotse                    │ 1.21.0      │                                              │
│ librosa                   │ 0.10.1      │                                              │
│ lightning-utilities       │ 0.10.1      │                                              │
│ lilcom                    │ 1.7         │                                              │
│ llvmlite                  │ 0.42.0      │                                              │
│ markdown-it-py            │ 3.0.0       │                                              │
│ MarkupSafe                │ 2.1.5       │                                              │
│ matplotlib                │ 3.8.3       │                                              │
│ mdurl                     │ 0.1.2       │                                              │
│ more-itertools            │ 10.2.0      │                                              │
│ mpmath                    │ 1.3.0       │                                              │
│ msgpack                   │ 1.0.7       │                                              │
│ multidict                 │ 6.0.5       │                                              │
│ murmurhash                │ 1.0.10      │                                              │
│ mypy-extensions           │ 1.0.0       │                                              │
│ networkx                  │ 3.2.1       │                                              │
│ ninja                     │ 1.11.1.1    │                                              │
│ nltk                      │ 3.8.1       │                                              │
│ num2words                 │ 0.5.13      │                                              │
│ numba                     │ 0.59.0      │                                              │
│ numpy                     │ 1.26.4      │                                              │
│ nvidia-cublas-cu12        │ 12.1.3.1    │                                              │
│ nvidia-cuda-cupti-cu12    │ 12.1.105    │                                              │
│ nvidia-cuda-nvrtc-cu12    │ 12.1.105    │                                              │
│ nvidia-cuda-runtime-cu12  │ 12.1.105    │                                              │
│ nvidia-cudnn-cu12         │ 8.9.2.26    │                                              │
│ nvidia-cufft-cu12         │ 11.0.2.54   │                                              │
│ nvidia-curand-cu12        │ 10.3.2.106  │                                              │
│ nvidia-cusolver-cu12      │ 11.4.5.107  │                                              │
│ nvidia-cusparse-cu12      │ 12.1.0.106  │                                              │
│ nvidia-nccl-cu12          │ 2.19.3      │                                              │
│ nvidia-nvjitlink-cu12     │ 12.3.101    │                                              │
│ nvidia-nvtx-cu12          │ 12.1.105    │                                              │
│ omegaconf                 │ 2.3.0       │                                              │
│ onnx                      │ 1.15.0      │                                              │
│ onnxruntime               │ 1.17.0      │                                              │
│ open-clip-torch           │ 2.24.0      │                                              │
│ openai-whisper            │ 20231117    │                                              │
│ opencv-python             │ 4.9.0.80    │                                              │
│ opencv-python-headless    │ 4.9.0.80    │                                              │
│ openunmix                 │ 1.2.1       │                                              │
│ orjson                    │ 3.9.15      │                                              │
│ packaging                 │ 23.2        │                                              │
│ pandas                    │ 2.2.1       │                                              │
│ pathspec                  │ 0.12.1      │                                              │
│ pilgram                   │ 1.2.1       │                                              │
│ pillow                    │ 10.2.0      │                                              │
│ platformdirs              │ 4.2.0       │                                              │
│ pooch                     │ 1.8.1       │                                              │
│ preshed                   │ 3.0.9       │                                              │
│ prettytable               │ 3.10.0      │                                              │
│ proces                    │ 0.1.7       │                                              │
│ progressbar               │ 2.5         │                                              │
│ protobuf                  │ 4.25.3      │                                              │
│ psutil                    │ 5.9.8       │                                              │
│ py-cpuinfo                │ 9.0.0       │                                              │
│ py-spy                    │ 0.3.14      │                                              │
│ pyarrow                   │ 15.0.0      │                                              │
│ pycparser                 │ 2.21        │                                              │
│ pydantic                  │ 2.6.3       │                                              │
│ pydantic_core             │ 2.16.3      │                                              │
│ pydeck                    │ 0.8.1b0     │                                              │
│ pydub                     │ 0.25.1      │                                              │
│ Pygments                  │ 2.17.2      │                                              │
│ PyMatting                 │ 1.1.12      │                                              │
│ pynvml                    │ 11.5.0      │                                              │
│ pyopenjtalk-prebuilt      │ 0.3.0       │                                              │
│ pyparsing                 │ 3.1.1       │                                              │
│ pypinyin                  │ 0.50.0      │                                              │
│ python-dateutil           │ 2.8.2       │                                              │
│ python-multipart          │ 0.0.9       │                                              │
│ pytorch-lightning         │ 2.2.0.post0 │                                              │
│ pytz                      │ 2024.1      │                                              │
│ PyYAML                    │ 6.0.1       │                                              │
│ qudida                    │ 0.0.4       │                                              │
│ referencing               │ 0.33.0      │                                              │
│ regex                     │ 2023.12.25  │                                              │
│ rembg                     │ 2.0.54      │                                              │
│ requests                  │ 2.31.0      │                                              │
│ retrying                  │ 1.3.4       │                                              │
│ rich                      │ 13.7.0      │                                              │
│ rpds-py                   │ 0.18.0      │                                              │
│ ruff                      │ 0.2.2       │                                              │
│ safetensors               │ 0.4.2       │                                              │
│ scikit-image              │ 0.22.0      │                                              │
│ scikit-learn              │ 1.4.1.post1 │                                              │
│ scipy                     │ 1.12.0      │                                              │
│ semantic-version          │ 2.10.0      │                                              │
│ sentencepiece             │ 0.2.0       │                                              │
│ setuptools                │ 69.1.0      │                                              │
│ shellingham               │ 1.5.4       │                                              │
│ simpleeval                │ 0.9.13      │                                              │
│ six                       │ 1.16.0      │                                              │
│ smart-open                │ 6.4.0       │                                              │
│ smmap                     │ 5.0.1       │                                              │
│ sniffio                   │ 1.3.1       │                                              │
│ sortedcontainers          │ 2.4.0       │                                              │
│ soundfile                 │ 0.12.1      │                                              │
│ soxr                      │ 0.3.7       │                                              │
│ spacy                     │ 3.7.4       │                                              │
│ spacy-legacy              │ 3.0.12      │                                              │
│ spacy-loggers             │ 1.0.5       │                                              │
│ srsly                     │ 2.4.8       │                                              │
│ starlette                 │ 0.36.3      │                                              │
│ streamlit                 │ 1.31.1      │                                              │
│ submitit                  │ 1.5.1       │                                              │
│ SudachiDict-core          │ 20240109    │                                              │
│ SudachiPy                 │ 0.6.8       │                                              │
│ sympy                     │ 1.12        │                                              │
│ tabulate                  │ 0.9.0       │                                              │
│ tenacity                  │ 8.2.3       │                                              │
│ thinc                     │ 8.2.3       │                                              │
│ threadpoolctl             │ 3.3.0       │                                              │
│ tifffile                  │ 2024.2.12   │                                              │
│ tiktoken                  │ 0.6.0       │                                              │
│ timm                      │ 0.9.16      │                                              │
│ tokenizers                │ 0.15.2      │                                              │
│ toml                      │ 0.10.2      │                                              │
│ tomlkit                   │ 0.12.0      │                                              │
│ toolz                     │ 0.12.1      │                                              │
│ torch                     │ 2.2.0       │                                              │
│ torchaudio                │ 2.2.0       │                                              │
│ torchdiffeq               │ 0.2.3       │                                              │
│ torchlibrosa              │ 0.1.0       │                                              │
│ torchmetrics              │ 1.3.1       │                                              │
│ torchsde                  │ 0.2.6       │                                              │
│ torchvision               │ 0.17.0      │                                              │
│ tornado                   │ 6.4         │                                              │
│ tortoise                  │ 0.1.1       │                                              │
│ tqdm                      │ 4.66.2      │                                              │
│ trampoline                │ 0.1.2       │                                              │
│ transformers              │ 4.38.1      │                                              │
│ treetable                 │ 0.2.5       │                                              │
│ triton                    │ 2.2.0       │                                              │
│ typer                     │ 0.9.0       │                                              │
│ typing_extensions         │ 4.9.0       │                                              │
│ tzdata                    │ 2024.1      │                                              │
│ tzlocal                   │ 5.2         │                                              │
│ Unidecode                 │ 1.3.8       │                                              │
│ urllib3                   │ 2.2.1       │                                              │
│ uvicorn                   │ 0.27.1      │                                              │
│ validators                │ 0.22.0      │                                              │
│ VALL-E-X                  │ 0.0.2a1     │ /home/drewp/Downloads/ComfyUI/dep/VALL-E-X   │
│ vocos                     │ 0.1.0       │                                              │
│ voicefixer                │ 0.1.3       │                                              │
│ wasabi                    │ 1.1.2       │                                              │
│ watchdog                  │ 4.0.0       │                                              │
│ wcwidth                   │ 0.2.13      │                                              │
│ weasel                    │ 0.3.4       │                                              │
│ websockets                │ 11.0.3      │                                              │
│ wget                      │ 3.2         │                                              │
│ xformers                  │ 0.0.24      │                                              │
│ yarl                      │ 1.9.4       │                                              │
│ zipp                      │ 3.17.0      │                                              │
╰───────────────────────────┴─────────────┴──────────────────────────────────────────────╯
eigenpunk commented 8 months ago

this should be fixed now. it was actually fixed in develop but had not been merged into main. sorry about that.