ShihaoZhaoZSH / Uni-ControlNet

[NeurIPS 2023] Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models
MIT License
595 stars 42 forks source link

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

Closed MrA2K2 closed 1 year ago

MrA2K2 commented 1 year ago

Hi, this project looks great! However, I didn't manage to launch it on my PC, even though I followed the instructions I would appreciate it a lot, if you would help me fix the following problem Global seed set to 42 Traceback (most recent call last): File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/gradio/routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/gradio/blocks.py", line 1015, in process_api result = await self.call_function( File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/gradio/blocks.py", line 833, in call_function prediction = await anyio.to_thread.run_sync( File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "src/test/test.py", line 124, in process local_control = einops.rearrange(local_control, 'b h w c -> b c h w').clone() File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/einops/einops.py", line 424, in rearrange return reduce(tensor, pattern, reduction='rearrange', **axes_lengths) File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/einops/einops.py", line 368, in reduce return recipe.apply(tensor) File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/einops/einops.py", line 203, in apply backend = get_backend(tensor) File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-packages/einops/_backends.py", line 28, in get_backend if backend.is_appropriate_type(tensor): File "/home/rd289/anaconda3/envs/unicontrol/lib/python3.8/site-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'

I did create conda venv and installed all the dependencies

MrA2K2 commented 1 year ago

Update: Nevermind, issue was on my side, fixed it

thhung commented 1 year ago

@MrA2K2 Can you share how you fixed it? I am having the same issue.