nod-ai / sdxl-scripts

Apache License 2.0
2 stars 5 forks source link

[tuner] Fix missing return bug and incorrect sort order in best.log #69

Closed RattataKing closed 4 months ago

RattataKing commented 4 months ago
  1. run_command() missing return result after merged #65
  2. Solved the legacy issue where the actual best candidates are not listed properly in best.log in benchmark_compiled_candidates().

print([i[0] for i in best_results]) best_results = sorted(best_results, key=lambda x: x[0]) print([i[0] for i in best_results]) / ['715.0', '921.0', '727.0', '728.0', '925.0', '727.0', '925.0', '735.0', '806.0', '1063.0', '1062.0', '1064.0', '1078.0', '798.0'] ['1062.0', '1063.0', '1064.0', '1078.0', '715.0', '727.0', '727.0', '728.0', '735.0', '798.0', '806.0', '921.0', '925.0', '925.0'] /

  • x[0] is type str, and they are sorted lexicographically, which is why "1062.0" comes before "715.0".
  • Convert to float will solve the issue