fofr / flux-gingerbread
Flux trained on gingerbread creations
- Public
- 177 runs
Prediction
fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6fIDhm5ytkgdb9rme0ckveavc6dv2mStatusSucceededSourceWebHardwareH100Total durationCreatedInput
- model
- dev
- prompt
- a photo of a GINGERBREAD delorean
- go_fast
- lora_scale
- 1
- megapixels
- 1
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- guidance_scale
- 3
- output_quality
- 80
- prompt_strength
- 0.8
- extra_lora_scale
- 1
- num_inference_steps
- 28
{ "model": "dev", "prompt": "a photo of a GINGERBREAD delorean", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", { input: { model: "dev", prompt: "a photo of a GINGERBREAD delorean", go_fast: false, lora_scale: 1, megapixels: "1", num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", guidance_scale: 3, output_quality: 80, prompt_strength: 0.8, extra_lora_scale: 1, num_inference_steps: 28 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", input={ "model": "dev", "prompt": "a photo of a GINGERBREAD delorean", "go_fast": False, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run fofr/flux-gingerbread 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": "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", "input": { "model": "dev", "prompt": "a photo of a GINGERBREAD delorean", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-12-18T21:03:26.532600Z", "created_at": "2024-12-18T21:03:18.874000Z", "data_removed": false, "error": null, "id": "hm5ytkgdb9rme0ckveavc6dv2m", "input": { "model": "dev", "prompt": "a photo of a GINGERBREAD delorean", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }, "logs": "2024-12-18 21:03:18.894 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:03:18.894 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2812.03it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2776.29it/s]\n2024-12-18 21:03:19.004 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.11s\nfree=28776996618240\nDownloading weights\n2024-12-18T21:03:19Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpkvx6k7o0/weights url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar\n2024-12-18T21:03:20Z | INFO | [ Complete ] dest=/tmp/tmpkvx6k7o0/weights size=\"172 MB\" total_elapsed=1.205s url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar\nDownloaded weights in 1.23s\n2024-12-18 21:03:20.234 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a\n2024-12-18 21:03:20.306 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2024-12-18 21:03:20.306 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:03:20.306 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2818.35it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2782.45it/s]\n2024-12-18 21:03:20.416 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.18s\nUsing seed: 42968\n0it [00:00, ?it/s]\n1it [00:00, 8.36it/s]\n2it [00:00, 5.87it/s]\n3it [00:00, 5.36it/s]\n4it [00:00, 5.15it/s]\n5it [00:00, 5.03it/s]\n6it [00:01, 4.94it/s]\n7it [00:01, 4.90it/s]\n8it [00:01, 4.88it/s]\n9it [00:01, 4.86it/s]\n10it [00:01, 4.85it/s]\n11it [00:02, 4.83it/s]\n12it [00:02, 4.81it/s]\n13it [00:02, 4.82it/s]\n14it [00:02, 4.81it/s]\n15it [00:03, 4.81it/s]\n16it [00:03, 4.81it/s]\n17it [00:03, 4.81it/s]\n18it [00:03, 4.81it/s]\n19it [00:03, 4.82it/s]\n20it [00:04, 4.81it/s]\n21it [00:04, 4.79it/s]\n22it [00:04, 4.80it/s]\n23it [00:04, 4.80it/s]\n24it [00:04, 4.80it/s]\n25it [00:05, 4.81it/s]\n26it [00:05, 4.80it/s]\n27it [00:05, 4.80it/s]\n28it [00:05, 4.81it/s]\n28it [00:05, 4.89it/s]\nTotal safe images: 1 out of 1", "metrics": { "predict_time": 7.637858471, "total_time": 7.6586 }, "output": [ "https://replicate.delivery/xezq/oYrE4jmnwRqlJBUqBS7F6bcBRWfms5ArMbId0sl0MnVPVHeTA/out-0.webp" ], "started_at": "2024-12-18T21:03:18.894742Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-gg7uxdlggdbahmilf47bkr3go4gak62xclesi65amsbhmbqr5uiq", "get": "https://api.replicate.com/v1/predictions/hm5ytkgdb9rme0ckveavc6dv2m", "cancel": "https://api.replicate.com/v1/predictions/hm5ytkgdb9rme0ckveavc6dv2m/cancel" }, "version": "503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f" }
Generated in2024-12-18 21:03:18.894 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:03:18.894 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2812.03it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2776.29it/s] 2024-12-18 21:03:19.004 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.11s free=28776996618240 Downloading weights 2024-12-18T21:03:19Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpkvx6k7o0/weights url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar 2024-12-18T21:03:20Z | INFO | [ Complete ] dest=/tmp/tmpkvx6k7o0/weights size="172 MB" total_elapsed=1.205s url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar Downloaded weights in 1.23s 2024-12-18 21:03:20.234 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a 2024-12-18 21:03:20.306 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded 2024-12-18 21:03:20.306 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:03:20.306 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2818.35it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2782.45it/s] 2024-12-18 21:03:20.416 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.18s Using seed: 42968 0it [00:00, ?it/s] 1it [00:00, 8.36it/s] 2it [00:00, 5.87it/s] 3it [00:00, 5.36it/s] 4it [00:00, 5.15it/s] 5it [00:00, 5.03it/s] 6it [00:01, 4.94it/s] 7it [00:01, 4.90it/s] 8it [00:01, 4.88it/s] 9it [00:01, 4.86it/s] 10it [00:01, 4.85it/s] 11it [00:02, 4.83it/s] 12it [00:02, 4.81it/s] 13it [00:02, 4.82it/s] 14it [00:02, 4.81it/s] 15it [00:03, 4.81it/s] 16it [00:03, 4.81it/s] 17it [00:03, 4.81it/s] 18it [00:03, 4.81it/s] 19it [00:03, 4.82it/s] 20it [00:04, 4.81it/s] 21it [00:04, 4.79it/s] 22it [00:04, 4.80it/s] 23it [00:04, 4.80it/s] 24it [00:04, 4.80it/s] 25it [00:05, 4.81it/s] 26it [00:05, 4.80it/s] 27it [00:05, 4.80it/s] 28it [00:05, 4.81it/s] 28it [00:05, 4.89it/s] Total safe images: 1 out of 1
Prediction
fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6fIDghqzze9r3srmc0ckvecva5rwj8StatusSucceededSourceWebHardwareH100Total durationCreatedInput
- model
- dev
- prompt
- a photo of a GINGERBREAD mug of beer
- go_fast
- lora_scale
- 1
- megapixels
- 1
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- guidance_scale
- 3
- output_quality
- 80
- prompt_strength
- 0.8
- extra_lora_scale
- 1
- num_inference_steps
- 28
{ "model": "dev", "prompt": "a photo of a GINGERBREAD mug of beer", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", { input: { model: "dev", prompt: "a photo of a GINGERBREAD mug of beer", go_fast: false, lora_scale: 1, megapixels: "1", num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", guidance_scale: 3, output_quality: 80, prompt_strength: 0.8, extra_lora_scale: 1, num_inference_steps: 28 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", input={ "model": "dev", "prompt": "a photo of a GINGERBREAD mug of beer", "go_fast": False, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run fofr/flux-gingerbread 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": "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", "input": { "model": "dev", "prompt": "a photo of a GINGERBREAD mug of beer", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-12-18T21:07:58.443084Z", "created_at": "2024-12-18T21:07:51.966000Z", "data_removed": false, "error": null, "id": "ghqzze9r3srmc0ckvecva5rwj8", "input": { "model": "dev", "prompt": "a photo of a GINGERBREAD mug of beer", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }, "logs": "2024-12-18 21:07:51.978 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:07:51.978 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2813.78it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2778.56it/s]\n2024-12-18 21:07:52.088 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.11s\n2024-12-18 21:07:52.089 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a\n2024-12-18 21:07:52.209 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2024-12-18 21:07:52.209 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:07:52.210 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2821.43it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2785.64it/s]\n2024-12-18 21:07:52.319 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.23s\nUsing seed: 16596\n0it [00:00, ?it/s]\n1it [00:00, 8.39it/s]\n2it [00:00, 5.87it/s]\n3it [00:00, 5.35it/s]\n4it [00:00, 5.14it/s]\n5it [00:00, 5.00it/s]\n6it [00:01, 4.90it/s]\n7it [00:01, 4.88it/s]\n8it [00:01, 4.87it/s]\n9it [00:01, 4.86it/s]\n10it [00:01, 4.82it/s]\n11it [00:02, 4.81it/s]\n12it [00:02, 4.80it/s]\n13it [00:02, 4.80it/s]\n14it [00:02, 4.82it/s]\n15it [00:03, 4.81it/s]\n16it [00:03, 4.80it/s]\n17it [00:03, 4.80it/s]\n18it [00:03, 4.80it/s]\n19it [00:03, 4.79it/s]\n20it [00:04, 4.78it/s]\n21it [00:04, 4.78it/s]\n22it [00:04, 4.78it/s]\n23it [00:04, 4.78it/s]\n24it [00:04, 4.78it/s]\n25it [00:05, 4.78it/s]\n26it [00:05, 4.78it/s]\n27it [00:05, 4.78it/s]\n28it [00:05, 4.78it/s]\n28it [00:05, 4.87it/s]\nTotal safe images: 1 out of 1", "metrics": { "predict_time": 6.463777764, "total_time": 6.477084 }, "output": [ "https://replicate.delivery/xezq/vgZ0tnfrJzVDdKVDos9DXqjnw6lf755TFk5PDnkpnh5uuO8TA/out-0.webp" ], "started_at": "2024-12-18T21:07:51.979306Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-dwlyblyjc4vveqc2fs5onwfeybfeotibqj5pt2e2q7nv2wpzc6aq", "get": "https://api.replicate.com/v1/predictions/ghqzze9r3srmc0ckvecva5rwj8", "cancel": "https://api.replicate.com/v1/predictions/ghqzze9r3srmc0ckvecva5rwj8/cancel" }, "version": "503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f" }
Generated in2024-12-18 21:07:51.978 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:07:51.978 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2813.78it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2778.56it/s] 2024-12-18 21:07:52.088 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.11s 2024-12-18 21:07:52.089 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a 2024-12-18 21:07:52.209 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded 2024-12-18 21:07:52.209 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:07:52.210 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 93%|█████████▎| 284/304 [00:00<00:00, 2821.43it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2785.64it/s] 2024-12-18 21:07:52.319 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.23s Using seed: 16596 0it [00:00, ?it/s] 1it [00:00, 8.39it/s] 2it [00:00, 5.87it/s] 3it [00:00, 5.35it/s] 4it [00:00, 5.14it/s] 5it [00:00, 5.00it/s] 6it [00:01, 4.90it/s] 7it [00:01, 4.88it/s] 8it [00:01, 4.87it/s] 9it [00:01, 4.86it/s] 10it [00:01, 4.82it/s] 11it [00:02, 4.81it/s] 12it [00:02, 4.80it/s] 13it [00:02, 4.80it/s] 14it [00:02, 4.82it/s] 15it [00:03, 4.81it/s] 16it [00:03, 4.80it/s] 17it [00:03, 4.80it/s] 18it [00:03, 4.80it/s] 19it [00:03, 4.79it/s] 20it [00:04, 4.78it/s] 21it [00:04, 4.78it/s] 22it [00:04, 4.78it/s] 23it [00:04, 4.78it/s] 24it [00:04, 4.78it/s] 25it [00:05, 4.78it/s] 26it [00:05, 4.78it/s] 27it [00:05, 4.78it/s] 28it [00:05, 4.78it/s] 28it [00:05, 4.87it/s] Total safe images: 1 out of 1
Prediction
fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6fIDntx3nn4w4drmc0ckvega4by6a0StatusSucceededSourceWebHardwareH100Total durationCreatedInput
- seed
- 65511
- model
- dev
- prompt
- a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window
- go_fast
- lora_scale
- 1
- megapixels
- 1
- num_outputs
- 1
- aspect_ratio
- 1:1
- output_format
- webp
- guidance_scale
- 3
- output_quality
- 80
- prompt_strength
- 0.8
- extra_lora_scale
- 1
- num_inference_steps
- 28
{ "seed": 65511, "model": "dev", "prompt": "a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", { input: { seed: 65511, model: "dev", prompt: "a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window", go_fast: false, lora_scale: 1, megapixels: "1", num_outputs: 1, aspect_ratio: "1:1", output_format: "webp", guidance_scale: 3, output_quality: 80, prompt_strength: 0.8, extra_lora_scale: 1, num_inference_steps: 28 } } ); // 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.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run fofr/flux-gingerbread using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", input={ "seed": 65511, "model": "dev", "prompt": "a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window", "go_fast": False, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run fofr/flux-gingerbread 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": "fofr/flux-gingerbread:503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f", "input": { "seed": 65511, "model": "dev", "prompt": "a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-12-18T21:16:10.984235Z", "created_at": "2024-12-18T21:15:56.323000Z", "data_removed": false, "error": null, "id": "ntx3nn4w4drmc0ckvega4by6a0", "input": { "seed": 65511, "model": "dev", "prompt": "a photo of a giant GINGERBREAD sculpture of a woman with icing sugar, sweets and frosting in a shop window", "go_fast": false, "lora_scale": 1, "megapixels": "1", "num_outputs": 1, "aspect_ratio": "1:1", "output_format": "webp", "guidance_scale": 3, "output_quality": 80, "prompt_strength": 0.8, "extra_lora_scale": 1, "num_inference_steps": 28 }, "logs": "2024-12-18 21:15:57.812 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:15:57.813 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 91%|█████████ | 276/304 [00:00<00:00, 2757.00it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2606.06it/s]\n2024-12-18 21:15:57.930 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.12s\nfree=28877863776256\nDownloading weights\n2024-12-18T21:15:57Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpkcr401s0/weights url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar\n2024-12-18T21:16:04Z | INFO | [ Complete ] dest=/tmp/tmpkcr401s0/weights size=\"172 MB\" total_elapsed=6.695s url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar\nDownloaded weights in 6.72s\n2024-12-18 21:16:04.651 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a\n2024-12-18 21:16:04.720 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2024-12-18 21:16:04.720 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-18 21:16:04.720 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 91%|█████████ | 276/304 [00:00<00:00, 2759.17it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2607.72it/s]\n2024-12-18 21:16:04.837 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.19s\nUsing seed: 65511\n0it [00:00, ?it/s]\n1it [00:00, 8.34it/s]\n2it [00:00, 5.84it/s]\n3it [00:00, 5.33it/s]\n4it [00:00, 5.11it/s]\n5it [00:00, 4.99it/s]\n6it [00:01, 4.91it/s]\n7it [00:01, 4.87it/s]\n8it [00:01, 4.84it/s]\n9it [00:01, 4.82it/s]\n10it [00:01, 4.80it/s]\n11it [00:02, 4.79it/s]\n12it [00:02, 4.79it/s]\n13it [00:02, 4.79it/s]\n14it [00:02, 4.78it/s]\n15it [00:03, 4.78it/s]\n16it [00:03, 4.78it/s]\n17it [00:03, 4.78it/s]\n18it [00:03, 4.78it/s]\n19it [00:03, 4.78it/s]\n20it [00:04, 4.78it/s]\n21it [00:04, 4.78it/s]\n22it [00:04, 4.77it/s]\n23it [00:04, 4.77it/s]\n24it [00:04, 4.77it/s]\n25it [00:05, 4.78it/s]\n26it [00:05, 4.78it/s]\n27it [00:05, 4.79it/s]\n28it [00:05, 4.79it/s]\n28it [00:05, 4.86it/s]\nTotal safe images: 1 out of 1", "metrics": { "predict_time": 13.169920075, "total_time": 14.661235 }, "output": [ "https://replicate.delivery/xezq/nswddLNlhQ6cLVOo4beMoxKORaBl0Xn8WAbeSLSUs7e1sd4nA/out-0.webp" ], "started_at": "2024-12-18T21:15:57.814315Z", "status": "succeeded", "urls": { "stream": "https://stream.replicate.com/v1/files/bcwr-nlyjti6ycwltbfvutfks7ry3r2kssljtojlqdkrnp7nyqazhr5ma", "get": "https://api.replicate.com/v1/predictions/ntx3nn4w4drmc0ckvega4by6a0", "cancel": "https://api.replicate.com/v1/predictions/ntx3nn4w4drmc0ckvega4by6a0/cancel" }, "version": "503940bae1420b7b37ca91b8ff0f3a43974b48143225f2a6eeadd0d099f13e6f" }
Generated in2024-12-18 21:15:57.812 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:15:57.813 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 91%|█████████ | 276/304 [00:00<00:00, 2757.00it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2606.06it/s] 2024-12-18 21:15:57.930 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.12s free=28877863776256 Downloading weights 2024-12-18T21:15:57Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpkcr401s0/weights url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar 2024-12-18T21:16:04Z | INFO | [ Complete ] dest=/tmp/tmpkcr401s0/weights size="172 MB" total_elapsed=6.695s url=https://replicate.delivery/xezq/XFZ1s0d56e3kIySrbB2mFDblQW5sPX2vyaT6ciVNL8VUSHeTA/trained_model.tar Downloaded weights in 6.72s 2024-12-18 21:16:04.651 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/79e40e707f56872a 2024-12-18 21:16:04.720 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded 2024-12-18 21:16:04.720 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys 2024-12-18 21:16:04.720 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted Applying LoRA: 0%| | 0/304 [00:00<?, ?it/s] Applying LoRA: 91%|█████████ | 276/304 [00:00<00:00, 2759.17it/s] Applying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2607.72it/s] 2024-12-18 21:16:04.837 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.19s Using seed: 65511 0it [00:00, ?it/s] 1it [00:00, 8.34it/s] 2it [00:00, 5.84it/s] 3it [00:00, 5.33it/s] 4it [00:00, 5.11it/s] 5it [00:00, 4.99it/s] 6it [00:01, 4.91it/s] 7it [00:01, 4.87it/s] 8it [00:01, 4.84it/s] 9it [00:01, 4.82it/s] 10it [00:01, 4.80it/s] 11it [00:02, 4.79it/s] 12it [00:02, 4.79it/s] 13it [00:02, 4.79it/s] 14it [00:02, 4.78it/s] 15it [00:03, 4.78it/s] 16it [00:03, 4.78it/s] 17it [00:03, 4.78it/s] 18it [00:03, 4.78it/s] 19it [00:03, 4.78it/s] 20it [00:04, 4.78it/s] 21it [00:04, 4.78it/s] 22it [00:04, 4.77it/s] 23it [00:04, 4.77it/s] 24it [00:04, 4.77it/s] 25it [00:05, 4.78it/s] 26it [00:05, 4.78it/s] 27it [00:05, 4.79it/s] 28it [00:05, 4.79it/s] 28it [00:05, 4.86it/s] Total safe images: 1 out of 1
Want to make some of these yourself?
Run this model