Sliders - AMD GPU - is it possible to operate without xformers? (Missing keys)
Voidbord opened this issue · 2 comments
Ok, so I have an AMD GPU so it may be the root of the below problem, but I'm just curious if you can still run it.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
Python 3.10.11 (you have 3.10.6)
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
[{'target': ' ', 'positive': ' ', 'unconditional': ' ', 'neutral': ' ', 'action': 'enhance', 'guidance_scale': 4, 'resolution': 512, 'dynamic_resolution': False, 'batch_size': 1}]
[{'target': ' ', 'positive': ' ', 'unconditional': ' ', 'neutral': ' ', 'action': 'enhance', 'guidance_scale': 4, 'resolution': 512, 'dynamic_resolution': False, 'batch_size': 1}]
1 1
['closed', 'open'] [1, -1]
C:\Users\Void\Desktop\Sliders\venv\lib\site-packages\diffusers\loaders.py:1722: FutureWarning: The function from_ckpt
is deprecated in favor of from_single_file
and will be removed in diffusers v.0.21. Please make sure to use StableDiffusionPipeline.from_single_file(...)
instead.
deprecate("from_ckpt", "0.21.0", deprecation_message, standard_warn=False)
Traceback (most recent call last):
File "C:\Users\Void\Desktop\Sliders\sliders\trainscripts\imagesliders\train_lora-scale.py", line 501, in
main(args)
File "C:\Users\Void\Desktop\Sliders\sliders\trainscripts\imagesliders\train_lora-scale.py", line 419, in main
train(config=config, prompts=prompts, device=device, folder_main = args.folder_main, folders = folders, scales = scales)
File "C:\Users\Void\Desktop\Sliders\sliders\trainscripts\imagesliders\train_lora-scale.py", line 72, in train
tokenizer, text_encoder, unet, noise_scheduler, vae = model_util.load_models(
File "C:\Users\Void\Desktop\Sliders\sliders\trainscripts\imagesliders\model_util.py", line 118, in load_models
tokenizer, text_encoder, unet, vae = load_checkpoint_model(
File "C:\Users\Void\Desktop\Sliders\sliders\trainscripts\imagesliders\model_util.py", line 86, in load_checkpoint_model
pipe = StableDiffusionPipeline.from_ckpt(
File "C:\Users\Void_\Desktop\Sliders\venv\lib\site-packages\diffusers\loaders.py", line 1723, in from_ckpt
return cls.from_single_file(*args, **kwargs)
File "C:\Users\Void\Desktop\Sliders\venv\lib\site-packages\diffusers\loaders.py", line 1922, in from_single_file
pipe = download_from_original_stable_diffusion_ckpt(
File "C:\Users\Void\Desktop\Sliders\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\convert_from_ckpt.py", line 1534, in download_from_original_stable_diffusion_ckpt
text_model = convert_ldm_clip_checkpoint(
File "C:\Users\Void\Desktop\Sliders\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\convert_from_ckpt.py", line 807, in convert_ldm_clip_checkpoint
text_model.load_state_dict(text_model_dict)
File "C:\Users\Void\Desktop\Sliders\venv\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
Missing key(s) in state_dict: "text_model.embeddings.position_ids".
absolutely! You can turn off use_xformers
flag during training. You can find the flag in any config.yaml file. For example, in the text slider config file for XL models (https://github.com/rohitgandikota/sliders/blob/main/trainscripts/textsliders/data/config-xl.yaml) you can turn of the flag in line 28
Ok then, thanks for the reply ;)