Wan 2.2 14B 趣味區域性重繪
使用 Wan 2.2 Fun Inpainting,根據起始幀與結束幀產生影片。
下載工作流程在 Cloud 中試用 API 文件
關於
這個 ComfyUI 工作流程「Wan 2.2 14B Fun Inp」可透過 Wan 2.2 模型,根據起始與結束影格進行插值,產生影片。流程包含 CLIPLoader、VAELoader 與 ModelSamplingSD3 等節點來載入與處理輸入圖片,並由 WanFunInpaintToVideo 節點負責應用修補技術產生影片。此流程特別適合需要影片平滑過渡的藝術創作或動畫專案。進階節點如 KSamplerAdvanced 與 VAEDecode 可確保高品質影片輸出,LoraLoaderModelOnly 則提供彈性模型調整。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview此工作流程中的檔案
- 作者
- ComfyUI
需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# 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({
"90": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
"device": "default",
"type": "wan"
},
"_meta": {
"title": "Load CLIP"
}
},
"91": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"90",
0
],
"text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"92": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "wan_2.1_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"93": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"116",
0
],
"shift": 8
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"94": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"117",
0
],
"shift": 8
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"95": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "disable",
"cfg": 1,
"end_at_step": 4,
"latent_image": [
"96",
0
],
"model": [
"94",
0
],
"negative": [
"111",
1
],
"noise_seed": 0,
"positive": [
"111",
0
],
"return_with_leftover_noise": "disable",
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 2,
"steps": 4
},
"_meta": {
"title": "KSampler (Advanced)"
}
},
"96": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "enable",
"cfg": 1,
"end_at_step": 2,
"latent_image": [
"111",
2
],
"model": [
"93",
0
],
"negative": [
"111",
1
],
"noise_seed": 221824495232956,
"positive": [
"111",
0
],
"return_with_leftover_noise": "enable",
"sampler_name": "euler",
"scheduler": "simple",
"start_at_step": 0,
"steps": 4
},
"_meta": {
"title": "KSampler (Advanced)"
}
},
"97": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"95",
0
],
"vae": [
"92",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"99": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"90",
0
],
"text": "A dreamy scene where a little cat is sleeping. Zoom in, and the cat opens its eyes, looks up, and blinks. In Q-style, with ice crystals."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"100": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 16,
"images": [
"97",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"101": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_fun_inpaint_high_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"102": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "wan2.2_fun_inpaint_low_noise_14B_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"110": {
"class_type": "LoadImage",
"inputs": {
"image": "video_wan2_2_14B_fun_inpaint_start_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"111": {
"class_type": "WanFunInpaintToVideo",
"inputs": {
"batch_size": 1,
"end_image": [
"112",
0
],
"height": 640,
"length": 81,
"negative": [
"91",
0
],
"positive": [
"99",
0
],
"start_image": [
"110",
0
],
"vae": [
"92",
0
],
"width": 640
},
"_meta": {
"title": "WanFunInpaintToVideo"
}
},
"112": {
"class_type": "LoadImage",
"inputs": {
"image": "video_wan2_2_14B_fun_inpaint_end_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"116": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors",
"model": [
"101",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"117": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors",
"model": [
"102",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"158": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"100",
0
]
},
"_meta": {
"title": "Save Video"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
流程使用 Wan2.2 模型,並搭配 CLIPLoader 與 VAELoader 等節點進行圖片處理與影片生成。
可以,流程內有節點可設定影片尺寸與長度,依你的 VRAM 與專案需求調整。
請確保輸入影格品質良好,並使用 KSamplerAdvanced 與 VAEDecode 節點進行最佳化處理。
可以,你可在 CLIPTextEncode 節點輸入不同提示詞,依需求調整影片風格與外觀。