sail-sg / EditAnything

Edit anything in images powered by segment-anything, ControlNet, StableDiffusion, etc. (ACM MM)
Apache License 2.0
3.23k stars 179 forks source link

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

Open ChintanShahDS opened 10 months ago

ChintanShahDS commented 10 months ago

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 commented 10 months ago

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

ChintanShahDS commented 10 months ago

I just downloaded the latest version on Google colab and tried running it and getting these errors. It seems it is for to mismatch between the keras versions.

On Mon, Sep 4, 2023, 11:28 Shanghua Gao @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/sail-sg/EditAnything/issues/58#issuecomment-1704657177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWQOXBD2R34OCA3OMEW554LXYVUYBANCNFSM6AAAAAA3TWHAEE . You are receiving this because you authored the thread.Message ID: @.***>