Utility Video Upscale
在 Utility Video Upscale 中使用 Wan2.2 將影片放大成更清晰、更高解析度的輸出,並精準控制細節、降噪強度與尺寸參數。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
- 您的檔案
- 由程式碼透過其 URL 上傳
需要付費 Cloud 方案與點數。
# 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({
"665": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"727",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"666": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"665",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"665",
2
],
"images": [
"632:698",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"667": {
"class_type": "SaveVideo",
"inputs": {
"codec": "h264",
"filename_prefix": "video/ComfyUI",
"format": "mp4",
"format.codec": "h264",
"video": [
"666",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"668": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"665",
0
],
"length": 48
},
"_meta": {
"title": "Get Image from Batch"
}
},
"676": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"668",
0
],
"image2": [
"632:698",
0
],
"match_image_size": False,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"677": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"665",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"665",
2
],
"images": [
"676",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"678": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"677",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"719": {
"class_type": "ResolutionSelector",
"inputs": {
"aspect_ratio": "16:9 (Widescreen)",
"megapixels": 2.1,
"multiple": 8
},
"_meta": {
"title": "Resolution Selector"
}
},
"727": {
"class_type": "LoadVideo",
"inputs": {
"file": "UPLOADED_video_FILENAME"
},
"_meta": {
"title": "Load Video"
}
},
"632:695": {
"class_type": "WanVideoEmptyEmbeds",
"inputs": {
"height": [
"632:697",
1
],
"num_frames": [
"632:697",
2
],
"width": [
"632:697",
0
]
},
"_meta": {
"title": "Image Embeds"
}
},
"632:696": {
"class_type": "WanVideoSampler",
"inputs": {
"add_noise_to_samples": True,
"batched_cfg": False,
"cfg": 1.0000000000000002,
"denoise_strength": 0.25,
"end_step": -1,
"force_offload": False,
"image_embeds": [
"632:695",
0
],
"model": [
"632:702",
0
],
"riflex_freq_index": 0,
"rope_function": "comfy",
"samples": [
"632:699",
0
],
"scheduler": "euler",
"seed": 622986558479570,
"shift": 5,
"start_step": 0,
"steps": 4,
"text_embeds": [
"632:704",
0
]
},
"_meta": {
"title": "WanVideo Sampler"
}
},
"632:697": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"632:706",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"632:698": {
"class_type": "WanVideoDecode",
"inputs": {
"enable_vae_tiling": True,
"normalization": "default",
"samples": [
"632:696",
1
],
"tile_stride_x": 256,
"tile_stride_y": 256,
"tile_x": 512,
"tile_y": 512,
"vae": [
"632:701",
0
]
},
"_meta": {
"title": "WanVideo Decode"
}
},
"632:699": {
"class_type": "WanVideoEncode",
"inputs": {
"enable_vae_tiling": True,
"image": [
"632:706",
0
],
"latent_strength": 1,
"noise_aug_strength": 0.001,
"tile_stride_x": 256,
"tile_stride_y": 256,
"tile_x": 512,
"tile_y": 512,
"vae": [
"632:701",
0
]
},
"_meta": {
"title": "WanVideo Encode"
}
},
"632:700": {
"class_type": "WanVideoTorchCompileSettings",
"inputs": {
"allow_unmerged_lora_compile": False,
"backend": "inductor",
"compile_transformer_blocks_only": True,
"dynamic": False,
"dynamo_cache_size_limit": 64,
"dynamo_recompile_limit": 128,
"force_parameter_static_shapes": False,
"fullgraph": False,
"mode": "default"
},
"_meta": {
"title": "Torch CompSettings"
}
},
"632:701": {
"class_type": "WanVideoVAELoader",
"inputs": {
"model_name": "wan_2.1_vae.safetensors",
"precision": "bf16",
"use_cpu_cache": False,
"verbose": False
},
"_meta": {
"title": "WanVideo VAE Loader"
}
},
"632:702": {
"class_type": "WanVideoSetLoRAs",
"inputs": {
"lora": [
"632:705",
0
],
"model": [
"632:703",
0
]
},
"_meta": {
"title": "WanVideo Set LoRAs"
}
},
"632:703": {
"class_type": "WanVideoModelLoader",
"inputs": {
"attention_mode": "sdpa",
"base_precision": "fp16_fast",
"compile_args": [
"632:700",
0
],
"load_device": "offload_device",
"model": "Wan2_2-T2V-A14B-LOW_fp8_e4m3fn_scaled_KJ.safetensors",
"quantization": "fp8_e4m3fn_scaled",
"rms_norm_function": "default"
},
"_meta": {
"title": "WanVideo Model Loader"
}
},
"632:704": {
"class_type": "WanVideoTextEncodeCached",
"inputs": {
"device": "gpu",
"model_name": "umt5_xxl_fp16.safetensors",
"negative_prompt": "",
"positive_prompt": "high resolution, sharp, detailed",
"precision": "bf16",
"quantization": "disabled",
"use_disk_cache": True
},
"_meta": {
"title": "WanVideo TextEncode Cached"
}
},
"632:705": {
"class_type": "WanVideoLoraSelect",
"inputs": {
"lora": "lightx2v_14B_T2V_cfg_step_distill_lora_adaptive_rank_quantile_0.15_bf16.safetensors",
"low_mem_load": False,
"merge_loras": False,
"strength": 0.7
},
"_meta": {
"title": "Lightning Lora"
}
},
"632:706": {
"class_type": "ImageResize+",
"inputs": {
"condition": "always",
"height": [
"632:709",
0
],
"image": [
"668",
0
],
"interpolation": "lanczos",
"method": "fill / crop",
"multiple_of": 64,
"width": [
"632:708",
0
]
},
"_meta": {
"title": "🔧 Image Resize"
}
},
"632:708": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"719",
0
]
},
"_meta": {
"title": "Width"
}
},
"632:709": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"719",
1
]
},
"_meta": {
"title": "Heigth"
}
}
})
workflow.set_input("727", "file", client.assets.from_url("https://comfy.org/catalog-media/ea1e2595-155d-4854-87b8-e4b3a5d938c1/81866afc-ff24-47ed-9828-0634aa9086f2"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("667"):
output.to_file(output.name)
for output in job.get_outputs("678"):
output.to_file(output.name)試試範例
關於此工作流程
Utility Video Upscale 是一個精簡的 ComfyUI 流程,用 Wan2.2 放大節點(自訂節點 ID 8c62a455-6744-43c8-9352-543905ed4db7)把偏糊、低解析度的片段轉成更清晰、更高解析度的影片。流程很直接:LoadVideo 匯入來源,GetVideoComponents 讀取 FPS、幀數等中繼資料,ResolutionSelector 讓你選擇有效的目標尺寸(寬與高需可被 64 整除),並提供常見格式的預設,例如 Full HD(約 2.1 MP)與 4K(約 8.3 MP)。Wan2.2 節點負責主要處理,提供實用的降噪強度與細節控制,讓你在去雜訊與保留紋理之間取得平衡。
為了方便檢視與迭代,工作流程包含 Before vs After Comparison 群組:使用 ImageFromBatch 選取單幀,再用 ImageStitch 產生左右對照合成圖,讓你在完整跑批前先把設定調到位。確認效果後,CreateVideo 會以選定解析度重建影片(通常使用 GetVideoComponents 傳入的來源 FPS),再由 SaveVideo 寫出結果。由於 Wan2.2 每次運行可處理的幀數有限(約最多 121 幀)且受 VRAM 影響,這個流程以可預期、記憶體友善為目標設計,同時提供對放大尺寸與主觀銳利度的精準控制。
問答
像 Wan2.2 這類放大模型會在特徵網格上運作,通常需要影像尺寸對齊 64 像素區塊。請使用 1920x1088(而非 1920x1080)或 3840x2176 之類的尺寸,以避免補邊與瑕疵。
Wan2.2 每次運行實務上約可處理到 121 幀,實際上限取決於可用 VRAM。較長片段請先切段,再逐段處理。
先用中等降噪去除壓縮雜訊、避免抹掉真實紋理;細節保持保守,避免過度銳化。若結果仍偏軟再逐步提高細節;如果邊緣變得刺眼或出現光暈,就降低細節(以及降噪)。
此流程主要處理畫格。如果你的 CreateVideo/SaveVideo 節點不會混流音訊,請先輸出放大後影片,再在剪輯軟體或用 FFmpeg 合併原音訊。若 CreateVideo 支援音訊輸入,則可從 GetVideoComponents 連接音訊相關輸出。
相關工作流程
- Seedance 2.5
Change a video’s background
- LTX-2.3
Remove an object from a video
- LTX-2.3
Expand a video’s frame
- SSCAIL-2
Replace a character in a video
- SSeedVR2
Upscale a video
- LTX-2.3
Restore archival footage
- MiniMax H3
Aspect Ratio Reframe: MiniMax H3 Max
- BRIA
Bria:去除影片背景
- Grok
Grok:影片擴充
- LTX-2.3
LTX 2.3 - EditAnything - 以提示編輯影片
- 合作夥伴節點
LTX 2.3 - Lipdub LoRA + Voice Clone
- LTX-2.3
LTX 2.3 - 動漫轉寫實