Coder Social home page Coder Social logo

Comments (11)

nobane avatar nobane commented on August 22, 2024 5

Update einops, e.g pip install --upgrade einops

from rerender_a_video.

Honeybadger-LSX avatar Honeybadger-LSX commented on August 22, 2024 1

thank you! "pip install --upgrade einops" it's useful for AttributeError: module 'keras.backend' has no attribute 'is_tensor' in the deployment of latent-diffusion

from rerender_a_video.

wouterverweirder avatar wouterverweirder commented on August 22, 2024

Same issue here, on Colab.

from rerender_a_video.

pondloso avatar pondloso commented on August 22, 2024

now it fix but is oom for me when process.
How to enable xformers?

..........

update
I manage to install xformers and get to generate 1st Key Frame
but it stuck at complete 100% not continue not show any error just stuck there and my vram still full use
maybe my GPU not had enough vraw

from rerender_a_video.

oliverban avatar oliverban commented on August 22, 2024

now it fix but is oom for me when process. How to enable xformers?

..........

update I manage to install xformers and get to generate 1st Key Frame but it stuck at complete 100% not continue not show any error just stuck there and my vram still full use maybe my GPU not had enough vraw

how did you fix this error? And how did you get xformers working?

from rerender_a_video.

oliverban avatar oliverban commented on August 22, 2024

Update einops, e.g pip install --upgrade einops

I already did this and still getting error

from rerender_a_video.

ffzero58 avatar ffzero58 commented on August 22, 2024

Fixed by updating einops as mentioned above.

pip install --upgrade einops

=============================================

I am also running into something similar - running on Win10 with 3060 Ti GPU.

X:\AI\Rerender_A_Video>python rerender.py --cfg config/real2sculpture.json
logging improved.
No module 'xformers'. Proceeding without it.
ControlLDM: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loaded model config from [./deps/ControlNet/models/cldm_v15.yaml]
Loaded state_dict from [./models/control_sd15_canny.pth]
C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\safetensors\torch.py:98: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
with safe_open(filename, framework="pt", device=device) as f:
Traceback (most recent call last):
File "X:\AI\Rerender_A_Video\rerender.py", line 462, in
rerender(cfg, args.one, args.key_video_path)
File "X:\AI\Rerender_A_Video\rerender.py", line 156, in rerender
img_ = numpy2tensor(img)
File "X:\AI\Rerender_A_Video\src\img_util.py", line 23, in numpy2tensor
return einops.rearrange(x0, 'b h w c -> b c h w').clone()
File "C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\einops\einops.py", line 424, in rearrange
return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
File "C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\einops\einops.py", line 368, in reduce
return recipe.apply(tensor)
File "C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\einops\einops.py", line 203, in apply
backend = get_backend(tensor)
File "C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\einops_backends.py", line 49, in get_backend
if backend.is_appropriate_type(tensor):
File "C:\Users\Cain\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\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'. Did you mean: 'print_tensor'?

from rerender_a_video.

pondloso avatar pondloso commented on August 22, 2024

now it fix but is oom for me when process. How to enable xformers?
..........
update I manage to install xformers and get to generate 1st Key Frame but it stuck at complete 100% not continue not show any error just stuck there and my vram still full use maybe my GPU not had enough vraw

how did you fix this error? And how did you get xformers working?

i build new environment for this and install xformers in it but you also need to install new version of torch and cuda in new environment because it had old version so it not complied.

from rerender_a_video.

oliverban avatar oliverban commented on August 22, 2024

now it fix but is oom for me when process. How to enable xformers?
..........
update I manage to install xformers and get to generate 1st Key Frame but it stuck at complete 100% not continue not show any error just stuck there and my vram still full use maybe my GPU not had enough vraw

how did you fix this error? And how did you get xformers working?

i build new environment for this and install xformers in it but you also need to install new version of torch and cuda in new environment because it had old version so it not complied.

I did compile new CUDA based torch in the venv environment. It was created by converting the conda yaml to requirements.txt for pip since I don't use conda.

Even after doing all this, the interface starts and I can produce the first keyframe which looks nice but the "keras.backend" Error still happens.

from rerender_a_video.

tjohn88 avatar tjohn88 commented on August 22, 2024

now it fix but is oom for me when process. How to enable xformers?
..........
update I manage to install xformers and get to generate 1st Key Frame but it stuck at complete 100% not continue not show any error just stuck there and my vram still full use maybe my GPU not had enough vraw

how did you fix this error? And how did you get xformers working?

i build new environment for this and install xformers in it but you also need to install new version of torch and cuda in new environment because it had old version so it not complied.

I did compile new CUDA based torch in the venv environment. It was created by converting the conda yaml to requirements.txt for pip since I don't use conda.

Even after doing all this, the interface starts and I can produce the first keyframe which looks nice but the "keras.backend" Error still happens.

I had the same problem. And I tried to reinstall tensorflow and keras to different compatible versions. It doesn't help me.
But I resolved this problem (its not a godd but it work for me now):

  1. I reinstalled my WINDOWS! So deleted all dependencies.
  2. I installed Python 3.10.6
  3. I installed requirements1 from Automatic1111 (pip install -r requirements.txt):

astunparse
blendmodes
accelerate
basicsr
fonts
font-roboto
gfpgan
gradio==3.28.1
numpy
omegaconf
opencv-contrib-python
requests
piexif
Pillow
pytorch_lightning==1.7.7
realesrgan
scikit-image>=0.19
timm==0.4.12
transformers==4.25.1
torch
einops
jsonmerge
clean-fid
resize-right
torchdiffeq
kornia
lark
inflection
GitPython
torchsde
safetensors
psutil
rich

  1. Installed requirements2 from Kohya:

accelerate==0.23.0

albumentations==1.3.0

aiofiles==23.2.1
altair==4.2.2
dadaptation==3.1
diffusers[torch]==0.21.4
easygui==0.98.3
einops==0.6.0
fairscale==0.4.13
ftfy==6.1.1
gradio==3.36.1
huggingface-hub==0.15.1

for loading Diffusers' SDXL

invisible-watermark==0.2.0
lion-pytorch==0.0.6
lycoris_lora==1.9.0

for BLIP captioning

requests==2.28.2

timm==0.6.12

fairscale==0.4.13

for WD14 captioning (tensorflow)

tensorflow==2.14.0

for WD14 captioning (onnx)

onnx==1.14.1
onnxruntime-gpu==1.16.0

onnxruntime==1.16.0

this is for onnx:

tensorboard==2.14.1

protobuf==3.20.3

open clip for SDXL

open-clip-torch==2.20.0
opencv-python==4.7.0.68
prodigyopt==1.0
pytorch-lightning==1.9.0
rich==13.4.1
safetensors==0.3.1
timm==0.6.12
tk==0.1.0
toml==0.10.2
transformers==4.30.2
voluptuous==0.13.1
wandb==0.15.11

for kohya_ss library

-e . # no_verify leave this to specify not checking this a verification stage

And now it works.

from rerender_a_video.

beyondsanskriti avatar beyondsanskriti commented on August 22, 2024

I fixed it by running:
pip install --upgrade einops

from rerender_a_video.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.