### Example CUDA Installation Output Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md This is an example of the expected output when verifying a successful CUDA installation using `nvcc --version`. It confirms the compiler version and build details. ```text nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 ``` -------------------------------- ### Configure execution and memory settings Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Full configuration example for video processing pipelines with specific hardware and memory constraints. ```bash python run.py \ --frame-processors lip_syncer face_enhancer \ -s /path/to/audio.wav \ -t /path/to/video.mp4 \ -o /path/to/output.mp4 \ --execution-providers cuda \ --execution-thread-count 8 \ --execution-queue-count 2 \ --video-memory-strategy tolerant \ --system-memory-limit 0 \ --face-analyser-order left-right \ --face-detector-model yoloface \ --face-detector-size 640x640 \ --face-detector-score 0.5 \ --face-selector-mode reference \ --reference-face-position 0 \ --reference-face-distance 0.6 \ --face-mask-types box \ --face-mask-blur 0.3 \ --face-mask-padding 0 0 0 0 \ --output-video-encoder libx264 \ --output-video-preset veryfast \ --output-video-quality 80 \ --temp-frame-format png \ --headless ``` -------------------------------- ### Clone and Install DeepFuze Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Steps to navigate to the custom nodes directory, clone the repository, and install requirements. ```bash cd custom_nodes git clone https://github.com/SamKhoze/CompfyUI-DeepFuze.git ``` ```bash cd CompfyUI-DeepFuze pip install -r requirements.txt ``` -------------------------------- ### Install Required Dependencies Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Commands to install necessary packages for voice cloning, dlib, and ONNX runtime. ```bash pip install onnxruntime ``` ```bash pip install dlib ``` ```bash pip install TTS ``` -------------------------------- ### Train Vocoder Model Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/TTS/vocoder/README.md Use this command to start training a new vocoder model. Ensure your data is in a specified folder and configuration is set in config.json. ```bash CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --config_path path/to/config.json ``` -------------------------------- ### Verify CUDA Installation Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md After installing CUDA Toolkit and cuDNN, run this command in your terminal to confirm the installation and check the CUDA version. This is crucial for enabling GPU acceleration. ```bash nvcc --version ``` -------------------------------- ### Install DeepFuze via Git URL in ComfyUI Manager Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Use this command in the ComfyUI Manager to install the DeepFuze node. Ensure ComfyUI is restarted after installation. ```bash https://github.com/SamKhoze/ComfyUI-DeepFuze.git ``` -------------------------------- ### Fine-tune Pre-trained Vocoder Model Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/TTS/vocoder/README.md Start a new training run using weights from a pre-trained model checkpoint. This restores only the model weights and begins training in a new directory. ```bash CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --restore_path path/to/your/model.pth ``` -------------------------------- ### Configure Save Audio Node for ComfyUI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Configure the Save Audio node in ComfyUI to save and trim audio data. Specify start and end times for trimming. The output includes playback controls. ```python # ComfyUI Node Configuration for Save Audio { "audio": ("AUDIO",), # Audio data to save "start_time": "0", # Trim start (0-9999) "end_time": "0", # Trim end (0-9999) } # Output: AUDIO with playback UI controls # Provides: playback, save, and playback speed options ``` -------------------------------- ### Clone VideoHelperSuite Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Prerequisite repository for video and audio loading functionality. ```bash cd custom_nodes git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git ``` -------------------------------- ### Initialize and Use DeepFuze Programmatically Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Initialize the DeepFuze instance, load video and audio files, optionally load a checkpoint, set parameters, and generate a lipsynced video. Ensure the paths to your video, audio, and checkpoint are correct. ```python from deepfuze import DeepFuze # Initialize the DeepFuze instance deepfuze = DeepFuze() # Load video and audio files deepfuze.load_video('path/to/video.mp4') deepfuze.load_audio('path/to/audio.mp3') deepfuze.load_checkpoint('path/to/checkpoint_path') # Set parameters (optional) deepfuze.set_parameters(sync_level=5, transform_intensity=3) # Generate lipsynced video output_path = deepfuze.generate(output='path/to/output.mp4') print(f"Lipsynced video saved at {output_path}") ``` -------------------------------- ### Basic Lip Syncing via CLI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Generate a lipsynced video from audio and a target video using the CLI. This basic command specifies the lip syncer processor, audio input, target video, and output path. Use --headless for non-interactive execution. ```bash # Basic lip sync python run.py \ --frame-processors lip_syncer \ -s /path/to/audio.wav \ -t /path/to/video.mp4 \ -o /path/to/output.mp4 \ --headless ``` -------------------------------- ### Basic Face Swapping via CLI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Perform a basic face swap using the CLI. Specify source face image, target video, output path, and the models for face swapping and detection. Use --headless for non-interactive mode. ```bash # Basic face swap python run.py \ --frame-processors face_swapper \ -s /path/to/source_face.jpg \ -t /path/to/target_video.mp4 \ -o /path/to/output.mp4 \ --face-swapper-model inswapper_128 \ --face-detector-model retinaface \ --headless ``` -------------------------------- ### Initialize and Use DeepFuze Python API Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Programmatically generate lipsynced videos using the DeepFuze Python class. Load video, audio, and model checkpoints, set synchronization and transformation levels, and specify the output path and device. ```python from deepfuze import DeepFuze # Initialize the DeepFuze instance deepfuze = DeepFuze() # Load video file (supported: mp4, avi, webm) deepfuze.load_video('path/to/video.mp4') # Load audio file (supported: wav, mp3) deepfuze.load_audio('path/to/audio.mp3') # Load model checkpoint directory deepfuze.load_checkpoint('path/to/checkpoint_path') # Set optional parameters deepfuze.sync_level = 5 # Synchronization level deepfuze.transform_intensity = 3 # Transform intensity # Generate lipsynced video # device options: 'cpu', 'cuda', 'mps' output_path = deepfuze.generate( output_path='path/to/output.mp4', device='cuda' ) print(f"Lipsynced video saved at {output_path}") ``` -------------------------------- ### Process audio with utility functions Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Extract, lazily load, and validate audio files for pipeline usage. ```python from utils import get_audio, ffmpeg_path # Extract audio from video file with optional trimming audio_data = get_audio( file='/path/to/video.mp4', start_time=0, # Start time in seconds duration=30 # Duration in seconds (0 = full audio) ) # audio_data structure: # { # 'waveform': torch.Tensor, # Shape: (1, channels, samples) # 'sample_rate': int # e.g., 44100 # } # Lazy audio loading for memory efficiency from utils import lazy_eval lazy_audio = lazy_eval('/path/to/video.mp4', start_time=0, duration=0) # Audio is only loaded when accessed waveform = lazy_audio['waveform'] sample_rate = lazy_audio['sample_rate'] # File validation from utils import validate_path, is_url is_valid = validate_path('/path/to/file.mp4', allow_none=False, allow_url=True) is_remote = is_url('https://example.com/video.mp4') # True # Calculate file hash for caching from utils import calculate_file_hash file_hash = calculate_file_hash('/path/to/video.mp4') ``` -------------------------------- ### Continue Vocoder Training Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/TTS/vocoder/README.md Resume a previous training session by specifying the path to your model folder. ```bash CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --continue_path path/to/your/model/folder ``` -------------------------------- ### Generate face debug preview Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Run the face debugger processor on an image to visualize face detection. ```bash python run.py \ --frame-processors face_debugger \ -t /path/to/image.jpg \ -o /path/to/debug_output.jpg \ --face-mask-types box \ --face-mask-padding 5 5 5 5 \ --headless ``` -------------------------------- ### Face Swap with Enhancement via CLI (CUDA) Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Execute a face swap with enhancement using the CLI, leveraging CUDA for acceleration. This command includes face enhancement, specifies models for swapping, enhancement, and detection, and sets face mask padding. ```bash # Face swap with enhancement (CUDA) python run.py \ --frame-processors face_swapper face_enhancer \ -s /path/to/source_face.jpg \ -t /path/to/target_video.mp4 \ -o /path/to/output.mp4 \ --face-swapper-model inswapper_128 \ --face-enhancer-model gfpgan_1.4 \ --face-detector-model yoloface \ --face-mask-padding 5 5 5 5 \ --reference-face-position 0 \ --execution-providers cuda \ --headless ``` -------------------------------- ### Lip Sync with Enhancement and Trimming via CLI (CUDA) Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Perform lip syncing with face enhancement and frame trimming using the CLI and CUDA. This command specifies models for lip syncing and enhancement, along with trimming parameters and output video quality. ```bash # Lip sync with face enhancement and frame trimming python run.py \ --frame-processors lip_syncer face_enhancer \ -s /path/to/audio.wav \ -t /path/to/video.mp4 \ -o /path/to/output.mp4 \ --face-enhancer-model codeformer \ --trim-frame-start 30 \ --trim-frame-end 500 \ --face-mask-padding 2 2 2 2 \ --execution-providers cuda \ --output-video-quality 90 \ --headless ``` -------------------------------- ### DeepFuze Lipsync Node Configuration Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Configure the Lipsync node for generating lipsyncing video from input video, image, and audio. Supports face and frame enhancement, customizable padding, and up to 4K output. Ensure audio is loaded via VHS load audio node. ```python # ComfyUI Node Configuration for Lipsync # Required inputs for DeepFuzeAdavance (Lipsync) node: { "images": ("IMAGE",), # Video frames as PyTorch tensors "audio": ("AUDIO",), # Audio loaded via VHS load audio node "enhancer": "codeformer", # Options: None, codeformer, gfpgan_1.2, gfpgan_1.3, gfpgan_1.4, gpen_bfr_256, gpen_bfr_512, gpen_bfr_1024, gpen_bfr_2048, restoreformer_plus_plus "frame_enhancer": "real_esrgan_x4", # Options: None, clear_reality_x4, lsdir_x4, nomos8k_sc_x4, real_esrgan_x2, real_esrgan_x4, etc. "face_mask_padding_left": 0, # 0-30 "face_mask_padding_right": 0, # 0-30 "face_mask_padding_bottom": 0, # 0-30 "face_mask_padding_top": 0, # 0-30 "trim_frame_start": 0, # Start frame trimming "trim_frame_end": 0, # End frame trimming "device": "cuda", # Options: cpu, cuda, mps "frame_rate": 25.0, # Output frame rate } # Output Types: # - IMAGE: Processed frame images as PyTorch tensors # - frame_count: Total frame count (int) # - audio: Output audio data # - video_info: Video metadata dictionary ``` -------------------------------- ### Configure Padding Preview Node for ComfyUI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Use the Padding Preview node in ComfyUI to visualize face mask padding settings. Input an image and adjust padding values for left, right, bottom, and top to see the boundary visualization. ```python # ComfyUI Node Configuration for Padding Preview { "images": ("IMAGE",), # Input image for preview "face_mask_padding_left": 5, # 0-30 "face_mask_padding_right": 5, # 0-30 "face_mask_padding_bottom": 5, # 0-30 "face_mask_padding_top": 5, # 0-30 } # Output: Preview image with face mask boundary visualization ``` -------------------------------- ### Configure OpenAI API Key Environment Variable Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Commands to set the OpenAI API key as an environment variable for voice cloning nodes. ```bash setx OPENAI_API_KEY "your-api-key-here" ``` ```bash export OPENAI_API_KEY='your-api-key-here' ``` ```bash echo $OPENAI_API_KEY ``` -------------------------------- ### Resolve Import and Package Errors Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Commands to fix common dependency version conflicts or missing packages. ```bash conda install chardet ``` ```bash pip install --upgrade transformers==4.39.2 ``` -------------------------------- ### Configure OpenAI LLM Node for ComfyUI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Set up the LLM Integration node in ComfyUI to use OpenAI models for text generation. Ensure your API key is valid and adjust parameters like model name, max tokens, and temperature for desired output. ```python # ComfyUI Node Configuration for OpenAI LLM { "system_prompt": "You are a helpful assistant that writes engaging dialogue.", "user_query": "Write a 30-second monologue about the future of AI.", "model_name": "gpt-4o", # Options: gpt-3.5-turbo, gpt-4o, gpt-4-turbo, gpt-4 "api_key": "sk-your-api-key", # OpenAI API key (not saved) "max_tokens": 250, # 10-2000 "temperature": 0.7, # 0-1 (0=deterministic, 1=creative) "timeout": 10, # 1-200 seconds } # Output: LLM_RESPONSE (NEW_STRING) - Generated text for voice cloning ``` -------------------------------- ### Standalone Face Enhancement via CLI (CUDA) Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Enhance face quality in a video using the CLI with a specified restoration model and CUDA. This command focuses solely on face enhancement without other processors. ```bash # Standalone face enhancement python run.py \ --frame-processors face_enhancer \ -t /path/to/input_video.mp4 \ -o /path/to/enhanced_video.mp4 \ --face-enhancer-model restoreformer_plus_plus \ --execution-providers cuda \ --headless ``` -------------------------------- ### Load video frames for ComfyUI Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Load video files with custom frame rate, size, and batching options. ```python from nodes import load_video_cv # Load video with comprehensive options images, frame_count, audio, video_info = load_video_cv( video='/path/to/video.mp4', force_rate=0, # 0 = use original frame rate force_size='Disabled', # Options: Disabled, Custom, Custom Width, Custom Height, 256x256, 512x512, etc. custom_width=512, # Used if force_size is Custom or Custom Width custom_height=512, # Used if force_size is Custom or Custom Height frame_load_cap=0, # 0 = load all frames skip_first_frames=0, # Skip N frames from start select_every_nth=1, # Select every Nth frame meta_batch=None, # Optional batch manager unique_id=None, # Optional unique identifier memory_limit_mb=None # Optional memory limit ) # video_info dictionary contents: # { # 'source_fps': float, # 'source_frame_count': int, # 'source_duration': float, # 'source_width': int, # 'source_height': int, # 'loaded_fps': float, # 'loaded_frame_count': int, # 'loaded_duration': float, ``` -------------------------------- ### DeepFuze TTS Node Configuration (Voice Cloning) Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Configure the TTS node for voice cloning and text-to-speech synthesis. Use a clean reference audio sample (10-15 seconds) and provide the text to synthesize. Supports 17 languages. ```python # ComfyUI Node Configuration for TTS Voice Cloning { "audio": ("AUDIO",), # Reference audio (10-15 seconds, clean, minimal noise) "text": "Hello, this is a cloned voice speaking.", # Text to synthesize "llm_response": "", # Optional: Use LLM-generated text "device": "cuda", # Options: cpu, cuda, mps "supported_language": "English (en)", # 17 supported languages } # Output: AUDIO - Synthesized speech with cloned voice characteristics # Language codes: # English (en), Spanish (es), French (fr), German (de), Italian (it), # Portuguese (pt), Polish (pl), Turkish (tr), Russian (ru), Dutch (nl), # Czech (cs), Arabic (ar), Chinese (zh-cn), Japanese (ja), Hungarian (hu), # Korean (ko), Hindi (hi) ``` -------------------------------- ### Perform standalone voice cloning Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Synthesize speech using a reference audio file for voice cloning. ```bash # Basic voice cloning python tts_generation.py \ --text "Hello, this is my cloned voice speaking." \ --speaker_wav /path/to/reference_voice.wav \ --output_file /path/to/output.wav \ --language en \ --device cuda # Voice cloning with custom model path python tts_generation.py \ --model /path/to/models/deepfuze \ --text "Bonjour, ceci est ma voix clonée." \ --speaker_wav /path/to/french_voice.wav \ --output_file /path/to/french_output.wav \ --language fr \ --device cpu ``` -------------------------------- ### Enable MPS Fallback for macOS Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Required for Mac users to enable Metal Performance Shaders for high-performance GPU tasks. ```bash export PYTORCH_ENABLE_MPS_FALLBACK=1 ``` -------------------------------- ### Train Speaker Encoder Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/TTS/encoder/README.md Initiates the training process for the speaker encoder using a specified configuration and dataset path. ```python speaker_encoder/train.py --config_path speaker_encoder/config.json --data_path ~/Data/Libri-TTS/train-clean-360 ``` -------------------------------- ### DeepFuze Save Audio (Playback) Node Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Handles the saving, trimming, and playback of audio data generated by the voice cloning node. ```APIDOC ## DeepFuze Save Audio (Playback) Node ### Description Saves the output of the voice cloning node, allows for audio trimming, and provides playback functionality. ### Parameters #### Request Body - **audio** (audio) - Required - The loaded audio data instance. - **METADATA** (string) - Optional - Metadata associated with the audio. - **start_time** (float) - Optional - Trim start time. - **end_time** (float) - Optional - Trim end time. - **playback window** (object) - Optional - Options for playback, saving, and speed. ``` -------------------------------- ### Frame Enhancement (Upscaling) via CLI (CUDA) Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Upscale entire frames in a video using the CLI with a specified enhancement model and CUDA. This command utilizes the frame_enhancer processor for general video upscaling. ```bash # Frame enhancement (whole frame upscaling) python run.py \ --frame-processors frame_enhancer \ -t /path/to/input_video.mp4 \ -o /path/to/enhanced_video.mp4 \ --frame-enhancer-model real_esrgan_x4 \ --execution-providers cuda \ --headless ``` -------------------------------- ### Generate Embedding Vectors Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/TTS/encoder/README.md Parses .wav files in a dataset to generate embedding files, maintaining the original folder structure in the output directory. ```python speaker_encoder/compute_embeddings.py --use_cuda true /model/path/best_model.pth model/config/path/config.json dataset/path/ output_path ``` -------------------------------- ### Repository Structure Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md This plaintext shows the directory structure of the ComfyUI-DeepFuze repository, outlining the organization of source files, modules, tests, and other project assets. ```plaintext ComfyUI-DeepFuze/ ├── __init__.py ├── __pycache__/ │ ├── __init__.cpython-311.pyc │ ├── audio_playback.cpython-311.pyc │ ├── llm_node.cpython-311.pyc │ ├── nodes.cpython-311.pyc │ └── utils.cpython-311.pyc ├── audio_playback.py ├── deepfuze/ │ ├── __init__.py │ ├── audio.py │ ├── choices.py │ ├── common_helper.py │ ├── config.py │ ├── content_analyser.py │ ├── core.py │ ├── download.py │ ├── execution.py │ ├── face_analyser.py │ ├── face_helper.py │ ├── face_masker.py │ ├── face_store.py │ ├── ffmpeg.py │ ├── filesystem.py │ ├── globals.py │ ├── installer.py │ ├── logger.py │ ├── memory.py │ ├── metadata.py │ ├── normalizer.py │ ├── process_manager.py ├── requirements.txt ├── images/ ├── install.py ├── LICENSE.txt ├── llm_node.py ├── mypy.ini ├── nodes.py ├── README.md ├── requirements.txt ├── run.py ├── tests/ │ ├── __init__.py │ ├── test_audio.py │ ├── test_cli_face_debugger.py │ ├── test_cli_face_enhancer.py │ ├── test_cli_face_swapper.py │ ├── test_cli_frame_colorizer.py │ ├── test_cli_frame_enhancer.py │ ├── test_cli_lip_syncer.py │ ├── test_common_helper.py │ ├── test_config.py │ ├── test_download.py │ ├── test_execution.py │ ├── test_face_analyser.py │ ├── test_ffmpeg.py │ ├── test_filesystem.py │ ├── test_memory.py │ ├── test_normalizer.py │ ├── test_process_manager.py │ ├── test_vision.py │ └── test_wording.py ├── tts_generation.py └── utils.py ``` -------------------------------- ### DeepFuze Openai LLM Node Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md The LLM Integration node allows users to interface with OpenAI models to generate text for voice cloning or general conversational tasks. ```APIDOC ## DeepFuze Openai LLM Node ### Description Integrates OpenAI LLMs into the voice cloning process or for general text generation tasks. Outputs can be connected to display nodes. ### Parameters #### Request Body - **user_query** (string) - Required - The dialogue or prompt input. - **model_name** (string) - Required - The specific OpenAI model to use. - **api_key** (string) - Required - OpenAI API key (not saved, must be entered manually). - **max_tokens** (integer) - Optional - Limits the number of tokens in the response (default: 4096). - **temperature** (float) - Optional - Controls randomness (0 to 1, default: 0.7). - **timeout** (integer) - Optional - Request timeout duration. ### Response - **LLM_RESPONSE** (string) - The AI-generated text output. ``` -------------------------------- ### DeepFuze FaceSwap Node Configuration Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Configure the FaceSwap node for swapping, enhancing, and restoring faces. Supports multiple face detection and swapping models. Adjust padding and select face detector for optimal results. ```python # ComfyUI Node Configuration for FaceSwap { "source_images": ("IMAGE",), # Face to swap FROM (PyTorch tensors) "target_images": ("IMAGE",), # Face to swap TO (PyTorch tensors) "enhancer": "gfpgan_1.4", # Face restoration model "faceswap_model": "inswapper_128", # Options: blendswap_256, inswapper_128, inswapper_128_fp16, simswap_256, simswap_512_unofficial, uniface_256 "frame_enhancer": "real_esrgan_x4", "face_detector_model": "retinaface", # Options: retinaface, scrfd, yoloface, yunet "reference_face_index": 0, # Which face to swap (0-5) "face_mask_padding_left": 0, "face_mask_padding_right": 0, "face_mask_padding_bottom": 0, "face_mask_padding_top": 0, "device": "cuda", # Options: cpu, cuda, mps "frame_rate": 25.0, } # Face Detector Model Comparison: # | Model | Speed | Accuracy | Robustness | Best For | # |------------|------------|------------|------------|-----------------------------| # | YOLOFace | Very Fast | Good | Moderate | Real-time, simple scenes | # | RetinaFace | Moderate | Very High | Very High | High-precision, robust | # | SCRFD | Fast | High | High | Mobile/edge devices | # | YuNet | Very Fast | Good | Moderate | Mobile, embedded, real-time | ``` -------------------------------- ### DeepFuze Lipsync Node Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt The Lipsync node synchronizes facial movements with audio input for video frames. ```APIDOC ## Lipsync Node Configuration ### Description Generates lipsyncing video from video, image, and audio files by synchronizing facial movements with audio input. ### Parameters - **images** (IMAGE) - Required - Video frames as PyTorch tensors - **audio** (AUDIO) - Required - Audio loaded via VHS load audio node - **enhancer** (string) - Optional - Options: None, codeformer, gfpgan_1.2, gfpgan_1.3, gfpgan_1.4, gpen_bfr_256, gpen_bfr_512, gpen_bfr_1024, gpen_bfr_2048, restoreformer_plus_plus - **frame_enhancer** (string) - Optional - Options: None, clear_reality_x4, lsdir_x4, nomos8k_sc_x4, real_esrgan_x2, real_esrgan_x4 - **face_mask_padding_left/right/bottom/top** (int) - Optional - 0-30 - **device** (string) - Optional - Options: cpu, cuda, mps ### Response - **IMAGE** (IMAGE) - Processed frame images as PyTorch tensors - **frame_count** (int) - Total frame count - **audio** (AUDIO) - Output audio data ``` -------------------------------- ### DeepFuze Padding Node Source: https://github.com/samkhoze/comfyui-deepfuze/blob/main/README.md Provides controls for adjusting the padding of face masks used during the lipsyncing process. ```APIDOC ## DeepFuze Padding Node ### Description Adjusts the padding around the face mask to ensure proper alignment during lipsyncing operations. ### Parameters #### Request Body - **image** (image) - Required - Input image for previewing padding. - **face_mask_padding_left** (float) - Optional - Padding on the left side. - **face_mask_padding_right** (float) - Optional - Padding on the right side. - **face_mask_padding_bottom** (float) - Optional - Padding on the bottom. - **face_mask_padding_top** (float) - Optional - Padding on the top. ``` -------------------------------- ### DeepFuze TTS Node Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt The TTS node clones voices from reference audio and generates speech from text. ```APIDOC ## TTS Voice Cloning Node Configuration ### Description Clones any voice from a reference audio sample and generates speech from text input. ### Parameters - **audio** (AUDIO) - Required - Reference audio (10-15 seconds) - **text** (string) - Required - Text to synthesize - **supported_language** (string) - Required - 17 supported languages (e.g., English (en), Spanish (es), etc.) - **device** (string) - Optional - Options: cpu, cuda, mps ### Response - **AUDIO** (AUDIO) - Synthesized speech with cloned voice characteristics ``` -------------------------------- ### Define Loaded Dimensions Structure Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt Represents the expected structure for loaded image dimensions in the DeepFuze processing pipeline. ```python # 'loaded_width': int, # 'loaded_height': int # } ``` -------------------------------- ### DeepFuze FaceSwap Node Source: https://context7.com/samkhoze/comfyui-deepfuze/llms.txt The FaceSwap node swaps, enhances, and restores faces from video and image sources. ```APIDOC ## FaceSwap Node Configuration ### Description Swaps, enhances, and restores faces from video and image sources using multiple face detection models. ### Parameters - **source_images** (IMAGE) - Required - Face to swap FROM - **target_images** (IMAGE) - Required - Face to swap TO - **faceswap_model** (string) - Required - Options: blendswap_256, inswapper_128, inswapper_128_fp16, simswap_256, simswap_512_unofficial, uniface_256 - **face_detector_model** (string) - Optional - Options: retinaface, scrfd, yoloface, yunet - **reference_face_index** (int) - Optional - Which face to swap (0-5) - **device** (string) - Optional - Options: cpu, cuda, mps ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.