defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A close-up portrait photo in the style of TOK",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_QC7**********************************
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 fofr/sdxl-deep-down using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"fofr/sdxl-deep-down:b42c6affd67fc88a1f3a8b5c35ae943425508989607f35f39f4ca9b3e7d91ce8",
{
input: {
apply_watermark: true,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.8,
lora_scale: 0.6,
negative_prompt: "",
num_inference_steps: 50,
num_outputs: 1,
prompt: "A close-up portrait photo in the style of TOK",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER",
width: 1024
}
}
);
// 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_QC7**********************************
This is your API token. Keep it to yourself.
import replicate
Run fofr/sdxl-deep-down using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"fofr/sdxl-deep-down:b42c6affd67fc88a1f3a8b5c35ae943425508989607f35f39f4ca9b3e7d91ce8",
input={
"apply_watermark": True,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A close-up portrait photo in the style of TOK",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}
)
# 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_QC7**********************************
This is your API token. Keep it to yourself.
Run fofr/sdxl-deep-down 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": "fofr/sdxl-deep-down:b42c6affd67fc88a1f3a8b5c35ae943425508989607f35f39f4ca9b3e7d91ce8",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A close-up portrait photo in the style of TOK",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "hlvnnttbzpvhoki6d4ysij5dmq",
"model": "fofr/sdxl-deep-down",
"version": "b42c6affd67fc88a1f3a8b5c35ae943425508989607f35f39f4ca9b3e7d91ce8",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 1,
"prompt": "A close-up portrait photo in the style of TOK",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
},
"logs": "",
"output": [
"https://pbxt.replicate.delivery/HGs5W9Q8LWp7AZbs4VgJVrtVZ9lwZbLep3UmZj1RCmeFp0qRA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-04T16:51:59.363438Z",
"started_at": "2023-10-04T16:52:06.848828Z",
"completed_at": "2023-10-04T16:52:21.826628Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/hlvnnttbzpvhoki6d4ysij5dmq/cancel",
"get": "https://api.replicate.com/v1/predictions/hlvnnttbzpvhoki6d4ysij5dmq"
},
"metrics": {
"predict_time": 14.9778,
"total_time": 22.46319
}
}