typeboolean
{
"NSFW": false,
"VAE": "noVAE",
"guidance_scale": 7,
"height": 768,
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"num_inference_steps": 20,
"number_picture": 1,
"prompt": "RAW photo, a portrait photo of a man in casual clothes, natural skin, 8k uhd, high quality, film grain, Fujifilm XT3",
"seed": 42,
"width": 512
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_B2f**********************************
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 wglint/3_rv using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"wglint/3_rv:f543bb04f1cf613c3df1cdb8219288c6b44abc2c39f006c188f8d22a9598bd47",
{
input: {
NSFW: false,
VAE: "noVAE",
guidance_scale: 7,
height: 768,
negative_prompt: "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
num_inference_steps: 20,
number_picture: 1,
prompt: "RAW photo, a portrait photo of a man in casual clothes, natural skin, 8k uhd, high quality, film grain, Fujifilm XT3",
seed: 42,
width: 512
}
}
);
// 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_B2f**********************************
This is your API token. Keep it to yourself.
import replicate
Run wglint/3_rv using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"wglint/3_rv:f543bb04f1cf613c3df1cdb8219288c6b44abc2c39f006c188f8d22a9598bd47",
input={
"NSFW": False,
"VAE": "noVAE",
"guidance_scale": 7,
"height": 768,
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"num_inference_steps": 20,
"number_picture": 1,
"prompt": "RAW photo, a portrait photo of a man in casual clothes, natural skin, 8k uhd, high quality, film grain, Fujifilm XT3",
"seed": 42,
"width": 512
}
)
# 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_B2f**********************************
This is your API token. Keep it to yourself.
Run wglint/3_rv 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": "wglint/3_rv:f543bb04f1cf613c3df1cdb8219288c6b44abc2c39f006c188f8d22a9598bd47",
"input": {
"NSFW": false,
"VAE": "noVAE",
"guidance_scale": 7,
"height": 768,
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"num_inference_steps": 20,
"number_picture": 1,
"prompt": "RAW photo, a portrait photo of a man in casual clothes, natural skin, 8k uhd, high quality, film grain, Fujifilm XT3",
"seed": 42,
"width": 512
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "m7645xjbzekn6jseklroh5ltwi",
"model": "wglint/3_rv",
"version": "f543bb04f1cf613c3df1cdb8219288c6b44abc2c39f006c188f8d22a9598bd47",
"input": {
"NSFW": false,
"VAE": "noVAE",
"guidance_scale": 7,
"height": 768,
"negative_prompt": "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck",
"num_inference_steps": 20,
"number_picture": 1,
"prompt": "RAW photo, a portrait photo of a man in casual clothes, natural skin, 8k uhd, high quality, film grain, Fujifilm XT3",
"seed": 42,
"width": 512
},
"logs": "0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:02, 6.68it/s]\n 10%|█ | 2/20 [00:00<00:02, 7.33it/s]\n 15%|█▌ | 3/20 [00:00<00:02, 7.80it/s]\n 20%|██ | 4/20 [00:00<00:01, 8.04it/s]\n 25%|██▌ | 5/20 [00:00<00:01, 8.18it/s]\n 30%|███ | 6/20 [00:00<00:01, 8.26it/s]\n 35%|███▌ | 7/20 [00:00<00:01, 8.32it/s]\n 40%|████ | 8/20 [00:00<00:01, 8.37it/s]\n 45%|████▌ | 9/20 [00:01<00:01, 8.38it/s]\n 50%|█████ | 10/20 [00:01<00:01, 8.39it/s]\n 55%|█████▌ | 11/20 [00:01<00:01, 8.39it/s]\n 60%|██████ | 12/20 [00:01<00:00, 8.40it/s]\n 65%|██████▌ | 13/20 [00:01<00:00, 8.40it/s]\n 70%|███████ | 14/20 [00:01<00:00, 8.40it/s]\n 75%|███████▌ | 15/20 [00:01<00:00, 8.40it/s]\n 80%|████████ | 16/20 [00:01<00:00, 8.40it/s]\n 85%|████████▌ | 17/20 [00:02<00:00, 8.41it/s]\n 90%|█████████ | 18/20 [00:02<00:00, 8.42it/s]\n 95%|█████████▌| 19/20 [00:02<00:00, 8.43it/s]\n100%|██████████| 20/20 [00:02<00:00, 8.43it/s]\n100%|██████████| 20/20 [00:02<00:00, 8.29it/s]\nStableDiffusionPipelineOutput(images=[<PIL.Image.Image image mode=RGB size=512x768 at 0x79D3C97E7190>], nsfw_content_detected=None)",
"output": [
"https://replicate.delivery/pbxt/npb7cKLmNN7JC5cDjSEuR82ianeG0xTQ9tiTmqBi0fcrqVBSA/picture_0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-12T00:26:16.557382Z",
"started_at": "2023-12-12T00:26:16.573309Z",
"completed_at": "2023-12-12T00:26:20.339871Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/m7645xjbzekn6jseklroh5ltwi/cancel",
"get": "https://api.replicate.com/v1/predictions/m7645xjbzekn6jseklroh5ltwi"
},
"metrics": {
"predict_time": 3.766562,
"total_time": 3.782489
}
}