takuma104's picture
add gen_compare_guess_mode
75805ca
raw
history blame
1.58 kB
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("")