Skip to content

Commit 89da49f

Browse files
[misc] [4/n] Remove configs/sample/ entirely and update all references
Delete the backward-compatible re-export shims in configs/sample/ and update all docs, tests, and CI config to point to the canonical location at fastvideo/api/sampling_param.py.
1 parent 02534ac commit 89da49f

11 files changed

Lines changed: 25 additions & 36 deletions

File tree

.github/mergify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pull_request_rules:
105105
- files~=^fastvideo/pipelines/samplers/
106106
- files~=^fastvideo/entrypoints/
107107
- files~=^fastvideo/worker/
108-
- files~=^fastvideo/configs/sample/
108+
- files~=^fastvideo/api/sampling_param
109109
- files~=^fastvideo/configs/pipelines/
110110
- files~=^examples/inference/
111111
- -closed

docs/api/fastvideo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ This page contains the complete API reference for the FastVideo library.
6262
show_root_toc_entry: true
6363
heading_level: 4
6464

65-
#### fastvideo.configs.sample
65+
#### fastvideo.api.sampling_param
6666

67-
::: fastvideo.configs.sample
67+
::: fastvideo.api.sampling_param
6868
options:
6969
show_source: true
7070
show_root_heading: true

docs/contributing/ci_architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Applied by Mergify based on which paths you modified. Multiple scope labels can
173173
| Label | File paths that trigger it |
174174
|-------|---------------------------|
175175
| `scope: training` | `fastvideo/train/`, `fastvideo/training/`, `fastvideo/distillation/`, `examples/train/`, `examples/training/`, `examples/distill/` |
176-
| `scope: inference` | `fastvideo/pipelines/basic/`, `fastvideo/pipelines/stages/`, `fastvideo/pipelines/samplers/`, `fastvideo/entrypoints/`, `fastvideo/worker/`, `fastvideo/configs/sample/`, `fastvideo/configs/pipelines/`, `examples/inference/` |
176+
| `scope: inference` | `fastvideo/pipelines/basic/`, `fastvideo/pipelines/stages/`, `fastvideo/pipelines/samplers/`, `fastvideo/entrypoints/`, `fastvideo/worker/`, `fastvideo/api/sampling_param.py`, `fastvideo/configs/pipelines/`, `examples/inference/` |
177177
| `scope: attention` | `fastvideo/attention/` |
178178
| `scope: kernel` | `fastvideo-kernel/`, `csrc/` |
179179
| `scope: data` | `fastvideo/dataset/`, `fastvideo/pipelines/preprocess/`, `examples/preprocessing/` |

docs/contributing/coding_agents.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ FastVideo maps a Diffusers-style repo into a pipeline like:
4444
- `fastvideo/configs/models/*`: arch configs and `param_names_mapping` for
4545
weight name translation.
4646
- `fastvideo/configs/pipelines/*`: pipeline wiring (component classes + names).
47-
- `fastvideo/configs/sample/*`: default runtime sampling parameters.
47+
- `fastvideo/api/sampling_param.py`: runtime sampling parameters.
4848
- `fastvideo/pipelines/basic/*`: end-to-end pipeline logic built from stages.
4949
- `model_index.json`: the HF repo entrypoint that maps component names to
5050
classes and weight files.
@@ -319,7 +319,8 @@ Purpose:
319319

320320
- `fastvideo/configs/pipelines/` describes pipeline wiring and model module
321321
names.
322-
- `fastvideo/configs/sample/` defines default runtime parameters.
322+
- `fastvideo/api/sampling_param.py` defines runtime sampling parameters.
323+
Defaults come from profiles in `fastvideo/pipelines/basic/<family>/profiles.py`.
323324

324325
Action:
325326

@@ -474,7 +475,7 @@ FastVideo integration.
474475
3. Pipeline wiring.
475476
- Pipeline: `fastvideo/pipelines/basic/wan/wan_pipeline.py`
476477
- Pipeline config: `fastvideo/configs/pipelines/wan.py`
477-
- Sampling defaults: `fastvideo/configs/sample/wan.py`
478+
- Sampling defaults: `fastvideo/pipelines/basic/wan/profiles.py`
478479

479480
4. Minimal example.
480481
- Script: `examples/inference/basic/basic.py`

