Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run kuprel/min-dalle using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"kuprel/min-dalle:fd77461b5df14ab0870ee331ecdd6c134900f6abed5525d8ad7dcd89458036c7",
{
input: {
text: "A realistic photo of a grim reaper is sitting in a bus stop, photorealistic, 8K, black and white",
grid_size: 5,
intermediate_outputs: true,
log2_supercondition_factor: 6
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run kuprel/min-dalle using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"kuprel/min-dalle:fd77461b5df14ab0870ee331ecdd6c134900f6abed5525d8ad7dcd89458036c7",
input={
"text": "A realistic photo of a grim reaper is sitting in a bus stop, photorealistic, 8K, black and white",
"grid_size": 5,
"intermediate_outputs": True,
"log2_supercondition_factor": 6
}
)
# The kuprel/min-dalle model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/kuprel/min-dalle/api#output-schema
print(item)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run kuprel/min-dalle 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": "kuprel/min-dalle:fd77461b5df14ab0870ee331ecdd6c134900f6abed5525d8ad7dcd89458036c7",
"input": {
"text": "A realistic photo of a grim reaper is sitting in a bus stop, photorealistic, 8K, black and white",
"grid_size": 5,
"intermediate_outputs": true,
"log2_supercondition_factor": 6
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-07-10T17:18:30.167809Z",
"created_at": "2022-07-10T17:18:13.639996Z",
"data_removed": false,
"error": null,
"id": "4z54ipsz45b23orufrjfpopata",
"input": {
"text": "A realistic photo of a grim reaper is sitting in a bus stop, photorealistic, 8K, black and white",
"grid_size": "5",
"intermediate_outputs": true,
"log2_supercondition_factor": "6"
},
"logs": "tokenizing text\n['Ġa']\n['Ġrealistic']\n['Ġphoto']\n['Ġof']\n['Ġa']\n['Ġgrim']\n['Ġreaper']\n['Ġis']\n['Ġsitting']\n['Ġin']\n['Ġa']\n['Ġbus']\n['Ġstop', ',']\n['Ġphot', 'oreal', 'istic', ',']\n['Ġ8', 'k', ',']\n['Ġblack']\n['Ġand']\n['Ġwhite']\ntext tokens [0, 58, 10573, 564, 111, 58, 12446, 18809, 231, 9782, 91, 58, 662, 2865, 11, 234, 35495, 3478, 11, 416, 38, 11, 486, 128, 657, 2]\nencoding text tokens\nsampling row 1 of 16\nsampling row 2 of 16\ndetokenizing image\nsampling row 3 of 16\nsampling row 4 of 16\ndetokenizing image\nsampling row 5 of 16\nsampling row 6 of 16\ndetokenizing image\nsampling row 7 of 16\nsampling row 8 of 16\ndetokenizing image\nsampling row 9 of 16\nsampling row 10 of 16\ndetokenizing image\nsampling row 11 of 16\nsampling row 12 of 16\ndetokenizing image\nsampling row 13 of 16\nsampling row 14 of 16\ndetokenizing image\nsampling row 15 of 16\nsampling row 16 of 16\ndetokenizing image",
"metrics": {
"predict_time": 16.353974,
"total_time": 16.527813
},
"output": [
"https://replicate.delivery/mgxm/a746ddea-351b-4f6a-91e6-792787061202/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/de467041-c56d-4671-87b8-835a3c90be03/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/def7c335-2e33-4c26-92f1-6204c8cdfc5f/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/3560de96-dbbe-4849-bbb1-a2d1541f0f77/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/f7c74538-555a-44b5-b4cb-25e0b6e9b86e/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/9e5e1a0c-ef1f-4b38-8fc1-856c32d26cd8/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/713d0313-f09b-4b75-9c30-95debba5b9ea/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/0d2d9dca-c13f-4252-a4c9-50a53f32d0e6/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-10T17:18:13.813835Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/4z54ipsz45b23orufrjfpopata",
"cancel": "https://api.replicate.com/v1/predictions/4z54ipsz45b23orufrjfpopata/cancel"
},
"version": "fd77461b5df14ab0870ee331ecdd6c134900f6abed5525d8ad7dcd89458036c7"
}
tokenizing text
['Ġa']
['Ġrealistic']
['Ġphoto']
['Ġof']
['Ġa']
['Ġgrim']
['Ġreaper']
['Ġis']
['Ġsitting']
['Ġin']
['Ġa']
['Ġbus']
['Ġstop', ',']
['Ġphot', 'oreal', 'istic', ',']
['Ġ8', 'k', ',']
['Ġblack']
['Ġand']
['Ġwhite']
text tokens [0, 58, 10573, 564, 111, 58, 12446, 18809, 231, 9782, 91, 58, 662, 2865, 11, 234, 35495, 3478, 11, 416, 38, 11, 486, 128, 657, 2]
encoding text tokens
sampling row 1 of 16
sampling row 2 of 16
detokenizing image
sampling row 3 of 16
sampling row 4 of 16
detokenizing image
sampling row 5 of 16
sampling row 6 of 16
detokenizing image
sampling row 7 of 16
sampling row 8 of 16
detokenizing image
sampling row 9 of 16
sampling row 10 of 16
detokenizing image
sampling row 11 of 16
sampling row 12 of 16
detokenizing image
sampling row 13 of 16
sampling row 14 of 16
detokenizing image
sampling row 15 of 16
sampling row 16 of 16
detokenizing image