defaultA fantasy landscape, trending on artstation
typetext
{
"guidance_scale": 6.07,
"height": 512,
"image": "https://replicate.delivery/pbxt/JDjlS9i196GEZuR9lSzZJHRVSUcVmTl9NXdEPb5D6Lxs1VF2/vg-2.jpg",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "lvngvncnt, beautiful woman, highly detailed ",
"prompt_strength": 0.8,
"scheduler": "K_EULER",
"width": 512
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Bqq**********************************
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 hazxone/img2img-vg using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"hazxone/img2img-vg:76b7599585142940646d43cdaa259aa530d95fc270dbc1374d987ecab71469fb",
{
input: {
guidance_scale: 6.07,
height: 512,
image: "https://replicate.delivery/pbxt/JDjlS9i196GEZuR9lSzZJHRVSUcVmTl9NXdEPb5D6Lxs1VF2/vg-2.jpg",
num_inference_steps: 25,
num_outputs: 1,
prompt: "lvngvncnt, beautiful woman, highly detailed ",
prompt_strength: 0.8,
scheduler: "K_EULER",
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_Bqq**********************************
This is your API token. Keep it to yourself.
import replicate
Run hazxone/img2img-vg using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"hazxone/img2img-vg:76b7599585142940646d43cdaa259aa530d95fc270dbc1374d987ecab71469fb",
input={
"guidance_scale": 6.07,
"height": 512,
"image": "https://replicate.delivery/pbxt/JDjlS9i196GEZuR9lSzZJHRVSUcVmTl9NXdEPb5D6Lxs1VF2/vg-2.jpg",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "lvngvncnt, beautiful woman, highly detailed ",
"prompt_strength": 0.8,
"scheduler": "K_EULER",
"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_Bqq**********************************
This is your API token. Keep it to yourself.
Run hazxone/img2img-vg 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": "hazxone/img2img-vg:76b7599585142940646d43cdaa259aa530d95fc270dbc1374d987ecab71469fb",
"input": {
"guidance_scale": 6.07,
"height": 512,
"image": "https://replicate.delivery/pbxt/JDjlS9i196GEZuR9lSzZJHRVSUcVmTl9NXdEPb5D6Lxs1VF2/vg-2.jpg",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "lvngvncnt, beautiful woman, highly detailed ",
"prompt_strength": 0.8,
"scheduler": "K_EULER",
"width": 512
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "xu4h2gbb7kig4qtovszczfm4ia",
"model": "hazxone/img2img-vg",
"version": "76b7599585142940646d43cdaa259aa530d95fc270dbc1374d987ecab71469fb",
"input": {
"guidance_scale": 6.07,
"height": 512,
"image": "https://replicate.delivery/pbxt/JDjlS9i196GEZuR9lSzZJHRVSUcVmTl9NXdEPb5D6Lxs1VF2/vg-2.jpg",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "lvngvncnt, beautiful woman, highly detailed ",
"prompt_strength": 0.8,
"scheduler": "K_EULER",
"width": 512
},
"logs": "Using seed: 48979\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:09, 2.07it/s]\n 10%|█ | 2/20 [00:00<00:09, 2.00it/s]\n 15%|█▌ | 3/20 [00:01<00:08, 2.02it/s]\n 20%|██ | 4/20 [00:01<00:08, 2.00it/s]\n 25%|██▌ | 5/20 [00:02<00:07, 2.01it/s]\n 30%|███ | 6/20 [00:03<00:07, 1.99it/s]\n 35%|███▌ | 7/20 [00:03<00:06, 2.01it/s]\n 40%|████ | 8/20 [00:04<00:06, 1.98it/s]\n 45%|████▌ | 9/20 [00:04<00:05, 1.99it/s]\n 50%|█████ | 10/20 [00:05<00:05, 1.98it/s]\n 55%|█████▌ | 11/20 [00:05<00:04, 1.99it/s]\n 60%|██████ | 12/20 [00:06<00:03, 2.00it/s]\n 65%|██████▌ | 13/20 [00:06<00:03, 2.00it/s]\n 70%|███████ | 14/20 [00:07<00:03, 2.00it/s]\n 75%|███████▌ | 15/20 [00:07<00:02, 2.00it/s]\n 80%|████████ | 16/20 [00:08<00:02, 2.00it/s]\n 85%|████████▌ | 17/20 [00:08<00:01, 2.00it/s]\n 90%|█████████ | 18/20 [00:09<00:01, 1.99it/s]\n 95%|█████████▌| 19/20 [00:09<00:00, 1.99it/s]\n100%|██████████| 20/20 [00:10<00:00, 1.98it/s]\n100%|██████████| 20/20 [00:10<00:00, 1.99it/s]",
"output": [
"https://replicate.delivery/pbxt/sx061Hd4cVozNVzgw5bOdzedJy0WhKx5PNtphm2Nlqa7TSpIA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-07-23T03:00:59.548985Z",
"started_at": "2023-07-23T03:00:59.521441Z",
"completed_at": "2023-07-23T03:01:11.71154Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/xu4h2gbb7kig4qtovszczfm4ia/cancel",
"get": "https://api.replicate.com/v1/predictions/xu4h2gbb7kig4qtovszczfm4ia"
},
"metrics": {
"predict_time": 12.190099,
"total_time": 12.162555
}
}