docs/design/overview.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FastVideo maps a Diffusers-style repo into a pipeline like this:
1212
- `fastvideo/configs/models/*`: arch configs and `param_names_mapping` for
1313
weight name translation.
1414
- `fastvideo/configs/pipelines/*`: pipeline wiring (component classes + names).
15-
- `fastvideo/configs/sample/*`: default runtime sampling parameters.
15+
- `fastvideo/api/sampling_param.py`: runtime sampling parameters.
1616
- `fastvideo/pipelines/basic/*`: end-to-end pipelines.
1717
- `fastvideo/pipelines/stages/*`: reusable pipeline stages.
1818
- `fastvideo/models/loader/*`: component loaders for Diffusers-style repos.
@@ -49,8 +49,9 @@ runtime parameters consistent:
4949
- `fastvideo/configs/models/`: architecture definitions, layer shapes, and
5050
`param_names_mapping` rules for key renaming.
5151
- `fastvideo/configs/pipelines/`: pipeline wiring and required components.
52-
- `fastvideo/configs/sample/`: default sampling parameters (steps, frames,
53-
guidance scale, resolution, fps).
52+
- `fastvideo/api/sampling_param.py`: sampling parameters (steps, frames,
53+
guidance scale, resolution, fps). Defaults come from profiles in
54+
`fastvideo/pipelines/basic/<family>/profiles.py`.
5455
- `fastvideo/registry.py`: unified registry for pipeline config + sampling
5556
defaults and model metadata resolution, defined via explicit
5657
`register_configs(...)` blocks (no separate dict registries).
@@ -142,7 +143,7 @@ How this maps to FastVideo:
142143
- `T5TokenizerFast` -> loaded via HF in `fastvideo/models/loader/`
143144
- `UniPCMultistepScheduler` -> loaded via Diffusers scheduler utilities
144145
- Pipeline defaults -> `fastvideo/configs/pipelines/wan.py`
145-
- Sampling defaults -> `fastvideo/configs/sample/wan.py`
146+
- Sampling defaults -> `fastvideo/pipelines/basic/wan/profiles.py`
146147

147148
## Pipeline system
148149

docs/getting_started/v1_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The following two classes `PipelineConfig` and `SamplingParam` are used to confi
3333

3434
### SamplingParam
3535

36-
::: fastvideo.configs.sample.base.SamplingParam
36+
::: fastvideo.api.sampling_param.SamplingParam
3737
options:
3838
show_root_heading: true
3939
show_source: false

docs/inference/architecture.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,14 @@ Concrete hierarchy: `DiTConfig` → `DiTArchConfig`, `VAEConfig` →
128128
- `dump_to_json()` / `load_from_json()` — JSON persistence. Callable
129129
fields and `arch_config` are excluded from dumps.
130130

131-
### SamplingParam (`fastvideo/configs/sample/`)
131+
### SamplingParam (`fastvideo/api/sampling_param.py`)
132132

133133
Generation parameters separate from pipeline config. Each model family
134-
provides defaults:
134+
provides defaults via a profile (see `fastvideo/pipelines/basic/<family>/profiles.py`):
135135

136136
```python
137-
@dataclass
138-
class WanT2V_1_3B_SamplingParam(SamplingParam):
139-
height: int = 480
140-
width: int = 832
141-
num_frames: int = 81
142-
guidance_scale: float = 3.0
143-
num_inference_steps: int = 50
137+
sp = SamplingParam.from_pretrained("Wan-AI/Wan2.1-T2V-1.3B-Diffusers")
138+
# sp.height == 480, sp.width == 832, sp.num_frames == 81, etc.
144139
```
145140

146141
## Component Loading
@@ -430,9 +425,9 @@ User: generator.generate_video(prompt, ...)
430425
`fastvideo/configs/pipelines/<model>.py`. Set DiT/VAE/encoder configs,
431426
flow_shift, precision defaults.
432427

433-
2. **Sampling param** — Create a `SamplingParam` subclass in
434-
`fastvideo/configs/sample/<model>.py`. Set default height, width,
435-
num_frames, guidance_scale, num_inference_steps.
428+
2. **Sampling param profile** — Create a profile in
429+
`fastvideo/pipelines/basic/<model>/profiles.py` with default height,
430+
width, num_frames, guidance_scale, num_inference_steps.
436431

437432
3. **Register configs** — In `fastvideo/registry.py`, add a
438433
`register_configs()` call inside `_register_configs()` with

docs/inference/gen3c.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ GEN3C defaults in FastVideo:
8989

9090
These values are defined in:
9191

92-
- `fastvideo/configs/sample/gen3c.py`
92+
- `fastvideo/pipelines/basic/gen3c/profiles.py`
9393
- `fastvideo/configs/pipelines/gen3c.py`
9494

9595
and align with the official GEN3C inference defaults in:

fastvideo/configs/sample/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

fastvideo/configs/sample/base.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)