Using Image with Mask Endpoints​
These endpoints are used in a similar way to other AI Server endpoints where you can provide:
RefId
- provide a unique identifier to track requestsTag
- categorize like requests under a common group
In addition Queue requests can provide:
ReplyTo
- URL to send a POST request to when the request is complete
Image with Mask​
var response = client.PostFilesWithRequest(new ImageWithMask {
PositivePrompt = "A beautiful sunset over the ocean",
NegativePrompt = "A pixelated, low-quality image"
},
[new UploadFile("image", File.OpenRead("files/comfyui_upload_test.png"), "image"),
new UploadFile("mask", File.OpenRead("files/comfyui_upload_test_mask.png"), "mask")]
);
response.Outputs[0].Url.DownloadFileTo(outputFileName);
Queue Image with Mask​
var response = client.PostFilesWithRequest(new QueueImageWithMask {
PositivePrompt = "A beautiful sunset over the ocean",
NegativePrompt = "A pixelated, low-quality image"
},
[new UploadFile("image", File.OpenRead("files/comfyui_upload_test.png"), "image"),
new UploadFile("mask", File.OpenRead("files/comfyui_upload_test_mask.png"), "mask")]
);