Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Lycoris support. #232

Closed
knzro opened this issue Sep 21, 2023 · 3 comments
Closed

Feature: Lycoris support. #232

knzro opened this issue Sep 21, 2023 · 3 comments

Comments

@knzro
Copy link

knzro commented Sep 21, 2023

Now that A1111 natively supports Lycoris will support be added? Currently using a LOCON results in the following error.

*** Error completing request *** Arguments: ('task(2b6dmf6q8i0za4e)', 'stuff, ADDCOMM \n<lora:LOCON1:0.7> loc, BREAK\n<lora:LOCON2:0.7> LOC', 'negative pormpt', [], 28, 'Euler a', 1, 1, 7, 1024, 640, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x0000029BC9987550>, 0, False, '', 0.8, 2402353210, False, -1, 0, 0, 0, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000029BC9C829B0>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000029BC9B0D300>, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x0000029AB555CF10>, True, False, 'Matrix', 'Columns', 'Mask', 'Prompt', '1,1', '0.2', False, True, False, 'Latent', False, '0', '0', '0.4', None, '0', '0', False, False, False, 'Denoised', 5.0, 0.0, 0.0, 'Standard operation', 'mp4', 'h264', 2.0, 0.0, 0.0, False, 0.0, True, True, False, False, False, False, '1:1,1:2,1:2', '0:0,0:0,0:1', '0.2,0.8,0.8', 150, 0.2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50, [], 30, '', 4, [], 1, '', '', '', '') {} Traceback (most recent call last): File "D:\wifediff\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(*args, **kwargs)) File "D:\wifediff\stable-diffusion-webui\modules\call_queue.py", line 36, in f res = func(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\modules\txt2img.py", line 55, in txt2img processed = processing.process_images(p) File "D:\wifediff\stable-diffusion-webui\modules\processing.py", line 732, in process_images res = process_images_inner(p) File "D:\wifediff\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs) File "D:\wifediff\stable-diffusion-webui\modules\processing.py", line 867, in process_images_inner samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts) File "D:\wifediff\stable-diffusion-webui\modules\processing.py", line 1140, in sample samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) File "D:\wifediff\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 235, in sample samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs)) File "D:\wifediff\stable-diffusion-webui\modules\sd_samplers_common.py", line 261, in launch_sampling return func() File "D:\wifediff\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 235, in <lambda> samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs)) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\k-diffusion\k_diffusion\sampling.py", line 145, in sample_euler_ancestral denoised = model(x, sigmas[i] * s_in, **extra_args) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\modules\sd_samplers_cfg_denoiser.py", line 188, in forward x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict(c_crossattn, image_cond_in[a:b])) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\k-diffusion\k_diffusion\external.py", line 112, in forward eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\k-diffusion\k_diffusion\external.py", line 138, in get_eps return self.inner_model.apply_model(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\modules\sd_hijack_utils.py", line 17, in <lambda> setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs)) File "D:\wifediff\stable-diffusion-webui\modules\sd_hijack_utils.py", line 28, in __call__ return self.__orig_func(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 858, in apply_model x_recon = self.model(x_noisy, t, **cond) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 1335, in forward out = self.diffusion_model(x, t, context=cc) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\modules\sd_unet.py", line 91, in UNetModel_forward return ldm.modules.diffusionmodules.openaimodel.copy_of_UNetModel_forward_for_webui(self, x, timesteps, context, *args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 797, in forward h = module(h, emb, context) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 86, in forward x = layer(x) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 159, in forward return self.op(x) File "D:\wifediff\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\wifediff\stable-diffusion-webui\extensions-builtin\Lora\networks.py", line 440, in network_Conv2d_forward return network_forward(self, input, originals.Conv2d_forward) File "D:\wifediff\stable-diffusion-webui\extensions-builtin\Lora\networks.py", line 413, in network_forward y = module.forward(input, y) File "D:\wifediff\stable-diffusion-webui\extensions-builtin\Lora\network_lora.py", line 84, in forward return y + self.up_model(self.down_model(x)) * self.multiplier() * self.calc_scale() RuntimeError: The size of tensor a (40) must match the size of tensor b (80) at non-singleton dimension 3

@hako-mikan
Copy link
Owner

Does this error occur only when using the Regional Prompter? Basically, it should be usable with any type of LoRA. Could you please provide more detailed information about the usage conditions?

@knzro
Copy link
Author

knzro commented Sep 22, 2023

Yes, I have never seen that particular error it before. It occurs when using a pair of LOCON in column(it happens the same in row) configuration, as they were character LOCON, i simply switched to another pair of characters, but this time making sure they were normal LORAs and everything worked as expected.

In other words, this doesn't work and always gives me the same error as above:

Tag1, tag2, tag3, ADDCOMM 
<lora:LOCON1:0.7> LOCONATrigger, tag4, BREAK
<lora:LOCON2:0.7> LOCONBTrigger, tag5

This on the other hand works fine:

Tag1, tag2, tag3, ADDCOMM 
<lora:LORA1:0.7> LORAATrigger, tag4, BREAK
<lora:LORA2:0.7> LORABTrigger, tag5

hako-mikan added a commit that referenced this issue Oct 18, 2023
@hako-mikan
Copy link
Owner

May be fixed.
If you have error after update, use "Use LoHa or other" option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants