Unverified Commit f9188ee4 authored by PengGao's avatar PengGao Committed by GitHub
Browse files

fix: return value in DefaultRunner and enhance config loading in set_… (#363)

…config
parent 835ca96b
...@@ -279,7 +279,7 @@ class DefaultRunner(BaseRunner): ...@@ -279,7 +279,7 @@ class DefaultRunner(BaseRunner):
self.end_run_segment(segment_idx) self.end_run_segment(segment_idx)
gen_video_final = self.process_images_after_vae_decoder() gen_video_final = self.process_images_after_vae_decoder()
self.end_run() self.end_run()
return {"video": gen_video_final} return gen_video_final
@ProfilingContext4DebugL1("Run VAE Decoder", recorder_mode=GET_RECORDER_MODE(), metrics_func=monitor_cli.lightx2v_run_vae_decode_duration, metrics_labels=["DefaultRunner"]) @ProfilingContext4DebugL1("Run VAE Decoder", recorder_mode=GET_RECORDER_MODE(), metrics_func=monitor_cli.lightx2v_run_vae_decode_duration, metrics_labels=["DefaultRunner"])
def run_vae_decoder(self, latents): def run_vae_decoder(self, latents):
......
...@@ -37,9 +37,11 @@ def set_config(args): ...@@ -37,9 +37,11 @@ def set_config(args):
config = get_default_config() config = get_default_config()
config.update({k: v for k, v in vars(args).items() if k not in ALL_INPUT_INFO_KEYS}) config.update({k: v for k, v in vars(args).items() if k not in ALL_INPUT_INFO_KEYS})
with open(config["config_json"], "r") as f: if config.get("config_json", None) is not None:
config_json = json.load(f) logger.info(f"Loading some config from {config['config_json']}")
config.update(config_json) with open(config["config_json"], "r") as f:
config_json = json.load(f)
config.update(config_json)
if os.path.exists(os.path.join(config["model_path"], "config.json")): if os.path.exists(os.path.join(config["model_path"], "config.json")):
with open(os.path.join(config["model_path"], "config.json"), "r") as f: with open(os.path.join(config["model_path"], "config.json"), "r") as f:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment