Open-Sora: Democratizing Efficient Video Production for All
Python
debug
Shen-Chenhuia04a7d7fbef1
diff --git a/scripts/inference-vae-v2.py b/scripts/inference-vae-v2.pyindex c8475a8..3ffc3e4 100644--- a/scripts/inference-vae-v2.py+++ b/scripts/inference-vae-v2.py@@ -10,7 +10,6 @@ from opensora.acceleration.parallel_states import set_sequence_parallel_groupfrom opensora.datasets import save_samplefrom opensora.registry import MODELS, SCHEDULERS, build_modulefrom opensora.utils.config_utils import parse_configs-from opensora.utils.ckpt_utils import load_jsonfrom opensora.utils.misc import to_torch_dtypefrom opensora.datasets import prepare_dataloader, prepare_variable_dataloaderfrom opensora.registry import DATASETS, MODELS, build_module@@ -132,17 +131,10 @@ def main():)# LeCam EMA for discriminator- lecam_path = os.path.join(cfg.load, "lecam_states.json")- if cfg.lecam_loss_weight is not None and os.path.exists(lecam_path):- lecam_state = load_json(lecam_path)- lecam_ema_real, lecam_ema_fake = lecam_state["lecam_ema_real"], lecam_state["lecam_ema_fake"]- lecam_ema = LeCamEMA(- decay=cfg.ema_decay, ema_real=lecam_ema_real, ema_fake=lecam_ema_fake, dtype=dtype, device=device- )- else:- lecam_ema = LeCamEMA(++ lecam_ema = LeCamEMA(decay=cfg.ema_decay, dtype=dtype, device=device- )+ )