NUROISEA / anime-webui-colab

webui on colab for weebs lol
113 stars 8 forks source link

Lora Block Weight + latest issues #40

Closed Ayaya70 closed 3 weeks ago

Ayaya70 commented 7 months ago

After nearly a month I finally stop being lazy to present the problem lol I always liked to use Lora Block Weight, but many months ago it stopped working. It used to be one of the pillar of my generator art, so without it it's not as good as my prime days

As for the issue about Lora Block Weight, it says

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 511, 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 836, in loradealer te,unet = multidealer(te,unet) File "/content/stable-diffusion-webui/extensions/sd-webui-lora-block-weight/scripts/lora_block_weight.py", line 926, in multidealer return float(t),float(u) ValueError: could not convert string to float: 'face'

This value error called 'face' is a thing that I insert inside the Block Weight tab:

face:1,0,0,0,0,0,0,0,0.8,1,1,0.2,0,0,0,0,0 ware:1,1,1,1,1,0,0.2,0,0.8,1,1,0.2,0,0,0,0,0 pose:1,0,0,0,0,0,0.2,1,1,1,0,0,0,0,0,0,0

then I'm supposed to put these codes into Open TextEditor, which isn't possible I assume as I click on it and nothing appears, so I always have put it.... hmmmm, it was like where are those numbers if you already have put it in your SD before, then I save and load tags and presets; always have worked. But then, it stopped, like I said.

For the link, it's: https://github.com/hako-mikan/sd-webui-lora-block-weight.git I install it in Extensions > Install from URL then I always restart the SD so that it works.

About how to use, it's

If we could fix this, would be very meaningful to me **About the latest version of Stable Diffusion, my problem is** > > 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 165, 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' > > 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.py", line 1172, in > update_image_cfg_scale_visibility = lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit") > File "/content/stable-diffusion-webui/modules/shared_items.py", line 133, in sd_model > return modules.sd_models.model_data.get_sd_model() > File "/content/stable-diffusion-webui/modules/sd_models.py", line 621, in get_sd_model > load_model() > File "/content/stable-diffusion-webui/modules/sd_models.py", line 724, 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 911, in cuda > return self._apply(lambda t: t.cuda(device)) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply > module._apply(fn) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply > module._apply(fn) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 825, in _apply > param_applied = fn(param) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 911, 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.py", line 1172, in > update_image_cfg_scale_visibility = lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit") > File "/content/stable-diffusion-webui/modules/shared_items.py", line 133, in sd_model > return modules.sd_models.model_data.get_sd_model() > File "/content/stable-diffusion-webui/modules/sd_models.py", line 621, in get_sd_model > load_model() > File "/content/stable-diffusion-webui/modules/sd_models.py", line 733, 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 911, in cuda > return self._apply(lambda t: t.cuda(device)) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply > module._apply(fn) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 802, in _apply > module._apply(fn) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 825, in _apply > param_applied = fn(param) > File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 911, in > return self._apply(lambda t: t.cuda(device)) > NotImplementedError: Cannot copy out of meta tensor; no data! > > > Stable diffusion model failed to load This problem is universal in the latest version for me, and that's why I've never been able to use it. I do all the steps in the Stable version, which works, but the latest never worked. Just after I try to generate something, this error happens. In fact, I remember a single time that it worked (I don't remember how), but as soon as I restarted to install Block Weight, this error had returned For now these are the two problems I have. The other one is that lora issue but I can get over it, but these two... damn Bonus: man idk if it's because I use stable version but Lycoris never "worked" for me as well because the tab doesn't appear inside the SD so I always needed to install it manually in the lora folder of google drive šŸ˜­ šŸ˜­ šŸ˜­
NUROISEA commented 7 months ago

ValueError: could not convert string to float: 'face'

Looking at the repo, it seems like you need to use the new syntax: image

Ayaya70 commented 7 months ago

Nani?! OK lemme see if I got it, so instead of using loraname:1:face I need to put loraname:1:lbw=IN02?

NUROISEA commented 7 months ago

Maybe? If you have the time you can try it since I'm clueless on how this extension works šŸ˜