typetext
{
"aspect_ratio": "21:9",
"guidance_scale": 3.5,
"hf_lora": "jbilcke-hf/flux-dev-panorama-lora-2",
"lora_scale": 0.8,
"num_inference_steps": 35,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_fAS**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/flux-dev-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/flux-dev-lora:94a0c19e55e36f75d657ecf9eada9f16a233b5329fb9cdf8e2b9ecd093e5c97e",
{
input: {
aspect_ratio: "21:9",
guidance_scale: 3.5,
hf_lora: "jbilcke-hf/flux-dev-panorama-lora-2",
lora_scale: 0.8,
num_inference_steps: 35,
num_outputs: 1,
output_format: "webp",
output_quality: 80,
prompt: "HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic"
}
}
);
// 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=r8_fAS**********************************
This is your API token. Keep it to yourself.
import replicate
Run lucataco/flux-dev-lora using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/flux-dev-lora:94a0c19e55e36f75d657ecf9eada9f16a233b5329fb9cdf8e2b9ecd093e5c97e",
input={
"aspect_ratio": "21:9",
"guidance_scale": 3.5,
"hf_lora": "jbilcke-hf/flux-dev-panorama-lora-2",
"lora_scale": 0.8,
"num_inference_steps": 35,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic"
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_fAS**********************************
This is your API token. Keep it to yourself.
Run lucataco/flux-dev-lora 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": "lucataco/flux-dev-lora:94a0c19e55e36f75d657ecf9eada9f16a233b5329fb9cdf8e2b9ecd093e5c97e",
"input": {
"aspect_ratio": "21:9",
"guidance_scale": 3.5,
"hf_lora": "jbilcke-hf/flux-dev-panorama-lora-2",
"lora_scale": 0.8,
"num_inference_steps": 35,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "zs732r6rhsrj60chafz9509rw4",
"model": "lucataco/flux-dev-lora",
"version": "94a0c19e55e36f75d657ecf9eada9f16a233b5329fb9cdf8e2b9ecd093e5c97e",
"input": {
"aspect_ratio": "21:9",
"guidance_scale": 3.5,
"hf_lora": "jbilcke-hf/flux-dev-panorama-lora-2",
"lora_scale": 0.8,
"num_inference_steps": 35,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 80,
"prompt": "HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic"
},
"logs": "Using seed: 12790\nPrompt: HDRI panoramic view of TOK, a serene indoor setting, featuring a tranquil swimming pool surrounded by wooden architecture. A large tree with pink blossoms stands prominently in the center, enhancing the natural ambiance. The scene is further complemented by the presence of several chairs and potted plants, contributing to the overall sense of relaxation and harmony. cinematic\ntxt2img mode\nLoading LoRA weights from HF path:jbilcke-hf/flux-dev-panorama-lora-2\n 0%| | 0/35 [00:00<?, ?it/s]\n 3%|▎ | 1/35 [00:00<00:17, 1.95it/s]\n 6%|▌ | 2/35 [00:00<00:14, 2.24it/s]\n 9%|▊ | 3/35 [00:01<00:15, 2.09it/s]\n 11%|█▏ | 4/35 [00:01<00:15, 2.03it/s]\n 14%|█▍ | 5/35 [00:02<00:15, 2.00it/s]\n 17%|█▋ | 6/35 [00:02<00:14, 1.98it/s]\n 20%|██ | 7/35 [00:03<00:14, 1.97it/s]\n 23%|██▎ | 8/35 [00:03<00:13, 1.96it/s]\n 26%|██▌ | 9/35 [00:04<00:13, 1.95it/s]\n 29%|██▊ | 10/35 [00:05<00:12, 1.95it/s]\n 31%|███▏ | 11/35 [00:05<00:12, 1.95it/s]\n 34%|███▍ | 12/35 [00:06<00:11, 1.95it/s]\n 37%|███▋ | 13/35 [00:06<00:11, 1.94it/s]\n 40%|████ | 14/35 [00:07<00:10, 1.94it/s]\n 43%|████▎ | 15/35 [00:07<00:10, 1.95it/s]\n 46%|████▌ | 16/35 [00:08<00:09, 1.94it/s]\n 49%|████▊ | 17/35 [00:08<00:09, 1.94it/s]\n 51%|█████▏ | 18/35 [00:09<00:08, 1.94it/s]\n 54%|█████▍ | 19/35 [00:09<00:08, 1.95it/s]\n 57%|█████▋ | 20/35 [00:10<00:07, 1.95it/s]\n 60%|██████ | 21/35 [00:10<00:07, 1.95it/s]\n 63%|██████▎ | 22/35 [00:11<00:06, 1.94it/s]\n 66%|██████▌ | 23/35 [00:11<00:06, 1.94it/s]\n 69%|██████▊ | 24/35 [00:12<00:05, 1.95it/s]\n 71%|███████▏ | 25/35 [00:12<00:05, 1.95it/s]\n 74%|███████▍ | 26/35 [00:13<00:04, 1.94it/s]\n 77%|███████▋ | 27/35 [00:13<00:04, 1.95it/s]\n 80%|████████ | 28/35 [00:14<00:03, 1.95it/s]\n 83%|████████▎ | 29/35 [00:14<00:03, 1.94it/s]\n 86%|████████▌ | 30/35 [00:15<00:02, 1.94it/s]\n 89%|████████▊ | 31/35 [00:15<00:02, 1.94it/s]\n 91%|█████████▏| 32/35 [00:16<00:01, 1.94it/s]\n 94%|█████████▍| 33/35 [00:16<00:01, 1.94it/s]\n 97%|█████████▋| 34/35 [00:17<00:00, 1.94it/s]\n100%|██████████| 35/35 [00:17<00:00, 1.94it/s]\n100%|██████████| 35/35 [00:17<00:00, 1.96it/s]",
"output": [
"https://replicate.delivery/yhqm/X3fnqjMLFftPG0oZoeA8Xp1y0lIwxrwl3QvzlkWWIXTZTklmA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-08-15T03:04:56.206Z",
"started_at": "2024-08-15T03:04:56.21433Z",
"completed_at": "2024-08-15T03:05:16.838854Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zs732r6rhsrj60chafz9509rw4/cancel",
"get": "https://api.replicate.com/v1/predictions/zs732r6rhsrj60chafz9509rw4",
"web": "https://replicate.com/p/zs732r6rhsrj60chafz9509rw4"
},
"metrics": {
"predict_time": 20.624523773,
"total_time": 20.632854
}
}