Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'bool' object is not iterable #148

Open
amiran-gorgazjan opened this issue Jun 29, 2023 · 8 comments
Open

'bool' object is not iterable #148

amiran-gorgazjan opened this issue Jun 29, 2023 · 8 comments

Comments

@amiran-gorgazjan
Copy link

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
Copy link

qinfrank commented Jul 3, 2023

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

@guillaume-rce
Copy link

guillaume-rce commented Jul 5, 2023

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

@fatualux
Copy link

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

@kassi-bertrand
Copy link

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

@RemmyLee
Copy link

RemmyLee commented Jul 29, 2023

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
Copy link

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
Copy link

rsxdalv commented Aug 24, 2023

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
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants