@@ -186,7 +186,6 @@ def _load_module(
186
186
) -> Iterable [str ]:
187
187
if isinstance (module , PPMissingLayer ):
188
188
return
189
-
190
189
191
190
# Avoid infinite recursion since this function is typically
192
191
# called inside load_weights of the module itself
@@ -206,15 +205,6 @@ def _load_module(
206
205
207
206
child_modules = dict (module .named_children ())
208
207
child_params = dict (module .named_parameters (recurse = False ))
209
- # print("===============================================")
210
- # print(f"In base_prefix: {base_prefix}")
211
- # if base_prefix == "model":
212
- # print(module)
213
- # for module in child_modules.keys():
214
- # print(f"\tchild module: {module}")
215
- # for param in child_params.keys():
216
- # print(f"\tchild param: {param}")
217
- # print("===============================================")
218
208
219
209
# Add missing tensors the weight loader needs to be able to load
220
210
# that aren't registered as params, e.g., batchnorm statistics.
@@ -268,7 +258,6 @@ def load_weights(
268
258
if mapper is not None :
269
259
weights = mapper .apply (weights )
270
260
271
- weights = list (weights )
272
261
autoloaded_weights = set (self ._load_module ("" , self .module , weights ))
273
262
return autoloaded_weights
274
263
0 commit comments