(self, config)
| 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()) |
nothing calls this directly
no test coverage detected