Commit 96598639 authored by anton-l's avatar anton-l
Browse files

Revert an accidental commit

This reverts commit 679c77f8.
parent 80be0744
......@@ -27,7 +27,7 @@ from huggingface_hub import hf_hub_download
from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError, RevisionNotFoundError
from requests import HTTPError
from . import __version__, is_torch_available
from . import is_torch_available
from .modeling_flax_pytorch_utils import convert_pytorch_state_dict_to_flax
from .utils import (
CONFIG_NAME,
......@@ -289,12 +289,7 @@ class FlaxModelMixin:
from_auto_class = kwargs.pop("_from_auto", False)
subfolder = kwargs.pop("subfolder", None)
user_agent = {
"diffusers": __version__,
"file_type": "model",
"framework": "flax",
"from_auto_class": from_auto_class,
}
user_agent = {"file_type": "model", "framework": "flax", "from_auto_class": from_auto_class}
# Load config if we don't provide a configuration
config_path = config if config is not None else pretrained_model_name_or_path
......
......@@ -26,7 +26,6 @@ from huggingface_hub import hf_hub_download
from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError, RevisionNotFoundError
from requests import HTTPError
from . import __version__
from .utils import CONFIG_NAME, DIFFUSERS_CACHE, HUGGINGFACE_CO_RESOLVE_ENDPOINT, WEIGHTS_NAME, logging
......@@ -298,12 +297,7 @@ class ModelMixin(torch.nn.Module):
subfolder = kwargs.pop("subfolder", None)
device_map = kwargs.pop("device_map", None)
user_agent = {
"diffusers": __version__,
"file_type": "model",
"framework": "pytorch",
"from_auto_class": from_auto_class,
}
user_agent = {"file_type": "model", "framework": "pytorch", "from_auto_class": from_auto_class}
# Load config if we don't provide a configuration
config_path = pretrained_model_name_or_path
......
......@@ -29,7 +29,6 @@ from huggingface_hub import snapshot_download
from PIL import Image
from tqdm.auto import tqdm
from . import __version__
from .configuration_utils import ConfigMixin
from .dynamic_modules_utils import get_class_from_dynamic_module
from .schedulers.scheduling_utils import SCHEDULER_CONFIG_NAME
......@@ -374,10 +373,6 @@ class DiffusionPipeline(ConfigMixin):
if custom_pipeline is not None:
allow_patterns += [CUSTOM_PIPELINE_FILE_NAME]
user_agent = {"diffusers": __version__, "pipeline_class": config_dict["_class_name"]}
if custom_pipeline is not None:
user_agent["custom_pipeline"] = custom_pipeline
# download all allow_patterns
cached_folder = snapshot_download(
pretrained_model_name_or_path,
......@@ -388,7 +383,6 @@ class DiffusionPipeline(ConfigMixin):
use_auth_token=use_auth_token,
revision=revision,
allow_patterns=allow_patterns,
user_agent=user_agent,
)
else:
cached_folder = pretrained_model_name_or_path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment