Xerxemi / sdweb-auto-MBW

196 stars 21 forks source link

[Bug] AttributeError: 'NoneType' object has no attribute 'keys' - Multi Merge CMD #13

Open ghost opened 1 year ago

ghost commented 1 year ago

for key in (tqdm(theta_0.keys(), desc="Stage 1/2") if not verbose else theta_0.keys()): AttributeError: 'NoneType' object has no attribute 'keys'

I'm setting up positive prompt, negative prompts, 4 models over 2 cmd lines

mix1.cktp+mix2.safetensors=A
A.safetensors+mix3.safetensors=B

Screenshot image

Full error for me is the same as posted elsewhere, just mine is a local version of the error, their seems to be cloud


    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "xxxxxxxxxx/stable-diffusion-webui/extensions/sdweb-auto-MBW/scripts/mbw_each/auto_mbw_mod.py", line 858, in onclick_btn_do_merge_block_weighted
    binary_mid_pass(prechks, 1, True)
  File "xxxxxxxxxxxx/stable-diffusion-webui/extensions/sdweb-auto-MBW/scripts/mbw_each/auto_mbw_mod.py", line 816, in binary_mid_pass
    lowerscore = merge_wrapper(merge_params_a, merge_params_b)
  File "xxxxxxxx/stable-diffusion-webui/extensions/sdweb-auto-MBW/scripts/mbw_each/auto_mbw_mod.py", line 465, in merge_wrapper
    result, ret_message = merge(weight_A=_weights_a, weight_B=_weights_b, model_0=model_A, model_1=model_B, allow_overwrite=chk_allow_overwrite,
  File "xxxxxxxx/stable-diffusion-webui/extensions/sdweb-auto-MBW/scripts/mbw_each/merge_block_weighted_mod.py", line 101, in merge
    for key in (tqdm(theta_0.keys(), desc="Stage 1/2") if not verbose else theta_0.keys()):
AttributeError: 'NoneType' object has no attribute 'keys' ``````