Vidéo d'Effet d'Expansion de Personnage Lora d'Inflation
Téléversez une image de personnage et saisissez votre prompt. Générez une vidéo animée où le personnage se dilate avec un effet d'inflation.
À propos
Ce workflow ComfyUI, intitulé « Inflation Lora : Effet d’expansion de personnage en vidéo », permet de transformer une image statique de personnage en une vidéo animée avec un effet d’inflation unique. En s’appuyant sur des modèles IA avancés et des nœuds personnalisés, ce workflow permet de saisir une image de personnage et une instruction descriptive, qui guidera ensuite l’animation. Le workflow utilise le modèle 'wan2.2 Animate', reconnu pour sa capacité à produire des animations dynamiques et visuellement attractives. Les nœuds clés comme 'ComfyUI-WanAnimatePreprocess' et 'ComfyUI-WanVideoWrapper' servent respectivement à prétraiter l’image et à l’assembler au format vidéo.
Techniquement, le workflow commence par le nœud 'VHS_LoadVideo' pour gérer l’entrée vidéo, suivi de 'GetImageRangeFromBatch' et 'ImageResizeKJv2' pour préparer l’image au traitement. La détection de pose et de visage est assurée par 'PoseAndFaceDetection' et 'OnnxDetectionModelLoader', garantissant que les traits du personnage sont bien identifiés et animés. Les nœuds 'WanVideoModelLoader' et 'WanVideoLoraSelectMulti' sont essentiels pour charger les modèles d’animation et sélectionner les bons réglages Lora pour l’effet d’inflation. Le workflow se termine avec 'WanVideoAnimateEmbeds' et 'WanVideoVAELoader', qui génèrent la vidéo animée finale. Ce workflow est particulièrement utile pour créer du contenu engageant pour les réseaux sociaux, les jeux vidéo ou la narration digitale.
Ce que vous fournissez
- Lecture du workflow
S’exécute dans ComfyUI. Ce workflow ne peut pas s’exécuter sur cette page. Ouvrez-le dans Comfy Cloud, avec tout déjà chargé, ou téléchargez-le pour votre propre ComfyUI.
Essayer dans CloudDans le workflow
Un aperçu en lecture seule du graphe de nœuds. Ouvrez-le dans Comfy Cloud ou téléchargez-le pour modifier les nœuds.
Loading the graph
Open full-size workflow previewFichiers de ce workflow
- lightx2v_14B_T2V_cfg_step_distill_lora_adaptive_rank_quantile_0.15_bf16.safetensors
- WanAnimate_relight_lora_fp16.safetensors
- clip_vision_h.safetensors
- umt5-xxl-enc-bf16.safetensors
- qwen_image_edit_2511_bf16.safetensors
- qwen_image_vae.safetensors
- qwen_2.5_vl_7b_fp8_scaled.safetensors
- Qwen_Image_Edit_2511-SYSTMS_INFL8.safetensors
- Auteur
- ComfyUI
Nécessite des nœuds personnalisés
- Lecture du workflow
Utiliser ce workflow depuis du code
Généré à partir du graphe et des entrées du workflow lorsque cela est possible ; sinon, les exemples enregistrés sont affichés. Vérifiez les identifiants et les points de terminaison avant d’exécuter le code, ce qui peut entraîner des frais.
What you need
- Runs on
- Comfy Cloud
- Clé
- COMFY_API_KEY
Nécessite un forfait Cloud payant et des crédits.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"2": {
"class_type": "VHS_LoadVideo",
"inputs": {
"custom_height": 0,
"custom_width": 0,
"force_rate": 0,
"format": "AnimateDiff",
"frame_load_cap": 121,
"select_every_nth": 1,
"skip_first_frames": 0,
"video": "woman_walking.mp4"
},
"_meta": {
"title": "Load Video (Upload) 🎥🅥🅗🅢"
}
},
"11": {
"class_type": "GetImageRangeFromBatch",
"inputs": {
"images": [
"2",
0
],
"num_frames": 1,
"start_index": [
"359",
1
]
},
"_meta": {
"title": "Get Image or Mask Range From Batch"
}
},
"32": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"52",
2
],
"image": [
"358:8",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"52",
1
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"33": {
"class_type": "PoseAndFaceDetection",
"inputs": {
"face_padding": 0,
"height": [
"52",
2
],
"images": [
"52",
0
],
"model": [
"35",
0
],
"width": [
"52",
1
]
},
"_meta": {
"title": "Pose and Face Detection"
}
},
"35": {
"class_type": "OnnxDetectionModelLoader",
"inputs": {
"onnx_device": "CUDAExecutionProvider",
"vitpose_model": "vitpose-l-wholebody.onnx",
"yolo_model": "yolov10m.onnx"
},
"_meta": {
"title": "ONNX Detection Model Loader"
}
},
"36": {
"class_type": "DrawViTPose",
"inputs": {
"body_stick_width": -1,
"draw_head": True,
"hand_stick_width": -1,
"height": [
"52",
2
],
"pose_data": [
"33",
0
],
"retarget_padding": 16,
"width": [
"52",
1
]
},
"_meta": {
"title": "Draw ViT Pose"
}
},
"43": {
"class_type": "VHS_VideoCombine",
"inputs": {
"audio": [
"2",
2
],
"crf": 10,
"filename_prefix": "INFL8/GENS/VID",
"format": "video/h264-mp4",
"frame_rate": [
"68",
0
],
"images": [
"67",
0
],
"loop_count": 0,
"pingpong": False,
"pix_fmt": "yuv420p",
"save_metadata": True,
"save_output": True,
"trim_to_audio": False
},
"_meta": {
"title": "Video Combine 🎥🅥🅗🅢"
}
},
"47": {
"class_type": "DownloadAndLoadSAM2Model",
"inputs": {
"device": "cuda",
"model": "sam2.1_hiera_large.safetensors",
"precision": "fp16",
"segmentor": "video"
},
"_meta": {
"title": "(Down)Load SAM2Model"
}
},
"48": {
"class_type": "Sam2Segmentation",
"inputs": {
"bboxes": [
"33",
3
],
"image": [
"52",
0
],
"individual_objects": False,
"keep_model_loaded": False,
"sam2_model": [
"47",
0
]
},
"_meta": {
"title": "Sam2Segmentation"
}
},
"49": {
"class_type": "BlockifyMask",
"inputs": {
"block_size": 32,
"device": "cpu",
"masks": [
"50",
0
]
},
"_meta": {
"title": "Blockify Mask"
}
},
"50": {
"class_type": "GrowMaskWithBlur",
"inputs": {
"blur_radius": 0,
"decay_factor": 1,
"expand": 40,
"fill_holes": False,
"flip_input": False,
"incremental_expandrate": 0,
"lerp_alpha": 1,
"mask": [
"48",
0
],
"tapered_corners": True
},
"_meta": {
"title": "Grow Mask With Blur"
}
},
"51": {
"class_type": "DrawMaskOnImage",
"inputs": {
"color": "0, 0, 0",
"device": "cpu",
"image": [
"52",
0
],
"mask": [
"49",
0
]
},
"_meta": {
"title": "Draw Mask On Image"
}
},
"52": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 720,
"image": [
"2",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1280
},
"_meta": {
"title": "Resize Image v2"
}
},
"53": {
"class_type": "WanVideoModelLoader",
"inputs": {
"attention_mode": "comfy",
"base_precision": "bf16",
"load_device": "offload_device",
"lora": [
"57",
0
],
"model": "wan2.2_animate_14B_bf16.safetensors",
"quantization": "disabled",
"rms_norm_function": "default"
},
"_meta": {
"title": "WanVideo Model Loader"
}
},
"57": {
"class_type": "WanVideoLoraSelectMulti",
"inputs": {
"lora_0": "lightx2v_14B_T2V_cfg_step_distill_lora_adaptive_rank_quantile_0.15_bf16.safetensors",
"lora_1": "WanAnimate_relight_lora_fp16.safetensors",
"lora_2": "none",
"lora_3": "none",
"lora_4": "none",
"low_mem_load": False,
"merge_loras": False,
"strength_0": 1,
"strength_1": 1,
"strength_2": 1,
"strength_3": 1,
"strength_4": 1
},
"_meta": {
"title": "WanVideo Lora Select Multi"
}
},
"58": {
"class_type": "WanVideoSamplerv2",
"inputs": {
"add_noise_to_samples": False,
"cfg": 1,
"force_offload": True,
"image_embeds": [
"60",
0
],
"model": [
"53",
0
],
"scheduler": [
"59",
0
],
"seed": 648178387160412,
"text_embeds": [
"65",
0
]
},
"_meta": {
"title": "WanVideo Sampler v2"
}
},
"59": {
"class_type": "WanVideoSchedulerv2",
"inputs": {
"end_step": -1,
"enhance_hf": True,
"scheduler": "dpm++_sde",
"shift": 5,
"start_step": 0,
"steps": 6
},
"_meta": {
"title": "WanVideo Scheduler v2"
}
},
"60": {
"class_type": "WanVideoAnimateEmbeds",
"inputs": {
"bg_images": [
"51",
0
],
"clip_embeds": [
"62",
0
],
"colormatch": "disabled",
"face_images": [
"33",
1
],
"face_strength": 1,
"force_offload": True,
"frame_window_size": 77,
"height": [
"52",
2
],
"mask": [
"49",
0
],
"num_frames": [
"2",
1
],
"pose_images": [
"36",
0
],
"pose_strength": 1,
"ref_images": [
"32",
0
],
"tiled_vae": False,
"vae": [
"61",
0
],
"width": [
"52",
1
]
},
"_meta": {
"title": "WanVideo Animate Embeds"
}
},
"61": {
"class_type": "WanVideoVAELoader",
"inputs": {
"model_name": "Wan2_1_VAE_fp32.safetensors",
"precision": "fp32",
"use_cpu_cache": False,
"verbose": False
},
"_meta": {
"title": "WanVideo VAE Loader"
}
},
"62": {
"class_type": "WanVideoClipVisionEncode",
"inputs": {
"clip_vision": [
"63",
0
],
"combine_embeds": "average",
"crop": "center",
"force_offload": True,
"image_1": [
"32",
0
],
"ratio": 0.5,
"strength_1": 1,
"strength_2": 1,
"tiles": 0
},
"_meta": {
"title": "WanVideo ClipVision Encode"
}
},
"63": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "clip_vision_h.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
},
"65": {
"class_type": "WanVideoTextEncode",
"inputs": {
"device": "gpu",
"force_offload": True,
"negative_prompt": "",
"positive_prompt": "INFL8, the inflated man is speaking on the phone",
"t5": [
"66",
0
],
"use_disk_cache": False
},
"_meta": {
"title": "WanVideo TextEncode"
}
},
"66": {
"class_type": "LoadWanVideoT5TextEncoder",
"inputs": {
"load_device": "offload_device",
"model_name": "umt5-xxl-enc-bf16.safetensors",
"precision": "fp32",
"quantization": "disabled"
},
"_meta": {
"title": "WanVideo T5 Text Encoder Loader"
}
},
"67": {
"class_type": "WanVideoDecode",
"inputs": {
"enable_vae_tiling": False,
"normalization": "default",
"samples": [
"58",
0
],
"tile_stride_x": 144,
"tile_stride_y": 128,
"tile_x": 272,
"tile_y": 272,
"vae": [
"61",
0
]
},
"_meta": {
"title": "WanVideo Decode"
}
},
"68": {
"class_type": "VHS_VideoInfo",
"inputs": {
"video_info": [
"2",
3
]
},
"_meta": {
"title": "Video Info 🎥🅥🅗🅢"
}
},
"359": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a/2",
"values.a": [
"2",
1
]
},
"_meta": {
"title": "Math Expression"
}
},
"361": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"358:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"358:12": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2511_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"358:349": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"358:350": {
"class_type": "FluxKontextMultiReferenceLatentMethod",
"inputs": {
"conditioning": [
"358:352",
0
],
"reference_latents_method": "index_timestep_zero"
},
"_meta": {
"title": "Edit Model Reference Method"
}
},
"358:351": {
"class_type": "FluxKontextMultiReferenceLatentMethod",
"inputs": {
"conditioning": [
"358:353",
0
],
"reference_latents_method": "index_timestep_zero"
},
"_meta": {
"title": "Edit Model Reference Method"
}
},
"358:352": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"358:355",
0
],
"image1": [
"358:88",
0
],
"prompt": "",
"vae": [
"358:349",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"358:353": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"358:355",
0
],
"image1": [
"358:88",
0
],
"prompt": "inflate the woman",
"vae": [
"358:349",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Positive)"
}
},
"358:354": {
"class_type": "KSampler",
"inputs": {
"cfg": 4,
"denoise": 1,
"latent_image": [
"358:75",
0
],
"model": [
"358:64",
0
],
"negative": [
"358:350",
0
],
"positive": [
"358:351",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 544553820212047,
"steps": 40
},
"_meta": {
"title": "KSampler"
}
},
"358:355": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"358:64": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"358:71",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"358:71": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"358:90",
0
],
"sampling": "flow",
"shift": 3.1
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"358:75": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"358:88",
0
],
"vae": [
"358:349",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"358:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"358:354",
0
],
"vae": [
"358:349",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"358:88": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"11",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"358:90": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen_Image_Edit_2511-SYSTMS_INFL8.safetensors",
"model": [
"358:12",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)Questions-réponses
Des images de personnage haute résolution avec des traits nets assurent une détection de pose et de visage précise.
Oui, le nœud 'WanVideoLoraSelectMulti' permet d’ajuster les réglages Lora pour moduler l’intensité de l’effet.
Ce workflow est conçu pour la post-production et n’est pas adapté au temps réel en raison des besoins en traitement.
Le workflow produit des vidéos dans des formats standards, compatibles avec la plupart des lecteurs et logiciels de montage.