File size: 1,047 Bytes
2e343db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390f12e
 
2e343db
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys

cnet_models = ["canny", "normal", "depth", "openpose", "hed", "scribble", "mlsd", "seg"]
unet_models = ["sd15", "openjourney", "Nitro-Diffusion", "anything-v3.0", "vintedois-diffusion-v0-1"]

print(f"# ControlNet Generation Comparison")
print("")

def print_header():
    print("|seed|", end="")
    for ot in unet_models:
        print(f"{ot}|", end="")
    print("")

    print("|", end="")
    for _ in range(len(unet_models) + 1):
        print("---|", end="")
    print("")

def get_url(path):
    # url = "./all_controlnet_models/"
    url = 'https://huggingface.co/takuma104/controlnet_dev/resolve/main/model_compare_full/all_controlnet_models/'
    return url + path

for cnet in cnet_models:
    print(f"## ControlNet {cnet}")
    print("")
    print_header()
    for seed in range(16):
        print(f"|{seed}|", end="")
        for unet in unet_models:
            url = get_url(path=f"{cnet}/{unet}/output_{seed:02d}.png")
            print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")
        print("")