defaultA fantasy landscape, trending on artstation
typetext
{
"guidance_scale": "5.5",
"image": "https://replicate.delivery/pbxt/IAh0VDQpBV4STGq3JtNAFGA09FCYini5FZHMZl39OL7PwafI/sketch-mountains-input.jpeg",
"negative_prompt": "light sky, day",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A fantasy landscape at a dark moonlit night, black sky, trending on artstation",
"prompt_strength": 0.9,
"scheduler": "K_EULER_ANCESTRAL"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Lye**********************************
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 pwntus/stable-diffusion-depth2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pwntus/stable-diffusion-depth2img:90a616d5e8e49d4387c8e1de57f6a62f8182a99644468a22890e8a956a45a964",
{
input: {
guidance_scale: "5.5",
image: "https://replicate.delivery/pbxt/IAh0VDQpBV4STGq3JtNAFGA09FCYini5FZHMZl39OL7PwafI/sketch-mountains-input.jpeg",
negative_prompt: "light sky, day",
num_inference_steps: 50,
num_outputs: 1,
prompt: "A fantasy landscape at a dark moonlit night, black sky, trending on artstation",
prompt_strength: 0.9,
scheduler: "K_EULER_ANCESTRAL"
}
}
);
// 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_Lye**********************************
This is your API token. Keep it to yourself.
import replicate
Run pwntus/stable-diffusion-depth2img using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pwntus/stable-diffusion-depth2img:90a616d5e8e49d4387c8e1de57f6a62f8182a99644468a22890e8a956a45a964",
input={
"guidance_scale": "5.5",
"image": "https://replicate.delivery/pbxt/IAh0VDQpBV4STGq3JtNAFGA09FCYini5FZHMZl39OL7PwafI/sketch-mountains-input.jpeg",
"negative_prompt": "light sky, day",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A fantasy landscape at a dark moonlit night, black sky, trending on artstation",
"prompt_strength": 0.9,
"scheduler": "K_EULER_ANCESTRAL"
}
)
# 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_Lye**********************************
This is your API token. Keep it to yourself.
Run pwntus/stable-diffusion-depth2img 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": "pwntus/stable-diffusion-depth2img:90a616d5e8e49d4387c8e1de57f6a62f8182a99644468a22890e8a956a45a964",
"input": {
"guidance_scale": "5.5",
"image": "https://replicate.delivery/pbxt/IAh0VDQpBV4STGq3JtNAFGA09FCYini5FZHMZl39OL7PwafI/sketch-mountains-input.jpeg",
"negative_prompt": "light sky, day",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A fantasy landscape at a dark moonlit night, black sky, trending on artstation",
"prompt_strength": 0.9,
"scheduler": "K_EULER_ANCESTRAL"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "kguyn6gfsnbttmmngrr3hj6kwq",
"model": "pwntus/stable-diffusion-depth2img",
"version": "90a616d5e8e49d4387c8e1de57f6a62f8182a99644468a22890e8a956a45a964",
"input": {
"guidance_scale": "5.5",
"image": "https://replicate.delivery/pbxt/IAh0VDQpBV4STGq3JtNAFGA09FCYini5FZHMZl39OL7PwafI/sketch-mountains-input.jpeg",
"negative_prompt": "light sky, day",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A fantasy landscape at a dark moonlit night, black sky, trending on artstation",
"prompt_strength": 0.9,
"scheduler": "K_EULER_ANCESTRAL"
},
"logs": "Using seed: 19973\n 0%| | 0/45 [00:00<?, ?it/s]\n 2%|▏ | 1/45 [00:00<00:15, 2.82it/s]\n 4%|▍ | 2/45 [00:00<00:15, 2.81it/s]\n 7%|▋ | 3/45 [00:01<00:15, 2.77it/s]\n 9%|▉ | 4/45 [00:01<00:14, 2.78it/s]\n 11%|█ | 5/45 [00:01<00:14, 2.78it/s]\n 13%|█▎ | 6/45 [00:02<00:14, 2.78it/s]\n 16%|█▌ | 7/45 [00:02<00:13, 2.78it/s]\n 18%|█▊ | 8/45 [00:02<00:13, 2.77it/s]\n 20%|██ | 9/45 [00:03<00:13, 2.77it/s]\n 22%|██▏ | 10/45 [00:03<00:12, 2.77it/s]\n 24%|██▍ | 11/45 [00:03<00:12, 2.77it/s]\n 27%|██▋ | 12/45 [00:04<00:11, 2.77it/s]\n 29%|██▉ | 13/45 [00:04<00:11, 2.78it/s]\n 31%|███ | 14/45 [00:05<00:11, 2.77it/s]\n 33%|███▎ | 15/45 [00:05<00:10, 2.76it/s]\n 36%|███▌ | 16/45 [00:05<00:10, 2.77it/s]\n 38%|███▊ | 17/45 [00:06<00:10, 2.76it/s]\n 40%|████ | 18/45 [00:06<00:09, 2.77it/s]\n 42%|████▏ | 19/45 [00:06<00:09, 2.77it/s]\n 44%|████▍ | 20/45 [00:07<00:09, 2.75it/s]\n 47%|████▋ | 21/45 [00:07<00:08, 2.76it/s]\n 49%|████▉ | 22/45 [00:07<00:08, 2.75it/s]\n 51%|█████ | 23/45 [00:08<00:08, 2.75it/s]\n 53%|█████▎ | 24/45 [00:08<00:07, 2.75it/s]\n 56%|█████▌ | 25/45 [00:09<00:07, 2.75it/s]\n 58%|█████▊ | 26/45 [00:09<00:06, 2.75it/s]\n 60%|██████ | 27/45 [00:09<00:06, 2.75it/s]\n 62%|██████▏ | 28/45 [00:10<00:06, 2.75it/s]\n 64%|██████▍ | 29/45 [00:10<00:05, 2.74it/s]\n 67%|██████▋ | 30/45 [00:10<00:05, 2.74it/s]\n 69%|██████▉ | 31/45 [00:11<00:05, 2.74it/s]\n 71%|███████ | 32/45 [00:11<00:04, 2.74it/s]\n 73%|███████▎ | 33/45 [00:11<00:04, 2.74it/s]\n 76%|███████▌ | 34/45 [00:12<00:04, 2.74it/s]\n 78%|███████▊ | 35/45 [00:12<00:03, 2.74it/s]\n 80%|████████ | 36/45 [00:13<00:03, 2.74it/s]\n 82%|████████▏ | 37/45 [00:13<00:02, 2.75it/s]\n 84%|████████▍ | 38/45 [00:13<00:02, 2.75it/s]\n 87%|████████▋ | 39/45 [00:14<00:02, 2.74it/s]\n 89%|████████▉ | 40/45 [00:14<00:01, 2.74it/s]\n 91%|█████████ | 41/45 [00:14<00:01, 2.74it/s]\n 93%|█████████▎| 42/45 [00:15<00:01, 2.74it/s]\n 96%|█████████▌| 43/45 [00:15<00:00, 2.74it/s]\n 98%|█████████▊| 44/45 [00:15<00:00, 2.74it/s]\n100%|██████████| 45/45 [00:16<00:00, 2.74it/s]\n100%|██████████| 45/45 [00:16<00:00, 2.75it/s]",
"output": [
"https://replicate.delivery/pbxt/o9adZ8mV3s6gGlrYV7eNnMV8OH5pwFKGESWfOHGWErcRRLWQA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-01-20T21:06:08.365524Z",
"started_at": "2023-01-20T21:06:08.403287Z",
"completed_at": "2023-01-20T21:06:26.195744Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/kguyn6gfsnbttmmngrr3hj6kwq/cancel",
"get": "https://api.replicate.com/v1/predictions/kguyn6gfsnbttmmngrr3hj6kwq"
},
"metrics": {
"predict_time": 17.792457,
"total_time": 17.83022
}
}
