thecooltechguy / ComfyUI-Stable-Video-Diffusion

ComfyUI nodes for Stable Video Diffusion
336 stars 25 forks source link

NameError: name 'xformers' is not defined #29

Open bobdobbs opened 8 months ago

bobdobbs commented 8 months ago

I'm running ComfyUI on ubuntu linux 22.04 with an RTX 3090.

When the flow reaches the Stable Video Diffusion Sampler node, execution ceases.

A modal appears with the below text:

Error occurred when executing SVDSampler:

name 'xformers' is not defined

File "/mnt/mantis/ssd2/opt/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/mnt/mantis/ssd2/opt/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/mnt/mantis/ssd2/opt/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/nodes.py", line 162, in sample_video c, uc = model.conditioner.get_unconditional_conditioning( File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/encoders/modules.py", line 179, in get_unconditional_conditioning c = self(batch_c, force_cond_zero_embeddings) File "/home/mantis/.pyenv/versions/3.10.6/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/encoders/modules.py", line 132, in forward emb_out = embedder(batch[embedder.input_key]) File "/home/mantis/.pyenv/versions/3.10.6/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/encoders/modules.py", line 1012, in forward out = self.encoder.encode(vid[n n_samples : (n + 1) n_samples]) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/models/autoencoder.py", line 472, in encode z = self.encoder(x) File "/home/mantis/.pyenv/versions/3.10.6/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/diffusionmodules/model.py", line 594, in forward h = self.mid.attn_1(h) File "/home/mantis/.pyenv/versions/3.10.6/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, **kwargs) File "/mnt/mantis/ssd2/opt/ComfyUI/customnodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/diffusionmodules/model.py", line 263, in forward h = self.attention(h_) File "/mnt/mantis/ssd2/opt/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion/libs/sgm/modules/diffusionmodules/model.py", line 249, in attention out = xformers.ops.memory_efficient_attention(

KingScorpiusXXVIII commented 2 days ago

Encountering the same error. Have you found a fix?