Haidra-Org / hordelib

A wrapper around ComfyUI to allow use by the AI Horde.
https://hordelib.org
GNU Affero General Public License v3.0
56 stars 17 forks source link

Added early stopping to train.py #362

Closed rbrtcs1 closed 4 days ago

rbrtcs1 commented 4 days ago

This should stop after PATIENCE epochs beyond the current best performing epoch (I set this to 25 arbitrarily). So if we peak at epoch 60, it would run until 85 and then stop early if none of 61-85 performed better than 60 did.

It also now saves the state_dict of the best performing epoch and saves that instead of the last one.