Only use .yaml config prediction if actually set (#2272)

This commit is contained in:
catboxanon
2024-11-06 23:44:12 -05:00
committed by GitHub
parent 75120d02f3
commit f4afbaff45

View File

@@ -321,7 +321,7 @@ def forge_loader(sd, additional_state_dicts=None):
yaml_config_prediction_type = 'v_prediction'
if has_prediction_type:
if yaml_config_prediction_type is not None:
if yaml_config_prediction_type:
huggingface_components['scheduler'].config.prediction_type = yaml_config_prediction_type
else:
huggingface_components['scheduler'].config.prediction_type = prediction_types.get(estimated_config.model_type.name, huggingface_components['scheduler'].config.prediction_type)