Skip to content

AttributeError: 'Image' object has no attribute 'shape'. Did you mean: 'save'? #111

@ZhouJunCheng99

Description

@ZhouJunCheng99

Traceback (most recent call last):
File "code/Show-o-main/show-o2/inference_t2i.py", line 205, in
checked_images, has_nsfw_concept = safety_checker(
File "/envs/showo2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/safety_checker.py", line 92, in forward
images[idx] = np.zeros(images[idx].shape) # black image
AttributeError: 'Image' object has no attribute 'shape'. Did you mean: 'save'?
Traceback (most recent call last):
File "/m2v_intern/ode/Show-o-main/show-o2/inference_t2i.py", line 205, in
checked_images, has_nsfw_concept = safety_checker(
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/envs/showo2/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/safety_checker.py", line 92, in forward
images[idx] = np.zeros(images[idx].shape) # black image
AttributeError: 'Image' object has no attribute 'shape'. Did you mean: 'save'?

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