Апскейл видео: RelayVSR 2x
Upscale real footage 2x in one streaming pass: RelayVSR writes reference latents on sparse keyframes and a compact decoder carries them across the clip.
О проекте
Upscale real footage 2x with RelayVSR: a large Wan-based model writes reference latents for sparse keyframes and a compact Flash decoder carries them across every frame, so a long clip is restored in one streaming pass at one sampling step. Output is exactly 2x the input at the source frame rate, with the audio track kept. Ideal as the finishing pass after a 480p-768p generation.
Graph: LoadVideo -> the RelayVSR subgraph (UNETLoader relayvsr_x2_lightx2v_int8_convrot, KSampler euler/simple at 1 step, cfg 1, denoise 1, VAELoader relayvsr_flash_vae_x2_fp32, VSRDecode detail 1) -> CreateVideo (frame rate and audio taken from the source) -> SaveVideo (mp4). One input: the clip. One output: the 2x video.
The graph also ships an unconnected Video Slice node (start 0, 5 s) as a trim helper — nothing is wired to it, so the whole clip is processed. Resolution is not a knob: it is exactly twice the source.
This record has no runnable form. The graph is one video in, one video out with a single seed, so the form is easy to model; it is left off because `comfy workflow validate --where cloud` answers unknown_enum_value for both weights (relayvsr_x2_lightx2v_int8_convrot.safetensors, relayvsr_flash_vae_x2_fp32.safetensors) — local weights outside the CLI's 377-entry UNET / 45-entry VAE lists — and no cloud run has been made to prove them (this batch may not spend). The first real run settles it and the form can be added then.
Что вы предоставляете
- Чтение рабочего процесса
Работает в ComfyUI. Этот рабочий процесс нельзя запустить на этой странице. Скачайте его и откройте в ComfyUI.
Скачать рабочий процессВнутри рабочего процесса
Предварительный просмотр графа узлов только для чтения. Откройте его в Comfy Cloud или скачайте, чтобы редактировать узлы.
Loading the graph
Open full-size workflow previewФайлы в этом рабочем процессе
- Выход
- Видео
- Автор
- Автор недоступен
Требуются пользовательские ноды
- Чтение рабочего процесса
Используйте этот рабочий процесс в коде
По возможности генерируется из графа рабочего процесса и входных данных; в противном случае отображаются сохранённые примеры. Перед запуском кода проверьте учётные данные и конечные точки: могут взиматься платежи.
What you need
- Runs on
- Comfy Cloud
- Ключ
- COMFY_API_KEY
Требуются платный тариф 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({
"1": {
"class_type": "LoadVideo",
"inputs": {
"file": "utility_relayvsr_video_x2_upscale_input.mp4"
},
"_meta": {
"title": "Load Video"
}
},
"106": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/RelayVSR",
"format": "auto",
"format.codec": "auto",
"video": [
"108:105",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"202": {
"class_type": "Video Slice",
"inputs": {
"duration": 5,
"start_time": 0,
"strict_duration": False
},
"_meta": {
"title": "Trim Video"
}
},
"108:104": {
"class_type": "VSRDecode",
"inputs": {
"detail": 1,
"images": [
"108:2",
0
],
"samples": [
"108:6",
0
],
"vae": [
"108:7",
0
]
},
"_meta": {
"title": "VSR Decode"
}
},
"108:105": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"108:2",
1
],
"bit_depth": "auto",
"chroma_subsampling": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"108:2",
2
],
"images": [
"108:104",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"108:2": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"108:4": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "relayvsr_x2_lightx2v_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"108:5": {
"class_type": "RelayVSRConditioning",
"inputs": {
"images": [
"108:2",
0
],
"model": [
"108:4",
0
]
},
"_meta": {
"title": "RelayVSRConditioning"
}
},
"108:6": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"108:5",
1
],
"model": [
"108:4",
0
],
"negative": [
"108:5",
0
],
"positive": [
"108:5",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 42,
"steps": 1
},
"_meta": {
"title": "KSampler"
}
},
"108:7": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "relayvsr_flash_vae_x2_fp32.safetensors"
},
"_meta": {
"title": "Load VAE"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)