Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

debug

Shen-Chenhuia401630e7a21
diff --git a/configs/vae_3d/inference/16x256x256.py b/configs/vae_3d/inference/16x256x256.py
index dd404de..87d6ac5 100644
--- a/configs/vae_3d/inference/16x256x256.py
+++ b/configs/vae_3d/inference/16x256x256.py
@@ -46,4 +46,3 @@ save_dir = "outputs/samples"
batch_size = 8
grad_clip = 1.0
-
diff --git a/scripts/inference-debug.py b/scripts/inference-debug.py
index 06127a0..a7b3b86 100644
--- a/scripts/inference-debug.py
+++ b/scripts/inference-debug.py
@@ -145,8 +145,18 @@ def main():
model=vae, dataloader=dataloader
)
torch.set_default_dtype(torch.float)
+
+
# load model using booster
booster.load_model(vae, os.path.join(cfg.model["from_pretrained"], "model"))
+ # booster.load_optimizer(optimizer, os.path.join(cfg.load, "optimizer"))
+ # if lr_scheduler is not None:
+ # booster.load_lr_scheduler(lr_scheduler, os.path.join(cfg.load, "lr_scheduler"))
+ # running_states = load_json(os.path.join(cfg.load, "running_states.json"))
+ dist.barrier()
+ # start_epoch, start_step, sampler_start_idx = running_states["epoch"], running_states["step"], running_states["sample_start_index"]
+# logger.info(f"Loaded checkpoint {cfg.load} at epoch {start_epoch} step {start_step}")
+ # logger.info(f"Training for {cfg.epochs} epochs with {num_steps_per_epoch} steps per epoch")
# 4.1. batch generation