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
1 change: 1 addition & 0 deletions packages/ltx-pipelines/src/ltx_pipelines/distilled_mgpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def __call__( # noqa: PLR0913
vae_queue=vae_queue,
compilation_config=args.compile,
diffvae_optimization=args.diffvae_optimization,
quantization=args.quantization_builder,
)
try:
for _ in controller.stream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def __call__( # noqa: PLR0913
distilled_lora_strength_stage_2=args.distilled_lora_strength_stage_2,
compilation_config=args.compile,
diffvae_optimization=args.diffvae_optimization,
quantization=args.quantization_builder,
)
try:
for _ in controller.stream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def __call__( # noqa: PLR0913
distilled_lora_path=args.distilled_lora[0].path,
compilation_config=args.compile,
diffvae_optimization=args.diffvae_optimization,
quantization=args.quantization_builder,
)
try:
for _ in controller.stream(
Expand Down
7 changes: 7 additions & 0 deletions packages/ltx-pipelines/src/ltx_pipelines/utils/args.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import functools
import json
import logging
import sys
Expand Down Expand Up @@ -303,6 +304,11 @@ def _resolve_quantization(namespace: argparse.Namespace) -> None:
# Resolution is deferred until after parse_args because fp8-scaled-mm needs the
# checkpoint path, which isn't on the namespace when the --quantization argument
# is parsed.
#
# Two forms are produced. Single-GPU pipelines take ``quantization`` (the built
# policy). The multi-GPU runners build the policy inside each spawned worker and
# therefore need ``quantization_builder``: a picklable zero-arg callable.
namespace.quantization_builder = None
name = getattr(namespace, "quantization", None)
if name is None or isinstance(name, QuantizationPolicy):
return
Expand All @@ -324,6 +330,7 @@ def _resolve_quantization(namespace: argparse.Namespace) -> None:
"--distilled-checkpoint-path, or --transformer-path."
)
namespace.quantization = kind.to_policy(checkpoint_path=ckpt)
namespace.quantization_builder = functools.partial(kind.to_policy, checkpoint_path=ckpt)


def _resolve_model_paths(namespace: argparse.Namespace) -> None:
Expand Down