[diffusion] fix: fix LoRA weight merging when using layerwise offload (#16737)
Co-authored-by: niehen6174 <niehen.6174@gmail.com> Co-authored-by: DavisTao <dwt614707404@163.com> Co-authored-by: niehen6174 <nihen6174@gmail.com> Co-authored-by: Mick <mickjagger19@icloud.com>
This commit is contained in:
co-authored by
niehen6174
DavisTao
niehen6174
Mick
parent
dae6a4092a
commit
bdb76b34db
@@ -149,7 +149,12 @@ class DiffusionServerArgs:
|
||||
ulysses_degree: int | None = None
|
||||
ring_degree: int | None = None
|
||||
# LoRA
|
||||
lora_path: str | None = None # LoRA adapter path (HF repo or local path)
|
||||
lora_path: str | None = (
|
||||
None # LoRA adapter path (HF repo or local path, loaded at startup)
|
||||
)
|
||||
dynamic_lora_path: str | None = (
|
||||
None # LoRA path for dynamic loading test (loaded via set_lora after startup)
|
||||
)
|
||||
# misc
|
||||
enable_warmup: bool = False
|
||||
|
||||
@@ -406,6 +411,8 @@ ONE_GPU_CASES_B: list[DiffusionTestCase] = [
|
||||
),
|
||||
),
|
||||
# LoRA test case for single transformer + merge/unmerge API test
|
||||
# Note: Uses dynamic_lora_path instead of lora_path to test LayerwiseOffload + set_lora interaction
|
||||
# Server starts WITHOUT LoRA, then set_lora is called after startup (Wan models auto-enable layerwise offload)
|
||||
DiffusionTestCase(
|
||||
"wan2_1_t2v_1_3b_lora_1gpu",
|
||||
DiffusionServerArgs(
|
||||
@@ -414,7 +421,7 @@ ONE_GPU_CASES_B: list[DiffusionTestCase] = [
|
||||
warmup=0,
|
||||
custom_validator="video",
|
||||
num_gpus=1,
|
||||
lora_path="Cseti/Wan-LoRA-Arcane-Jinx-v1",
|
||||
dynamic_lora_path="Cseti/Wan-LoRA-Arcane-Jinx-v1",
|
||||
),
|
||||
DiffusionSamplingParams(
|
||||
prompt="csetiarcane Nfj1nx with blue hair, a woman walking in a cyberpunk city at night",
|
||||
|
||||
Reference in New Issue
Block a user