ArtificialGuyBR

Home / Blog / AI video

HunyuanVideo img2vid LoRA: Settings & LTX-Video Comparison

Run HunyuanVideo img2vid with the Leapfusion LoRA, compare against LTX-Video, and tune denoise and attention for stable frames.

8 sources cited AI video

TL;DR


HunyuanVideo Image-to-Video LoRA: Unofficial Path, Settings, and LTX-Video Comparison

HunyuanVideo shipped as a text-to-video model. The community added image-to-video through a LoRA trained by AeroScripts, branded Leapfusion. It works by conditioning the base model on an encoded first frame — no full fine-tune required. This article covers the LoRA-based workflow, the settings that keep motion coherent, and how the output compares when you hand it off to LTX-Video for a second pass.


The Unofficial LoRA Path: Leapfusion

AeroScripts released two LoRA versions:

VersionResolutionFilenameHugging Face Repo
v1512×320 (320p)img2vid.safetensorsleapfusion-image2vid-test/image2vid-512x320
v2960×544 (544p)img2vid544p.safetensorsleapfusion-image2vid-test/image2vid-960x544

Both sit on top of the official HunyuanVideo t2v checkpoint. The canonical ComfyUI example workflow lives in kijai/ComfyUI-HunyuanVideoWrapper under example_workflows/hyvideo_leapfusion_img2vid_example_01.json.

How the LoRA Conditions on the Input Image

The mechanism is explicit in the inference script. Your input image is encoded through the Hunyuan 3D VAE into latents (encode_image.py writes target_latent.pt). During sampling, the first frame of the noisy latent tensor is replaced with those target latents at every step:

x_noised[:, :, [0,], :, :] = target_image[:, :, [0,], :, :]

This frame-replacement is the entire conditioning strategy — the LoRA learns to propagate that first frame forward.

Required Models Checklist

ComponentFile / RepoNotes
Base checkpointhunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensorsFP8 cfg-distill, not FastVideo (see Corrections)
LoRA (v2)img2vid544p.safetensors544p, preferred for quality
LoRA (v1)img2vid.safetensors320p, faster
VAEhunyuan_video_vae_bf16.safetensorsbf16 precision
Text encodersllava-llama-3-8b + clip-vit-large-patch14Auto-downloaded by nodes
Upscaler (optional)4x-UniScaleV2_Sharp.pthCommunity-reported in chained workflows

Settings That Keep Motion Coherent

Denoise Strength: 0.60–0.75

ThinkDiffusion's workflow documentation calls this the "sweet spot" for video-to-video and image-to-video passes. Lower values preserve more of the input; higher values introduce more motion but risk drifting from the source frame.

Attention Mode: sageattn_varlen

The default attention backend can produce a black screen on consumer GPUs. Switching the HunyuanVideo Model Loader node to sageattn_varlen enables the SageAttention kernel with variable-length sequences, avoiding OOM and the all-black failure mode.

Frame Count Must Be 4n + 1

HunyuanVideo's 3D VAE compresses time by 4×. The latent frame count must be an integer, so input frames = 4n + 1 (e.g., 97, 101, 129). Violating this throws:

video_length-1 must be a multiple of 4, got 34

Pick a compliant frame count before you load the video.

VAE Chunk Size and Tiling

The Leapfusion scripts use --vae_chunk_size 32 and enable spatial tiling with --vae_spatial_tile_sample_min_size 128. The ThinkDiffusion workflow sets vae_chunk_size=16 and noise_aug_strength=256 on the HyVideoEncode node. Both configurations work; the chunk size trades VRAM for speed.

Inference Steps

The example generate.py uses 30 steps. Community workflows often run 20–30 steps for the LoRA pass.


Chaining to LTX-Video for Motion Refinement

The AeroScripts author reported that Hunyuan produces stronger motion but lower resolution, while LTX-Video alone struggles with animation quality. The workaround: run Hunyuan LoRA i2v first, then feed that output into LTX-Video's I+V2V (Image + Video to Video) workflow with the original reference image.

LTX-Video I+V2V Workflow

The official ComfyUI-LTXVideo repo (formerly ComfyUI-LTXTricks, now deprecated) provides example_ltx_iv2v.json. It conditions on:

  1. A reference image (frame 0 appearance)
  2. A source video (motion template)

This preserves subject identity while re-rendering motion at higher fidelity.

LTX-Video Constraints


Side-by-Side: Hunyuan LoRA i2v vs LTX-Video I+V2V

AspectHunyuan Leapfusion LoRALTX-Video I+V2V
InputSingle image + promptReference image + source video + prompt
Motion qualityStronger, more expressive (community-reported)Smoother, better temporal consistency
Resolution320p (v1) or 544p (v2) nativeUp to 720p native; spatial upscaler LoRAs available
VRAM (fp8)~16 GB on 4070 Ti Super (single-user report)32 GB+ recommended for 22B; 2B fits lower VRAM
Speed~5–6 min per clip (unverified single-user report)Real-time capable with 2B distilled
Attention fixsageattn_varlen for black screenNative SDPA / FlashAttention
Frame constraint4n + 18n + 1
Workflow sourcekijai/ComfyUI-HunyuanVideoWrapperLightricks/ComfyUI-LTXVideo

