Image Upscale: PiD Latent Decode
Input a latent image from a diffusion model and select a PiD checkpoint. Generate a high-resolution decoded image with 4x or 8x upscaling in a single pass.
ワークフローをダウンロードCloudで試す API ドキュメント
概要
Input a latent image from a diffusion model and select a PiD checkpoint. Generate a high-resolution decoded image with 4x or 8x upscaling in a single pass.
入力するもの
- ワークフローを読み込み中
ComfyUI で実行できます。 このワークフローはご自身のComfyUIでのみ実行できます。ダウンロードして、ファイルをキャンバスにドロップしてください。
ワークフローをダウンロードこのワークフローにはまだサンプル出力がありません。
ワークフローの内部
ノードグラフの読み取り専用プレビューです。ノードを編集するには、Comfy Cloudで開くかダウンロードしてください。
Loading the graph
Open full-size workflow previewこのワークフロー内のファイル
- Comfy Cloud
- いいえ
- 作成者
- 著者は利用できません
カスタムノードが必要です
- ワークフローを読み込み中
コードからこのワークフローを使用する
可能な場合はワークフローグラフと入力から生成されます。それ以外の場合は保存された例が表示されます。料金が発生する場合があるため、コードを実行する前に認証情報とエンドポイントを確認してください。
1 API キーを取得 ↗
What you need
- Runs on
- Comfy Cloud
- キー
- COMFY_API_KEY
有料の Cloud プランとクレジットが必要です。
API JSONをダウンロードAPI ドキュメント ↗
# 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({
"93": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"95:8",
0
],
"image_b": [
"94:79",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"96": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"95:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"232": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "A cinematic shot of a solitary figure viewed from behind, standing on a circular platform inside a massive concrete tube structure. The person is wearing a long beige trench coat and looking out through the large circular opening at a dense cityscape of tall skyscrapers with grid-like windows. The composition features strong concentric circles and framing, creating a sense of depth and isolation. The lighting is soft and diffused daylight, casting gentle shadows within the curved architecture. The art style is photorealistic with a slightly muted color palette dominated by beige, grey, and concrete tones. High resolution, architectural photography, 8k, sharp focus on the subject and background buildings, volumetric lighting, detailed texture of the concrete walls and fabric coat."
},
"_meta": {
"title": "Text String (Prompt)"
}
},
"233": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "PiD",
"images": [
"94:79",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"94:74": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "gemma_2_2b_it_elm_fp8_scaled.safetensors",
"device": "default",
"type": "pixeldit"
},
"_meta": {
"title": "Load CLIP"
}
},
"94:75": {
"class_type": "SamplerCustom",
"inputs": {
"add_noise": True,
"cfg": 1,
"latent_image": [
"94:84",
0
],
"model": [
"94:82",
0
],
"negative": [
"94:81",
0
],
"noise_seed": 3,
"positive": [
"94:86",
0
],
"sampler": [
"94:76",
0
],
"sigmas": [
"94:77",
0
]
},
"_meta": {
"title": "SamplerCustom"
}
},
"94:76": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "lcm"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"94:77": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"94:82",
0
],
"scheduler": "simple",
"steps": 4
},
"_meta": {
"title": "BasicScheduler"
}
},
"94:78": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "pixel_space"
},
"_meta": {
"title": "Load VAE"
}
},
"94:79": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"94:75",
0
],
"vae": [
"94:78",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"94:81": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"94:85",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"94:82": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "pid_flux1_1024_to_4096_4step_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"94:84": {
"class_type": "EmptyChromaRadianceLatentImage",
"inputs": {
"batch_size": 1,
"height": 4096,
"width": 4096
},
"_meta": {
"title": "EmptyChromaRadianceLatentImage"
}
},
"94:85": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"94:74",
0
],
"text": [
"232",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"94:86": {
"class_type": "PiDConditioning",
"inputs": {
"degrade_sigma": 0,
"latent": [
"95:3",
0
],
"latent_format": "flux",
"positive": [
"94:85",
0
]
},
"_meta": {
"title": "PiD Conditioning"
}
},
"95:11": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"95:28",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"95:13": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"95:27": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"95:30",
0
],
"text": [
"232",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"95:28": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "z_image_turbo_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"95:29": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"95:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"95:13",
0
],
"model": [
"95:11",
0
],
"negative": [
"95:33",
0
],
"positive": [
"95:27",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 118003886179702,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"95:30": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_4b.safetensors",
"device": "default",
"type": "lumina2"
},
"_meta": {
"title": "Load CLIP"
}
},
"95:33": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"95:27",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"95:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"95:3",
0
],
"vae": [
"95:29",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)