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.
justmalhar /flux-thumbnails:42799c2b
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run justmalhar/flux-thumbnails using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"justmalhar/flux-thumbnails:42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8",
{
input: {
model: "schnell",
prompt: "Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”",
go_fast: false,
lora_scale: 1,
megapixels: "1",
num_outputs: 1,
aspect_ratio: "16:9",
output_format: "webp",
guidance_scale: 3.5,
output_quality: 100,
prompt_strength: 0.8,
extra_lora_scale: 1,
num_inference_steps: 4
}
}
);
// 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 justmalhar/flux-thumbnails using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"justmalhar/flux-thumbnails:42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8",
input={
"model": "schnell",
"prompt": "Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”",
"go_fast": False,
"lora_scale": 1,
"megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "16:9",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 100,
"prompt_strength": 0.8,
"extra_lora_scale": 1,
"num_inference_steps": 4
}
)
print(output)
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 justmalhar/flux-thumbnails 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": "justmalhar/flux-thumbnails:42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8",
"input": {
"model": "schnell",
"prompt": "Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”",
"go_fast": false,
"lora_scale": 1,
"megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "16:9",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 100,
"prompt_strength": 0.8,
"extra_lora_scale": 1,
"num_inference_steps": 4
}
}' \
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": "2024-08-26T05:48:06.000097Z",
"created_at": "2024-08-26T05:47:53.294000Z",
"data_removed": false,
"error": null,
"id": "ard3z5fw9srm00chhmwteptftw",
"input": {
"model": "schnell",
"prompt": "Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”",
"lora_scale": 1,
"num_outputs": 1,
"aspect_ratio": "16:9",
"output_format": "webp",
"guidance_scale": 3.5,
"output_quality": 100,
"num_inference_steps": 4
},
"logs": "Using seed: 53408\nPrompt: Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”\ntxt2img mode\nUsing schnell model\nfree=9892826619904\nDownloading weights\n2024-08-26T05:47:53Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpc5heiv_9/weights url=https://replicate.delivery/yhqm/vLH3ZJVEeJ3SBanDU1Gp7nR3JZrYaIrLNMsIY7oD29jinXqJA/trained_model.tar\n2024-08-26T05:47:55Z | INFO | [ Complete ] dest=/tmp/tmpc5heiv_9/weights size=\"172 MB\" total_elapsed=1.617s url=https://replicate.delivery/yhqm/vLH3ZJVEeJ3SBanDU1Gp7nR3JZrYaIrLNMsIY7oD29jinXqJA/trained_model.tar\nDownloaded weights in 1.65s\nLoaded LoRAs in 10.95s\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:00, 3.86it/s]\n 50%|█████ | 2/4 [00:00<00:00, 4.44it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 4.17it/s]\n100%|██████████| 4/4 [00:00<00:00, 4.06it/s]\n100%|██████████| 4/4 [00:00<00:00, 4.10it/s]",
"metrics": {
"predict_time": 12.492995191,
"total_time": 12.706097
},
"output": [
"https://replicate.delivery/yhqm/WJSWUDmxNSphNZyuUwHizmkxeCjqpPjRmzN13OMYv94KSOrJA/out-0.webp"
],
"started_at": "2024-08-26T05:47:53.507102Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/ard3z5fw9srm00chhmwteptftw",
"cancel": "https://api.replicate.com/v1/predictions/ard3z5fw9srm00chhmwteptftw/cancel"
},
"version": "42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8"
}
Using seed: 53408
Prompt: Thumbnail in the style of TOK, a girl in red nike outfit standing in front of a 500 million dollar mansion, gold aesthetic, with text “$1 vs $500 Million Dollar Houses”
txt2img mode
Using schnell model
free=9892826619904
Downloading weights
2024-08-26T05:47:53Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpc5heiv_9/weights url=https://replicate.delivery/yhqm/vLH3ZJVEeJ3SBanDU1Gp7nR3JZrYaIrLNMsIY7oD29jinXqJA/trained_model.tar
2024-08-26T05:47:55Z | INFO | [ Complete ] dest=/tmp/tmpc5heiv_9/weights size="172 MB" total_elapsed=1.617s url=https://replicate.delivery/yhqm/vLH3ZJVEeJ3SBanDU1Gp7nR3JZrYaIrLNMsIY7oD29jinXqJA/trained_model.tar
Downloaded weights in 1.65s
Loaded LoRAs in 10.95s
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:00<00:00, 3.86it/s]
50%|█████ | 2/4 [00:00<00:00, 4.44it/s]
75%|███████▌ | 3/4 [00:00<00:00, 4.17it/s]
100%|██████████| 4/4 [00:00<00:00, 4.06it/s]
100%|██████████| 4/4 [00:00<00:00, 4.10it/s]