VRAM and speed figures are community-reported; no independent benchmarks exist.


Common Errors and Fixes

SymptomCauseFixSource
video_length-1 must be a multiple of 4, got 34Input frames ≠ 4n+1Use 97, 101, 129, or 161 frameshttps://github.com/Tencent-Hunyuan/HunyuanVideo
Can\'t import SageAttention: No module named \'sageattention\'SageAttention not installed or CUDA/PyTorch mismatchInstall SageAttention, or switch Model Loader to sageattn_varlen / use Beta versionhttps://learn.thinkdiffusion.com/unleashing-creativity-how-hunyuan-redefines-video-generation/
Black screen outputAttention backend incompatible with GPU/driverSet HunyuanVideo Model Loader → attention_mode: sageattn_varlenhttps://learn.thinkdiffusion.com/unleashing-creativity-how-hunyuan-redefines-video-generation/

All three are documented in the ThinkDiffusion guide.


FAQ

Why does my HunyuanVideo output a black screen? The default attention mode fails on some consumer GPUs. Switch the Model Loader node to sageattn_varlen.

What does "video_length-1 must be a multiple of 4" mean? The 3D VAE compresses time 4×. Your frame count must be 4n+1 (e.g., 101 frames → 25 latent frames).

Can I use the Leapfusion LoRA with the official HunyuanVideo-I2V repo? The official Tencent repo (HunyuanVideo-I2V) released March 2025 with its own checkpoints and LoRA training scripts. Leapfusion is a separate community effort; they are not interchangeable.

Which LTX-Video model should I use for the second pass? The 2B distilled (ltxv-2b-0.9.6-distilled or newer) runs 15× faster and needs no STG/CFG. The 13B/22B models give higher quality but need 32 GB+ VRAM.

Do I need SageAttention installed to run HunyuanVideo? No — sageattn_varlen is a kernel option inside the Model Loader. If it errors, fall back to the Beta version or install SageAttention separately.

What upscaler works after Hunyuan LoRA output? Community workflows cite 4x-UniScaleV2_Sharp.pth. LTX-Video also ships a spatial upscaler LoRA (ltx-2.3-spatial-upscaler-x2-1.1.safetensors) for its own pipeline.

Is the LTXTricks repo still maintained? No. The README marks it DEPRECATED; all nodes moved to Lightricks/ComfyUI-LTXVideo under tricks/.

Can I run this on a 12 GB GPU? Not with the fp8 Hunyuan checkpoint at 544p. The 2B LTX distilled model might fit with aggressive offloading, but no verified configs exist.


Corrections to Common Claims

Claim Seen in Community PostsVerified Reality
"ltx-video-2b-v0.9.1.safetensors"Official HF lists 0.9.6, 0.9.8-distilled; 0.9.1 may be a community rename
"hunyuan_video_FastVideo_720_fp8_e4m3fn.safetensors"Actual filename: hunyuan_video_720_cfgdistill_fp8_e4m3fn.safetensors (cfg-distill, not FastVideo)
"5–6 minutes on 4070 Ti Super 16 GB"Single-user report; no independent verification
"Leapfusion workflow at github.com/obraia/ComfyUI"Link 404s; canonical workflow is in kijai/ComfyUI-HunyuanVideoWrapper
"LTXTricks is current"Repo deprecated; use Lightricks/ComfyUI-LTXVideo

Sources

  1. AeroScripts Leapfusion repo — LoRA weights, inference script, VAE encoding: https://github.com/AeroScripts/leapfusion-hunyuan-image2video
  2. ComfyUI-HunyuanVideoWrapper — example workflow, Model Loader settings: https://github.com/kijai/ComfyUI-HunyuanVideoWrapper
  3. Lightricks LTX-Video model card — model variants, constraints, I+V2V: https://huggingface.co/Lightricks/LTX-Video
  4. ComfyUI-LTXTricks (deprecated) — I+V2V example workflow: https://github.com/logtd/ComfyUI-LTXTricks
  5. ThinkDiffusion guide — denoise sweet spot, error strings, attention fix: https://learn.thinkdiffusion.com/unleashing-creativity-how-hunyuan-redefines-video-generation/
  6. Tencent HunyuanVideo repo — 3D VAE compression ratios, official I2V release: https://github.com/Tencent-Hunyuan/HunyuanVideo
  7. Civitai model 1327608 — Hunyuan I2V workflow with upscale/frame-interp: https://civitai.com/models/1327608
  8. Civitai model 1291195 — SkyReels I2V workflow with upscale/frame-interp: https://civitai.com/models/1291195

Internal link placeholders used in this article: