跳到主要内容

workflow

使用工作流进行生图

请求示例:

{
"requestId": "678571482378412436",
"params": {
"10": {
"classType": "LoraLoader",
"inputs": {
"clip": [
"4",
1
],
"lora_name": "648628718430054626",
"model": [
"4",
0
],
"strength_clip": 1,
"strength_model": 1,
}
},
"14": {
"classType": "LoraLoader",
"inputs": {
"clip": [
"10",
1
],
"lora_name": "631627137633337321",
"model": [
"10",
0
],
"strength_clip": 1,
"strength_model": 0.6,
}
},
"16": {
"classType": "LatentUpscale",
"inputs": {
"crop": "disabled",
"height": 1536,
"samples": [
"3",
0
],
"upscale_method": "nearest-exact",
"width": 1024
}
},
"17": {
"classType": "KSampler",
"inputs": {
"cfg": 8,
"denoise": 0.3,
"latent_image": [
"16",
0
],
"model": [
"4",
0
],
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"sampler_name": "dpmpp_2m_sde",
"scheduler": "karras",
"seed": 12345,
"steps": 30
}
},
"18": {
"classType": "VAEDecode",
"inputs": {
"samples": [
"17",
0
],
"vae": [
"4",
2
]
}
},
"3": {
"classType": "KSampler",
"inputs": {
"cfg": 7,
"denoise": 1,
"latent_image": [
"5",
0
],
"model": [
"14",
0
],
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"sampler_name": "dpmpp_2m_sde",
"scheduler": "karras",
"seed": 12345,
"steps": 26
}
},
"4": {
"classType": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "664602165660323756",
}
},
"5": {
"classType": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1536,
"width": 1024
}
},
"6": {
"classType": "CLIPTextEncode",
"inputs": {
"clip": [
"14",
1
],
"text": " (masterpiece, best quality:1.2), layla, layla, masterpiece, bestquality, 8k, cg"
}
},
"7": {
"classType": "CLIPTextEncode",
"inputs": {
"clip": [
"14",
1
],
"text": "sketch, duplicate, ugly, huge eyes, text, logo, monochrome, worst face, (bad and mutated hands:1.3), (worst quality:2.0), (low quality:2.0), (blurry:2.0), horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4), ((2girl)), (deformed fingers:1.2), (long fingers:1.2),(bad-artist-anime), bad-artist, bad hand, extra legs."
}
},
"9": {
"classType": "SaveImage",
"inputs": {
"filename_prefix": "TensorArt",
"images": [
"18",
0
]
}
}
}
}

返回示例:

{
"job": {
"id": "683082404926062625",
"status": "CREATED"
}
}

获取生图结果

返回示例:

{
"job": {
"id": "683082404926062625",
"status": "RUNNING",
"credits": 2.4,
"runningInfo": {
"workflowFinishItem": {
"status": "SUCCESS",
"nodes": {
"16": {
"id": "16",
"status": "SUCCESS"
},
"17": {
"id": "17",
"status": "SUCCESS",
"process": 1
},
"18": {
"id": "18",
"status": "SUCCESS"
},
"3": {
"id": "3",
"status": "SUCCESS",
"process": 1
},
"9": {
"id": "9",
"status": "SUCCESS",
"outputUi": {
"images": [
{
"filename": "http://tams-tusi-resource-sig.oss-cn-shanghai.aliyuncs.com/resource-upload%2Fshort-term%2F2024-01-15%2F94e1cbc2-871e-44b6-b0ca-79a4f78b38b4.png?Expires=1705318301&OSSAccessKeyId=LTAI5tA9wgpRFMZ23PwaJcL4&Signature=h2Z4ITwDiefBX6uHVjSZVXOEgIc%3D",
"type": "output",
"height": 1536,
"width": 1024,
"format": "png",
"imageResourceId": "94e1cbc2-871e-44b6-b0ca-79a4f78b38b4"
},
{
"filename": "http://tams-tusi-resource-sig.oss-cn-shanghai.aliyuncs.com/resource-upload%2Fshort-term%2F2024-01-15%2F053dc46e-c432-4f55-9f0d-5c44ce264714.png?Expires=1705318301&OSSAccessKeyId=LTAI5tA9wgpRFMZ23PwaJcL4&Signature=PN5YD%2F6pMAFC3lYoa1pEvDikzUk%3D",
"type": "output",
"height": 1536,
"width": 1024,
"format": "png",
"imageResourceId": "053dc46e-c432-4f55-9f0d-5c44ce264714"
}
]
}
}
}
}
}
}
}