Made sure autoselect applies USE_EXISTING when no motion models present in Gen2 node

This commit is contained in:
Jedrzej Kosinski
2024-01-16 17:02:10 -06:00
parent 51199d1c28
commit 35c0148e79
+2
View File
@@ -62,6 +62,8 @@ class UseEvolvedSamplingNode:
# if autoselect, get suggested beta_schedule from motion model
if beta_schedule == BetaSchedules.AUTOSELECT and not model.motion_models.is_empty():
beta_schedule = model.motion_models[0].model.get_best_beta_schedule(log=True)
else:
beta_schedule = BetaSchedules.USE_EXISTING
new_model_sampling = BetaSchedules.to_model_sampling(beta_schedule, model)
if new_model_sampling is not None:
model.add_object_patch("model_sampling", new_model_sampling)