NUROISEA/anime-webui-colab

Lora error?

Closed this issue · 3 comments

Hello. I'm having an issue with loras. I managed to ignore lora block weight error all this time, but yeah a character lora can't be ignored. I'm getting this error, loras aren't working. I use 'provide_your_own_models"

BatchLinks Downloads finished!

reading lora /content/stable-diffusion-webui/models/Lora/lala_satalin_deviluke_v1.safetensors: AssertionError
Traceback (most recent call last):
File "/content/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 83, in init
self.metadata = sd_models.read_metadata_from_safetensors(filename)
File "/content/stable-diffusion-webui/modules/sd_models.py", line 230, in read_metadata_from_safetensors
assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file"
AssertionError: /content/stable-diffusion-webui/models/Lora/lala_satalin_deviluke_v1.safetensors is not a safetensors file

Total progress: 0it [00:00, ?it/s]loading Lora /content/stable-diffusion-webui/models/Lora/lala_satalin_deviluke_v1.safetensors: SafetensorError
Traceback (most recent call last):
File "/content/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 253, in load_loras
lora = load_lora(name, lora_on_disk)
File "/content/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 162, in load_lora
sd = sd_models.read_state_dict(lora_on_disk.filename)
File "/content/stable-diffusion-webui/modules/sd_models.py", line 250, in read_state_dict
pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 259, in load_file
with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

*** Error running process_batch: /content/stable-diffusion-webui/extensions/sd-webui-lora-block-weight/scripts/lora_block_weight.py
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/scripts.py", line 490, in process_batch
script.process_batch(p, *script_args, **kwargs)
File "/content/stable-diffusion-webui/extensions/sd-webui-lora-block-weight/scripts/lora_block_weight.py", line 378, in process_batch
if not self.isnet: loradealer(self, o_prompts ,self.lratios,self.elementals)
File "/content/stable-diffusion-webui/extensions/sd-webui-lora-block-weight/scripts/lora_block_weight.py", line 694, in loradealer
te,unet = multidealer(te,unet)
File "/content/stable-diffusion-webui/extensions/sd-webui-lora-block-weight/scripts/lora_block_weight.py", line 775, in multidealer
return float(t),float(u)
ValueError: could not convert string to float: 'face'

It seems like the problem is in the LoRA itself.

Have you tried using the latest webui and/or extensions version?

image

I see, haven't tested it yet. It's a good idea
I'll try it in a few days and confirm if it went well 🙏

Yeah it's joever, with latest it's even worse. VAE, model don't work and loras couldn't even load in the lora bar inside stable diffusion.

Stable diffusion model failed to load
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1103, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/ui_extra_networks.py", line 425, in refresh
pg.refresh()
File "/content/stable-diffusion-webui/modules/ui_extra_networks_textual_inversion.py", line 13, in refresh
sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 222, in load_textual_inversion_embeddings
self.expected_shape = self.get_expected_shape()
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 154, in get_expected_shape
vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Loading weights [None] from /content/models/hssk.safetensors
Creating model from config: /content/stable-diffusion-webui/configs/v1-inference.yaml
creating model quickly: NotImplementedError
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/ui_settings.py", line 308, in
fn=lambda value, k=k: self.run_settings_single(value, key=k),
File "/content/stable-diffusion-webui/modules/ui_settings.py", line 94, in run_settings_single
if value is None or not opts.set(key, value):
File "/content/stable-diffusion-webui/modules/options.py", line 146, in set
option.onchange()
File "/content/stable-diffusion-webui/modules/call_queue.py", line 13, in f
res = func(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/initialize_util.py", line 175, in
shared.opts.onchange("sd_vae", wrap_queued_call(lambda: sd_vae.reload_vae_weights()), call=False)
File "/content/stable-diffusion-webui/modules/sd_vae.py", line 253, in reload_vae_weights
sd_model = shared.sd_model
File "/content/stable-diffusion-webui/modules/shared_items.py", line 128, in sd_model
return modules.sd_models.model_data.get_sd_model()
File "/content/stable-diffusion-webui/modules/sd_models.py", line 531, in get_sd_model
load_model()
File "/content/stable-diffusion-webui/modules/sd_models.py", line 634, in load_model
sd_model = instantiate_from_config(sd_config.model)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict())).cuda()
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 550, in init
super().init(conditioning_key=conditioning_key, *args, **kwargs)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 92, in init
self.model = DiffusionWrapper(unet_config, conditioning_key)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1314, in init
self.diffusion_model = instantiate_from_config(diff_model_config)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict())).cuda()
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 918, in cuda
return self._apply(lambda t: t.cuda(device))
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 833, in _apply
param_applied = fn(param)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 918, in
return self._apply(lambda t: t.cuda(device))
NotImplementedError: Cannot copy out of meta tensor; no data!

Failed to create model quickly; will retry using slow method.
loading stable diffusion model: NotImplementedError
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/ui_settings.py", line 308, in
fn=lambda value, k=k: self.run_settings_single(value, key=k),
File "/content/stable-diffusion-webui/modules/ui_settings.py", line 94, in run_settings_single
if value is None or not opts.set(key, value):
File "/content/stable-diffusion-webui/modules/options.py", line 146, in set
option.onchange()
File "/content/stable-diffusion-webui/modules/call_queue.py", line 13, in f
res = func(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/initialize_util.py", line 175, in
shared.opts.onchange("sd_vae", wrap_queued_call(lambda: sd_vae.reload_vae_weights()), call=False)
File "/content/stable-diffusion-webui/modules/sd_vae.py", line 253, in reload_vae_weights
sd_model = shared.sd_model
File "/content/stable-diffusion-webui/modules/shared_items.py", line 128, in sd_model
return modules.sd_models.model_data.get_sd_model()
File "/content/stable-diffusion-webui/modules/sd_models.py", line 531, in get_sd_model
load_model()
File "/content/stable-diffusion-webui/modules/sd_models.py", line 643, in load_model
sd_model = instantiate_from_config(sd_config.model)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict())).cuda()
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 550, in init
super().init(conditioning_key=conditioning_key, *args, **kwargs)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 92, in init
self.model = DiffusionWrapper(unet_config, conditioning_key)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1314, in init
self.diffusion_model = instantiate_from_config(diff_model_config)
File "/content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict())).cuda()
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 918, in cuda
return self._apply(lambda t: t.cuda(device))
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 810, in _apply
module._apply(fn)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 833, in _apply
param_applied = fn(param)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 918, in
return self._apply(lambda t: t.cuda(device))
NotImplementedError: Cannot copy out of meta tensor; no data!

Stable diffusion model failed to load
changing setting sd_vae to kl-f8-anime2.ckpt: AttributeError
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/options.py", line 146, in set
option.onchange()
File "/content/stable-diffusion-webui/modules/call_queue.py", line 13, in f
res = func(*args, **kwargs)
File "/content/stable-diffusion-webui/modules/initialize_util.py", line 175, in
shared.opts.onchange("sd_vae", wrap_queued_call(lambda: sd_vae.reload_vae_weights()), call=False)
File "/content/stable-diffusion-webui/modules/sd_vae.py", line 255, in reload_vae_weights
checkpoint_info = sd_model.sd_checkpoint_info
AttributeError: 'NoneType' object has no attribute 'sd_checkpoint_info'

I'm using it rn (stable) and I noticed it may be an issue in the batchlink download method, I changed from gdown to curl and managed to download a lora. Some of them are working btw so it's not all doomed for me, but others are not