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 5-star jungle themed waterpark, 4k photograph, cinematic",
top_k: 16384,
grid_size: 5,
save_as_png: false,
temperature: "4",
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:e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0",
input={
"text": "A 5-star jungle themed waterpark, 4k photograph, cinematic",
"top_k": 16384,
"grid_size": 5,
"save_as_png": False,
"temperature": "4",
"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:e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0",
"input": {
"text": "A 5-star jungle themed waterpark, 4k photograph, cinematic",
"top_k": 16384,
"grid_size": 5,
"save_as_png": false,
"temperature": "4",
"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-17T11:28:16.227456Z",
"created_at": "2022-07-17T11:28:00.035435Z",
"data_removed": false,
"error": null,
"id": "f3ibrtkcovdafk3unwngwinxem",
"input": {
"text": "A 5-star jungle themed waterpark, 4k photograph, cinematic",
"top_k": "16384",
"grid_size": "5",
"temperature": "4",
"progressive_outputs": true,
"supercondition_factor": "64"
},
"logs": "tokenizing text\n['Ġa']\n['Ġ5', '-', 'star']\n['Ġjungle']\n['Ġthemed']\n['Ġwaterpark', ',']\n['Ġ4', 'k']\n['Ġphotograph', ',']\n['Ġcinematic']\n15 text tokens [0, 58, 264, 3, 4046, 6941, 9928, 40859, 11, 252, 38, 701, 11, 19936, 2]\nencoding text tokens\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image\ndetokenizing image",
"metrics": {
"predict_time": 16.050578,
"total_time": 16.192021
},
"output": [
"https://replicate.delivery/mgxm/ddf1a523-3b2e-443f-ade9-900c9b73170e/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/9a5fd677-2556-4985-b6ee-d784ce7fb09c/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/c68dccd2-7cc5-413c-b87d-8477f9b20264/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/e85bed5b-e60c-4e8f-85e7-92ea78eb0afb/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/7bfd9410-0deb-40df-a87a-5d59d9de57ef/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/657f5332-1b4f-4d71-a2fb-4ddee4ffa5f3/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/4a775a8d-fbdf-4890-99fd-4b0d0912b46f/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/36418b99-8802-4a65-81f4-196edf132847/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-17T11:28:00.176878Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/f3ibrtkcovdafk3unwngwinxem",
"cancel": "https://api.replicate.com/v1/predictions/f3ibrtkcovdafk3unwngwinxem/cancel"
},
"version": "e0b50cb5eccee66c7a158e076abeecdee1716f6e58363c7d3c83fbcff21fa0d0"
}
tokenizing text
['Ġa']
['Ġ5', '-', 'star']
['Ġjungle']
['Ġthemed']
['Ġwaterpark', ',']
['Ġ4', 'k']
['Ġphotograph', ',']
['Ġcinematic']
15 text tokens [0, 58, 264, 3, 4046, 6941, 9928, 40859, 11, 252, 38, 701, 11, 19936, 2]
encoding text tokens
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image
detokenizing image