Skip to content

Commit

Permalink
Remove unused prediction_type and upcast_attention from from_single_f…
Browse files Browse the repository at this point in the history
…ile(...) calls.
  • Loading branch information
RyanJDick authored and maryhipp committed Oct 28, 2024
1 parent 07ab116 commit a2486a5
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def _load_from_singlefile(
load_class = load_classes[config.base][config.variant]
except KeyError as e:
raise Exception(f"No diffusers pipeline known for base={config.base}, variant={config.variant}") from e
prediction_type = config.prediction_type.value
upcast_attention = config.upcast_attention

# Without SilenceWarnings we get log messages like this:
# site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
Expand All @@ -129,12 +127,7 @@ def _load_from_singlefile(
# ['text_model.embeddings.position_ids']

with SilenceWarnings():
pipeline = load_class.from_single_file(
config.path,
torch_dtype=self._torch_dtype,
prediction_type=prediction_type,
upcast_attention=upcast_attention,
)
pipeline = load_class.from_single_file(config.path, torch_dtype=self._torch_dtype)

if not submodel_type:
return pipeline
Expand Down

0 comments on commit a2486a5

Please sign in to comment.