File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,8 @@ def _from_pretrained(
409409 "tokenizer_2" : None ,
410410 "tokenizer_3" : None ,
411411 "feature_extractor" : None ,
412+ "image_encoder" : None ,
413+ "safety_checker" : None ,
412414 }
413415 for name in submodels .keys ():
414416 if kwargs .get (name ) is not None :
@@ -434,6 +436,10 @@ def _from_pretrained(
434436 "text_encoder_3" : model_save_path / DIFFUSION_MODEL_TEXT_ENCODER_3_SUBFOLDER / text_encoder_3_file_name ,
435437 }
436438
439+ for config_key , value in config .items ():
440+ if config_key not in models and config_key not in kwargs and config_key not in submodels :
441+ kwargs [config_key ] = value
442+
437443 compile_only = kwargs .get ("compile_only" , False )
438444 quantization_config = cls ._prepare_weight_quantization_config (quantization_config , load_in_8bit )
439445 if (quantization_config is None or quantization_config .dataset is None ) and not compile_only :
You can’t perform that action at this time.
0 commit comments