mirror of
https://github.com/huggingface/diffusers.git
synced 2026-05-28 00:39:35 +08:00
Install latest prerelease from huggingface_hub when installing transformers from main (#12395)
Some checks failed
Run dependency tests / check_dependencies (push) Waiting to run
Run Torch dependency tests / check_torch_dependencies (push) Waiting to run
Fast GPU Tests on main / Setup Torch Pipelines CUDA Slow Tests Matrix (push) Waiting to run
Fast GPU Tests on main / Torch Pipelines CUDA Tests (push) Blocked by required conditions
Fast GPU Tests on main / Torch CUDA Tests (lora) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (models) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (others) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (schedulers) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (single_file) (push) Waiting to run
Fast GPU Tests on main / PyTorch Compile CUDA tests (push) Waiting to run
Fast GPU Tests on main / PyTorch xformers CUDA tests (push) Waiting to run
Fast GPU Tests on main / Examples PyTorch CUDA tests on Ubuntu (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch image:diffusers/diffusers-pytorch-cpu name:Fast PyTorch CPU tests on Ubuntu report:torch_cpu runner:aws-general-8-plus]) (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch_examples image:diffusers/diffusers-pytorch-cpu name:PyTorch Example CPU tests on Ubuntu report:torch_example_cpu runner:aws-general-8-plus]) (push) Waiting to run
Secret Leaks / trufflehog (push) Waiting to run
Update Diffusers metadata / update_metadata (push) Waiting to run
Benchmarking tests / Torch Core Models CUDA Benchmarking Tests (push) Has been cancelled
Some checks failed
Run dependency tests / check_dependencies (push) Waiting to run
Run Torch dependency tests / check_torch_dependencies (push) Waiting to run
Fast GPU Tests on main / Setup Torch Pipelines CUDA Slow Tests Matrix (push) Waiting to run
Fast GPU Tests on main / Torch Pipelines CUDA Tests (push) Blocked by required conditions
Fast GPU Tests on main / Torch CUDA Tests (lora) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (models) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (others) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (schedulers) (push) Waiting to run
Fast GPU Tests on main / Torch CUDA Tests (single_file) (push) Waiting to run
Fast GPU Tests on main / PyTorch Compile CUDA tests (push) Waiting to run
Fast GPU Tests on main / PyTorch xformers CUDA tests (push) Waiting to run
Fast GPU Tests on main / Examples PyTorch CUDA tests on Ubuntu (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch image:diffusers/diffusers-pytorch-cpu name:Fast PyTorch CPU tests on Ubuntu report:torch_cpu runner:aws-general-8-plus]) (push) Waiting to run
Fast tests on main / ${{ matrix.config.name }} (map[framework:pytorch_examples image:diffusers/diffusers-pytorch-cpu name:PyTorch Example CPU tests on Ubuntu report:torch_example_cpu runner:aws-general-8-plus]) (push) Waiting to run
Secret Leaks / trufflehog (push) Waiting to run
Update Diffusers metadata / update_metadata (push) Waiting to run
Benchmarking tests / Torch Core Models CUDA Benchmarking Tests (push) Has been cancelled
* Allow prerelease when installing transformers from main * maybe better * maybe better * and now? * just bored * should be better * works now
This commit is contained in:
5
.github/workflows/pr_modular_tests.yml
vendored
5
.github/workflows/pr_modular_tests.yml
vendored
@@ -110,9 +110,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
python -m uv pip install -e [quality,test]
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
|
||||
12
.github/workflows/pr_tests.yml
vendored
12
.github/workflows/pr_tests.yml
vendored
@@ -116,9 +116,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
python -m uv pip install -e [quality,test]
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
@@ -254,10 +253,9 @@ jobs:
|
||||
python -m uv pip install -e [quality,test]
|
||||
# TODO (sayakpaul, DN6): revisit `--no-deps`
|
||||
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
# python -m uv pip install -U tokenizers
|
||||
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
python -m uv pip install -U tokenizers
|
||||
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
|
||||
13
.github/workflows/pr_tests_gpu.yml
vendored
13
.github/workflows/pr_tests_gpu.yml
vendored
@@ -132,9 +132,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
python -m uv pip install -e [quality,test]
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
|
||||
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
@@ -204,9 +203,8 @@ jobs:
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
python -m uv pip install -e [quality,test]
|
||||
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
|
||||
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
@@ -268,8 +266,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
|
||||
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
|
||||
python -m uv pip install -e [quality,test,training]
|
||||
|
||||
- name: Environment
|
||||
|
||||
@@ -243,8 +243,8 @@ class ModelUtilsTest(unittest.TestCase):
|
||||
else:
|
||||
_ = load_model(repo_id)
|
||||
|
||||
warning_message = str(warning.warnings[0].message)
|
||||
self.assertIn("This serialization format is now deprecated to standardize the serialization", warning_message)
|
||||
warning_messages = " ".join(str(w.message) for w in warning.warnings)
|
||||
self.assertIn("This serialization format is now deprecated to standardize the serialization", warning_messages)
|
||||
|
||||
# Local tests are already covered down below.
|
||||
@parameterized.expand(
|
||||
@@ -298,11 +298,13 @@ class ModelUtilsTest(unittest.TestCase):
|
||||
raise_for_status=mock.Mock(side_effect=HfHubHTTPError("Server down", response=mock.Mock())),
|
||||
json=mock.Mock(return_value={}),
|
||||
)
|
||||
client_mock = mock.Mock()
|
||||
client_mock.get.return_value = error_response
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
model = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", cache_dir=tmpdir)
|
||||
|
||||
with mock.patch("requests.Session.get", return_value=error_response):
|
||||
with mock.patch("huggingface_hub.hf_api.get_session", return_value=client_mock):
|
||||
# Should fail with local_files_only=False (network required)
|
||||
# We would make a network call with model_info
|
||||
with self.assertRaises(OSError):
|
||||
|
||||
Reference in New Issue
Block a user