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:e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0",
{
input: {
text: "A carrot wearing sunglasses on top of a mountain on a sunny day, high definition, high detail",
top_k: 16384,
grid_size: 4,
save_as_png: true,
temperature: "4",
progressive_outputs: false,
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:e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0",
input={
"text": "A carrot wearing sunglasses on top of a mountain on a sunny day, high definition, high detail",
"top_k": 16384,
"grid_size": 4,
"save_as_png": True,
"temperature": "4",
"progressive_outputs": False,
"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:e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0",
"input": {
"text": "A carrot wearing sunglasses on top of a mountain on a sunny day, high definition, high detail",
"top_k": 16384,
"grid_size": 4,
"save_as_png": true,
"temperature": "4",
"progressive_outputs": false,
"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-16T19:05:09.915994Z",
"created_at": "2022-07-16T19:04:49.411196Z",
"data_removed": false,
"error": null,
"id": "72rmcm3o7jgo7cp4pi2ixicir4",
"input": {
"text": "A carrot wearing sunglasses on top of a mountain on a sunny day, high definition, high detail",
"top_k": "16384",
"grid_size": "4",
"save_as_png": true,
"temperature": "4",
"progressive_outputs": false,
"supercondition_factor": "64"
},
"logs": "tokenizing text\n['Ġa']\n['Ġcarrot']\n['Ġwearing']\n['Ġsunglasses']\n['Ġon']\n['Ġtop']\n['Ġof']\n['Ġa']\n['Ġmountain']\n['Ġon']\n['Ġa']\n['Ġsunny']\n['Ġday', ',']\n['Ġhigh']\n['Ġdefinition', ',']\n['Ġhigh']\n['Ġdetail']\n21 text tokens [0, 58, 19615, 8995, 7134, 133, 479, 111, 58, 2236, 133, 58, 8751, 615, 11, 524, 4951, 11, 524, 5854, 2]\nencoding text tokens\ndetokenizing image",
"metrics": {
"predict_time": 13.781749,
"total_time": 20.504798
},
"output": [
"https://replicate.delivery/mgxm/b8c1ad2d-f152-4654-aa95-79ab7ca6d1c1/min-dalle-iter-1.png"
],
"started_at": "2022-07-16T19:04:56.134245Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/72rmcm3o7jgo7cp4pi2ixicir4",
"cancel": "https://api.replicate.com/v1/predictions/72rmcm3o7jgo7cp4pi2ixicir4/cancel"
},
"version": "e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0"
}
tokenizing text
['Ġa']
['Ġcarrot']
['Ġwearing']
['Ġsunglasses']
['Ġon']
['Ġtop']
['Ġof']
['Ġa']
['Ġmountain']
['Ġon']
['Ġa']
['Ġsunny']
['Ġday', ',']
['Ġhigh']
['Ġdefinition', ',']
['Ġhigh']
['Ġdetail']
21 text tokens [0, 58, 19615, 8995, 7134, 133, 479, 111, 58, 2236, 133, 58, 8751, 615, 11, 524, 4951, 11, 524, 5854, 2]
encoding text tokens
detokenizing image