Upscale a video
Increase video resolution and restore detail across the clip.
ワークフローをダウンロードCloudで試す API ドキュメント
00:00
ワークフローの内部
ソーステンプレートの読み取り専用プレビューです。Cloud で開くと、ノードを確認して変更できます。
Loading the graph
Open full-size workflow preview- 作成者
- ComfyUI
コードからこのモデルを呼び出す
以下のリクエストでは、Playground と同じ準備済みグラフと設定を使用します。送信ごとに有料実行が開始される場合があります。結果が不明な送信を自動的に再試行しないでください。
1 API キーを取得 ↗
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({
"73": {
"class_type": "LoadVideo",
"inputs": {
"file": "UPLOADED_video_FILENAME"
},
"_meta": {
"title": "Load Video"
}
},
"76": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/Upscaled_seedVR2",
"format": "auto",
"format.codec": "auto",
"video": [
"66:75",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"66:100": {
"class_type": "SeedVR2TemporalMerge",
"inputs": {
"latents": [
"66:54",
0
],
"temporal_overlap": [
"66:99",
1
]
},
"_meta": {
"title": "Merge SeedVR2 Latents"
}
},
"66:102": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"66:48",
0
],
"on_true": [
"66:99",
0
],
"switch": [
"66:105",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"66:103": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"66:54",
0
],
"on_true": [
"66:100",
0
],
"switch": [
"66:105",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"66:105": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Boolean (Split Latent)"
}
},
"66:48": {
"class_type": "VAEEncodeTiled",
"inputs": {
"overlap": 128,
"pixels": [
"66:58",
0
],
"temporal_overlap": 8,
"temporal_size": 64,
"tile_size": 512,
"vae": [
"66:51",
0
]
},
"_meta": {
"title": "VAE Encode (Tiled)"
}
},
"66:51": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "seedvr2_ema_vae_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"66:52": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "seedvr2_3b_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"66:54": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"66:102",
0
],
"model": [
"66:52",
0
],
"negative": [
"66:61",
1
],
"positive": [
"66:61",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 959948902156062,
"steps": 1
},
"_meta": {
"title": "KSampler"
}
},
"66:55": {
"class_type": "VAEDecodeTiled",
"inputs": {
"overlap": 128,
"samples": [
"66:103",
0
],
"temporal_overlap": 8,
"temporal_size": 64,
"tile_size": 512,
"vae": [
"66:51",
0
]
},
"_meta": {
"title": "VAE Decode (Tiled)"
}
},
"66:57": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"66:74",
0
],
"resize_type": "scale by multiplier",
"resize_type.multiplier": 2,
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"66:58": {
"class_type": "SeedVR2Preprocess",
"inputs": {
"resized_images": [
"66:57",
0
]
},
"_meta": {
"title": "Pre-Process SeedVR2 Input"
}
},
"66:59": {
"class_type": "SeedVR2PostProcessing",
"inputs": {
"color_correction_method": "none",
"images": [
"66:55",
0
],
"original_resized_images": [
"66:57",
0
]
},
"_meta": {
"title": "Post-Process SeedVR2 Output"
}
},
"66:61": {
"class_type": "SeedVR2Conditioning",
"inputs": {
"model": [
"66:52",
0
],
"vae_conditioning": [
"66:102",
0
]
},
"_meta": {
"title": "Apply SeedVR2 Conditioning"
}
},
"66:74": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"66:81",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"66:75": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"66:74",
1
],
"bit_depth": [
"66:74",
3
],
"codec": "none",
"color_space": "sRGB",
"fps": [
"66:74",
2
],
"images": [
"66:59",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"66:79": {
"class_type": "Video Slice",
"inputs": {
"duration": 0,
"start_time": 0,
"strict_duration": False,
"video": [
"73",
0
]
},
"_meta": {
"title": "Trim Video"
}
},
"66:81": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"73",
0
],
"on_true": [
"66:79",
0
],
"switch": False
},
"_meta": {
"title": "If/Else Switch"
}
},
"66:99": {
"class_type": "SeedVR2TemporalChunk",
"inputs": {
"chunking_mode": "auto",
"latent": [
"66:48",
0
],
"temporal_overlap": 0
},
"_meta": {
"title": "Split SeedVR2 Latent"
}
}
})
workflow.set_input("73", "file", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/grainy_perfume_shot_crf32.mp4"))
# 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("76"):
output.to_file(output.name)