File size: 1,807 Bytes
75805ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d2cbb5
 
75805ca
 
 
6d2cbb5
75805ca
 
 
 
8eece7f
 
75805ca
a49d82c
75805ca
 
 
 
 
 
 
a49d82c
 
 
75805ca
 
 
 
 
 
 
 
 
6d2cbb5
 
 
75805ca
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import sys

cnet_models = ["canny", "normal", "depth", "openpose", "hed", "scribble", "mlsd", "seg"]
processors = ["ref", "diffusers"]
image_types = ['bird', 'human', 'room', 'vermeer']

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

def print_header():
    print("|seed|", end="")
    for proc in processors:
        print(f"{proc} with prompt|", end="")
    for proc in processors:
        print(f"{proc} guess_mode|", end="")
    for proc in ['diffusers']:
        print(f"{proc} guess_mode with prompt|", end="")
    print("")

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

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

for cnet in cnet_models:
    print(f"## ControlNet {cnet}")
    print("")
    print_header()

    for image_type in image_types:    
        for seed in range(4):
            if cnet=='openpose' and image_type=='human' and seed == 3:
                continue

            print(f"|{seed}|", end="")
            for proc in processors:
                url = get_url(path=f"{proc}/output_{image_type}_{cnet}_{seed:01d}.png")
                print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")

            for proc in processors:
                url = get_url(path=f"{proc}/output_{image_type}_{cnet}_{seed:01d}_gm.png")
                print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")

            for proc in ['diffusers']:
                url = get_url(path=f"{proc}/output_{image_type}_{cnet}_{seed:01d}_gm_wp.png")
                print(f'<a href="{url}"><img width="128" src="{url}"/></a>|', end="")
            print("")