Readme
This model doesn't have a readme.
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mohamad1998630/controlnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mohamad1998630/controlnet:905298f5d96cb992b6133132b151d4029122599cfd57d7ceb4c4e447b2390855",
{
input: {
eta: 0,
seed: 3.5,
scale: 9,
prompt: "Put furniture",
a_prompt: "best quality, extremely detailed",
n_prompt: "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
strength: 1,
ddim_steps: 20,
guess_mode: false,
num_samples: 1,
image_resolution: 512,
input_image_path: "https://replicate.delivery/pbxt/KSbEAl9T5UeDInRBNViM9xIpyYR2XNcRVqXC8gKJeWSfNe1y/point3d-commercial-imaging-ltd-nQlVMCHPysY-unsplash.jpg",
detect_resolution: 512
}
}
);
console.log(output);
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 mohamad1998630/controlnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mohamad1998630/controlnet:905298f5d96cb992b6133132b151d4029122599cfd57d7ceb4c4e447b2390855",
input={
"eta": 0,
"seed": 3.5,
"scale": 9,
"prompt": "Put furniture",
"a_prompt": "best quality, extremely detailed",
"n_prompt": "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"strength": 1,
"ddim_steps": 20,
"guess_mode": False,
"num_samples": 1,
"image_resolution": 512,
"input_image_path": "https://replicate.delivery/pbxt/KSbEAl9T5UeDInRBNViM9xIpyYR2XNcRVqXC8gKJeWSfNe1y/point3d-commercial-imaging-ltd-nQlVMCHPysY-unsplash.jpg",
"detect_resolution": 512
}
)
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 mohamad1998630/controlnet 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": "mohamad1998630/controlnet:905298f5d96cb992b6133132b151d4029122599cfd57d7ceb4c4e447b2390855",
"input": {
"eta": 0,
"seed": 3.5,
"scale": 9,
"prompt": "Put furniture",
"a_prompt": "best quality, extremely detailed",
"n_prompt": "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"strength": 1,
"ddim_steps": 20,
"guess_mode": false,
"num_samples": 1,
"image_resolution": 512,
"input_image_path": "https://replicate.delivery/pbxt/KSbEAl9T5UeDInRBNViM9xIpyYR2XNcRVqXC8gKJeWSfNe1y/point3d-commercial-imaging-ltd-nQlVMCHPysY-unsplash.jpg",
"detect_resolution": 512
}
}' \
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
{
"completed_at": "2024-02-24T16:07:06.767767Z",
"created_at": "2024-02-24T15:58:54.438733Z",
"data_removed": false,
"error": null,
"id": "elsb22zbvrv5nxstfzbzfrstpy",
"input": {
"eta": 0,
"seed": 3.5,
"scale": 9,
"prompt": "Put furniture",
"a_prompt": "best quality, extremely detailed",
"n_prompt": "longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",
"strength": 1,
"ddim_steps": 20,
"guess_mode": false,
"num_samples": 1,
"image_resolution": 512,
"input_image_path": "https://replicate.delivery/pbxt/KSbEAl9T5UeDInRBNViM9xIpyYR2XNcRVqXC8gKJeWSfNe1y/point3d-commercial-imaging-ltd-nQlVMCHPysY-unsplash.jpg",
"detect_resolution": 512
},
"logs": "Image shape: (4480, 6720, 3)\n/src/annotator/uniformer/mmseg/models/segmentors/base.py:271: UserWarning: show==False and out_file is not specified, only result image will be returned\nwarnings.warn('show==False and out_file is not specified, only '\nGlobal seed set to 3\nData shape for DDIM sampling is (1, 4, 64, 96), eta 0.0\nRunning DDIM Sampling with 20 timesteps\nDDIM Sampler: 0%| | 0/20 [00:00<?, ?it/s]\nDDIM Sampler: 5%|▌ | 1/20 [00:01<00:30, 1.59s/it]\nDDIM Sampler: 10%|█ | 2/20 [00:02<00:26, 1.47s/it]\nDDIM Sampler: 15%|█▌ | 3/20 [00:04<00:24, 1.43s/it]\nDDIM Sampler: 20%|██ | 4/20 [00:05<00:22, 1.42s/it]\nDDIM Sampler: 25%|██▌ | 5/20 [00:07<00:21, 1.41s/it]\nDDIM Sampler: 30%|███ | 6/20 [00:08<00:19, 1.41s/it]\nDDIM Sampler: 35%|███▌ | 7/20 [00:09<00:18, 1.41s/it]\nDDIM Sampler: 40%|████ | 8/20 [00:11<00:16, 1.41s/it]\nDDIM Sampler: 45%|████▌ | 9/20 [00:12<00:15, 1.42s/it]\nDDIM Sampler: 50%|█████ | 10/20 [00:14<00:14, 1.42s/it]\nDDIM Sampler: 55%|█████▌ | 11/20 [00:15<00:12, 1.42s/it]\nDDIM Sampler: 60%|██████ | 12/20 [00:17<00:11, 1.43s/it]\nDDIM Sampler: 65%|██████▌ | 13/20 [00:18<00:10, 1.43s/it]\nDDIM Sampler: 70%|███████ | 14/20 [00:19<00:08, 1.43s/it]\nDDIM Sampler: 75%|███████▌ | 15/20 [00:21<00:07, 1.43s/it]\nDDIM Sampler: 80%|████████ | 16/20 [00:22<00:05, 1.43s/it]\nDDIM Sampler: 85%|████████▌ | 17/20 [00:24<00:04, 1.44s/it]\nDDIM Sampler: 90%|█████████ | 18/20 [00:25<00:02, 1.44s/it]\nDDIM Sampler: 95%|█████████▌| 19/20 [00:27<00:01, 1.45s/it]\nDDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.45s/it]\nDDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.43s/it]\n<class 'numpy.ndarray'>\n(512, 768, 3)",
"metrics": {
"predict_time": 35.301674,
"total_time": 492.329034
},
"output": [
"https://storage.googleapis.com/replicate-files/PWpGmEAwYp50OddPlMXlUXKnekgZE78oqSucrfA7nFRqY8ZSA/out-0.png"
],
"started_at": "2024-02-24T16:06:31.466093Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/elsb22zbvrv5nxstfzbzfrstpy",
"cancel": "https://api.replicate.com/v1/predictions/elsb22zbvrv5nxstfzbzfrstpy/cancel"
},
"version": "905298f5d96cb992b6133132b151d4029122599cfd57d7ceb4c4e447b2390855"
}
Image shape: (4480, 6720, 3)
/src/annotator/uniformer/mmseg/models/segmentors/base.py:271: UserWarning: show==False and out_file is not specified, only result image will be returned
warnings.warn('show==False and out_file is not specified, only '
Global seed set to 3
Data shape for DDIM sampling is (1, 4, 64, 96), eta 0.0
Running DDIM Sampling with 20 timesteps
DDIM Sampler: 0%| | 0/20 [00:00<?, ?it/s]
DDIM Sampler: 5%|▌ | 1/20 [00:01<00:30, 1.59s/it]
DDIM Sampler: 10%|█ | 2/20 [00:02<00:26, 1.47s/it]
DDIM Sampler: 15%|█▌ | 3/20 [00:04<00:24, 1.43s/it]
DDIM Sampler: 20%|██ | 4/20 [00:05<00:22, 1.42s/it]
DDIM Sampler: 25%|██▌ | 5/20 [00:07<00:21, 1.41s/it]
DDIM Sampler: 30%|███ | 6/20 [00:08<00:19, 1.41s/it]
DDIM Sampler: 35%|███▌ | 7/20 [00:09<00:18, 1.41s/it]
DDIM Sampler: 40%|████ | 8/20 [00:11<00:16, 1.41s/it]
DDIM Sampler: 45%|████▌ | 9/20 [00:12<00:15, 1.42s/it]
DDIM Sampler: 50%|█████ | 10/20 [00:14<00:14, 1.42s/it]
DDIM Sampler: 55%|█████▌ | 11/20 [00:15<00:12, 1.42s/it]
DDIM Sampler: 60%|██████ | 12/20 [00:17<00:11, 1.43s/it]
DDIM Sampler: 65%|██████▌ | 13/20 [00:18<00:10, 1.43s/it]
DDIM Sampler: 70%|███████ | 14/20 [00:19<00:08, 1.43s/it]
DDIM Sampler: 75%|███████▌ | 15/20 [00:21<00:07, 1.43s/it]
DDIM Sampler: 80%|████████ | 16/20 [00:22<00:05, 1.43s/it]
DDIM Sampler: 85%|████████▌ | 17/20 [00:24<00:04, 1.44s/it]
DDIM Sampler: 90%|█████████ | 18/20 [00:25<00:02, 1.44s/it]
DDIM Sampler: 95%|█████████▌| 19/20 [00:27<00:01, 1.45s/it]
DDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.45s/it]
DDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.43s/it]
<class 'numpy.ndarray'>
(512, 768, 3)
This model costs approximately $0.085 to run on Replicate, or 11 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.
This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 7 minutes. The predict time for this model varies significantly based on the inputs.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
This model costs approximately $0.085 to run on Replicate, but this varies depending on your inputs. View more.
Choose a file from your machine
Hint: you can also drag files onto the input
Image shape: (4480, 6720, 3)
/src/annotator/uniformer/mmseg/models/segmentors/base.py:271: UserWarning: show==False and out_file is not specified, only result image will be returned
warnings.warn('show==False and out_file is not specified, only '
Global seed set to 3
Data shape for DDIM sampling is (1, 4, 64, 96), eta 0.0
Running DDIM Sampling with 20 timesteps
DDIM Sampler: 0%| | 0/20 [00:00<?, ?it/s]
DDIM Sampler: 5%|▌ | 1/20 [00:01<00:30, 1.59s/it]
DDIM Sampler: 10%|█ | 2/20 [00:02<00:26, 1.47s/it]
DDIM Sampler: 15%|█▌ | 3/20 [00:04<00:24, 1.43s/it]
DDIM Sampler: 20%|██ | 4/20 [00:05<00:22, 1.42s/it]
DDIM Sampler: 25%|██▌ | 5/20 [00:07<00:21, 1.41s/it]
DDIM Sampler: 30%|███ | 6/20 [00:08<00:19, 1.41s/it]
DDIM Sampler: 35%|███▌ | 7/20 [00:09<00:18, 1.41s/it]
DDIM Sampler: 40%|████ | 8/20 [00:11<00:16, 1.41s/it]
DDIM Sampler: 45%|████▌ | 9/20 [00:12<00:15, 1.42s/it]
DDIM Sampler: 50%|█████ | 10/20 [00:14<00:14, 1.42s/it]
DDIM Sampler: 55%|█████▌ | 11/20 [00:15<00:12, 1.42s/it]
DDIM Sampler: 60%|██████ | 12/20 [00:17<00:11, 1.43s/it]
DDIM Sampler: 65%|██████▌ | 13/20 [00:18<00:10, 1.43s/it]
DDIM Sampler: 70%|███████ | 14/20 [00:19<00:08, 1.43s/it]
DDIM Sampler: 75%|███████▌ | 15/20 [00:21<00:07, 1.43s/it]
DDIM Sampler: 80%|████████ | 16/20 [00:22<00:05, 1.43s/it]
DDIM Sampler: 85%|████████▌ | 17/20 [00:24<00:04, 1.44s/it]
DDIM Sampler: 90%|█████████ | 18/20 [00:25<00:02, 1.44s/it]
DDIM Sampler: 95%|█████████▌| 19/20 [00:27<00:01, 1.45s/it]
DDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.45s/it]
DDIM Sampler: 100%|██████████| 20/20 [00:28<00:00, 1.43s/it]
<class 'numpy.ndarray'>
(512, 768, 3)