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: "a sole time traveller wandering an abandoned planet, cinematic, award winning",
top_k: 512,
seamless: false,
grid_size: 7,
save_as_png: false,
temperature: 0.69,
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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
input={
"text": "a sole time traveller wandering an abandoned planet, cinematic, award winning",
"top_k": 512,
"seamless": False,
"grid_size": 7,
"save_as_png": False,
"temperature": 0.69,
"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:cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1",
"input": {
"text": "a sole time traveller wandering an abandoned planet, cinematic, award winning",
"top_k": 512,
"seamless": false,
"grid_size": 7,
"save_as_png": false,
"temperature": 0.69,
"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-19T10:14:14.146623Z",
"created_at": "2022-07-19T10:13:42.998226Z",
"data_removed": false,
"error": null,
"id": "du4sodbxm5cd7l5qik2wfalgeq",
"input": {
"text": "a sole time traveller wandering an abandoned planet, cinematic, award winning",
"top_k": "512",
"grid_size": "7",
"temperature": "0.69",
"progressive_outputs": false,
"supercondition_factor": "64"
},
"logs": "tokenizing text\n['Ġa']\n['Ġsole']\n['Ġtime']\n['Ġtraveller']\n['Ġwandering']\n['Ġan']\n['Ġabandoned']\n['Ġplanet', ',']\n['Ġcinematic', ',']\n['Ġaward']\n['Ġwinning']\n15 text tokens [0, 58, 9079, 1010, 12967, 18282, 101, 9352, 3493, 11, 19936, 11, 3457, 6534, 2]\nencoding text tokens\ndetokenizing image",
"metrics": {
"predict_time": 19.722192,
"total_time": 31.148397
},
"output": [
"https://replicate.delivery/mgxm/b0bad464-56bb-4b2a-8d86-e0b989a01f95/min-dalle-iter-1.jpg"
],
"started_at": "2022-07-19T10:13:54.424431Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/du4sodbxm5cd7l5qik2wfalgeq",
"cancel": "https://api.replicate.com/v1/predictions/du4sodbxm5cd7l5qik2wfalgeq/cancel"
},
"version": "cb2da7da16a54c78ad915be99f00c028a8d619031946ed4de46fa02c677230f1"
}
tokenizing text
['Ġa']
['Ġsole']
['Ġtime']
['Ġtraveller']
['Ġwandering']
['Ġan']
['Ġabandoned']
['Ġplanet', ',']
['Ġcinematic', ',']
['Ġaward']
['Ġwinning']
15 text tokens [0, 58, 9079, 1010, 12967, 18282, 101, 9352, 3493, 11, 19936, 11, 3457, 6534, 2]
encoding text tokens
detokenizing image