File size: 1,584 Bytes
75805ca 8eece7f 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 |
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="")
print("")
print("|", end="")
for _ in range((len(processors) + 1) * 2):
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):
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="")
# 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("")
|