Skip to content

Open-Sora: Democratizing Efficient Video Production for All

Python

debug

Shen-Chenhui47b51ba07d9b
diff --git a/opensora/models/vae/README.md b/opensora/models/vae/README.md
index 05ecfb4..dfa186e 100644
--- a/opensora/models/vae/README.md
+++ b/opensora/models/vae/README.md
@@ -21,7 +21,7 @@ CUDA_VISIBLE_DEVICES=6 torchrun --standalone --nnodes=1 --nproc_per_node=1 scrip
# debug train and inference on the same few samples
WANDB_API_KEY=7bc1ce71b2dc0b8cd40c500eb256747583f6c07e CUDA_VISIBLE_DEVICES=5 torchrun --master_port=29530 --nnodes=1 --nproc_per_node=1 scripts/train-vae.py configs/vae_3d/train/16x256x256.py --data-path /home/shenchenhui/data/pexels/debug.csv --wandb True
-CUDA_VISIBLE_DEVICES=6 torchrun --standalone --nnodes=1 --nproc_per_node=1 scripts/inference-vae.py configs/vae_3d/inference/16x256x256.py --ckpt-path /home/shenchenhui/Open-Sora-dev/outputs/006-F16S3-VAE_3D_B/epoch49-global_step50 --data-path /home/shenchenhui/data/pexels/debug.csv
+CUDA_VISIBLE_DEVICES=6 torchrun --standalone --nnodes=1 --nproc_per_node=1 scripts/inference-debug.py configs/vae_3d/inference/16x256x256.py --ckpt-path /home/shenchenhui/Open-Sora-dev/outputs/006-F16S3-VAE_3D_B/epoch49-global_step50 --data-path /home/shenchenhui/data/pexels/debug.csv
# resume training debug
WANDB_API_KEY=7bc1ce71b2dc0b8cd40c500eb256747583f6c07e CUDA_VISIBLE_DEVICES=5 torchrun --master_port=29530 --nnodes=1 --nproc_per_node=1 scripts/train-vae.py configs/vae_3d/train/16x256x256.py --data-path /home/shenchenhui/data/pexels/debug.csv --load /home/shenchenhui/Open-Sora-dev/outputs/006-F16S3-VAE_3D_B/epoch49-global_step50 --wandb True
diff --git a/scripts/inference-debug.py b/scripts/inference-debug.py
index e11f7b9..f1910eb 100644
--- a/scripts/inference-debug.py
+++ b/scripts/inference-debug.py
@@ -51,11 +51,10 @@ def main():
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True
device = "cuda" if torch.cuda.is_available() else "cpu"
- device = get_current_device()
+ # device = get_current_device()
dtype = to_torch_dtype(cfg.dtype)
set_random_seed(seed=cfg.seed)
-
# 2.3 DEBUG: USE BOOSTER
# 2.3. initialize ColossalAI booster
if cfg.plugin == "zero2":
@@ -116,7 +115,8 @@ def main():
# ======================================================
# 3.1. build model
# input_size = (cfg.num_frames, *cfg.image_size)
- vae = build_module(cfg.model, MODELS, device=device)
+ # vae = build_module(cfg.model, MODELS, device=device)
+ vae = build_module(cfg.model, MODELS)
# latent_size = vae.get_latent_size(input_size)
# 3.2. move to device & eval