Skip to content

[Bug]: Checkpoint merger error #10460

@gee666

Description

@gee666

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Error when trying to merge checkpoint

Loading C:\Automatic1111\models\Stable-diffusion\realisticVisionV20_v20_full.safetensors...
Loading C:\Automatic1111\models\Stable-diffusion\geetesha\oira666-02-v1.5_7000.safetensors...
Merging...
100%|█████████████████████████████████████████████████████████████████████████████| 1131/1131 [00:02<00:00, 449.38it/s]
Saving to C:\Automatic1111\models\Stable-diffusion\oira666_7000_realisticview.safetensors...
Error loading/saving model file:
Traceback (most recent call last):
  File "C:\Automatic1111\modules\ui.py", line 1722, in modelmerger
    results = modules.extras.run_modelmerger(*args)
  File "C:\Automatic1111\modules\extras.py", line 285, in run_modelmerger
    safetensors.torch.save_file(theta_0, output_modelname, metadata=metadata)
  File "C:\Automatic1111\venv\lib\site-packages\safetensors\torch.py", line 232, in save_file
    serialize_file(_flatten(tensors), filename, metadata=metadata)
TypeError: argument 'metadata': 'dict' object cannot be converted to 'PyString'

Steps to reproduce the problem

  1. Go to Checkpoint merger tab
  2. Set up two models (I tried a lot of different combinations with the same result)
  3. Set up params: m 0.15, Weighted sum, safetensors, A, B or C, Bake in vae: none;
  4. Press Merge
  5. Wait for a few seconds
  6. Receive the error

What should have happened?

Should have merged with no errors

Commit where the problem happens

89f9faa

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers --api

List of extensions

Auto-Photoshop-StableDiffusion-Plugin
deforum-for-automatic1111-webui
sd-webui-controlnet
sd_dreambooth_extension
LDSR
Lora
ScuNET
SwinIR
prompt-bracket-checker

Console logs

Loading C:\Automatic1111\models\Stable-diffusion\realisticVisionV20_v20_full.safetensors...
Loading C:\Automatic1111\models\Stable-diffusion\geetesha\oira666-02-v1.5_7000.safetensors...
Merging...
100%|█████████████████████████████████████████████████████████████████████████████| 1131/1131 [00:02<00:00, 449.38it/s]
Saving to C:\Automatic1111\models\Stable-diffusion\oira666_7000_realisticview.safetensors...
Error loading/saving model file:
Traceback (most recent call last):
  File "C:\Automatic1111\modules\ui.py", line 1722, in modelmerger
    results = modules.extras.run_modelmerger(*args)
  File "C:\Automatic1111\modules\extras.py", line 285, in run_modelmerger
    safetensors.torch.save_file(theta_0, output_modelname, metadata=metadata)
  File "C:\Automatic1111\venv\lib\site-packages\safetensors\torch.py", line 232, in save_file
    serialize_file(_flatten(tensors), filename, metadata=metadata)
TypeError: argument 'metadata': 'dict' object cannot be converted to 'PyString'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions