audio to image as frames

This commit is contained in:
harisreedhar
2025-12-18 19:56:31 +05:30
committed by henryruhs
parent c84e6102f6
commit 09d295ea31
6 changed files with 91 additions and 6 deletions
+6 -2
View File
@@ -20,7 +20,7 @@ from facefusion.processors.core import get_processors_modules
from facefusion.program import create_program
from facefusion.program_helper import validate_args
from facefusion.types import Args, ErrorCode, WorkFlow
from facefusion.workflows import audio_to_image, image_to_image, image_to_video, image_to_video_as_frames
from facefusion.workflows import audio_to_image, audio_to_image_as_frames, image_to_image, image_to_video, image_to_video_as_frames
def cli() -> None:
@@ -338,6 +338,8 @@ def conditional_process() -> ErrorCode:
if state_manager.get_item('workflow') == 'audio-to-image:video':
return audio_to_image.process(start_time)
if state_manager.get_item('workflow') == 'audio-to-image:frames':
return audio_to_image_as_frames.process(start_time)
if state_manager.get_item('workflow') == 'image-to-image':
return image_to_image.process(start_time)
if state_manager.get_item('workflow') == 'image-to-video':
@@ -355,6 +357,8 @@ def detect_workflow() -> WorkFlow:
return 'image-to-video:frames'
if has_audio(state_manager.get_item('source_paths')) and has_image([ state_manager.get_item('target_path') ]):
return 'audio-to-image:video'
if get_file_extension(state_manager.get_item('output_path')):
return 'audio-to-image:video'
return 'audio-to-image:frames'
return 'image-to-image'