Апскейл изображения: Wan 2.2 Two-Stage
Загрузите изображение и установите коэффициент изменения размера. Сгенерируйте промпт ИИ из вашего изображения и выполните апскейл в два контролируемых...
Внутри рабочего процесса
Предварительный просмотр исходного шаблона только для чтения. Откройте его в Cloud, чтобы изучить ноды и внести изменения.
Loading the graph
Open full-size workflow previewФайлы в этом рабочем процессе
- Выход
- Изображение
- Автор
- Автор недоступен
Вызовите эту модель из своего кода
Приведённый ниже запрос использует тот же подготовленный граф и настройки, что и 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({
"664": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"670": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "upscale-2",
"images": [
"800:806",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"733": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "upscale-1",
"images": [
"632:720",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"822": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"826",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"824": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"733",
0
],
"image_b": [
"670",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"826": {
"class_type": "GeminiNodeV3",
"inputs": {
"model": "Gemini 3.8 Flash",
"model.images.image_1": [
"664",
0
],
"model.max_output_tokens": 32768,
"model.prompt": "high resolution, sharp, detailed",
"model.seed": 1575831053,
"model.system_prompt": "prompt that retains composition, and focuses on increasing detail. 512 characters.",
"model.thinking_level": "MEDIUM",
"model.video_processing": "static"
},
"_meta": {
"title": "Google Gemini"
}
},
"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.35,
"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": 596336293815149,
"shift": 5,
"start_step": 0,
"steps": 25,
"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.01,
"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
],
"extra_model": None,
"fantasyportrait_model": None,
"fantasytalking_model": None,
"load_device": "offload_device",
"lora": None,
"model": "Wan2_2-T2V-A14B-LOW_fp8_e4m3fn_scaled_KJ.safetensors",
"multitalk_model": None,
"quantization": "fp8_e4m3fn_scaled",
"rms_norm_function": "default",
"vram_management_args": None
},
"_meta": {
"title": "WanVideo Model Loader"
}
},
"632:704": {
"class_type": "WanVideoTextEncodeCached",
"inputs": {
"device": "gpu",
"model_name": "umt5_xxl_fp16.safetensors",
"negative_prompt": "",
"positive_prompt": [
"826",
0
],
"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,
"prev_lora": [
"632:722",
0
],
"strength": 0.7
},
"_meta": {
"title": "Lightning Lora"
}
},
"632:706": {
"class_type": "ImageResize+",
"inputs": {
"condition": "always",
"height": [
"632:709",
0
],
"image": [
"664",
0
],
"interpolation": "lanczos",
"method": "fill / crop",
"multiple_of": 8,
"width": [
"632:708",
0
]
},
"_meta": {
"title": "🔧 Image Resize"
}
},
"632:708": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"632:725",
0
]
},
"_meta": {
"title": "Width"
}
},
"632:709": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"632:726",
0
]
},
"_meta": {
"title": "Heigth"
}
},
"632:720": {
"class_type": "VHS_SelectImages",
"inputs": {
"err_if_empty": True,
"err_if_missing": True,
"image": [
"632:698",
0
],
"indexes": "0"
},
"_meta": {
"title": "Select Images 🎥🅥🅗🅢"
}
},
"632:722": {
"class_type": "WanVideoLoraSelect",
"inputs": {
"lora": "WAN2.2-LowNoise_SmartphoneSnapshotPhotoReality_v3_by-AI_Characters.safetensors",
"low_mem_load": False,
"merge_loras": False,
"prev_lora": None,
"strength": 0.7
},
"_meta": {
"title": "Lightning Lora"
}
},
"632:724": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"664",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"632:725": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"632:724",
0
],
"b": [
"632:727",
0
],
"value": "a*b"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"632:726": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"632:724",
1
],
"b": [
"632:727",
0
],
"value": "a*b"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"632:727": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 2
},
"_meta": {
"title": "Resize by"
}
},
"800:801": {
"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"
}
},
"800:802": {
"class_type": "WanVideoModelLoader",
"inputs": {
"attention_mode": "sdpa",
"base_precision": "fp16_fast",
"compile_args": [
"800:801",
0
],
"extra_model": None,
"fantasyportrait_model": None,
"fantasytalking_model": None,
"load_device": "offload_device",
"lora": None,
"model": "Wan2_2-T2V-A14B-LOW_fp8_e4m3fn_scaled_KJ.safetensors",
"multitalk_model": None,
"quantization": "fp8_e4m3fn_scaled",
"rms_norm_function": "default",
"vram_management_args": None
},
"_meta": {
"title": "WanVideo Model Loader"
}
},
"800:803": {
"class_type": "WanVideoVAELoader",
"inputs": {
"model_name": "wan_2.1_vae.safetensors",
"precision": "bf16",
"use_cpu_cache": False,
"verbose": False
},
"_meta": {
"title": "WanVideo VAE Loader"
}
},
"800:804": {
"class_type": "WanVideoSetLoRAs",
"inputs": {
"lora": [
"800:807",
0
],
"model": [
"800:802",
0
]
},
"_meta": {
"title": "WanVideo Set LoRAs"
}
},
"800:805": {
"class_type": "WanVideoDecode",
"inputs": {
"enable_vae_tiling": True,
"normalization": "default",
"samples": [
"800:817",
1
],
"tile_stride_x": 256,
"tile_stride_y": 256,
"tile_x": 512,
"tile_y": 512,
"vae": [
"800:803",
0
]
},
"_meta": {
"title": "WanVideo Decode"
}
},
"800:806": {
"class_type": "VHS_SelectImages",
"inputs": {
"err_if_empty": True,
"err_if_missing": True,
"image": [
"800:805",
0
],
"indexes": "0"
},
"_meta": {
"title": "Select Images 🎥🅥🅗🅢"
}
},
"800:807": {
"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,
"prev_lora": [
"800:808",
0
],
"strength": 0.7
},
"_meta": {
"title": "Lightning Lora"
}
},
"800:808": {
"class_type": "WanVideoLoraSelect",
"inputs": {
"lora": "WAN2.2-LowNoise_SmartphoneSnapshotPhotoReality_v3_by-AI_Characters.safetensors",
"low_mem_load": False,
"merge_loras": False,
"prev_lora": None,
"strength": 0.7
},
"_meta": {
"title": "Lightning Lora"
}
},
"800:809": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"800:815",
1
],
"b": [
"800:814",
0
],
"value": "a*b"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"800:810": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"800:809",
0
]
},
"_meta": {
"title": "Heigth"
}
},
"800:811": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"800:813",
0
]
},
"_meta": {
"title": "Width"
}
},
"800:812": {
"class_type": "ImageResize+",
"inputs": {
"condition": "always",
"height": [
"800:810",
0
],
"image": [
"733",
0
],
"interpolation": "lanczos",
"method": "fill / crop",
"multiple_of": 8,
"width": [
"800:811",
0
]
},
"_meta": {
"title": "🔧 Image Resize"
}
},
"800:813": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"800:815",
0
],
"b": [
"800:814",
0
],
"value": "a*b"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"800:814": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 2
},
"_meta": {
"title": "Resize by"
}
},
"800:815": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"733",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"800:816": {
"class_type": "WanVideoTextEncodeCached",
"inputs": {
"device": "gpu",
"model_name": "umt5_xxl_fp16.safetensors",
"negative_prompt": "",
"positive_prompt": [
"826",
0
],
"precision": "bf16",
"quantization": "disabled",
"use_disk_cache": True
},
"_meta": {
"title": "WanVideo TextEncode Cached"
}
},
"800:817": {
"class_type": "WanVideoSampler",
"inputs": {
"add_noise_to_samples": True,
"batched_cfg": False,
"cfg": 1.0000000000000002,
"denoise_strength": 0.24,
"end_step": -1,
"force_offload": False,
"image_embeds": [
"800:819",
0
],
"model": [
"800:804",
0
],
"riflex_freq_index": 0,
"rope_function": "comfy",
"samples": [
"800:820",
0
],
"scheduler": "euler",
"seed": 517105421393766,
"shift": 5,
"start_step": 0,
"steps": 35,
"text_embeds": [
"800:816",
0
]
},
"_meta": {
"title": "WanVideo Sampler"
}
},
"800:818": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"800:812",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"800:819": {
"class_type": "WanVideoEmptyEmbeds",
"inputs": {
"height": [
"800:818",
1
],
"num_frames": [
"800:818",
2
],
"width": [
"800:818",
0
]
},
"_meta": {
"title": "Image Embeds"
}
},
"800:820": {
"class_type": "WanVideoEncode",
"inputs": {
"enable_vae_tiling": True,
"image": [
"800:812",
0
],
"latent_strength": 1,
"noise_aug_strength": 0.01,
"tile_stride_x": 256,
"tile_stride_y": 256,
"tile_x": 512,
"tile_y": 512,
"vae": [
"800:803",
0
]
},
"_meta": {
"title": "WanVideo Encode"
}
}
})
workflow.set_input("664", "image", client.assets.from_url("https://comfy.org/catalog-media/977163ea-b4bb-422b-9d9a-30a3e6610e41/ec7b17b1-d6c3-4b92-9598-bf087f446c56"))
# 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("670"):
output.to_file(output.name)Попробовать пример
Об этом рабочем процессе
This is a controlled 4x upscale in two passes. Stage one doubles the image at a light denoise (0.35), stage two takes that result and doubles it again with a little more freedom (0.24 denoise), so each pass has room to re-synthesise detail without drifting from the original. A Gemini pass writes the detail prompt ("high resolution, sharp, detailed") from the source image, which keeps both stages pointed at the same content.
Graph: LoadImage -> Wan 2.2 (Wan2_2-T2V-A14B-LOW fp8, lightx2v cfg-step distill LoRA + a smartphone-photo LoRA, 25 steps) -> 2x ImageResize as the second stage's input -> the same Wan pair at 35 steps -> SaveImage. Two SaveImage nodes are wired: upscale-1 (2x, 1440x800 from the shipped 720x400 source) and upscale-2 (4x, 2880x1600). The record's cover is the 4x finish.
Runs on open weights in the cloud worker; no partner API. The graph writes both stages, so a run costs two Wan passes.
Похожие рабочие процессы
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
Посмотрите на объект под новым углом
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- FLUX.1 Fill
Edit a selected region
- FLUX.1 Fill
Extend an image’s borders