Skip to content

Commit 8fbd567

Browse files
committed
ltx_transformer_step_test.py modified
1 parent 4cbc19c commit 8fbd567

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/maxdiffusion/tests/ltx_transformer_step_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_one_step_transformer(self):
108108

109109
with open(config_path, "r") as f:
110110
model_config = json.load(f)
111-
relative_ckpt_path = model_config["ckpt_path"]
111+
relative_ckpt_path = model_config.get("ckpt_path")
112112
ignored_keys = [
113113
"_class_name",
114114
"_diffusers_version",
@@ -129,9 +129,11 @@ def test_one_step_transformer(self):
129129
transformer.init_weights, in_channels, key, model_config["caption_channels"], eval_only=True
130130
)
131131

132-
absolute_ckpt_path = os.path.abspath(relative_ckpt_path)
133-
134-
checkpoint_manager = ocp.CheckpointManager(absolute_ckpt_path)
132+
if relative_ckpt_path:
133+
absolute_ckpt_path = os.path.abspath(relative_ckpt_path)
134+
checkpoint_manager = ocp.CheckpointManager(absolute_ckpt_path)
135+
else:
136+
checkpoint_manager = None
135137
transformer_state, transformer_state_shardings = setup_initial_state(
136138
model=transformer,
137139
tx=None,

0 commit comments

Comments
 (0)