riffusion / riffusion-hobby

Stable diffusion for real-time music generation
MIT License
3.41k stars 392 forks source link

'bool' object is not iterable #148

Open amiran-gorgazjan opened 1 year ago

amiran-gorgazjan commented 1 year ago

Doing Audio-to-Audio on the playground. After pressing the Riff button I get:

TypeError: 'bool' object is not iterable
Traceback:
File "/opt/homebrew/Caskroom/miniconda/base/envs/riffusion/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
File "/Users/amirangorgazjan/git/riffusion/riffusion/streamlit/playground.py", line 34, in <module>
    render()
File "/Users/amirangorgazjan/git/riffusion/riffusion/streamlit/playground.py", line 29, in render
    module.render()
File "/Users/amirangorgazjan/git/riffusion/riffusion/streamlit/tasks/audio_to_audio.py", line 272, in render
    image = streamlit_util.run_img2img(
File "/opt/homebrew/Caskroom/miniconda/base/envs/riffusion/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 715, in wrapped_func
    return get_or_create_cached_value()
File "/opt/homebrew/Caskroom/miniconda/base/envs/riffusion/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 696, in get_or_create_cached_value
    return_value = non_optional_func(*args, **kwargs)
File "/Users/amirangorgazjan/git/riffusion/riffusion/streamlit/util.py", line 383, in run_img2img
    result = pipeline(
File "/opt/homebrew/Caskroom/miniconda/base/envs/riffusion/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
File "/opt/homebrew/Caskroom/miniconda/base/envs/riffusion/lib/python3.9/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py", line 796, in __call__
    do_denormalize = [not has_nsfw for has_nsfw in has_nsfw_concept]

System specs:

Apple M1 Max
MacBook Pro (16-inch, 2021)
macOS Monterey Version 12.5
qinfrank commented 1 year ago

Have you resolved this yet? Seeing the same error with Apple M2 Pro, 16 GB, macOS 13.4.1.

guillaume-rce commented 1 year ago

Hi, same error with a Acer AN515, with core i7... If someone have an idea, I'm here :) I doing a text2audio

fatualux commented 1 year ago

Same error... I cannot figure how to solve it

kassi-bertrand commented 1 year ago

Running into the same issue Text-to-image pipeline.

RemmyLee commented 1 year ago

In pipline_stable_diffusion.py, change: image

To:

image

This will essentially bypass the NSFW filter, but it will at least allow it to work. You'll need to do this for any file that has this if/else.

Path should be: riffusion/lib/python3.XX/site-packages/diffusers/pipelines/stable_diffusion

fatualux commented 1 year ago

In pipline_stable_diffusion.py, change: image

To:

image

This will essentially bypass the NSFW filter, but it will at least allow it to work. You'll need to do this for any file that has this if/else.

Path should be: riffusion/lib/python3.XX/site-packages/diffusers/pipelines/stable_diffusion

Thank you RemmyLee

rsxdalv commented 1 year ago

More precisely: "\installer_files\env\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 706

I opened an issue with the upstream repository to see if it can be solved there.

Also here's the same thing as code for copy-paste convenience:

        if has_nsfw_concept is None:
            do_denormalize = [True] * image.shape[0]
        else:
            do_denormalize = [True] * image.shape[0]
gitihobo commented 1 year ago

same issue