Instructions to use Alissonerdx/BFS-Best-Face-Swap-Video with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Alissonerdx/BFS-Best-Face-Swap-Video with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Lightricks/LTX-2.3,ByteDance/Bernini-R", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Alissonerdx/BFS-Best-Face-Swap-Video") prompt = "A man with short gray hair plays a red electric guitar." input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png") image = pipe(image=input_image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
| # ============================================================ | |
| # CONFIGURATION | |
| # ============================================================ | |
| $COMFYUI_ROOT = "C:\ComfyUI_windows_portable\ComfyUI" # Update this path! | |
| $MODELS_BASE = "$COMFYUI_ROOT\models" | |
| # Use your HF Token if models are gated | |
| $HF_TOKEN = "" | |
| # ============================================================ | |
| # DOWNLOAD FUNCTION | |
| # ============================================================ | |
| function Download-Model { | |
| param ([string]$url, [string]$dest) | |
| if (Test-Path $dest) { | |
| Write-Host ">>> Skipping: $dest (Already exists)" -ForegroundColor Cyan | |
| } else { | |
| Write-Host ">>> Downloading to: $dest" -ForegroundColor Yellow | |
| $parent = Split-Path -Parent $dest | |
| if (-not (Test-Path $parent)) { New-Item -ItemType Directory -Path $parent -Force } | |
| $headers = @{} | |
| if ($HF_TOKEN) { $headers["Authorization"] = "Bearer $HF_TOKEN" } | |
| Invoke-WebRequest -Uri $url -OutFile $dest -Headers $headers -MaximumRetryCount 3 | |
| } | |
| } | |
| # ============================================================ | |
| # MODELS LIST | |
| # ============================================================ | |
| # --- FLUX.2 KLEIN --- | |
| Download-Model "https://huggingface.co/black-forest-labs/FLUX.2-klein-9b-fp8/resolve/main/flux-2-klein-9b-fp8.safetensors" "$MODELS_BASE\diffusion_models\flux-2-klein-9b-fp8.safetensors" | |
| Download-Model "https://huggingface.co/Comfy-Org/flux2-klein-9B/resolve/main/split_files/text_encoders/qwen_3_8b_fp8mixed.safetensors" "$MODELS_BASE\text_encoders\qwen_3_8b_fp8mixed.safetensors" | |
| Download-Model "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors" "$MODELS_BASE\vae\flux2-vae.safetensors" | |
| Download-Model "https://huggingface.co/Alissonerdx/BFS-Best-Face-Swap/resolve/main/bfs_head_v1_flux-klein_9b_step3500_rank128.safetensors" "$MODELS_BASE\loras\bfs_head_v1_flux-klein_9b_step3500_rank128.safetensors" | |
| Download-Model "https://huggingface.co/Alissonerdx/BFS-Best-Face-Swap/resolve/main/bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors" "$MODELS_BASE\loras\bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors" | |
| # --- LTX-VIDEO 2 (DEV RECOMMENDED) --- | |
| Download-Model "https://huggingface.co/Kijai/LTXV2_comfy/resolve/main/diffusion_models/ltx-2-19b-dev-fp8_transformer_only.safetensors" "$MODELS_BASE\diffusion_models\ltx-2-19b-dev-fp8_transformer_only.safetensors" | |
| Download-Model "https://huggingface.co/Comfy-Org/ltx-2/resolve/main/split_files/text_encoders/gemma_3_12B_it_fp8_scaled.safetensors" "$MODELS_BASE\text_encoders\gemma_3_12B_it_fp8_scaled.safetensors" | |
| Download-Model "https://huggingface.co/Kijai/LTXV2_comfy/resolve/main/text_encoders/ltx-2-19b-embeddings_connector_dev_bf16.safetensors" "$MODELS_BASE\text_encoders\ltx-2-19b-embeddings_connector_dev_bf16.safetensors" | |
| Download-Model "https://huggingface.co/Kijai/LTXV2_comfy/resolve/main/VAE/LTX2_video_vae_bf16.safetensors" "$MODELS_BASE\vae\LTX2_video_vae_bf16.safetensors" | |
| Download-Model "https://huggingface.co/Kijai/LTXV2_comfy/resolve/main/VAE/LTX2_audio_vae_bf16.safetensors" "$MODELS_BASE\vae\LTX2_audio_vae_bf16.safetensors" | |
| # --- BFS VIDEO LORAS --- | |
| Download-Model "https://huggingface.co/Alissonerdx/BFS-Best-Face-Swap-Video/resolve/main/ltx-2/head_swap_v1_13500_first_frame.safetensors" "$MODELS_BASE\loras\head_swap_v1_13500_first_frame.safetensors" | |
| Download-Model "https://huggingface.co/Alissonerdx/BFS-Best-Face-Swap-Video/resolve/main/ltx-2/head_swap_v1_8750_first_and_last_frame.safetensors" "$MODELS_BASE\loras\head_swap_v1_8750_first_and_last_frame.safetensors" | |
| # --- EXTRAS --- | |
| Download-Model "https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-spatial-upscaler-x2-1.0.safetensors" "$MODELS_BASE\latent_upscale_models\ltx-2-spatial-upscaler-x2-1.0.safetensors" | |
| Download-Model "https://huggingface.co/Kijai/MelBandRoFormer_comfy/resolve/main/MelBandRoformer_fp32.safetensors" "$MODELS_BASE\diffusion_models\MelBandRoformer_fp32.safetensors" | |
| Write-Host "--- ALL DOWNLOADS FINISHED ---" -ForegroundColor Green | |
| pause |