File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -887,20 +887,6 @@ def load_module(name, value):
887887
888888 init_dict = {k : v for k , v in init_dict .items () if load_module (k , v )}
889889
890- # Check `torch_dtype` map for unused keys
891- if isinstance (torch_dtype , dict ):
892- extra_keys_dtype = set (torch_dtype .keys ()) - set (passed_class_obj .keys ())
893- extra_keys_obj = set (passed_class_obj .keys ()) - set (torch_dtype .keys ())
894- if len (extra_keys_dtype ) > 0 :
895- logger .warning (
896- f"Expected `{ list (passed_class_obj .keys ())} `, got extra `torch_dtype` keys `{ extra_keys_dtype } `."
897- )
898- if len (extra_keys_obj ) > 0 :
899- logger .warning (
900- f"Expected `{ list (passed_class_obj .keys ())} `, missing `torch_dtype` keys `{ extra_keys_dtype } `."
901- " using `default` or `torch.float32`."
902- )
903-
904890 # Special case: safety_checker must be loaded separately when using `from_flax`
905891 if from_flax and "safety_checker" in init_dict and "safety_checker" not in passed_class_obj :
906892 raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments