Coder Social home page Coder Social logo

Comments (37)

Ineman avatar Ineman commented on July 23, 2024 23

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

from a1111-sd-webui-locon.

BigZampano avatar BigZampano commented on July 23, 2024 10

I was able to revert back to the last commit and everything is working again...!
I did "git log" in the extension folder and then did "git checkout 04b768b", which is the last version before it broke... as a non-coder I feel like a real hacker now... :)

04b768bad41e0f1122a86d0636fce47bb2765af8

from a1111-sd-webui-locon.

atbgams avatar atbgams commented on July 23, 2024 2

As Ineman said ,got \stable-diffusion-webui\extensions\a1111-sd-webui-locon\scripts,open (main.py) by notepad++ or other edit tools ,change these 2 lines,restart a1111 from cmd.

from a1111-sd-webui-locon.

Kadah avatar Kadah commented on July 23, 2024 1

Here are a few options to resolve this:

Migrate to https://github.com/KohakuBlueleaf/a1111-sd-webui-lycoris

Update to A1111 1.3.0 RC

Wait then update to A1111 1.3.0 release

Revert to commit 04b768b, but then revert back to head after updating A1111 to =>1.3.0

PR an A1111 version detection to deal with the changes in interface with the A1111 LoRA module in 1.3.0

Do note that this extension has other bug caused by the same root issue: this extension hijacks the default A1111 LoRA module and A1111 has updated that module a bunch while this extension's development has been dead for months. The a1111-sd-webui-lycoris does not do this and currently appears to be A1111=>1.3.0 safe.

from a1111-sd-webui-locon.

KohakuBlueleaf avatar KohakuBlueleaf commented on July 23, 2024 1

Experiencing similar issue:

Error running process_batch: C:\Users\user\a1111\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py
Traceback (most recent call last):
  File "C:\Users\user\a1111\stable-diffusion-webui\modules\scripts.py", line 395, in process_batch
    script.process_batch(p, *script_args, **kwargs)
  File "C:\Users\user\a1111\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 190, in process_batch
    if not args[0]:
IndexError: tuple index out of range

Is there an official fix in the mix?

This is not my extension.
Check the readme

"THIS EXTENSION IS NOT FOR ADDITIONAL NETWORK“

from a1111-sd-webui-locon.

BigZampano avatar BigZampano commented on July 23, 2024

Same error here...!!
Did an extensions update and was wondering why nothing looked like before... Help please...

from a1111-sd-webui-locon.

sif avatar sif commented on July 23, 2024

Pretty sure the latest commit broke it. Confirming the same experience.

from a1111-sd-webui-locon.

Rexveal avatar Rexveal commented on July 23, 2024

Disable both locon and lycoris extension and loras are working, only tested with 5-6 loras though so not sure if all of them will work.

I thought it worked, but it becomes inconsistent in results.

from a1111-sd-webui-locon.

olemisterharris avatar olemisterharris commented on July 23, 2024

I was able to revert back to the last commit and everything is working again...! I did "git log" in the extension folder and then did "git checkout 04b768b", which is the last version before it broke... as a non-coder I feel like a real hacker now... :)

04b768bad41e0f1122a86d0636fce47bb2765af8

Confirmed this works, will keep an eye out for a new update. Thanks for the (temporary) solution!

from a1111-sd-webui-locon.

acncagua avatar acncagua commented on July 23, 2024

Even the 1111 release candidate (v1.3.0-RC) that just came out doesn't work with an error.
If you want to use LoRA/LoCon only, disable this extension and reboot, LoRA/LoCon will work using the main body function of 1111

from a1111-sd-webui-locon.

tranthai2k2 avatar tranthai2k2 commented on July 23, 2024

@BigZampano colab has a similar situation, what to do

from a1111-sd-webui-locon.

BigZampano avatar BigZampano commented on July 23, 2024

@BigZampano colab has a similar situation, what to do

I have no idea, sorry... maybe just disable this extension and rely on the built in LoRA until a fixed version comes... won't be long I suppose...

from a1111-sd-webui-locon.

stablediffusionAI avatar stablediffusionAI commented on July 23, 2024

Guys, I use colab and disable Lycoris and a1111-sd-webui-locon extensions in extensions tab worked for me. Let's see what comes from now on...

