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:f9aa9bc4d9afc47d5d31edec6280194fa87c29f4866b6d5ad9103597c0387904",
{
input: {
text: "artificial intelligence",
top_k: 64,
seamless: true,
grid_size: 7,
save_as_png: false,
temperature: "4",
progressive_outputs: true,
supercondition_factor: 16
}
}
);
// 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:f9aa9bc4d9afc47d5d31edec6280194fa87c29f4866b6d5ad9103597c0387904",
input={
"text": "artificial intelligence",
"top_k": 64,
"seamless": True,
"grid_size": 7,
"save_as_png": False,
"temperature": "4",
"progressive_outputs": True,
"supercondition_factor": 16
}
)
# 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:f9aa9bc4d9afc47d5d31edec6280194fa87c29f4866b6d5ad9103597c0387904",
"input": {
"text": "artificial intelligence",
"top_k": 64,
"seamless": true,
"grid_size": 7,
"save_as_png": false,
"temperature": "4",
"progressive_outputs": true,
"supercondition_factor": 16
}
}' \
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-17T12:41:39.419950Z",
"created_at": "2022-07-17T12:39:44.489096Z",
"data_removed": false,
"error": null,
"id": "hef5ekddkbfnzd52izpx4avs3y",
"input": {
"text": "artificial intelligence",
"top_k": 64,
"seamless": true,
"grid_size": "7",
"temperature": "4",
"progressive_outputs": true,
"supercondition_factor": 16
},
"logs": "tokenizing text\n['Ġartificial']\n['Ġintelligence']\n4 text tokens [0, 6316, 7815, 2]\nencoding text tokens\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image",
"metrics": {
"predict_time": 28.009498,
"total_time": 114.930854
},
"output": [
"https://replicate.delivery/mgxm/2e79749b-60ad-4129-9b3e-1a1669eb156b/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/76a7bff2-ac4c-4e2d-b201-d2556558b585/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/2bf9f47a-d446-4191-a83a-b811bdd47505/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/8d0b3392-f6bf-4d36-9015-3c81de70227e/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/25125ea3-48cc-4972-915c-3de86240fa5f/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/2213e4e5-41b7-4a38-bd8d-cff1325ddf15/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/7101eb7a-1a4c-4709-97dc-5c5ae4e05d8e/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/03a5d4e5-7ff9-4b59-830f-f3c57a0452ea/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-17T12:41:11.410452Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/hef5ekddkbfnzd52izpx4avs3y",
"cancel": "https://api.replicate.com/v1/predictions/hef5ekddkbfnzd52izpx4avs3y/cancel"
},
"version": "f9aa9bc4d9afc47d5d31edec6280194fa87c29f4866b6d5ad9103597c0387904"
}
tokenizing text
['Ġartificial']
['Ġintelligence']
4 text tokens [0, 6316, 7815, 2]
encoding text tokens
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image