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
I am trying to run inference via L4 instance on colab and I am coming across this error of ImportError: cannot import name 'Cache' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
0it [00:00, ?it/s]
2025-02-04 16:04:06.676396: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1738685046.999070 16881 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1738685047.079683 16881 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.1.0+cu121)
Python 3.11.4 (you have 3.11.11)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
error: XDG_RUNTIME_DIR not set in the environment.
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
args
{'add_static_video_prompt': False,
'context_batch_size': 1,
'context_frames': 12,
'context_overlap': 4,
'context_schedule': 'uniform_v2',
'context_stride': 1,
'cross_attention_dim': 768,
'face_image_path': None,
'facein_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/facein.py',
'facein_model_name': None,
'facein_scale': 1.0,
'fix_condition_images': False,
'fixed_ip_adapter_image': True,
'fixed_refer_face_image': True,
'fixed_refer_image': True,
'fps': 12,
'guidance_scale': 7.5,
'height': None,
'img_length_ratio': 1.0,
'img_weight': 0.001,
'interpolation_factor': 1,
'ip_adapter_face_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/ip_adapter.py',
'ip_adapter_face_model_name': None,
'ip_adapter_face_scale': 1.0,
'ip_adapter_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/ip_adapter.py',
'ip_adapter_model_name': None,
'ip_adapter_scale': 1.0,
'ipadapter_image_path': None,
'lcm_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/lcm_model.py',
'lcm_model_name': None,
'log_level': 'INFO',
'motion_speed': 8.0,
'n_batch': 1,
'n_cols': 3,
'n_repeat': 1,
'n_vision_condition': 1,
'need_hist_match': False,
'need_img_based_video_noise': True,
'negative_prompt': 'V2',
'negprompt_cfg_path': '/content/MuseV/scripts/inference/../../configs/model/negative_prompt.py',
'noise_type': 'video_fusion',
'num_inference_steps': 30,
'output_dir': '/content/output',
'overwrite': False,
'prompt_only_use_image_prompt': False,
'record_mid_video_latents': False,
'record_mid_video_noises': False,
'redraw_condition_image': False,
'redraw_condition_image_with_facein': True,
'redraw_condition_image_with_ip_adapter_face': True,
'redraw_condition_image_with_ipdapter': True,
'redraw_condition_image_with_referencenet': True,
'referencenet_image_path': None,
'referencenet_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/referencenet.py',
'referencenet_model_name': None,
'save_filetype': 'mp4',
'save_images': False,
'sd_model_cfg_path': '/content/MuseV/scripts/inference/../../configs/model/T2I_all_model.py',
'sd_model_name': 'majicmixRealv6Fp16',
'seed': None,
'strength': 0.8,
'target_datas': 'all',
'test_data_path': '/content/MuseV/configs/tasks/vegeta_task.yaml',
'time_size': 12,
'unet_model_cfg_path': '/content/MuseV/scripts/inference/../.././configs/model/motion_model.py',
'unet_model_name': 'musev',
'use_condition_image': True,
'vae_model_path': '/content/MuseV/checkpoints/vae/sd-vae-ft-mse',
'video_guidance_scale': 3.5,
'video_guidance_scale_end': None,
'video_guidance_scale_method': 'linear',
'video_negative_prompt': 'V2',
'video_num_inference_steps': 10,
'video_overlap': 1,
'vision_clip_extractor_class_name': None,
'vision_clip_model_path': './checkpoints/ip_adapter/models/image_encoder',
'w_ind_noise': 0.5,
'width': None,
'write_info': False}
running model, T2I SD
{'majicmixRealv6Fp16': {'sd': '/content/MuseV/configs/model/../../checkpoints/t2i/sd1.5/majicmixRealv6Fp16'}}
lcm: None None
unet_model_params_dict_src dict_keys(['musev', 'musev_referencenet', 'musev_referencenet_pose'])
unet: musev /content/MuseV/configs/model/../../checkpoints/motion/musev
referencenet: None None
ip_adapter: None None
facein: None None
ip_adapter_face: None None
video_negprompt V2 badhandv4, ng_deepnegative_v1_75t, (((multiple heads))), (((bad body))), (((two people))), ((extra arms)), ((deformed body)), (((sexy))), paintings,(((two heads))), ((big head)),sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, (((nsfw))), nipples, extra fingers, (extra legs), (long neck), mutated hands, (fused fingers), (too many fingers)
negprompt V2 badhandv4, ng_deepnegative_v1_75t, (((multiple heads))), (((bad body))), (((two people))), ((extra arms)), ((deformed body)), (((sexy))), paintings,(((two heads))), ((big head)),sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, (((nsfw))), nipples, extra fingers, (extra legs), (long neck), mutated hands, (fused fingers), (too many fingers)
n_test_datas 1
2025-02-04 16:04:17,597- musev:887- INFO- vision_clip_extractor, None
test_model_vae_model_path /content/MuseV/checkpoints/vae/sd-vae-ft-mse
Keyword arguments {'torch_device': 'cuda'} are not expected by MusevControlNetPipeline and will be ignored.
Loading pipeline components...: 17% 1/6 [00:00<00:03, 1.47it/s]
Traceback (most recent call last):
File "/content/MuseV/scripts/inference/text2video.py", line 977, in <module>
sd_predictor = DiffusersPipelinePredictor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/MuseV/musev/pipelines/pipeline_controlnet_predictor.py", line 243, in __init__
pipeline = MusevControlNetPipeline.from_pretrained(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/MuseV/diffusers/src/diffusers/pipelines/pipeline_utils.py", line 1258, in from_pretrained
maybe_raise_or_warn(
File "/content/MuseV/diffusers/src/diffusers/pipelines/pipeline_utils.py", line 305, in maybe_raise_or_warn
unwrapped_sub_model = _unwrap_model(sub_model)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/content/MuseV/diffusers/src/diffusers/pipelines/pipeline_utils.py", line 280, in _unwrap_model
from peft import PeftModel
File "/usr/local/lib/python3.11/dist-packages/peft/__init__.py", line 22, in <module>
from .auto import (
File "/usr/local/lib/python3.11/dist-packages/peft/auto.py", line 32, in <module>
from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING
File "/usr/local/lib/python3.11/dist-packages/peft/mapping.py", line 25, in <module>
from .mixed_model import PeftMixedModel
File "/usr/local/lib/python3.11/dist-packages/peft/mixed_model.py", line 29, in <module>
from .peft_model import PeftModel
File "/usr/local/lib/python3.11/dist-packages/peft/peft_model.py", line 37, in <module>
from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel
ImportError: cannot import name 'Cache' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
These are the libraries i installed, i tinkered with by trial and error to get them all installed. I faced alot of issues directly installing versions as mentioned in requirements.txt
I am trying to run inference via L4 instance on colab and I am coming across this error of
ImportError: cannot import name 'Cache' from 'transformers' (/usr/local/lib/python3.11/dist-packages/transformers/__init__.py)
Getting this error
These are the libraries i installed, i tinkered with by trial and error to get them all installed. I faced alot of issues directly installing versions as mentioned in requirements.txt
Please let me know if anyone's found a way to set it up on colab, or got to install Musev without docker.
The text was updated successfully, but these errors were encountered: