From 5d63a339dbec8d476657a1f672a4eeb6dc79ed37 Mon Sep 17 00:00:00 2001 From: rewbs Date: Wed, 15 May 2024 10:07:19 +1000 Subject: [PATCH] Bump version number and minor fix for audio --- scripts/deforum_helpers/ui_right.py | 2 +- scripts/deforum_helpers/video_audio_utilities.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/deforum_helpers/ui_right.py b/scripts/deforum_helpers/ui_right.py index 535997e7e..515528a88 100644 --- a/scripts/deforum_helpers/ui_right.py +++ b/scripts/deforum_helpers/ui_right.py @@ -29,7 +29,7 @@ def on_ui_tabs(): # extend paths using sys.path.extend so we can access all of our files and folders deforum_sys_extend() # set text above generate button - i1_store_backup = f"

Deforum extension for auto1111 — version 3.0 | Git commit: {get_deforum_version()}

" + i1_store_backup = f"

Deforum extension version 3.1, for auto1111 v1.9 | Git commit: {get_deforum_version()}

" i1_store = i1_store_backup with gr.Blocks(analytics_enabled=False) as deforum_interface: diff --git a/scripts/deforum_helpers/video_audio_utilities.py b/scripts/deforum_helpers/video_audio_utilities.py index f17068a53..3935d518f 100644 --- a/scripts/deforum_helpers/video_audio_utilities.py +++ b/scripts/deforum_helpers/video_audio_utilities.py @@ -239,6 +239,7 @@ def ffmpeg_stitch_video(ffmpeg_location=None, fps=None, outmp4_path=None, stitch add_soundtrack_status = None add_soundtrack_success = None + temp_file = None if add_soundtrack != 'None': try: audio_path = clean_gradio_path_strings(audio_path) @@ -280,8 +281,9 @@ def ffmpeg_stitch_video(ffmpeg_location=None, fps=None, outmp4_path=None, stitch add_soundtrack_status = f"\rError adding audio to video: {e}" add_soundtrack_success = False finally: - file_path = Path(temp_file.name) - file_path.unlink(missing_ok=True) + if temp_file: + file_path = Path(temp_file.name) + file_path.unlink(missing_ok=True) add_srt = opts.data.get("deforum_save_gen_info_as_srt", False) and opts.data.get("deforum_embed_srt", False) and srt_path is not None add_srt_status = None