from a1111-sd-webui-locon.

GoldenMiocola avatar GoldenMiocola commented on July 23, 2024

NR C 9VM(G 6B% $)V}EKOB
Got same problem, 😭 dont understand whats wrong

from a1111-sd-webui-locon.

jyuan15 avatar jyuan15 commented on July 23, 2024

I did a "git checkout 04b768b" and it doesn't seem to revert to the last commit, what should I do? Thanks.
2023-05-22_090750

from a1111-sd-webui-locon.

Kadah avatar Kadah commented on July 23, 2024

There's a breaking change coming in A1111 1.3.0, you'll need to switch back to main after updating A1111.

from a1111-sd-webui-locon.

dajusha avatar dajusha commented on July 23, 2024

if you dont know about git cmd,
just see these change on file: 52a78b5
edit back file by any text editor.

from a1111-sd-webui-locon.

acncagua avatar acncagua commented on July 23, 2024
  1. updated to A1111 v1.3.0-RC
  2. remove a1111-sd-webui-locon extension
  3. restart A1111
  4. Install a1111-sd-webui-locon extension from URL (658c4f7)
  5. Restart A1111
  6. Select LoRA from ExtraNetwork
  7. Error occurs
    Traceback (most recent call last):

File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 414, in run_predict
output = await app.get_blocks().process_api(
File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1323, in process_api
result = await self.call_function(
File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1051, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/acncagua/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/home/acncagua/stable-diffusion-webui/modules/ui_extra_networks.py", line 313, in fill_tabs
refresh()
File "/home/acncagua/stable-diffusion-webui/modules/ui_extra_networks.py", line 330, in refresh
ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
File "/home/acncagua/stable-diffusion-webui/modules/ui_extra_networks.py", line 330, in
ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
File "/home/acncagua/stable-diffusion-webui/modules/ui_extra_networks.py", line 121, in create_html
for item in self.list_items():
File "/home/acncagua/stable-diffusion-webui/extensions-builtin/Lora/ui_extra_networks_lora.py", line 19, in list_items
alias = lora_on_disk.get_alias()
AttributeError: 'LoraOnDisk' object has no attribute 'get_alias'

from a1111-sd-webui-locon.

jyuan15 avatar jyuan15 commented on July 23, 2024

I rolled back to the last commit with 'git reset --hard 04b768b' and lora was back to work.

from a1111-sd-webui-locon.

Rexveal avatar Rexveal commented on July 23, 2024

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

This work for me

from a1111-sd-webui-locon.

RazredgeBR avatar RazredgeBR commented on July 23, 2024

I'm using SD on Google Colab "notebook" and I can't be editing any files. It's either straight out of Github or nothing. Is there a way for me to use an older commit or a branch that is working? If it is, please provide me a link and or a guide.

from a1111-sd-webui-locon.

NoppaiKohai avatar NoppaiKohai commented on July 23, 2024

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

This worked for me, but then I just get an error about

AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'

instead

from a1111-sd-webui-locon.

shinoda-kotaro avatar shinoda-kotaro commented on July 23, 2024

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

Thank you! This saved me from a two hour nightmare.

from a1111-sd-webui-locon.

riade3788 avatar riade3788 commented on July 23, 2024

this didnt work for me as i got a nans error afterward

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

from a1111-sd-webui-locon.

riade3788 avatar riade3788 commented on July 23, 2024

LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', <controlnet.py.UiControlNetUnit object at 0x00000242928CABF0>, <controlnet.py.UiControlNetUnit object at 0x00000243B49D1870>, <controlnet.py.UiControlNetUnit object at 0x00000242928C9030>, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, False, 'Horizontal', '1,1', '0.2', False, False, False, 'Attention', False, '0', '0', '0.4', None, False, False, False, False, False, False, None, [], [], [], [], '', '', '', '', False, None, None, '', '', '', '', 'Auto rename', {'label': 'Upload avatars config'}, 'Open outputs directory', 'Export to WebUI style', True, {'label': 'Presets'}, {'label': 'QC preview'}, '', [], 'Select', 'QC scan', 'Show pics', None, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, None, False, None, False, 50) {}
Traceback (most recent call last):
File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(args, **kwargs))
File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(args, kwargs)
File "D:\Stable\SuperSD\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
processed = process_images(p)
File "D:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 526, in process_images
res = process_images_inner(p)
File "D:\Stable\SuperSD\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:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 684, in process_images_inner
devices.test_for_nans(x, "vae")
File "D:\Stable\SuperSD\stable-diffusion-webui\modules\devices.py", line 156, in test_for_nans
raise NansException(message)
modules.devices.NansException: A tensor with all NaNs was produced in VAE. This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

from a1111-sd-webui-locon.

hiro-hiroyuki-takeuchi avatar hiro-hiroyuki-takeuchi commented on July 23, 2024

line 371: lora.mtime = os.path.getmtime(lora_on_disk)

line 373: sd = sd_models.read_state_dict(lora_on_disk)

This works for me! Thanks!!!

from a1111-sd-webui-locon.

jyuan15 avatar jyuan15 commented on July 23, 2024

LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', <controlnet.py.UiControlNetUnit object at 0x00000242928CABF0>, <controlnet.py.UiControlNetUnit object at 0x00000243B49D1870>, <controlnet.py.UiControlNetUnit object at 0x00000242928C9030>, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, False, 'Horizontal', '1,1', '0.2', False, False, False, 'Attention', False, '0', '0', '0.4', None, False, False, False, False, False, False, None, [], [], [], [], '', '', '', '', False, None, None, '', '', '', '', 'Auto rename', {'label': 'Upload avatars config'}, 'Open outputs directory', 'Export to WebUI style', True, {'label': 'Presets'}, {'label': 'QC preview'}, '', [], 'Select', 'QC scan', 'Show pics', None, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, None, False, None, False, 50) {} Traceback (most recent call last): File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(args, **kwargs)) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, kwargs) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img processed = process_images(p) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 526, in process_images res = process_images_inner(p) File "D:\Stable\SuperSD\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:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 684, in process_images_inner devices.test_for_nans(x, "vae") File "D:\Stable\SuperSD\stable-diffusion-webui\modules\devices.py", line 156, in test_for_nans raise NansException(message) modules.devices.NansException: A tensor with all NaNs was produced in VAE. This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

add --no-half-vae --disable-nan-check in webui-user.bat

from a1111-sd-webui-locon.

350640267 avatar 350640267 commented on July 23, 2024

line 371: lora.mtime = os.path.getmtime(lora_on_disk)
line 373: sd = sd_models.read_state_dict(lora_on_disk)

This worked for me, but then I just get an error about

AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'

instead

me,too。help!

from a1111-sd-webui-locon.

Merijeek avatar Merijeek commented on July 23, 2024

Worked for a bit by editing the two lines above.

Now, any attempt at a LORA/Lycoris gets me:

loading Lora E:\sd\stable-diffusion-webui\models\Lora\style\Analog_Diffusion.safetensors: NameError
Traceback (most recent call last):
  File "E:\sd\stable-diffusion-webui\extensions\a1111-sd-webui-locon\scripts\..\..\..\extensions-builtin/Lora\lora.py", line 222, in load_loras
    lora = load_lora(name, lora_on_disk.filename)
  File "E:\sd\stable-diffusion-webui\extensions\a1111-sd-webui-locon\scripts\main.py", line 378, in load_lora
    for key_diffusers, weight in sd.items():
NameError: name 'sd' is not defined

from a1111-sd-webui-locon.

riade3788 avatar riade3788 commented on July 23, 2024

LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', <controlnet.py.UiControlNetUnit object at 0x00000242928CABF0>, <controlnet.py.UiControlNetUnit object at 0x00000243B49D1870>, <controlnet.py.UiControlNetUnit object at 0x00000242928C9030>, 'NONE:0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\nALL:1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\nINS:1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0\nIND:1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0\nINALL:1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0\nMIDD:1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0\nOUTD:1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0\nOUTS:1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1\nOUTALL:1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1\nALL0.5:0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5', True, 0, 'values', '0,0.25,0.5,0.75,1', 'Block ID', 'IN05-OUT05', 'none', '', '0.5,1', 'BASE,IN00,IN01,IN02,IN03,IN04,IN05,IN06,IN07,IN08,IN09,IN10,IN11,M00,OUT00,OUT01,OUT02,OUT03,OUT04,OUT05,OUT06,OUT07,OUT08,OUT09,OUT10,OUT11', 1.0, 'black', '20', False, 'ATTNDEEPON:IN05-OUT05:attn:1\n\nATTNDEEPOFF:IN05-OUT05:attn:0\n\nPROJDEEPOFF:IN05-OUT05:proj:0\n\nXYZ:::1', False, False, False, 'Horizontal', '1,1', '0.2', False, False, False, 'Attention', False, '0', '0', '0.4', None, False, False, False, False, False, False, None, [], [], [], [], '', '', '', '', False, None, None, '', '', '', '', 'Auto rename', {'label': 'Upload avatars config'}, 'Open outputs directory', 'Export to WebUI style', True, {'label': 'Presets'}, {'label': 'QC preview'}, '', [], 'Select', 'QC scan', 'Show pics', None, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, False, None, False, None, False, 50) {} Traceback (most recent call last): File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 57, in f res = list(func(args, **kwargs)) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, kwargs) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img processed = process_images(p) File "D:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 526, in process_images res = process_images_inner(p) File "D:\Stable\SuperSD\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:\Stable\SuperSD\stable-diffusion-webui\modules\processing.py", line 684, in process_images_inner devices.test_for_nans(x, "vae") File "D:\Stable\SuperSD\stable-diffusion-webui\modules\devices.py", line 156, in test_for_nans raise NansException(message) modules.devices.NansException: A tensor with all NaNs was produced in VAE. This could be because there's not enough precision to represent the picture. Try adding --no-half-vae commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

add --no-half-vae --disable-nan-check in webui-user.bat

tried that but got a new error and I don't nor should need --no-half-vae --disable-nan-check

from a1111-sd-webui-locon.

KohakuBlueleaf avatar KohakuBlueleaf commented on July 23, 2024

Sorry for late reply.

First, this extension is basically dead and deprecated, and the reason is basically as same as what @Kadah said.

I firstly use some hijack and hook to replace the built-in lora with my own locon implementation, and this quickly turn out to be bad idea. So I just rewrite a new version (lycoris) by myself. Which is "basically" (not totally) isolated with built-in loras.

(If you have traced the code detailly, you will find out that since my impl and a41's impl both need to do some weight operation on-fly in generation. I need to do lot more check to ensure lycoris ext will backup/restore correct weight, however this part continuouly has some annoying bug and I cannot reproduce them...)

basically the best solution now is: install lycoris, disable built-in lora, move all your lora/locon/loha/lokr/ia3/dylora file into LyCORIS folder.

And if there are someone who want to maintain this extension (it will be very difficult), let me know.

from a1111-sd-webui-locon.

Bsm09 avatar Bsm09 commented on July 23, 2024

Sorry for late reply.

First, this extension is basically dead and deprecated, and the reason is basically as same as what @Kadah said.

I firstly use some hijack and hook to replace the built-in lora with my own locon implementation, and this quickly turn out to be bad idea. So I just rewrite a new version (lycoris) by myself. Which is "basically" (not totally) isolated with built-in loras.

(If you have traced the code detailly, you will find out that since my impl and a41's impl both need to do some weight operation on-fly in generation. I need to do lot more check to ensure lycoris ext will backup/restore correct weight, however this part continuouly has some annoying bug and I cannot reproduce them...)

basically the best solution now is: install lycoris, disable built-in lora, move all your lora/locon/loha/lokr/ia3/dylora file into LyCORIS folder.

And if there are someone who want to maintain this extension (it will be very difficult), let me know.

A1111-sd-webui-lycoris does not support LoRA Block Weight. Only this extension supports it. Can a1111-sd-webui-lycoris be enabled to support it? Thank you!

from a1111-sd-webui-locon.

Ideal-Real-Labs avatar Ideal-Real-Labs commented on July 23, 2024

Experiencing similar issue:

Error running process_batch: C:\Users\user\a1111\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py
Traceback (most recent call last):
  File "C:\Users\user\a1111\stable-diffusion-webui\modules\scripts.py", line 395, in process_batch
    script.process_batch(p, *script_args, **kwargs)
  File "C:\Users\user\a1111\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 190, in process_batch
    if not args[0]:
IndexError: tuple index out of range

Is there an official fix in the mix?

from a1111-sd-webui-locon.

KohakuBlueleaf avatar KohakuBlueleaf commented on July 23, 2024

Sorry for late reply.
First, this extension is basically dead and deprecated, and the reason is basically as same as what @Kadah said.
I firstly use some hijack and hook to replace the built-in lora with my own locon implementation, and this quickly turn out to be bad idea. So I just rewrite a new version (lycoris) by myself. Which is "basically" (not totally) isolated with built-in loras.
(If you have traced the code detailly, you will find out that since my impl and a41's impl both need to do some weight operation on-fly in generation. I need to do lot more check to ensure lycoris ext will backup/restore correct weight, however this part continuouly has some annoying bug and I cannot reproduce them...)
basically the best solution now is: install lycoris, disable built-in lora, move all your lora/locon/loha/lokr/ia3/dylora file into LyCORIS folder.
And if there are someone who want to maintain this extension (it will be very difficult), let me know.

A1111-sd-webui-lycoris does not support LoRA Block Weight. Only this extension supports it. Can a1111-sd-webui-lycoris be enabled to support it? Thank you!

You should check LBW's repo
It already support lycoris.
And it is not "support it recently"
It is like 1~2 months ago.

from a1111-sd-webui-locon.

KohakuBlueleaf avatar KohakuBlueleaf commented on July 23, 2024

@Bsm09

2023.04.14.2000(JST)
support LyCORIS(a1111-sd-webui-lycoris)
LyCORIS(a1111-sd-webui-lycoris)に対応

Copied from lbw's readme

from a1111-sd-webui-locon.

acncagua avatar acncagua commented on July 23, 2024

lora:
<lora: "lora name":1:IN02>
specifying after "lora name" the strength of LoRA, then specifying hierarchy

lyco: (except DyLORA)
<lyco: "lora name":1:1:lbw=IN02>
specifying TEnc:UNet strength after "lora name" and then specifying hierarchy with lbw=

lyco: (In case of DyLORA)
<lyco: "lora name":1:1:1:lbw=IN02>
Specify the strength of TEnc:UNet:Dyn after "lora name", and then specify the hierarchy with lbw=.

from a1111-sd-webui-locon.

KohakuBlueleaf avatar KohakuBlueleaf commented on July 23, 2024

lora: <lora: "lora name":1:IN02> specifying after "lora name" the strength of LoRA, then specifying hierarchy

lyco: (except DyLORA) <lyco: "lora name":1:1:lbw=IN02> specifying TEnc:UNet strength after "lora name" and then specifying hierarchy with lbw=

lyco: (In case of DyLORA) <lyco: "lora name":1:1:1:lbw=IN02> Specify the strength of TEnc:UNet:Dyn after "lora name", and then specify the hierarchy with lbw=.

BTW, since my arg system have kwarg feature and default value feature. you can use:
<lyco:NAME:0.5:lbw=IN02>
which only TE get value 0.5 and UNet will use default value (which will take same weight from TE), dyn will be None as default.
And if you use:
<lyco:NAME:unet=0.5:lbw=IN02>
TE will use default value(1), and unet=0.5, dyn=None.

from a1111-sd-webui-locon.

acncagua avatar acncagua commented on July 23, 2024

lora: <lora: "lora name":1:IN02> specifying after "lora name" the strength of LoRA, then specifying hierarchy
lyco: (except DyLORA) <lyco: "lora name":1:1:lbw=IN02> specifying TEnc:UNet strength after "lora name" and then specifying hierarchy with lbw=
lyco: (In case of DyLORA) <lyco: "lora name":1:1:1:lbw=IN02> Specify the strength of TEnc:UNet:Dyn after "lora name", and then specify the hierarchy with lbw=.

BTW, since my arg system have kwarg feature and default value feature. you can use: lyco:NAME:0.5:lbw=IN02 which only TE get value 0.5 and UNet will use default value (which will take same weight from TE), dyn will be None as default. And if you use: lyco:NAME:unet=0.5:lbw=IN02 TE will use default value(1), and unet=0.5, dyn=None.

So, you mean we can use it in the same way as <lora:> if TEnc and UNet have the same value.
Thank you for the explanation

from a1111-sd-webui-locon.

cultureBomb avatar cultureBomb commented on July 23, 2024

couldn't fallback.

from a1111-sd-webui-locon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.