typetext
{
"guidance_scale": 7.5,
"height": "512",
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "i put da new forgis on the jeep, im drivin till the, bloody bottoms is underneath, cuz all my homies got it out the streets\n",
"scheduler": "EulerAncestralDiscrete",
"width": "768"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_f2g**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mcai/edge-of-realism-v2.0 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mcai/edge-of-realism-v2.0:7af94dd511ff9cfe57ca47a20cbe82d0249e78dc9ea9e746569a0c0d285b61c4",
{
input: {
guidance_scale: 7.5,
height: "512",
negative_prompt: "disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
num_inference_steps: 30,
num_outputs: 1,
prompt: "i put da new forgis on the jeep, im drivin till the, bloody bottoms is underneath, cuz all my homies got it out the streets\n",
scheduler: "EulerAncestralDiscrete",
width: "768"
}
}
);
// 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=r8_f2g**********************************
This is your API token. Keep it to yourself.
import replicate
Run mcai/edge-of-realism-v2.0 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mcai/edge-of-realism-v2.0:7af94dd511ff9cfe57ca47a20cbe82d0249e78dc9ea9e746569a0c0d285b61c4",
input={
"guidance_scale": 7.5,
"height": "512",
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "i put da new forgis on the jeep, im drivin till the, bloody bottoms is underneath, cuz all my homies got it out the streets\n",
"scheduler": "EulerAncestralDiscrete",
"width": "768"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_f2g**********************************
This is your API token. Keep it to yourself.
Run mcai/edge-of-realism-v2.0 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/edge-of-realism-v2.0:7af94dd511ff9cfe57ca47a20cbe82d0249e78dc9ea9e746569a0c0d285b61c4",
"input": {
"guidance_scale": 7.5,
"height": "512",
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "i put da new forgis on the jeep, im drivin till the, bloody bottoms is underneath, cuz all my homies got it out the streets\\n",
"scheduler": "EulerAncestralDiscrete",
"width": "768"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "ymcrs7optvflxaj74q57t6axbq",
"model": "mcai/edge-of-realism-v2.0",
"version": "7af94dd511ff9cfe57ca47a20cbe82d0249e78dc9ea9e746569a0c0d285b61c4",
"input": {
"guidance_scale": 7.5,
"height": "512",
"negative_prompt": "disfigured, kitsch, ugly, oversaturated, greain, low-res, Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, extra limb, ugly, poorly drawn hands, missing limb, blurry, floating limbs, disconnected limbs, malformed hands, blur, out of focus, long neck, long body, ugly, 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, blurry, bad anatomy",
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "i put da new forgis on the jeep, im drivin till the, bloody bottoms is underneath, cuz all my homies got it out the streets\n",
"scheduler": "EulerAncestralDiscrete",
"width": "768"
},
"logs": "Using seed: 4328\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:10, 2.73it/s]\n 7%|▋ | 2/30 [00:00<00:07, 3.54it/s]\n 10%|█ | 3/30 [00:00<00:06, 3.90it/s]\n 13%|█▎ | 4/30 [00:01<00:06, 4.08it/s]\n 17%|█▋ | 5/30 [00:01<00:06, 4.09it/s]\n 20%|██ | 6/30 [00:01<00:05, 4.21it/s]\n 23%|██▎ | 7/30 [00:01<00:05, 4.28it/s]\n 27%|██▋ | 8/30 [00:01<00:05, 4.31it/s]\n 30%|███ | 9/30 [00:02<00:04, 4.34it/s]\n 33%|███▎ | 10/30 [00:02<00:04, 4.35it/s]\n 37%|███▋ | 11/30 [00:02<00:04, 4.36it/s]\n 40%|████ | 12/30 [00:02<00:04, 4.34it/s]\n 43%|████▎ | 13/30 [00:03<00:03, 4.36it/s]\n 47%|████▋ | 14/30 [00:03<00:03, 4.36it/s]\n 50%|█████ | 15/30 [00:03<00:03, 4.36it/s]\n 53%|█████▎ | 16/30 [00:03<00:03, 4.36it/s]\n 57%|█████▋ | 17/30 [00:04<00:02, 4.37it/s]\n 60%|██████ | 18/30 [00:04<00:02, 4.37it/s]\n 63%|██████▎ | 19/30 [00:04<00:02, 4.36it/s]\n 67%|██████▋ | 20/30 [00:04<00:02, 4.36it/s]\n 70%|███████ | 21/30 [00:04<00:02, 4.34it/s]\n 73%|███████▎ | 22/30 [00:05<00:01, 4.32it/s]\n 77%|███████▋ | 23/30 [00:05<00:01, 4.32it/s]\n 80%|████████ | 24/30 [00:05<00:01, 4.33it/s]\n 83%|████████▎ | 25/30 [00:05<00:01, 4.33it/s]\n 87%|████████▋ | 26/30 [00:06<00:00, 4.33it/s]\n 90%|█████████ | 27/30 [00:06<00:00, 4.36it/s]\n 93%|█████████▎| 28/30 [00:06<00:00, 4.37it/s]\n 97%|█████████▋| 29/30 [00:06<00:00, 4.36it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.34it/s]\n100%|██████████| 30/30 [00:07<00:00, 4.27it/s]",
"output": [
"https://replicate.delivery/pbxt/Sk3O8fpCHO3NYKGNXlRitXwikPyWhshxz4FFSEBtyJpNAmdIA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-05-13T04:12:04.18617Z",
"started_at": "2023-05-13T04:12:04.265531Z",
"completed_at": "2023-05-13T04:12:12.585271Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ymcrs7optvflxaj74q57t6axbq/cancel",
"get": "https://api.replicate.com/v1/predictions/ymcrs7optvflxaj74q57t6axbq"
},
"metrics": {
"predict_time": 8.31974,
"total_time": 8.399101
}
}