defaultAn astronaut riding a rainbow unicorn
typetext
{
"guidance_scale": 6,
"height": 1024,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, blur, bokeh",
"nsfw_checker": true,
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cinematic film still dramatic side lighting, dramatic intense stare closeup portrait, dark black background, hdr, dramatic beautiful warrior woman with warrior face paintings and blood, viking braids, blue eyes, pelt, skull necklace, shallow depth of field, vignette, highly detailed, high budget Hollywood film, cinemascope, moody, epic, gorgeous",
"scheduler": "DPMSolverMultistep",
"seed": 403,
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_0kL**********************************
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 lucataco/thinkdiffusionxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/thinkdiffusionxl:c41c12756b561bc81047a9307c9143589d158ef084655dbb3073b4f08ff54f32",
{
input: {
guidance_scale: 6,
height: 1024,
negative_prompt: "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, blur, bokeh",
nsfw_checker: true,
num_inference_steps: 30,
num_outputs: 1,
prompt: "cinematic film still dramatic side lighting, dramatic intense stare closeup portrait, dark black background, hdr, dramatic beautiful warrior woman with warrior face paintings and blood, viking braids, blue eyes, pelt, skull necklace, shallow depth of field, vignette, highly detailed, high budget Hollywood film, cinemascope, moody, epic, gorgeous",
scheduler: "DPMSolverMultistep",
seed: 403,
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_0kL**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/thinkdiffusionxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/thinkdiffusionxl:c41c12756b561bc81047a9307c9143589d158ef084655dbb3073b4f08ff54f32",
input={
"guidance_scale": 6,
"height": 1024,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, blur, bokeh",
"nsfw_checker": True,
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cinematic film still dramatic side lighting, dramatic intense stare closeup portrait, dark black background, hdr, dramatic beautiful warrior woman with warrior face paintings and blood, viking braids, blue eyes, pelt, skull necklace, shallow depth of field, vignette, highly detailed, high budget Hollywood film, cinemascope, moody, epic, gorgeous",
"scheduler": "DPMSolverMultistep",
"seed": 403,
"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_0kL**********************************
This is your API token. Keep it to yourself.
Run lucataco/thinkdiffusionxl 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": "lucataco/thinkdiffusionxl:c41c12756b561bc81047a9307c9143589d158ef084655dbb3073b4f08ff54f32",
"input": {
"guidance_scale": 6,
"height": 1024,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, blur, bokeh",
"nsfw_checker": true,
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cinematic film still dramatic side lighting, dramatic intense stare closeup portrait, dark black background, hdr, dramatic beautiful warrior woman with warrior face paintings and blood, viking braids, blue eyes, pelt, skull necklace, shallow depth of field, vignette, highly detailed, high budget Hollywood film, cinemascope, moody, epic, gorgeous",
"scheduler": "DPMSolverMultistep",
"seed": 403,
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "fezk7clbhkwinigd5exfp7mr2q",
"model": "lucataco/thinkdiffusionxl",
"version": "c41c12756b561bc81047a9307c9143589d158ef084655dbb3073b4f08ff54f32",
"input": {
"guidance_scale": 6,
"height": 1024,
"negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, blur, bokeh",
"nsfw_checker": true,
"num_inference_steps": 30,
"num_outputs": 1,
"prompt": "cinematic film still dramatic side lighting, dramatic intense stare closeup portrait, dark black background, hdr, dramatic beautiful warrior woman with warrior face paintings and blood, viking braids, blue eyes, pelt, skull necklace, shallow depth of field, vignette, highly detailed, high budget Hollywood film, cinemascope, moody, epic, gorgeous",
"scheduler": "DPMSolverMultistep",
"seed": 403,
"width": 1024
},
"logs": "Using seed: 403\n 0%| | 0/30 [00:00<?, ?it/s]\n 3%|▎ | 1/30 [00:00<00:05, 4.96it/s]\n 10%|█ | 3/30 [00:00<00:04, 6.18it/s]\n 13%|█▎ | 4/30 [00:00<00:04, 5.70it/s]\n 17%|█▋ | 5/30 [00:00<00:04, 5.44it/s]\n 20%|██ | 6/30 [00:01<00:04, 5.25it/s]\n 23%|██▎ | 7/30 [00:01<00:04, 5.15it/s]\n 27%|██▋ | 8/30 [00:01<00:04, 5.08it/s]\n 30%|███ | 9/30 [00:01<00:04, 5.04it/s]\n 33%|███▎ | 10/30 [00:01<00:03, 5.01it/s]\n 37%|███▋ | 11/30 [00:02<00:03, 4.98it/s]\n 40%|████ | 12/30 [00:02<00:03, 4.96it/s]\n 43%|████▎ | 13/30 [00:02<00:03, 4.95it/s]\n 47%|████▋ | 14/30 [00:02<00:03, 4.95it/s]\n 50%|█████ | 15/30 [00:02<00:03, 4.94it/s]\n 53%|█████▎ | 16/30 [00:03<00:02, 4.93it/s]\n 57%|█████▋ | 17/30 [00:03<00:02, 4.93it/s]\n 60%|██████ | 18/30 [00:03<00:02, 4.92it/s]\n 63%|██████▎ | 19/30 [00:03<00:02, 4.92it/s]\n 67%|██████▋ | 20/30 [00:03<00:02, 4.92it/s]\n 70%|███████ | 21/30 [00:04<00:01, 4.92it/s]\n 73%|███████▎ | 22/30 [00:04<00:01, 4.91it/s]\n 77%|███████▋ | 23/30 [00:04<00:01, 4.91it/s]\n 80%|████████ | 24/30 [00:04<00:01, 4.92it/s]\n 83%|████████▎ | 25/30 [00:04<00:01, 4.92it/s]\n 87%|████████▋ | 26/30 [00:05<00:00, 4.92it/s]\n 90%|█████████ | 27/30 [00:05<00:00, 4.91it/s]\n 93%|█████████▎| 28/30 [00:05<00:00, 4.91it/s]\n 97%|█████████▋| 29/30 [00:05<00:00, 4.91it/s]\n100%|██████████| 30/30 [00:05<00:00, 4.91it/s]\n100%|██████████| 30/30 [00:05<00:00, 5.02it/s]",
"output": [
"https://replicate.delivery/pbxt/mfzcQjPBtjUCMaIKko5AqlwS6DL4VRB8DqBUq1fc8q8Bgy1RA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-11-06T23:25:46.334249Z",
"started_at": "2023-11-06T23:25:46.304839Z",
"completed_at": "2023-11-06T23:25:54.366426Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/fezk7clbhkwinigd5exfp7mr2q/cancel",
"get": "https://api.replicate.com/v1/predictions/fezk7clbhkwinigd5exfp7mr2q"
},
"metrics": {
"predict_time": 8.061587,
"total_time": 8.032177
}
}