You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With diffusers 0.21.2 the safety checker hook fails due to tensors being passed instead of numpy arrays.
Traceback (most recent call last):
File "/mnt/900/builds/sd-scripts/daam/test.py", line 161, in <module>
main(args)
File "/mnt/900/builds/sd-scripts/daam/test.py", line 115, in main
out = pipe(
File "/mnt/900/builds/sd-scripts/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/mnt/900/builds/sd-scripts/.venv/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 708, in __call__
image, has_nsfw_concept = self.run_safety_checker(image, device, prompt_embeds.dtype)
File "/mnt/900/builds/sd-scripts/daam/daam/trace.py", line 140, in _hooked_run_safety_checker
pil_image = self.numpy_to_pil(image)
File "/mnt/900/builds/sd-scripts/.venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1699, in numpy_to_pil
return numpy_to_pil(images)
File "/mnt/900/builds/sd-scripts/.venv/lib/python3.10/site-packages/diffusers/utils/pil_utils.py", line 43, in numpy_to_pil
images = (images * 255).round().astype("uint8")
AttributeError: 'Tensor' object has no attribute 'astype'. Did you mean: 'dtype'?
Am aware the library isn't supported at this version. Making a PR to fix with backwards compatibility.
The text was updated successfully, but these errors were encountered:
With diffusers 0.21.2 the safety checker hook fails due to tensors being passed instead of numpy arrays.
Am aware the library isn't supported at this version. Making a PR to fix with backwards compatibility.
The text was updated successfully, but these errors were encountered: