Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
emaph /outpaint-controlnet-union:3947eb8c
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run emaph/outpaint-controlnet-union using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"emaph/outpaint-controlnet-union:3947eb8cde7f5953837f7f25b5b8ae7bb4e0c65ba38d1662d516c537cd6785e0",
{
input: {
top: 150,
left: 150,
image: "https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png",
right: 150,
bottom: 150,
prompt: "grass field, sunset, clouds",
output_format: "webp",
output_quality: 80,
negative_prompt: "ugly"
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run emaph/outpaint-controlnet-union using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"emaph/outpaint-controlnet-union:3947eb8cde7f5953837f7f25b5b8ae7bb4e0c65ba38d1662d516c537cd6785e0",
input={
"top": 150,
"left": 150,
"image": "https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png",
"right": 150,
"bottom": 150,
"prompt": "grass field, sunset, clouds",
"output_format": "webp",
"output_quality": 80,
"negative_prompt": "ugly"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run emaph/outpaint-controlnet-union using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "emaph/outpaint-controlnet-union:3947eb8cde7f5953837f7f25b5b8ae7bb4e0c65ba38d1662d516c537cd6785e0",
"input": {
"top": 150,
"left": 150,
"image": "https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png",
"right": 150,
"bottom": 150,
"prompt": "grass field, sunset, clouds",
"output_format": "webp",
"output_quality": 80,
"negative_prompt": "ugly"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-07-27T20:03:17.987029Z",
"created_at": "2024-07-27T19:57:54.538000Z",
"data_removed": false,
"error": null,
"id": "6fvgec3bx9rge0cgyq2vpehgam",
"input": {
"top": 150,
"left": 150,
"image": "https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png",
"right": 150,
"bottom": 150,
"prompt": "grass field, sunset, clouds",
"output_format": "webp",
"output_quality": 80,
"negative_prompt": "ugly"
},
"logs": "Random seed set to: 3062084987\nChecking inputs\nDownloading https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png to /tmp/inputs/Comfy-UI-temp-xdxpz-00001.png\n✅ /tmp/inputs/Comfy-UI-temp-xdxpz-00001.png\n====================================\nRunning workflow\ngot prompt\nExecuting node 4, title: Load Checkpoint, class type: CheckpointLoaderSimple\nmodel_type EPS\nUsing pytorch attention in VAE\nUsing pytorch attention in VAE\nloaded straight to GPU\nRequested to load SDXL\nLoading 1 new model\nExecuting node 6, title: Positive, class type: CLIPTextEncode\nRequested to load SDXLClipModel\nLoading 1 new model\nExecuting node 7, title: Negetive, class type: CLIPTextEncode\nExecuting node 16, title: Load ControlNet Model, class type: ControlNetLoader\nExecuting node 17, title: SetUnionControlNetType, class type: SetUnionControlNetType\nExecuting node 11, title: Load Image, class type: LoadImage\nExecuting node 10, title: Pad Image for Outpainting, class type: ImagePadForOutpaint\nExecuting node 48, title: InvertMask, class type: InvertMask\nExecuting node 47, title: Convert Mask to Image, class type: MaskToImage\nExecuting node 49, title: ImageCompositeMasked, class type: ImageCompositeMasked\nExecuting node 15, title: Apply ControlNet (Advanced), class type: ControlNetApplyAdvanced\nExecuting node 39, title: VAE Encode (for Inpainting), class type: VAEEncodeForInpaint\nRequested to load AutoencoderKL\nLoading 1 new model\nExecuting node 3, title: KSampler, class type: KSampler\nRequested to load ControlNet\nLoading 1 new model\n 0%| | 0/26 [00:00<?, ?it/s]\n 4%|▍ | 1/26 [00:01<00:37, 1.48s/it]\n 8%|▊ | 2/26 [00:02<00:34, 1.43s/it]\n 12%|█▏ | 3/26 [00:04<00:32, 1.41s/it]\n 15%|█▌ | 4/26 [00:05<00:30, 1.40s/it]\n 19%|█▉ | 5/26 [00:07<00:29, 1.40s/it]\n 23%|██▎ | 6/26 [00:08<00:27, 1.40s/it]\n 27%|██▋ | 7/26 [00:09<00:26, 1.40s/it]\n 31%|███ | 8/26 [00:11<00:25, 1.40s/it]\n 35%|███▍ | 9/26 [00:12<00:23, 1.41s/it]\n 38%|███▊ | 10/26 [00:14<00:22, 1.40s/it]\n 42%|████▏ | 11/26 [00:15<00:21, 1.41s/it]\n 46%|████▌ | 12/26 [00:16<00:19, 1.41s/it]\n 50%|█████ | 13/26 [00:18<00:18, 1.41s/it]\n 54%|█████▍ | 14/26 [00:19<00:16, 1.41s/it]\n 58%|█████▊ | 15/26 [00:21<00:15, 1.42s/it]\n 62%|██████▏ | 16/26 [00:22<00:14, 1.42s/it]\n 65%|██████▌ | 17/26 [00:23<00:12, 1.42s/it]\n 69%|██████▉ | 18/26 [00:25<00:11, 1.43s/it]\n 73%|███████▎ | 19/26 [00:26<00:10, 1.43s/it]\n 77%|███████▋ | 20/26 [00:28<00:08, 1.44s/it]\n 81%|████████ | 21/26 [00:29<00:07, 1.44s/it]\n 85%|████████▍ | 22/26 [00:31<00:05, 1.45s/it]\n 88%|████████▊ | 23/26 [00:32<00:04, 1.45s/it]\n 92%|█████████▏| 24/26 [00:34<00:02, 1.46s/it]\n 96%|█████████▌| 25/26 [00:35<00:01, 1.46s/it]\n100%|██████████| 26/26 [00:37<00:00, 1.47s/it]\n100%|██████████| 26/26 [00:37<00:00, 1.43s/it]\nExecuting node 8, title: VAE Decode, class type: VAEDecode\nExecuting node 58, title: ImageCompositeMasked, class type: ImageCompositeMasked\nExecuting node 65, title: Save Image, class type: SaveImage\nPrompt executed in 53.09 seconds\noutputs: {'65': {'images': [{'filename': 'outpainted_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\noutpainted_00001_.png",
"metrics": {
"predict_time": 54.461539476,
"total_time": 323.449029
},
"output": [
"https://replicate.delivery/czjl/cBsfmDDMoEzOdy4bF517fnm4XxVKns8vNR4dJx3ODv8FSwMTA/outpainted_00001_.webp"
],
"started_at": "2024-07-27T20:02:23.525489Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/6fvgec3bx9rge0cgyq2vpehgam",
"cancel": "https://api.replicate.com/v1/predictions/6fvgec3bx9rge0cgyq2vpehgam/cancel"
},
"version": "3947eb8cde7f5953837f7f25b5b8ae7bb4e0c65ba38d1662d516c537cd6785e0"
}
Random seed set to: 3062084987
Checking inputs
Downloading https://i.postimg.cc/PrR5JK6c/Comfy-UI-temp-xdxpz-00001.png to /tmp/inputs/Comfy-UI-temp-xdxpz-00001.png
✅ /tmp/inputs/Comfy-UI-temp-xdxpz-00001.png
====================================
Running workflow
got prompt
Executing node 4, title: Load Checkpoint, class type: CheckpointLoaderSimple
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
loaded straight to GPU
Requested to load SDXL
Loading 1 new model
Executing node 6, title: Positive, class type: CLIPTextEncode
Requested to load SDXLClipModel
Loading 1 new model
Executing node 7, title: Negetive, class type: CLIPTextEncode
Executing node 16, title: Load ControlNet Model, class type: ControlNetLoader
Executing node 17, title: SetUnionControlNetType, class type: SetUnionControlNetType
Executing node 11, title: Load Image, class type: LoadImage
Executing node 10, title: Pad Image for Outpainting, class type: ImagePadForOutpaint
Executing node 48, title: InvertMask, class type: InvertMask
Executing node 47, title: Convert Mask to Image, class type: MaskToImage
Executing node 49, title: ImageCompositeMasked, class type: ImageCompositeMasked
Executing node 15, title: Apply ControlNet (Advanced), class type: ControlNetApplyAdvanced
Executing node 39, title: VAE Encode (for Inpainting), class type: VAEEncodeForInpaint
Requested to load AutoencoderKL
Loading 1 new model
Executing node 3, title: KSampler, class type: KSampler
Requested to load ControlNet
Loading 1 new model
0%| | 0/26 [00:00<?, ?it/s]
4%|▍ | 1/26 [00:01<00:37, 1.48s/it]
8%|▊ | 2/26 [00:02<00:34, 1.43s/it]
12%|█▏ | 3/26 [00:04<00:32, 1.41s/it]
15%|█▌ | 4/26 [00:05<00:30, 1.40s/it]
19%|█▉ | 5/26 [00:07<00:29, 1.40s/it]
23%|██▎ | 6/26 [00:08<00:27, 1.40s/it]
27%|██▋ | 7/26 [00:09<00:26, 1.40s/it]
31%|███ | 8/26 [00:11<00:25, 1.40s/it]
35%|███▍ | 9/26 [00:12<00:23, 1.41s/it]
38%|███▊ | 10/26 [00:14<00:22, 1.40s/it]
42%|████▏ | 11/26 [00:15<00:21, 1.41s/it]
46%|████▌ | 12/26 [00:16<00:19, 1.41s/it]
50%|█████ | 13/26 [00:18<00:18, 1.41s/it]
54%|█████▍ | 14/26 [00:19<00:16, 1.41s/it]
58%|█████▊ | 15/26 [00:21<00:15, 1.42s/it]
62%|██████▏ | 16/26 [00:22<00:14, 1.42s/it]
65%|██████▌ | 17/26 [00:23<00:12, 1.42s/it]
69%|██████▉ | 18/26 [00:25<00:11, 1.43s/it]
73%|███████▎ | 19/26 [00:26<00:10, 1.43s/it]
77%|███████▋ | 20/26 [00:28<00:08, 1.44s/it]
81%|████████ | 21/26 [00:29<00:07, 1.44s/it]
85%|████████▍ | 22/26 [00:31<00:05, 1.45s/it]
88%|████████▊ | 23/26 [00:32<00:04, 1.45s/it]
92%|█████████▏| 24/26 [00:34<00:02, 1.46s/it]
96%|█████████▌| 25/26 [00:35<00:01, 1.46s/it]
100%|██████████| 26/26 [00:37<00:00, 1.47s/it]
100%|██████████| 26/26 [00:37<00:00, 1.43s/it]
Executing node 8, title: VAE Decode, class type: VAEDecode
Executing node 58, title: ImageCompositeMasked, class type: ImageCompositeMasked
Executing node 65, title: Save Image, class type: SaveImage
Prompt executed in 53.09 seconds
outputs: {'65': {'images': [{'filename': 'outpainted_00001_.png', 'subfolder': '', 'type': 'output'}]}}
====================================
outpainted_00001_.png