UnboundLocalError: local variable 'currentblock' referenced before assignment
asopasopaso opened this issue · 3 comments
asopasopaso commented
いつもお世話になっています。
SDXLで使用すると以下のエラーが出てしまい、層別適用、lbw=やstop=などの指定が全て機能しません。
他の拡張をすべてオフにした状態でやっても同様のエラーが出ます。
*** Error running after_extra_networks_activate: C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py
Traceback (most recent call last):
File "C:\stable-diffusion-webui\modules\scripts.py", line 734, in after_extra_networks_activate
script.after_extra_networks_activate(p, *script_args, **kwargs)
File "C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 448, in after_extra_networks_activate
loradealer(self, kwargs["prompts"] ,self.lratios,self.elementals,kwargs["extra_network_data"])
File "C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 800, in loradealer
if go_lbw or load: load_loras_blocks(self, lorans,lorars,te_multipliers,unet_multipliers,elements,ltype, starts=starts)
File "C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 878, in load_loras_blocks
lbw(loaded,lwei[n],elements[n])
File "C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 1015, in lbw
ratio, errormodules = ratiodealer(key, lwei, elemental)
File "C:\stable-diffusion-webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 1079, in ratiodealer
skey = key + BLOCKID26[currentblock]
UnboundLocalError: local variable 'currentblock' referenced before assignment
なお、Automatic1111のバージョンは1.7.0です。1.5のLoRAに対しては問題なく使用できています。
silveroxides commented
Same issue here
*** Error running after_extra_networks_activate: D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py
Traceback (most recent call last):
File "D:\stable-diffusion-webui\webui\modules\scripts.py", line 800, in after_extra_networks_activate
script.after_extra_networks_activate(p, *script_args, **kwargs)
File "D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 448, in after_extra_networks_activate
loradealer(self, kwargs["prompts"] ,self.lratios,self.elementals,kwargs["extra_network_data"])
File "D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 800, in loradealer
if go_lbw or load: load_loras_blocks(self, lorans,lorars,te_multipliers,unet_multipliers,elements,ltype, starts=starts)
File "D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 878, in load_loras_blocks
lbw(loaded,lwei[n],elements[n])
File "D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 1015, in lbw
ratio, errormodules = ratiodealer(key, lwei, elemental)
File "D:\stable-diffusion-webui\webui\extensions\sd-webui-lora-block-weight\scripts\lora_block_weight.py", line 1079, in ratiodealer
skey = key + BLOCKID26[currentblock]
UnboundLocalError: local variable 'currentblock' referenced before assignment
---
hako-mikan commented
May be fixed.
asopasopaso commented
無事動きました。早速の対応ありがとうございました!