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' #56

Open
nickwong64 opened this issue Mar 15, 2023 · 5 comments
Open

Comments

@nickwong64
Copy link

nickwong64 commented Mar 15, 2023

When running on Colab Pro.
Below error occurs:
AttributeError: module 'keras.backend' has no attribute 'is_tensor'
Any idea how to fix?

Run training

!(python main.py
-t
--base configs/stable-diffusion/pokemon.yaml
--gpus "$gpu_list"
--scale_lr False
--num_nodes 1
--check_val_every_n_epoch 10
--finetune_from "$ckpt_path"
data.params.batch_size="$BATCH_SIZE"
lightning.trainer.accumulate_grad_batches="$ACCUMULATE_BATCHES"
data.params.validation.params.n_gpus="$NUM_GPUS"
)
Thanks.

@rorycochrane
Copy link

Getting the same issue. Also on Colab Pro.

Manually importing tf and keras didn't seem to help, neither did upgrading keras with pip.

@mercurialminutes
Copy link

same here!

@lvsi-qi
Copy link

lvsi-qi commented Apr 24, 2023

Did you have solved it?

@aduchon
Copy link

aduchon commented May 4, 2023

I had the same issue with a Stable Diffusion upscaler. The solution there was
replace
!pip install einops==0.3.0
with
!pip install einops==0.3.2

@nickwong64
Copy link
Author

Thanks @aduchon.
Your solution works!

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

5 participants