File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
tests/pipelines/controlnet Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1092,6 +1092,13 @@ def test_single_file_component_configs(self):
10921092 for param_name , param_value in single_file_pipe .controlnet .config .items ():
10931093 if param_name in PARAMS_TO_IGNORE :
10941094 continue
1095+
1096+ # This parameter doesn't appear to be loaded from the config.
1097+ # So when it is registered to config, it remains a tuple as this is the default in the class definition
1098+ # from_pretrained, does load from config and converts to a list when registering to config
1099+ if param_name == "conditioning_embedding_out_channels" and isinstance (param_value , tuple ):
1100+ param_value = list (param_value )
1101+
10951102 assert (
10961103 pipe .controlnet .config [param_name ] == param_value
10971104 ), f"{ param_name } differs between single file loading and pretrained loading"
Original file line number Diff line number Diff line change @@ -1002,6 +1002,11 @@ def test_single_file_component_configs(self):
10021002 for param_name , param_value in single_file_pipe .unet .config .items ():
10031003 if param_name in PARAMS_TO_IGNORE :
10041004 continue
1005+
1006+ # Upcast attention might be set to None in a config file, which is incorrect. It should default to False in the model
1007+ if param_name == "upcast_attention" and pipe .unet .config [param_name ] is None :
1008+ pipe .unet .config [param_name ] = False
1009+
10051010 assert (
10061011 pipe .unet .config [param_name ] == param_value
10071012 ), f"{ param_name } differs between single file loading and pretrained loading"
You can’t perform that action at this time.
0 commit comments