Skip to content

Commit

Permalink
Revert "fix: pin timm version to 0.6.13"
Browse files Browse the repository at this point in the history
This reverts commit 2bf710b.
  • Loading branch information
jug-dev committed May 13, 2023
1 parent 8a5a237 commit 9c82655
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 6,754 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ hordelib/_comfyui
_version.py
_comfyui
tmp/
profiles/

.vscode
*.ckpt
Expand Down
154 changes: 0 additions & 154 deletions examples/run_cache_test.py

This file was deleted.

82 changes: 41 additions & 41 deletions examples/run_kudos_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,32 +88,32 @@ def main():
logger.info(f"Calculating time for base of {BASE_KUDOS} kudos")
base_time = do_inference(get_base_data())

# logger.info("Calculating time for steps 10")
# base_steps_10 = calculate_kudos_cost(base_time, get_base_data(steps=10))
# logger.info("Calculating time for steps 100")
# base_steps_100 = calculate_kudos_cost(base_time, get_base_data(steps=100))
logger.info("Calculating time for steps 10")
base_steps_10 = calculate_kudos_cost(base_time, get_base_data(steps=10))
logger.info("Calculating time for steps 100")
base_steps_100 = calculate_kudos_cost(base_time, get_base_data(steps=100))

# logger.info("Calculating kudos for karras")
# base_karras = calculate_kudos_cost(base_time, get_base_data(karras=True))
logger.info("Calculating kudos for karras")
base_karras = calculate_kudos_cost(base_time, get_base_data(karras=True))

# logger.info("Calculating kudos for weights")
# tmpdata = get_base_data()
# tmpdata["prompt"] = "(dog:1.5) and (cat:1.5) and (mouse:1.2) and (bird:1.6) and (owl:1.9)"
# base_weights = calculate_kudos_cost(base_time, tmpdata)
# tmpdata = get_base_data()
# tmpdata["prompt"] = "dog and cat and mouse and bird and owl"
# base_no_weights = calculate_kudos_cost(base_time, tmpdata)
logger.info("Calculating kudos for weights")
tmpdata = get_base_data()
tmpdata["prompt"] = "(dog:1.5) and (cat:1.5) and (mouse:1.2) and (bird:1.6) and (owl:1.9)"
base_weights = calculate_kudos_cost(base_time, tmpdata)
tmpdata = get_base_data()
tmpdata["prompt"] = "dog and cat and mouse and bird and owl"
base_no_weights = calculate_kudos_cost(base_time, tmpdata)

# logger.info("Calculating kudos for 1024x1024")
# base_1024 = calculate_kudos_cost(base_time, get_base_data(1024, 1024))
logger.info("Calculating kudos for 1024x1024")
base_1024 = calculate_kudos_cost(base_time, get_base_data(1024, 1024))

# logger.info("Calculating kudos for 2048x2048")
# base_2048 = calculate_kudos_cost(base_time, get_base_data(2048, 2048))
logger.info("Calculating kudos for 2048x2048")
base_2048 = calculate_kudos_cost(base_time, get_base_data(2048, 2048))

# logger.info("Calculating kudos for 1024x1024")
# tmpdata = get_base_data(1024, 1024)
# tmpdata["hires_fix"] = True
# base_hires_fix = calculate_kudos_cost(base_time, tmpdata)
logger.info("Calculating kudos for 1024x1024")
tmpdata = get_base_data(1024, 1024)
tmpdata["hires_fix"] = True
base_hires_fix = calculate_kudos_cost(base_time, tmpdata)

# Benchmark all samplers
samplers = {}
Expand All @@ -124,33 +124,33 @@ def main():
kudos = calculate_kudos_cost(base_time, data)
samplers[sampler] = kudos

# # Benchmark all controlnet types
# controltypes = {}
# for controltype in horde.CONTROLNET_IMAGE_PREPROCESSOR_MAP.keys():
# logger.info(f"Calculating kudos for controlnet {controltype}")
# data = get_base_data()
# data["control_type"] = controltype
# data["source_processing"] = "img2img"
# data["source_image"] = Image.open("images/test_db0.jpg")
# kudos = calculate_kudos_cost(base_time, data)
# controltypes[controltype] = kudos
# Benchmark all controlnet types
controltypes = {}
for controltype in horde.CONTROLNET_IMAGE_PREPROCESSOR_MAP.keys():
logger.info(f"Calculating kudos for controlnet {controltype}")
data = get_base_data()
data["control_type"] = controltype
data["source_processing"] = "img2img"
data["source_image"] = Image.open("images/test_db0.jpg")
kudos = calculate_kudos_cost(base_time, data)
controltypes[controltype] = kudos

# Results
logger.info(f"Base time {base_time} == 10 kudos")
# logger.info(f"10 steps: {base_steps_10}")
# logger.info(f"100 steps: {base_steps_100}")
# logger.info(f"Karras: {base_karras}")
# logger.info(f"No weights: {base_no_weights}")
# logger.info(f"Weights: {base_weights}")
# logger.info(f"Kudos 1024x1024: {base_1024}")
# logger.info(f"Hires fix 1024x1024: {base_hires_fix}")
# logger.info(f"Kudos 2048x2048: {base_2048}")
logger.info(f"10 steps: {base_steps_10}")
logger.info(f"100 steps: {base_steps_100}")
logger.info(f"Karras: {base_karras}")
logger.info(f"No weights: {base_no_weights}")
logger.info(f"Weights: {base_weights}")
logger.info(f"Kudos 1024x1024: {base_1024}")
logger.info(f"Hires fix 1024x1024: {base_hires_fix}")
logger.info(f"Kudos 2048x2048: {base_2048}")

for sampler, kudos in samplers.items():
logger.info(f"{sampler}: {kudos}")

# for controltype, kudos in controltypes.items():
# logger.info(f"{controltype}: {kudos}")
for controltype, kudos in controltypes.items():
logger.info(f"{controltype}: {kudos}")


if __name__ == "__main__":
Expand Down
Loading

0 comments on commit 9c82655

Please sign in to comment.