MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / run

Method run

diffsynth/pipelines/pipeline_runner.py:82–105  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

80
81
82 def run(self, config):
83 if self.in_streamlit:
84 import streamlit as st
85 if self.in_streamlit: st.markdown("Loading videos ...")
86 config["pipeline"]["pipeline_inputs"] = self.add_data_to_pipeline_inputs(config["data"], config["pipeline"]["pipeline_inputs"])
87 if self.in_streamlit: st.markdown("Loading videos ... done!")
88 if self.in_streamlit: st.markdown("Loading models ...")
89 model_manager, pipe = self.load_pipeline(**config["models"])
90 if self.in_streamlit: st.markdown("Loading models ... done!")
91 if "smoother_configs" in config:
92 if self.in_streamlit: st.markdown("Loading smoother ...")
93 smoother = self.load_smoother(model_manager, config["smoother_configs"])
94 if self.in_streamlit: st.markdown("Loading smoother ... done!")
95 else:
96 smoother = None
97 if self.in_streamlit: st.markdown("Synthesizing videos ...")
98 output_video = self.synthesize_video(model_manager, pipe, config["pipeline"]["seed"], smoother, **config["pipeline"]["pipeline_inputs"])
99 if self.in_streamlit: st.markdown("Synthesizing videos ... done!")
100 if self.in_streamlit: st.markdown("Saving videos ...")
101 self.save_output(output_video, config["data"]["output_folder"], config["data"]["fps"], config)
102 if self.in_streamlit: st.markdown("Saving videos ... done!")
103 if self.in_streamlit: st.markdown("Finished!")
104 video_file = open(os.path.join(os.path.join(config["data"]["output_folder"], "video.mp4")), 'rb')
105 if self.in_streamlit: st.video(video_file.read())

Callers

nothing calls this directly

Calls 5

load_pipelineMethod · 0.95
load_smootherMethod · 0.95
synthesize_videoMethod · 0.95
save_outputMethod · 0.95

Tested by

no test coverage detected