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, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”",
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, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”",
"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, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”",
"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.
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/justmalhar/flux-thumbnails@sha256:42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8 \
-i 'model="schnell"' \
-i 'prompt="Thumbnail in the style of TOK, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”"' \
-i 'go_fast=false' \
-i 'lora_scale=1' \
-i 'megapixels="1"' \
-i 'num_outputs=1' \
-i 'aspect_ratio="16:9"' \
-i 'output_format="webp"' \
-i 'guidance_scale=3.5' \
-i 'output_quality=100' \
-i 'prompt_strength=0.8' \
-i 'extra_lora_scale=1' \
-i 'num_inference_steps=4'
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/justmalhar/flux-thumbnails@sha256:42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "model": "schnell", "prompt": "Thumbnail in the style of TOK, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”", "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 } }' \ 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.022. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-08-26T05:50:01.424928Z",
"created_at": "2024-08-26T05:49:50.988000Z",
"data_removed": false,
"error": null,
"id": "e40sc4y81hrm40chhmxs1scvkr",
"input": {
"model": "schnell",
"prompt": "Thumbnail in the style of TOK, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”",
"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: 53493\nPrompt: Thumbnail in the style of TOK, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”\ntxt2img mode\nUsing schnell model\nLoaded LoRAs in 8.88s\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:00, 3.91it/s]\n 50%|█████ | 2/4 [00:00<00:00, 4.50it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 4.21it/s]\n100%|██████████| 4/4 [00:00<00:00, 4.10it/s]\n100%|██████████| 4/4 [00:00<00:00, 4.15it/s]",
"metrics": {
"predict_time": 10.427106287,
"total_time": 10.436928
},
"output": [
"https://replicate.delivery/yhqm/88JXfey52jncgErc5gzMgWnokgrs6DXUYfbst4zML3zSM5smA/out-0.webp"
],
"started_at": "2024-08-26T05:49:50.997822Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/e40sc4y81hrm40chhmxs1scvkr",
"cancel": "https://api.replicate.com/v1/predictions/e40sc4y81hrm40chhmxs1scvkr/cancel"
},
"version": "42799c2b58e0a6ca82d3a1d90f655f6386542e325d2017e3256b092189f567b8"
}
Using seed: 53493
Prompt: Thumbnail in the style of TOK, man in. Reality show set with 100 prisoners standing in front with scared face, orange clothes for prisoners, jail aesthetic, challenge video; with text “ Who makes out alive?”
txt2img mode
Using schnell model
Loaded LoRAs in 8.88s
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:00<00:00, 3.91it/s]
50%|█████ | 2/4 [00:00<00:00, 4.50it/s]
75%|███████▌ | 3/4 [00:00<00:00, 4.21it/s]
100%|██████████| 4/4 [00:00<00:00, 4.10it/s]
100%|██████████| 4/4 [00:00<00:00, 4.15it/s]