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.
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 camenduru/ml-mgie using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"camenduru/ml-mgie:cd6688b06dcdcf8b6c614abe400d37d40d85b9e07e438396582a1721686667b7",
{
input: {
seed: 13331,
prompt: "make the frame red",
text_cfg: 7.5,
image_cfg: 1.5,
input_image: "https://replicate.delivery/pbxt/KNSKXP6DiykiZn7bEsZoZiaxGmE5o90BSUbDr67KrbOZcAvc/_input_0.jpg"
}
}
);
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 camenduru/ml-mgie using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"camenduru/ml-mgie:cd6688b06dcdcf8b6c614abe400d37d40d85b9e07e438396582a1721686667b7",
input={
"seed": 13331,
"prompt": "make the frame red",
"text_cfg": 7.5,
"image_cfg": 1.5,
"input_image": "https://replicate.delivery/pbxt/KNSKXP6DiykiZn7bEsZoZiaxGmE5o90BSUbDr67KrbOZcAvc/_input_0.jpg"
}
)
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 camenduru/ml-mgie 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": "camenduru/ml-mgie:cd6688b06dcdcf8b6c614abe400d37d40d85b9e07e438396582a1721686667b7",
"input": {
"seed": 13331,
"prompt": "make the frame red",
"text_cfg": 7.5,
"image_cfg": 1.5,
"input_image": "https://replicate.delivery/pbxt/KNSKXP6DiykiZn7bEsZoZiaxGmE5o90BSUbDr67KrbOZcAvc/_input_0.jpg"
}
}' \
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-02-10T04:13:57.054187Z",
"created_at": "2024-02-10T04:12:29.814499Z",
"data_removed": false,
"error": null,
"id": "np5g2m3bbj6w3se3rvn4bbucka",
"input": {
"seed": 13331,
"prompt": "make the frame red",
"text_cfg": 7.5,
"image_cfg": 1.5,
"input_image": "https://replicate.delivery/pbxt/KNSKXP6DiykiZn7bEsZoZiaxGmE5o90BSUbDr67KrbOZcAvc/_input_0.jpg"
},
"logs": "/usr/local/lib/python3.10/site-packages/transformers/generation/utils.py:1211: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)\nwarnings.warn(",
"metrics": {
"predict_time": 12.281035,
"total_time": 87.239688
},
"output": {
"path": "https://replicate.delivery/pbxt/LkDA2ecYabWSdSnQjomeAewvXaPjB5jZMFXIsOZnffshAVpSC/image.png",
"text": "If the frame of the glasses in the image were made red, the overall appearance of the scene would change significantly.The red frame would draw more attention to the glass and create a stronger contrast with the black frame."
},
"started_at": "2024-02-10T04:13:44.773152Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/np5g2m3bbj6w3se3rvn4bbucka",
"cancel": "https://api.replicate.com/v1/predictions/np5g2m3bbj6w3se3rvn4bbucka/cancel"
},
"version": "cd6688b06dcdcf8b6c614abe400d37d40d85b9e07e438396582a1721686667b7"
}
/usr/local/lib/python3.10/site-packages/transformers/generation/utils.py:1211: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use a generation configuration file (see https://huggingface.co/docs/transformers/main_classes/text_generation)
warnings.warn(