Upscale a video
Increase video resolution and restore detail across the clip.
Télécharger le workflowEssayer dans Cloud Documentation de l’API
00:00
Dans le workflow
Un aperçu en lecture seule du modèle source. Ouvrez-le dans Cloud pour explorer les nœuds et apporter des modifications.
Loading the graph
Open full-size workflow previewFichiers de ce workflow
- Auteur
- ComfyUI
Appelez ce modèle depuis votre code
La requête ci-dessous utilise le même graphe préparé et les mêmes paramètres que le Playground. Chaque envoi peut lancer une exécution payante ; ne relancez pas automatiquement un envoi dont l’issue est inconnue.
1 Obtenir une clé API ↗
What you need
- Runs on
- Comfy Cloud
- Clé
- COMFY_API_KEY
- Vos fichiers
- Importés par le code depuis leurs URL
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({
"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)Essayer un exemple
Workflows associés
- SSeedVR2
Upscale and restore detail
- Qwen-Image, SeedVR2
Générateur de Skybox HDR Équirectangulaire
- SSeedVR2
SeedVR2 : agrandissement Vidéo
- SSeedVR2
SeedVR2: Agrandir l'image
- SeedVR2, WaveSpeed
WaveSpeed : Restauration d'image IA avec SeedVR2
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- LTX-2.3
Restore archival footage
- ZZ-Image-Turbo
2.3 Creator : Upscaling et Analyse d’Image
- ZZ-Image-Turbo
Agrandir l'image : Z-Image-Turbo 2K
- Topaz
Agrandir vidéo : Topaz Starlight Precise 2.5