mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-28 09:08:54 +00:00
preserve LivePortrait video with audio, if it exists
This commit is contained in:
@@ -57,9 +57,14 @@ def ensure_pipeline_input_present(source_path, input_name=None):
|
|||||||
shutil.copy(left, right)
|
shutil.copy(left, right)
|
||||||
|
|
||||||
|
|
||||||
def ensure_output_present_at(right):
|
def ensure_output_present_at(new_filename):
|
||||||
left = Path(COMFY_ROOT_DIRECTORY) / "output" / "vid2vid" / "LivePortrait_00001.mp4"
|
directory = Path(COMFY_ROOT_DIRECTORY) / "output" / "vid2vid"
|
||||||
shutil.copy(left, right)
|
# Comfy will create a copy of the video that includes audio, but only if the driver video had audio.
|
||||||
|
output = directory / "LivePortrait_00001.mp4"
|
||||||
|
output_with_audio = directory / "LivePortrait_00001-audio.mp4"
|
||||||
|
if os.path.exists(output_with_audio):
|
||||||
|
output = output_with_audio
|
||||||
|
shutil.copy(output, new_filename)
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser(description='Run Comfy')
|
parser = argparse.ArgumentParser(description='Run Comfy')
|
||||||
|
|||||||
Reference in New Issue
Block a user