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:ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0",
{
input: {
text: "A vintage photo of a capybara wearing a tuxedo and top hat, black and white",
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:ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0",
input={
"text": "A vintage photo of a capybara wearing a tuxedo and top hat, black and white",
"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:ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0",
"input": {
"text": "A vintage photo of a capybara wearing a tuxedo and top hat, black and white",
"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.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/kuprel/min-dalle@sha256:ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0 \
-i 'text="A vintage photo of a capybara wearing a tuxedo and top hat, black and white"' \
-i 'top_k=16384' \
-i 'grid_size=5' \
-i 'save_as_png=false' \
-i 'temperature="4"' \
-i 'progressive_outputs=true' \
-i 'supercondition_factor=64'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/kuprel/min-dalle@sha256:ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "text": "A vintage photo of a capybara wearing a tuxedo and top hat, black and white", "top_k": 16384, "grid_size": 5, "save_as_png": false, "temperature": "4", "progressive_outputs": true, "supercondition_factor": 64 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.019. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-07-15T13:25:24.592470Z",
"created_at": "2022-07-15T13:25:07.052163Z",
"data_removed": false,
"error": null,
"id": "e5ebn5qa5fhvbl5an2ner4fylq",
"input": {
"text": "A vintage photo of a capybara wearing a tuxedo and top hat, black and white",
"top_k": "16384",
"grid_size": "5",
"temperature": "4",
"progressive_outputs": true,
"supercondition_factor": "64"
},
"logs": "tokenizing text\n['Ġa']\n['Ġvintage']\n['Ġphoto']\n['Ġof']\n['Ġa']\n['Ġcap', 'yb', 'ara']\n['Ġwearing']\n['Ġa']\n['Ġtuxedo']\n['Ġand']\n['Ġtop']\n['Ġhat', ',']\n['Ġblack']\n['Ġand']\n['Ġwhite']\n20 text tokens [0, 58, 996, 564, 111, 58, 712, 21854, 761, 8995, 58, 26047, 128, 479, 2583, 11, 486, 128, 657, 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": 16.350287,
"total_time": 17.540307
},
"output": [
"https://replicate.delivery/mgxm/d4b9786a-8f3d-4881-ae7c-a984e3fbc093/min-dalle-iter-1.jpg",
"https://replicate.delivery/mgxm/fefee167-08e6-4770-b66c-c4866dd3d24c/min-dalle-iter-2.jpg",
"https://replicate.delivery/mgxm/c08656c4-99c3-4237-9a47-e49687ecd37d/min-dalle-iter-3.jpg",
"https://replicate.delivery/mgxm/b0c200f5-3947-465a-80d7-7a995b7cdf75/min-dalle-iter-4.jpg",
"https://replicate.delivery/mgxm/1c136dc6-716d-43b5-aede-f73493fbc511/min-dalle-iter-5.jpg",
"https://replicate.delivery/mgxm/c4333592-a326-4c50-97b4-aaad9ecee001/min-dalle-iter-6.jpg",
"https://replicate.delivery/mgxm/35ae8d3f-bfb3-4dbc-9822-884ece2d35bc/min-dalle-iter-7.jpg",
"https://replicate.delivery/mgxm/957c66ef-dec4-4e6c-bf1e-a693f444a270/min-dalle-iter-8.jpg"
],
"started_at": "2022-07-15T13:25:08.242183Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/e5ebn5qa5fhvbl5an2ner4fylq",
"cancel": "https://api.replicate.com/v1/predictions/e5ebn5qa5fhvbl5an2ner4fylq/cancel"
},
"version": "ee5b034a2b9525bc32f84ea885ef98b4a7847264f9453aa01de58994018234e0"
}
tokenizing text
['Ġa']
['Ġvintage']
['Ġphoto']
['Ġof']
['Ġa']
['Ġcap', 'yb', 'ara']
['Ġwearing']
['Ġa']
['Ġtuxedo']
['Ġand']
['Ġtop']
['Ġhat', ',']
['Ġblack']
['Ġand']
['Ġwhite']
20 text tokens [0, 58, 996, 564, 111, 58, 712, 21854, 761, 8995, 58, 26047, 128, 479, 2583, 11, 486, 128, 657, 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