wkpark / sd-webui-model-mixer

Checkpoint model mixer/merger extension
GNU Affero General Public License v3.0
96 stars 4 forks source link

A1111 config json got corrupted / deleted it / but now any selection in Model Mixer gives error #101

Closed CCpt5 closed 6 months ago

CCpt5 commented 6 months ago

Hello again,

I had a computer issue (BSOD crash) and when I recovered A1111 wouldn't launch due to a corrupt config json file. I deleted that and reset my settings, but now when I try to use the menu options for Model Mixer I'm getting errors. Is there a way to totally clear it out? I actually tried deleting the folder and reinstalling it but somehow that didn't work.

Console error examples:

venv "D:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
Installing sd-webui-controlnet requirement: trimesh[easy]
Launching Web UI with arguments: --opt-sdp-attention --no-half-vae --opt-channelslast --disable-safe-unpickle --skip-torch-cuda-test --disable-nan-check --skip-version-check --ckpt-dir e:\stable Diffusion Checkpoints
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
ControlNet preprocessor location: D:\stable-diffusion-webui\extensions\3sd-webui-controlnet\annotator\downloads
2024-01-04 12:24:40,801 - ControlNet - INFO - ControlNet v1.1.427
2024-01-04 12:24:40,848 - ControlNet - INFO - ControlNet v1.1.427
[-] ADetailer initialized. version: 23.9.2, num models: 9
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
Loading weights [e869ac7d69] from e:\stable Diffusion Checkpoints\SDXL\sd_xl_turbo_1.0_fp16.safetensors
Creating model from config: D:\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Loading VAE weights specified in settings: D:\stable-diffusion-webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: sdp... done.
Model loaded in 3.5s (load weights from disk: 0.5s, create model: 0.3s, apply weights to model: 1.8s, calculate empty prompt: 0.7s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.5s (prepare environment: 2.2s, import torch: 1.6s, import gradio: 0.4s, setup paths: 0.4s, initialize shared: 1.0s, other imports: 0.3s, list SD models: 0.2s, load scripts: 1.4s, create ui: 4.1s, gradio launch: 0.3s, app_started_callback: 0.5s).
Reusing loaded model SDXL\sd_xl_turbo_1.0_fp16.safetensors [e869ac7d69] to load SDXL\talmendoxlSDXL_v11Beta.safetensors [7fb8947de2]
Loading weights [7fb8947de2] from e:\stable Diffusion Checkpoints\SDXL\talmendoxlSDXL_v11Beta.safetensors
Loading VAE weights specified in settings: D:\stable-diffusion-webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: sdp... done.
Weights loaded in 15.6s (send model to cpu: 1.4s, load weights from disk: 0.9s, apply weights to model: 12.3s, move model to device: 0.8s).
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (config_sdxl) didn't receive enough output values (needed: 41, received: 35).
Wanted outputs:
    [dropdown, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, textbox, textbox, textbox, textbox, textbox, textbox, textbox]
Received outputs:
    [{'choices': ['BASE', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}]
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (config_sdxl) didn't receive enough output values (needed: 41, received: 35).
Wanted outputs:
    [dropdown, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, textbox, textbox, textbox, textbox, textbox, textbox, textbox]
Received outputs:
    [{'choices': ['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'], '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', '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'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', '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'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', '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'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', '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'], '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN11,M00,OUT00,...,OUT11', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN11,M00,OUT00,...,OUT11', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN11,M00,OUT00,...,OUT11', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN11,M00,OUT00,...,OUT11', '__type__': 'generic_update'}]
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "D:\stable-diffusion-webui\extensions\sd-webui-model-mixer\scripts\model_mixer.py", line 958, in check_calc_settings
    last = calc_settings.pop()
IndexError: pop from empty list
Reusing loaded model SDXL\talmendoxlSDXL_v11Beta.safetensors [7fb8947de2] to load v1-5-pruned-emaonly.safetensors [6ce0161689]
Loading weights [6ce0161689] from D:\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: D:\stable-diffusion-webui\configs\v1-inference.yaml
Loading VAE weights specified in settings: D:\stable-diffusion-webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: sdp... done.
Model loaded in 1.3s (create model: 0.2s, apply weights to model: 0.9s).
Reusing loaded model v1-5-pruned-emaonly.safetensors [6ce0161689] to load SDXL\sd_xl_turbo_1.0.safetensors [2e58e3704b]
Loading weights [2e58e3704b] from e:\stable Diffusion Checkpoints\SDXL\sd_xl_turbo_1.0.safetensors
Creating model from config: D:\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Loading VAE weights specified in settings: D:\stable-diffusion-webui\models\VAE\sdxl_vae.safetensors
Applying attention optimization: sdp... done.
Model loaded in 3.5s (create model: 0.2s, apply weights to model: 3.1s).
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (config_sdxl) didn't receive enough output values (needed: 41, received: 35).
Wanted outputs:
    [dropdown, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, slider, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, dropdown, textbox, textbox, textbox, textbox, textbox, textbox, textbox]
Received outputs:
    [{'choices': ['BASE', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': True, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'visible': False, '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'choices': ['ALL', 'BASE', 'INP*', 'MID', 'OUT*', 'IN00', 'IN01', 'IN02', 'IN03', 'IN04', 'IN05', 'IN06', 'IN07', 'IN08', 'M00', 'OUT00', 'OUT01', 'OUT02', 'OUT03', 'OUT04', 'OUT05', 'OUT06', 'OUT07', 'OUT08'], '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}, {'label': 'Merge Block Weights: BASE,IN00,IN02,...IN08,M00,OUT00,...,OUT08', '__type__': 'generic_update'}]
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "D:\stable-diffusion-webui\extensions\sd-webui-model-mixer\scripts\model_mixer.py", line 2083, in recipe_update
    if "Sum" in modes[n]:
TypeError: argument of type 'bool' is not iterable
CCpt5 commented 6 months ago

Never mind - fixed it by deleting the ui-config.json file again and restarting. That cleared out whatever was causing issues.

Thanks!

lemontheme commented 6 months ago

I was getting the same traceback. Was sceptical about the reported solution, but it did in fact fix it. And to my relief, no important config was lost, as this is stored in config.json. Thanks!