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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
{
input: {
text: "Face portrait of Darth Vader, by Pablo Picasso",
top_k: 16384,
seamless: false,
grid_size: 5,
save_as_png: false,
temperature: 1.5,
progressive_outputs: true,
supercondition_factor: 64
}
}
);
// 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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
input={
"text": "Face portrait of Darth Vader, by Pablo Picasso",
"top_k": 16384,
"seamless": False,
"grid_size": 5,
"save_as_png": False,
"temperature": 1.5,
"progressive_outputs": True,
"supercondition_factor": 64
}
)
# 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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
"input": {
"text": "Face portrait of Darth Vader, by Pablo Picasso",
"top_k": 16384,
"seamless": false,
"grid_size": 5,
"save_as_png": false,
"temperature": 1.5,
"progressive_outputs": true,
"supercondition_factor": 64
}
}' \
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-17T20:56:39.094278Z",
"created_at": "2022-07-17T20:55:59.294294Z",
"data_removed": false,
"error": null,
"id": "c2c5t2mbt5cjjkblmqv44abvuy",
"input": {
"text": "Face portrait of Darth Vader, by Pablo Picasso",
"top_k": "16384",
"seamless": false,
"grid_size": "5",
"temperature": "1.5",
"progressive_outputs": true,
"supercondition_factor": "64"
},
"logs": "tokenizing text\n['Ġface']\n['Ġportrait']\n['Ġof']\n['Ġdarth']\n['Ġvader', ',']\n['Ġby']\n['Ġpablo']\n['Ġpicasso']\n11 text tokens [0, 1775, 3317, 111, 19109, 22981, 11, 185, 11599, 18117, 2]\nencoding text tokens\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image",
"metrics": {
"predict_time": 15.280702,
"total_time": 39.799984
},
"output": [
"https://replicate.delivery/mgxm/cb69bf9a-f3ab-4f78-ab17-06d47e811a41/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/2f69ca2a-55ec-4ffc-8b91-0032392c8d67/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/8eefbdde-e855-4925-a8dc-20c3945b7c4c/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/d3e7d34c-364a-45a1-af45-edae7bdfef3b/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/cf0ab068-458b-48a7-b523-4244cccbc770/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/822e2f38-ce68-49e5-95f0-041fd834d2f6/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/70437e98-e4dd-4b0b-b4d7-fea75f53dde6/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/1d55c7b2-3616-48b0-b350-016c3d6a4e78/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-17T20:56:23.813576Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/c2c5t2mbt5cjjkblmqv44abvuy",
"cancel": "https://api.replicate.com/v1/predictions/c2c5t2mbt5cjjkblmqv44abvuy/cancel"
},
"version": "cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1"
}
tokenizing text
['Ġface']
['Ġportrait']
['Ġof']
['Ġdarth']
['Ġvader', ',']
['Ġby']
['Ġpablo']
['Ġpicasso']
11 text tokens [0, 1775, 3317, 111, 19109, 22981, 11, 185, 11599, 18117, 2]
encoding text tokens
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image