Skip to content

Commit 67fc007

Browse files
authored
Merge branch 'main' into transformers-v5-pr
2 parents 2402990 + 2843b3d commit 67fc007

File tree

789 files changed

+17257
-17708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

789 files changed

+17257
-17708
lines changed

.github/workflows/notify_slack_about_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup Python
1616
uses: actions/setup-python@v6
1717
with:
18-
python-version: '3.8'
18+
python-version: '3.10'
1919

2020
- name: Notify Slack about the release
2121
env:

.github/workflows/pr_dependency_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.8"
25+
python-version: "3.10"
2626
- name: Install dependencies
2727
run: |
2828
pip install -e .

.github/workflows/pr_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Set up Python
3636
uses: actions/setup-python@v6
3737
with:
38-
python-version: "3.8"
38+
python-version: "3.10"
3939
- name: Install dependencies
4040
run: |
4141
pip install --upgrade pip
@@ -55,7 +55,7 @@ jobs:
5555
- name: Set up Python
5656
uses: actions/setup-python@v6
5757
with:
58-
python-version: "3.8"
58+
python-version: "3.10"
5959
- name: Install dependencies
6060
run: |
6161
pip install --upgrade pip

.github/workflows/pr_tests_gpu.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python
3838
uses: actions/setup-python@v6
3939
with:
40-
python-version: "3.8"
40+
python-version: "3.10"
4141
- name: Install dependencies
4242
run: |
4343
pip install --upgrade pip
@@ -57,7 +57,7 @@ jobs:
5757
- name: Set up Python
5858
uses: actions/setup-python@v6
5959
with:
60-
python-version: "3.8"
60+
python-version: "3.10"
6161
- name: Install dependencies
6262
run: |
6363
pip install --upgrade pip
@@ -206,6 +206,11 @@ jobs:
206206

207207
- name: Install dependencies
208208
run: |
209+
# Install pkgs which depend on setuptools<81 for pkg_resources first with no build isolation
210+
uv pip install pip==25.2 setuptools==80.10.2
211+
uv pip install --no-build-isolation k-diffusion==0.0.12
212+
uv pip install --upgrade pip setuptools
213+
# Install the rest as normal
209214
uv pip install -e ".[quality]"
210215
uv pip install peft@git+https://github.com/huggingface/peft.git
211216
uv pip uninstall accelerate && uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git

.github/workflows/pr_torch_dependency_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.8"
25+
python-version: "3.10"
2626
- name: Install dependencies
2727
run: |
2828
pip install -e .

.github/workflows/pypi_publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: '3.8'
23+
python-version: '3.10'
2424

2525
- name: Fetch latest branch
2626
id: fetch_latest_branch
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Python
4848
uses: actions/setup-python@v6
4949
with:
50-
python-version: "3.8"
50+
python-version: "3.10"
5151

5252
- name: Install dependencies
5353
run: |

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Python
2121
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.8
23+
python-version: 3.10
2424

2525
- name: Install requirements
2626
run: |

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
agreed to in writing, Licensor provides the Work (and each
145145
Contributor provides its Contributions) on an "AS IS" BASIS,
146146
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147-
implied, including, without limitation, any warranties or conditions
147+
implied, including, without limitation, Any warranties or conditions
148148
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149149
PARTICULAR PURPOSE. You are solely responsible for determining the
150150
appropriateness of using or redistributing the Work and assume any

benchmarks/benchmarking_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import threading
77
from contextlib import nullcontext
88
from dataclasses import dataclass
9-
from typing import Any, Callable, Dict, Optional, Union
9+
from typing import Any, Callable
1010

1111
import pandas as pd
1212
import torch
@@ -91,10 +91,10 @@ def model_init_fn(model_cls, group_offload_kwargs=None, layerwise_upcasting=Fals
9191
class BenchmarkScenario:
9292
name: str
9393
model_cls: ModelMixin
94-
model_init_kwargs: Dict[str, Any]
94+
model_init_kwargs: dict[str, Any]
9595
model_init_fn: Callable
9696
get_model_input_dict: Callable
97-
compile_kwargs: Optional[Dict[str, Any]] = None
97+
compile_kwargs: dict[str, Any] | None = None
9898

9999

100100
@require_torch_gpu
@@ -176,7 +176,7 @@ def run_benchmark(self, scenario: BenchmarkScenario):
176176
result["fullgraph"], result["mode"] = None, None
177177
return result
178178

179-
def run_bencmarks_and_collate(self, scenarios: Union[BenchmarkScenario, list[BenchmarkScenario]], filename: str):
179+
def run_bencmarks_and_collate(self, scenarios: BenchmarkScenario | list[BenchmarkScenario], filename: str):
180180
if not isinstance(scenarios, list):
181181
scenarios = [scenarios]
182182
record_queue = queue.Queue()
@@ -214,10 +214,10 @@ def _run_phase(
214214
*,
215215
model_cls: ModelMixin,
216216
init_fn: Callable,
217-
init_kwargs: Dict[str, Any],
217+
init_kwargs: dict[str, Any],
218218
get_input_fn: Callable,
219-
compile_kwargs: Optional[Dict[str, Any]],
220-
) -> Dict[str, float]:
219+
compile_kwargs: dict[str, Any] | None = None,
220+
) -> dict[str, float]:
221221
# setup
222222
self.pre_benchmark()
223223

examples/cogvideo/train_cogvideox_image_to_video_lora.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ def get_args():
432432
class VideoDataset(Dataset):
433433
def __init__(
434434
self,
435-
instance_data_root: Optional[str] = None,
436-
dataset_name: Optional[str] = None,
437-
dataset_config_name: Optional[str] = None,
435+
instance_data_root: str | None = None,
436+
dataset_name: str | None = None,
437+
dataset_config_name: str | None = None,
438438
caption_column: str = "text",
439439
video_column: str = "video",
440440
height: int = 480,
@@ -443,8 +443,8 @@ def __init__(
443443
max_num_frames: int = 49,
444444
skip_frames_start: int = 0,
445445
skip_frames_end: int = 0,
446-
cache_dir: Optional[str] = None,
447-
id_token: Optional[str] = None,
446+
cache_dir: str | None = None,
447+
id_token: str | None = None,
448448
) -> None:
449449
super().__init__()
450450

0 commit comments

Comments
 (0)