LambdaLabsML / examples

Deep Learning Examples
MIT License
805 stars 103 forks source link

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

Open nickwong64 opened 1 year ago

nickwong64 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

same here!

lvsi-qi commented 1 year ago

Did you have solved it?

aduchon commented 1 year ago

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 commented 1 year ago

Thanks @aduchon. Your solution works!