Skip to content

Commit 6f8073c

Browse files
torch.compile with dynamic=False (#185)
* torch.compile with dynamic=False * fix compile repeated blocks --------- Co-authored-by: Glaceon-Hyy <[email protected]>
1 parent f925211 commit 6f8073c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

diffsynth_engine/pipelines/flux_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def update_weights(self, state_dicts: FluxStateDicts) -> None:
573573
self.update_component(self.vae_encoder, state_dicts.vae, self.config.device, self.config.vae_dtype)
574574

575575
def compile(self):
576-
self.dit.compile_repeated_blocks(dynamic=True)
576+
self.dit.compile_repeated_blocks()
577577

578578
def load_loras(self, lora_list: List[Tuple[str, float]], fused: bool = True, save_original_weight: bool = False):
579579
assert self.config.tp_degree is None or self.config.tp_degree == 1, (

diffsynth_engine/pipelines/qwen_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def update_weights(self, state_dicts: QwenImageStateDicts) -> None:
307307
self.update_component(self.vae, state_dicts.vae, self.config.device, self.config.vae_dtype)
308308

309309
def compile(self):
310-
self.dit.compile_repeated_blocks(dynamic=True)
310+
self.dit.compile_repeated_blocks()
311311

312312
def load_loras(self, lora_list: List[Tuple[str, float]], fused: bool = True, save_original_weight: bool = False):
313313
assert self.config.tp_degree is None or self.config.tp_degree == 1, (

diffsynth_engine/pipelines/wan_video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,6 @@ def _get_vae_type(vae_state_dict: Dict[str, torch.Tensor]) -> str:
645645
return vae_type
646646

647647
def compile(self):
648-
self.dit.compile_repeated_blocks(dynamic=True)
648+
self.dit.compile_repeated_blocks()
649649
if self.dit2 is not None:
650-
self.dit2.compile_repeated_blocks(dynamic=True)
650+
self.dit2.compile_repeated_blocks()

0 commit comments

Comments
 (0)