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:dd9bb5e3ec9c8ffe775546fc6cc39587d7e11a1c789582fd4c54e221a66158c7",
{
input: {
text: "a watercolour painting of a goose and a bunny having afternoon tea",
grid_size: 4,
intermediate_outputs: true,
log2_supercondition_factor: 4
}
}
);
// 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:dd9bb5e3ec9c8ffe775546fc6cc39587d7e11a1c789582fd4c54e221a66158c7",
input={
"text": "a watercolour painting of a goose and a bunny having afternoon tea",
"grid_size": 4,
"intermediate_outputs": True,
"log2_supercondition_factor": 4
}
)
# 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:dd9bb5e3ec9c8ffe775546fc6cc39587d7e11a1c789582fd4c54e221a66158c7",
"input": {
"text": "a watercolour painting of a goose and a bunny having afternoon tea",
"grid_size": 4,
"intermediate_outputs": true,
"log2_supercondition_factor": 4
}
}' \
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-06T18:41:21.434053Z",
"created_at": "2022-07-06T18:41:05.869054Z",
"data_removed": false,
"error": null,
"id": "2g7mfi4ezfey7bmy3xc64ychpu",
"input": {
"text": "a watercolour painting of a goose and a bunny having afternoon tea",
"grid_size": "4",
"intermediate_outputs": true,
"log2_supercondition_factor": 4
},
"logs": "tokenizing text\n['Ġa']\n['Ġwatercolour']\n['Ġpainting']\n['Ġof']\n['Ġa']\n['Ġgoose']\n['Ġand']\n['Ġa']\n['Ġbunny']\n['Ġhaving']\n['Ġafternoon']\n['Ġtea']\ntext tokens [0, 58, 18581, 1545, 111, 58, 14215, 128, 58, 8684, 8345, 12598, 2705, 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": 15.38574,
"total_time": 15.564999
},
"output": [
"https://replicate.delivery/mgxm/edd5c2f5-7e0f-41d1-bf1f-b92a4212bcfc/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/747836bd-e773-4ef5-a903-bd1aa4938639/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/ca863d2a-f4ec-4516-9777-d021f2403f56/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/7034c1a9-ccf1-4d12-bbf3-eb2d54924e1a/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/879e3e96-11b2-4d7f-8883-4ba80cfccba5/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/fd391f90-87a5-48cd-9a67-2c0d56dec89d/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/7adade5c-ba14-4460-801c-af35df62871f/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/07ce46f4-f554-47b3-bda8-47326fedf8c6/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-06T18:41:06.048313Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/2g7mfi4ezfey7bmy3xc64ychpu",
"cancel": "https://api.replicate.com/v1/predictions/2g7mfi4ezfey7bmy3xc64ychpu/cancel"
},
"version": "dd9bb5e3ec9c8ffe775546fc6cc39587d7e11a1c789582fd4c54e221a66158c7"
}
tokenizing text
['Ġa']
['Ġwatercolour']
['Ġpainting']
['Ġof']
['Ġa']
['Ġgoose']
['Ġand']
['Ġa']
['Ġbunny']
['Ġhaving']
['Ġafternoon']
['Ġtea']
text tokens [0, 58, 18581, 1545, 111, 58, 14215, 128, 58, 8684, 8345, 12598, 2705, 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