Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions examples/diffusers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ python quantize.py \
> (including quantized or distilled checkpoints) remain subject to the LTX Community License
> Agreement and are **not** covered by Apache 2.0.

> [!NOTE]
> This example targets the LTX-2 packages at commit
> [`28c3c73`](https://github.com/Lightricks/LTX-2/commit/28c3c73fe557666c3de176e1e50a5220152ccfca)
> (`QuantizationPolicy.fp8_cast()` and `checkpoint_path`/`gemma_root` pipeline arguments), e.g.
> `pip install "ltx-core @ git+https://github.com/Lightricks/LTX-2.git@28c3c73#subdirectory=packages/ltx-core" "ltx-pipelines @ git+https://github.com/Lightricks/LTX-2.git@28c3c73#subdirectory=packages/ltx-pipelines"`.
> Newer LTX-2 releases removed `fp8_cast()` and changed the pipeline constructor, so this example does
> not run on them yet.

This example produces three outputs: a PyTorch checkpoint (`--quantized-torch-ckpt-save-path`), a Hugging Face checkpoint (`--hf-ckpt-dir`), and a ComfyUI-compatible merged safetensor (`--extra-param merged_base_safetensor_path`).

```sh
Expand Down
11 changes: 11 additions & 0 deletions examples/diffusers/quantization/pipeline_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@ def _create_ltx2_pipeline(self) -> Any:
params.pop("enable_swizzle_layout", None)
params.pop("padding_strategy", None)
params.pop("enable_layerwise_quant_metadata", None)
# Calibration-only knobs read in calibration.py; the pipeline constructor rejects them.
for key in (
"height",
"width",
"num_frames",
"frame_rate",
"seed",
"images",
"tiling_config",
):
params.pop(key, None)

if not checkpoint_path:
raise ValueError("Missing required extra_param: checkpoint_path.")
Expand Down
Loading