Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

debug

Shen-Chenhui89a58b8e15bf
diff --git a/opensora/models/vae/vae_3d_v2.py b/opensora/models/vae/vae_3d_v2.py
index 7d7a26f..225b072 100644
--- a/opensora/models/vae/vae_3d_v2.py
+++ b/opensora/models/vae/vae_3d_v2.py
@@ -1220,7 +1220,7 @@ def DISCRIMINATOR_3D(from_pretrained=None, inflate_from_2d=False, use_pretrained
load_checkpoint_with_inflation(model, from_pretrained)
else:
load_checkpoint(model, from_pretrained, model_name="discriminator")
- print(f"loading from:{use_pretrained}")
+ print(f"loaded discriminator")
else:
print(f"discriminator use_pretrained={use_pretrained}, initializing new discriminator")
diff --git a/opensora/utils/ckpt_utils.py b/opensora/utils/ckpt_utils.py
index f910009..b28debb 100644
--- a/opensora/utils/ckpt_utils.py
+++ b/opensora/utils/ckpt_utils.py
@@ -212,7 +212,7 @@ def load_checkpoint(model, ckpt_path, save_as_pt=True, model_name="model"):
elif os.path.isdir(ckpt_path):
load_from_sharded_state_dict(model, ckpt_path, model_name)
if save_as_pt:
- save_path = os.path.join(ckpt_path, "model_ckpt.pt")
+ save_path = os.path.join(ckpt_path, model_name+"_ckpt.pt")
torch.save(model.state_dict(), save_path)
print(f"Model checkpoint saved to {save_path}")
else: