bbc-mc / sdweb-merge-board

Multi-step automation merge tool. Extension/Script for Stable Diffusion UI by AUTOMATIC1111 https://github.com/AUTOMATIC1111/stable-diffusion-webui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hash indexing

esbe1175 opened this issue · comments

Is there any way to create a system so merge board knows which merges it has made before and the resulting hashes from those models, so it can then in the future when you run the merge again know to only merge steps that have changed?

Like if i have a merge that looks like

SD 1.5 + Anything 3.0 - SD 1.4
Waifu diffusion + Trinart2
__O1__ + __O2__

if i change the second step to Waifu Diffusion + Artstation Diffusion, it will still perform step 1 even though that merge might still exist in the model directory.

Would make testing new merges and iterating through different variations / weights WAY faster, without having to modify the recipe to point to preexisting merges and keep track of that for every test, or run the same thing but merge unnecessary steps.

Thank you for requests.

Hash stuff is currently broken with "Same Hash" issues as below...
AUTOMATIC1111/stable-diffusion-webui#2459
AUTOMATIC1111/stable-diffusion-webui#2459

and I have no way to know Ox hash before their merge has done.

So, I add Checkbox "Skip merge if same name checkpoint already exists" and functions.
With this functionally, you can skip merge of already existing (old) checkpoint, and re-use it as Ox.

Please try !!

Example:

step1

= __F99__ + __F111__, 0.1
= __F99__ + __F111__, 0.2
= __F99__ + __F111__, 0.3
= __O1__ + __O2__ + __O3__, 0.5

This will create 4 checkpoints.

step2

Check "Skip~" checkbox True, and "Run Merge" results "Skipped" x4.

step3

Change Lane 2 as 0.6, and "Run Merge",

= __F99__ + __F111__, 0.1
= __F99__ + __F111__, 0.6
= __F99__ + __F111__, 0.3
= __O1__ + __O2__ + __O3__, 0.5

and you get message as

[skipped]
(generated checkpoint name)
[skipped]
(generated checkpoint name)

O2 and O4 checkpoint names are changed, so re-merged.

  [skipped] workspace\steps\F222Insta.safetensors
  [skipped] workspace\steps\Trinart To SD15.safetensors
  [skipped] workspace\steps\Anything To SD15.safetensors
  [skipped] workspace\steps\UnstabilizedF222Insta.safetensors
  [skipped] workspace\steps\TrinArtstation.safetensors
  [skipped] workspace\steps\AnyUnstabilizedF222Insta.safetensors
  [skipped] workspace\AnyUnstabilizedF222InstaTrinArtstation [fp16].safetensors
  [skipped] workspace\AnyUnstabilizedF222InstaTrinArtstation [fp32].safetensors

Works beautifully, thanks :D