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:377564d3
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:377564d35153c66f8629d9540480813685d114f0552e9a3c9ffe5dd315091e68",
{
input: {
cfg: 4,
top: 0,
left: 400,
image: "https://replicate.delivery/pbxt/LLeEjiDlyLmiJLR2yh7rsiijobX9cWaTOvLTJfwqmcHFivr3/00008-81734364.png",
right: 400,
steps: 20,
bottom: 0,
prompt: "japanese village, relaxing, anime drawing",
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:377564d35153c66f8629d9540480813685d114f0552e9a3c9ffe5dd315091e68",
input={
"cfg": 4,
"top": 0,
"left": 400,
"image": "https://replicate.delivery/pbxt/LLeEjiDlyLmiJLR2yh7rsiijobX9cWaTOvLTJfwqmcHFivr3/00008-81734364.png",
"right": 400,
"steps": 20,
"bottom": 0,
"prompt": "japanese village, relaxing, anime drawing",
"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:377564d35153c66f8629d9540480813685d114f0552e9a3c9ffe5dd315091e68",
"input": {
"cfg": 4,
"top": 0,
"left": 400,
"image": "https://replicate.delivery/pbxt/LLeEjiDlyLmiJLR2yh7rsiijobX9cWaTOvLTJfwqmcHFivr3/00008-81734364.png",
"right": 400,
"steps": 20,
"bottom": 0,
"prompt": "japanese village, relaxing, anime drawing",
"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-28T18:03:31.351739Z",
"created_at": "2024-07-28T18:01:47.961000Z",
"data_removed": false,
"error": null,
"id": "0gk4cbbtq5rgj0cgza0rqaxtm8",
"input": {
"cfg": 4,
"top": 0,
"left": 400,
"image": "https://replicate.delivery/pbxt/LLeEjiDlyLmiJLR2yh7rsiijobX9cWaTOvLTJfwqmcHFivr3/00008-81734364.png",
"right": 400,
"steps": 20,
"bottom": 0,
"prompt": "japanese village, relaxing, anime drawing",
"output_format": "webp",
"output_quality": 80,
"negative_prompt": "ugly"
},
"logs": "Random seed set to: 577323934\nChecking inputs\n✅ /tmp/inputs/image.png\n====================================\nChecking weights\n⏳ Downloading juggernautXL_v8Rundiffusion.safetensors to ComfyUI/models/checkpoints\n✅ juggernautXL_v8Rundiffusion.safetensors downloaded to ComfyUI/models/checkpoints in 3.90s, size: 6776.19MB\n✅ diffusion_pytorch_model_promax.safetensors exists in ComfyUI/models/controlnet\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/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:06, 3.14it/s]\n 10%|█ | 2/20 [00:00<00:04, 3.69it/s]\n 15%|█▌ | 3/20 [00:00<00:04, 3.94it/s]\n 20%|██ | 4/20 [00:01<00:03, 4.06it/s]\n 25%|██▌ | 5/20 [00:01<00:03, 4.11it/s]\n 30%|███ | 6/20 [00:01<00:03, 4.16it/s]\n 35%|███▌ | 7/20 [00:01<00:03, 4.19it/s]\n 40%|████ | 8/20 [00:01<00:02, 4.20it/s]\n 45%|████▌ | 9/20 [00:02<00:02, 4.22it/s]\n 50%|█████ | 10/20 [00:02<00:02, 4.23it/s]\n 55%|█████▌ | 11/20 [00:02<00:02, 4.25it/s]\n 60%|██████ | 12/20 [00:02<00:01, 4.26it/s]\n 65%|██████▌ | 13/20 [00:03<00:01, 4.26it/s]\n 70%|███████ | 14/20 [00:03<00:01, 4.26it/s]\n 75%|███████▌ | 15/20 [00:03<00:01, 4.27it/s]\n 80%|████████ | 16/20 [00:03<00:00, 4.27it/s]\n 85%|████████▌ | 17/20 [00:04<00:00, 4.27it/s]\n 90%|█████████ | 18/20 [00:04<00:00, 4.27it/s]\n 95%|█████████▌| 19/20 [00:04<00:00, 4.27it/s]\n100%|██████████| 20/20 [00:04<00:00, 4.27it/s]\n100%|██████████| 20/20 [00:04<00:00, 4.19it/s]\nExecuting node 8, title: VAE Decode, class type: VAEDecode\nExecuting node 60, title: Save Image, class type: SaveImage\nPrompt executed in 10.48 seconds\noutputs: {'60': {'images': [{'filename': 'outpainted_00001_.png', 'subfolder': '', 'type': 'output'}]}}\n====================================\noutpainted_00001_.png",
"metrics": {
"predict_time": 16.165886814,
"total_time": 103.390739
},
"output": [
"https://replicate.delivery/pbxt/dFQ3cBfGWNztViJlIeOfrfQiPjPFfDRjx4qCGIbGlX8Se5QzE/outpainted_00001_.webp"
],
"started_at": "2024-07-28T18:03:15.185852Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/0gk4cbbtq5rgj0cgza0rqaxtm8",
"cancel": "https://api.replicate.com/v1/predictions/0gk4cbbtq5rgj0cgza0rqaxtm8/cancel"
},
"version": "377564d35153c66f8629d9540480813685d114f0552e9a3c9ffe5dd315091e68"
}
Random seed set to: 577323934
Checking inputs
✅ /tmp/inputs/image.png
====================================
Checking weights
⏳ Downloading juggernautXL_v8Rundiffusion.safetensors to ComfyUI/models/checkpoints
✅ juggernautXL_v8Rundiffusion.safetensors downloaded to ComfyUI/models/checkpoints in 3.90s, size: 6776.19MB
✅ diffusion_pytorch_model_promax.safetensors exists in ComfyUI/models/controlnet
====================================
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/20 [00:00<?, ?it/s]
5%|▌ | 1/20 [00:00<00:06, 3.14it/s]
10%|█ | 2/20 [00:00<00:04, 3.69it/s]
15%|█▌ | 3/20 [00:00<00:04, 3.94it/s]
20%|██ | 4/20 [00:01<00:03, 4.06it/s]
25%|██▌ | 5/20 [00:01<00:03, 4.11it/s]
30%|███ | 6/20 [00:01<00:03, 4.16it/s]
35%|███▌ | 7/20 [00:01<00:03, 4.19it/s]
40%|████ | 8/20 [00:01<00:02, 4.20it/s]
45%|████▌ | 9/20 [00:02<00:02, 4.22it/s]
50%|█████ | 10/20 [00:02<00:02, 4.23it/s]
55%|█████▌ | 11/20 [00:02<00:02, 4.25it/s]
60%|██████ | 12/20 [00:02<00:01, 4.26it/s]
65%|██████▌ | 13/20 [00:03<00:01, 4.26it/s]
70%|███████ | 14/20 [00:03<00:01, 4.26it/s]
75%|███████▌ | 15/20 [00:03<00:01, 4.27it/s]
80%|████████ | 16/20 [00:03<00:00, 4.27it/s]
85%|████████▌ | 17/20 [00:04<00:00, 4.27it/s]
90%|█████████ | 18/20 [00:04<00:00, 4.27it/s]
95%|█████████▌| 19/20 [00:04<00:00, 4.27it/s]
100%|██████████| 20/20 [00:04<00:00, 4.27it/s]
100%|██████████| 20/20 [00:04<00:00, 4.19it/s]
Executing node 8, title: VAE Decode, class type: VAEDecode
Executing node 60, title: Save Image, class type: SaveImage
Prompt executed in 10.48 seconds
outputs: {'60': {'images': [{'filename': 'outpainted_00001_.png', 'subfolder': '', 'type': 'output'}]}}
====================================
outpainted_00001_.png