Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions dfm/src/automodel/recipes/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,8 @@ def setup(self):
start_epoch=int(self.start_epoch),
num_epochs=int(self.num_epochs),
)
# Optional resume only through config-defined restore_from
if self.restore_from:
self.load_checkpoint(restore_from=self.restore_from)

self.load_checkpoint(self.restore_from)

if is_main_process():
os.makedirs(self.checkpoint_config.checkpoint_dir, exist_ok=True)
Expand Down
2 changes: 1 addition & 1 deletion examples/automodel/finetune/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from dfm.src.automodel.recipes.train import TrainWan21DiffusionRecipe


def main(default_config_path="/opt/DFM/dfm/examples/Automodel/finetune/wan2_1_t2v_flow.yaml"):
def main(default_config_path="examples/automodel/finetune/wan2_1_t2v_flow.yaml"):
cfg = parse_args_and_load_config(default_config_path)
recipe = TrainWan21DiffusionRecipe(cfg)
recipe.setup()
Expand Down
2 changes: 1 addition & 1 deletion examples/automodel/pretrain/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from dfm.src.automodel.recipes.train import TrainWan21DiffusionRecipe


def main(default_config_path="/opt/DFM/dfm/examples/Automodel/pretrain/wan2_1_t2v_flow.yaml"):
def main(default_config_path="examples/automodel/pretrain/wan2_1_t2v_flow.yaml"):
cfg = parse_args_and_load_config(default_config_path)
recipe = TrainWan21DiffusionRecipe(cfg)
recipe.setup()
Expand Down
Loading