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

AttributeError: module 'keras.backend' has no attribute 'is_tensor' #58

Open
ChintanShahDS opened this issue Aug 17, 2023 · 2 comments
Open

Comments

@ChintanShahDS
Copy link

Generating SAM seg:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1109, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 706, in wrapper
response = f(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/content/drive/MyDrive/Colab Notebooks/EditAnything-main/EditAnything-main/annotator/util.py", line 86, in wrapper
result = func(self, *args, **kwargs)
File "/content/drive/MyDrive/Colab Notebooks/EditAnything-main/EditAnything-main/editany_lora.py", line 743, in process
control = einops.rearrange(control, "b h w c -> b c h w").clone()
File "/usr/local/lib/python3.10/dist-packages/einops/einops.py", line 424, in rearrange
return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
File "/usr/local/lib/python3.10/dist-packages/einops/einops.py", line 368, in reduce
return recipe.apply(tensor)
File "/usr/local/lib/python3.10/dist-packages/einops/einops.py", line 203, in apply
backend = get_backend(tensor)
File "/usr/local/lib/python3.10/dist-packages/einops/_backends.py", line 49, in get_backend
if backend.is_appropriate_type(tensor):
File "/usr/local/lib/python3.10/dist-packages/einops/_backends.py", line 513, in is_appropriate_type
return self.K.is_tensor(tensor) and self.K.is_keras_tensor(tensor)
AttributeError: module 'keras.backend' has no attribute 'is_tensor'

@gasvn
Copy link
Collaborator

gasvn commented Sep 4, 2023

Can you please show how to reproduce this error? Thanks.

@ChintanShahDS
Copy link
Author

ChintanShahDS commented Sep 7, 2023 via email

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

2 participants