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.
mcai /urpm-v1.3-img2img:4df956e8
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mcai/urpm-v1.3-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mcai/urpm-v1.3-img2img:4df956e8dbfebf1afaf0c3ee98ad426ec58c4262d24360d054582e5eab2cb5f6",
{
input: {
image: "https://replicate.delivery/pbxt/IvyTOjVHHdwaNW60zu8SARghg6mNXkgXEOH0LAn238y53HYp/il_1588xN.620769841_3kw7.webp",
prompt: "A painting of a cafe terrace at night in Arles, France. The cafe is brightly lit, with yellow, green, and orange lights. The tables are filled with people, and there are a few musicians playing. The sky is dark blue, and there are stars twinkling in the distance. The painting is done in a post-impressionist style, with thick brushstrokes and vibrant colors.",
upscale: 1,
strength: 0.3,
scheduler: "EulerAncestralDiscrete",
num_outputs: 1,
guidance_scale: 7.5,
negative_prompt: "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
num_inference_steps: 30
}
}
);
// 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 mcai/urpm-v1.3-img2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mcai/urpm-v1.3-img2img:4df956e8dbfebf1afaf0c3ee98ad426ec58c4262d24360d054582e5eab2cb5f6",
input={
"image": "https://replicate.delivery/pbxt/IvyTOjVHHdwaNW60zu8SARghg6mNXkgXEOH0LAn238y53HYp/il_1588xN.620769841_3kw7.webp",
"prompt": "A painting of a cafe terrace at night in Arles, France. The cafe is brightly lit, with yellow, green, and orange lights. The tables are filled with people, and there are a few musicians playing. The sky is dark blue, and there are stars twinkling in the distance. The painting is done in a post-impressionist style, with thick brushstrokes and vibrant colors.",
"upscale": 1,
"strength": 0.3,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"num_inference_steps": 30
}
)
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 mcai/urpm-v1.3-img2img 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": "mcai/urpm-v1.3-img2img:4df956e8dbfebf1afaf0c3ee98ad426ec58c4262d24360d054582e5eab2cb5f6",
"input": {
"image": "https://replicate.delivery/pbxt/IvyTOjVHHdwaNW60zu8SARghg6mNXkgXEOH0LAn238y53HYp/il_1588xN.620769841_3kw7.webp",
"prompt": "A painting of a cafe terrace at night in Arles, France. The cafe is brightly lit, with yellow, green, and orange lights. The tables are filled with people, and there are a few musicians playing. The sky is dark blue, and there are stars twinkling in the distance. The painting is done in a post-impressionist style, with thick brushstrokes and vibrant colors.",
"upscale": 1,
"strength": 0.3,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"num_inference_steps": 30
}
}' \
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": "2023-06-03T02:00:35.481378Z",
"created_at": "2023-06-03T02:00:24.746314Z",
"data_removed": false,
"error": null,
"id": "rkhnjxyy4jbwjgw7kciwdmifly",
"input": {
"image": "https://replicate.delivery/pbxt/IvyTOjVHHdwaNW60zu8SARghg6mNXkgXEOH0LAn238y53HYp/il_1588xN.620769841_3kw7.webp",
"prompt": "A painting of a cafe terrace at night in Arles, France. The cafe is brightly lit, with yellow, green, and orange lights. The tables are filled with people, and there are a few musicians playing. The sky is dark blue, and there are stars twinkling in the distance. The painting is done in a post-impressionist style, with thick brushstrokes and vibrant colors.",
"upscale": 1,
"strength": 0.3,
"scheduler": "EulerAncestralDiscrete",
"num_outputs": 1,
"guidance_scale": 7.5,
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, deformed, blurry, bad anatomy, poorly drawn face, mutation, mutated, extra limb, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, disgusting, poorly drawn, childish, mutilated, mangled, old, surreal, calligraphy, sign, writing, watermark, text, body out of frame, extra legs, extra arms, extra feet, out of frame, poorly drawn feet, cross-eye",
"num_inference_steps": 30
},
"logs": "Using seed: 58613\nToken indices sequence length is longer than the specified maximum sequence length for this model (82 > 77). Running this sequence through the model will result in indexing errors\nThe following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['strokes and vibrant colors.']\n 0%| | 0/9 [00:00<?, ?it/s]\n 11%|█ | 1/9 [00:00<00:05, 1.35it/s]\n 22%|██▏ | 2/9 [00:01<00:05, 1.35it/s]\n 33%|███▎ | 3/9 [00:02<00:04, 1.35it/s]\n 44%|████▍ | 4/9 [00:02<00:03, 1.35it/s]\n 56%|█████▌ | 5/9 [00:03<00:02, 1.35it/s]\n 67%|██████▋ | 6/9 [00:04<00:02, 1.35it/s]\n 78%|███████▊ | 7/9 [00:05<00:01, 1.35it/s]\n 89%|████████▉ | 8/9 [00:05<00:00, 1.35it/s]\n100%|██████████| 9/9 [00:06<00:00, 1.35it/s]\n100%|██████████| 9/9 [00:06<00:00, 1.35it/s]",
"metrics": {
"predict_time": 10.779485,
"total_time": 10.735064
},
"output": [
"https://replicate.delivery/pbxt/5cVeicbZ2S1KUa5HL6PBYS4o2OfL614xZFcD2dSUVkBCDFCRA/out-0.png"
],
"started_at": "2023-06-03T02:00:24.701893Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/rkhnjxyy4jbwjgw7kciwdmifly",
"cancel": "https://api.replicate.com/v1/predictions/rkhnjxyy4jbwjgw7kciwdmifly/cancel"
},
"version": "4df956e8dbfebf1afaf0c3ee98ad426ec58c4262d24360d054582e5eab2cb5f6"
}
Using seed: 58613
Token indices sequence length is longer than the specified maximum sequence length for this model (82 > 77). Running this sequence through the model will result in indexing errors
The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['strokes and vibrant colors.']
0%| | 0/9 [00:00<?, ?it/s]
11%|█ | 1/9 [00:00<00:05, 1.35it/s]
22%|██▏ | 2/9 [00:01<00:05, 1.35it/s]
33%|███▎ | 3/9 [00:02<00:04, 1.35it/s]
44%|████▍ | 4/9 [00:02<00:03, 1.35it/s]
56%|█████▌ | 5/9 [00:03<00:02, 1.35it/s]
67%|██████▋ | 6/9 [00:04<00:02, 1.35it/s]
78%|███████▊ | 7/9 [00:05<00:01, 1.35it/s]
89%|████████▉ | 8/9 [00:05<00:00, 1.35it/s]
100%|██████████| 9/9 [00:06<00:00, 1.35it/s]
100%|██████████| 9/9 [00:06<00:00, 1.35it/s]