Compare commits

...

2 Commits

Author SHA1 Message Date
Sayak Paul
dbd413dfd9 Merge branch 'main' into call-pipeline-not-model 2024-07-26 15:53:25 +05:30
sayakpaul
744533ad59 model -> pipeline 2024-07-25 10:00:24 +05:30

View File

@@ -963,13 +963,13 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
) )
# 10. Instantiate the pipeline # 10. Instantiate the pipeline
model = pipeline_class(**init_kwargs) final_pipeline = pipeline_class(**init_kwargs)
# 11. Save where the model was instantiated from # 11. Save where the model was instantiated from
model.register_to_config(_name_or_path=pretrained_model_name_or_path) final_pipeline.register_to_config(_name_or_path=pretrained_model_name_or_path)
if device_map is not None: if device_map is not None:
setattr(model, "hf_device_map", final_device_map) setattr(final_pipeline, "hf_device_map", final_device_map)
return model return final_pipeline
@property @property
def name_or_path(self) -> str: def name_or_path(self) -> str: