Tiny refactor DefaultModelLoader.Source (#5482)
This commit is contained in:
@@ -515,13 +515,7 @@ class ModelRunner:
|
||||
|
||||
def get_weight_iter(config):
|
||||
iter = loader._get_weights_iterator(
|
||||
DefaultModelLoader.Source(
|
||||
config.model_path,
|
||||
revision=config.revision,
|
||||
fall_back_to_pt=getattr(
|
||||
self.model, "fall_back_to_pt_during_load", True
|
||||
),
|
||||
)
|
||||
DefaultModelLoader.Source.init_new(config, model)
|
||||
)
|
||||
return iter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user