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: "cavemen at a rave",
top_k: 128,
seamless: false,
grid_size: 5,
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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
input={
"text": "cavemen at a rave",
"top_k": 128,
"seamless": False,
"grid_size": 5,
"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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
"input": {
"text": "cavemen at a rave",
"top_k": 128,
"seamless": false,
"grid_size": 5,
"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-17T17:24:47.097793Z",
"created_at": "2022-07-17T17:24:31.273343Z",
"data_removed": false,
"error": null,
"id": "5mskldqaebcadgh5brgldtzxma",
"input": {
"text": "cavemen at a rave",
"top_k": "128",
"seamless": false,
"grid_size": "5",
"temperature": "4",
"progressive_outputs": true,
"supercondition_factor": "16"
},
"logs": "tokenizing text\n['Ġcav', 'emen']\n['Ġat']\n['Ġa']\n['Ġrave']\n7 text tokens [0, 4044, 8275, 202, 58, 14391, 2]\nencoding text tokens\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image",
"metrics": {
"predict_time": 15.220954,
"total_time": 15.82445
},
"output": [
"https://replicate.delivery/mgxm/72b412cf-6673-4909-a196-b9d06258dd88/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/d93242d0-ae96-47a7-90e4-2321e89bf1d5/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/088690d0-8955-4688-832b-27951221e566/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/cebc7c55-076b-4c5c-9e96-a3976a170025/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/83bc6d30-b0bf-46bc-8e23-d1a76aab14e9/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/60f2d867-4b15-4beb-bfb9-ca6172f1123d/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/4c2f790b-4d66-40c1-ad9f-d0cdc1cf77b6/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/e8eee0ae-f6f7-41f4-a1db-47fcb8b0ed34/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-17T17:24:31.876839Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/5mskldqaebcadgh5brgldtzxma",
"cancel": "https://api.replicate.com/v1/predictions/5mskldqaebcadgh5brgldtzxma/cancel"
},
"version": "cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1"
}
tokenizing text
['Ġcav', 'emen']
['Ġat']
['Ġa']
['Ġrave']
7 text tokens [0, 4044, 8275, 202, 58, 14391, 2]
encoding text tokens
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image