You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在load lora时候报错:
if lora_path:
self.pipe.load_lora_weights(lora_path, weight_name="pytorch_lora_weights.safetensors", adapter_name="zoom in")
self.pipe.fuse_lora(lora_scale=1 / lora_rank)
报错信息:Traceback (most recent call last):
File "", line 1, in
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/Cogvideox_demo.py", line 74, in dynamic_lora
self.pipe.fuse_lora(lora_scale=1 / lora_rank)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/lora_pipeline.py", line 2646, in fuse_lora
super().fuse_lora(
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/lora_base.py", line 459, in fuse_lora
model.fuse_lora(lora_scale, safe_fusing=safe_fusing, adapter_names=adapter_names)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/peft.py", line 567, in fuse_lora
self.apply(partial(self.fuse_lora_apply, adapter_names=adapter_names))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
[Previous line repeated 1 more time]
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 896, in apply
fn(self)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/peft.py", line 589, in fuse_lora_apply
module.merge(**merge_kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/peft/tuners/lora/layer.py", line 483, in merge
base_layer.weight.data += delta_weight
File "/root/miniconda3/lib/python3.8/site-packages/torchao/dtypes/utils.py", line 56, in dispatch__torch_function
return func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torchao/dtypes/utils.py", line 70, in dispatch__torch_dispatch
raise NotImplementedError(f"{cls.name} dispatch: attempting to run unimplemented operator/function: {func}")
NotImplementedError: AffineQuantizedTensor dispatch: attempting to run unimplemented operator/function: aten.add.Tensor
The text was updated successfully, but these errors were encountered:
System Info / 系統信息
ubuntu
Information / 问题信息
Reproduction / 复现过程
1
Expected behavior / 期待表现
模型经过量化: import torch
from diffusers import AutoencoderKLCogVideoX, CogVideoXTransformer3DModel, CogVideoXImageToVideoPipeline
from diffusers.utils import export_to_video, load_image
from transformers import T5EncoderModel
from torchao.quantization import quantize_, int8_weight_only
在load lora时候报错:
if lora_path:
self.pipe.load_lora_weights(lora_path, weight_name="pytorch_lora_weights.safetensors", adapter_name="zoom in")
self.pipe.fuse_lora(lora_scale=1 / lora_rank)
报错信息:Traceback (most recent call last):
File "", line 1, in
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/Cogvideox_demo.py", line 74, in dynamic_lora
self.pipe.fuse_lora(lora_scale=1 / lora_rank)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/lora_pipeline.py", line 2646, in fuse_lora
super().fuse_lora(
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/lora_base.py", line 459, in fuse_lora
model.fuse_lora(lora_scale, safe_fusing=safe_fusing, adapter_names=adapter_names)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/peft.py", line 567, in fuse_lora
self.apply(partial(self.fuse_lora_apply, adapter_names=adapter_names))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 895, in apply
module.apply(fn)
[Previous line repeated 1 more time]
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 896, in apply
fn(self)
File "/code/ace/CogVideo/smart_g_image_to_video_sobey/app/src/I2VExtensionPackage/diffusers/loaders/peft.py", line 589, in fuse_lora_apply
module.merge(**merge_kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/peft/tuners/lora/layer.py", line 483, in merge
base_layer.weight.data += delta_weight
File "/root/miniconda3/lib/python3.8/site-packages/torchao/dtypes/utils.py", line 56, in dispatch__torch_function
return func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torchao/dtypes/utils.py", line 70, in dispatch__torch_dispatch
raise NotImplementedError(f"{cls.name} dispatch: attempting to run unimplemented operator/function: {func}")
NotImplementedError: AffineQuantizedTensor dispatch: attempting to run unimplemented operator/function: aten.add.Tensor
The text was updated successfully, but these errors were encountered: