[Feature]: Adds distilled LoRA support for diffusion models (#2783)
Signed-off-by: Songrui625 <songrui625@gmail.com>
This commit is contained in:
1 parent
348cf95a89
commit
89015d5cad
24 files changed
+1283
-33
No files matched your search
@@ -284,6 +284,37 @@ def test_serve_cli_accepts_diffusion_pipeline_profiler_flag():
|
||||
assert stage_cfg["engine_args"]["enable_diffusion_pipeline_profiler"] is True
|
||||
|
||||
|
||||
def test_serve_cli_forwards_distilled_lora_to_diffusion_stage():
|
||||
"""Ensure startup distilled LoRA options reach the online diffusion stage."""
|
||||
parser = TrackingArgumentParser()
|
||||
subparsers = parser.add_subparsers(dest="command")
|
||||
OmniServeCommand().subparser_init(subparsers)
|
||||
|
||||
args = parser.parse_args(
|
||||
[
|
||||
"serve",
|
||||
"Wan-AI/Wan2.2-T2V-A14B-Diffusers",
|
||||
"--omni",
|
||||
"--lora-backend",
|
||||
"distill",
|
||||
"--lora-path",
|
||||
"/models/high.safetensors",
|
||||
"/models/low.safetensors",
|
||||
]
|
||||
)
|
||||
|
||||
explicit_kwargs = args.get_explicit_kwargs_dict()
|
||||
stage_cfg = AsyncOmniEngine._create_default_diffusion_stage_cfg(explicit_kwargs)[0]
|
||||
engine_args = stage_cfg["engine_args"]
|
||||
|
||||
assert explicit_kwargs["lora_backend"] == "distill"
|
||||
assert engine_args["lora_backend"] == "distill"
|
||||
assert engine_args["lora_path"] == [
|
||||
"/models/high.safetensors",
|
||||
"/models/low.safetensors",
|
||||
]
|
||||
|
||||
|
||||
def test_serve_cli_forwards_distributed_offload_residency():
|
||||
"""Ensure the two-GPU DLO placement controls reach the diffusion stage."""
|
||||
parser = TrackingArgumentParser()
|
||||
|
||||
Reference in new issue
Block a user