typetext
{
"aspect_ratio": "21:9",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "Maul stands in the dimly lit Mandalorian palace, his crimson lightsaber ignited. The red glow illuminates his tattoos and fierce yellow eyes, radiating menace. Shadows dance on the stone floor as he grips his weapon tightly, his gaze burning with rage and triumph, the cold throne looming behind him.",
"prompt_strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Ht6**********************************
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 swk23/mauls using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"swk23/mauls:fd70c0597847c0fea51c1ce43645ba6d443e61083812e15a2d0bc92323e7d1d0",
{
input: {
aspect_ratio: "21:9",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 3,
lora_scale: 1,
megapixels: "1",
model: "dev",
num_inference_steps: 28,
num_outputs: 1,
output_format: "jpg",
output_quality: 80,
prompt: "Maul stands in the dimly lit Mandalorian palace, his crimson lightsaber ignited. The red glow illuminates his tattoos and fierce yellow eyes, radiating menace. Shadows dance on the stone floor as he grips his weapon tightly, his gaze burning with rage and triumph, the cold throne looming behind him.",
prompt_strength: 0.8
}
}
);
// 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_Ht6**********************************
This is your API token. Keep it to yourself.
import replicate
Run swk23/mauls using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"swk23/mauls:fd70c0597847c0fea51c1ce43645ba6d443e61083812e15a2d0bc92323e7d1d0",
input={
"aspect_ratio": "21:9",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "Maul stands in the dimly lit Mandalorian palace, his crimson lightsaber ignited. The red glow illuminates his tattoos and fierce yellow eyes, radiating menace. Shadows dance on the stone floor as he grips his weapon tightly, his gaze burning with rage and triumph, the cold throne looming behind him.",
"prompt_strength": 0.8
}
)
# 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_Ht6**********************************
This is your API token. Keep it to yourself.
Run swk23/mauls 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": "swk23/mauls:fd70c0597847c0fea51c1ce43645ba6d443e61083812e15a2d0bc92323e7d1d0",
"input": {
"aspect_ratio": "21:9",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "Maul stands in the dimly lit Mandalorian palace, his crimson lightsaber ignited. The red glow illuminates his tattoos and fierce yellow eyes, radiating menace. Shadows dance on the stone floor as he grips his weapon tightly, his gaze burning with rage and triumph, the cold throne looming behind him.",
"prompt_strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "6g2ezrdwvxrmc0cmcyqswz3nz0",
"model": "swk23/mauls",
"version": "fd70c0597847c0fea51c1ce43645ba6d443e61083812e15a2d0bc92323e7d1d0",
"input": {
"aspect_ratio": "21:9",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 28,
"num_outputs": 1,
"output_format": "jpg",
"output_quality": 80,
"prompt": "Maul stands in the dimly lit Mandalorian palace, his crimson lightsaber ignited. The red glow illuminates his tattoos and fierce yellow eyes, radiating menace. Shadows dance on the stone floor as he grips his weapon tightly, his gaze burning with rage and triumph, the cold throne looming behind him.",
"prompt_strength": 0.8
},
"logs": "Lora https://replicate.delivery/yhqm/qgGkswo7rmoiJFNqFewfPAvTI0HwfHPWdC2lWoir1f2JyTXOB/trained_model.tar already loaded\nUsing seed: 55670\n0it [00:00, ?it/s]\n1it [00:00, 9.08it/s]\n2it [00:00, 6.39it/s]\n3it [00:00, 5.83it/s]\n4it [00:00, 5.58it/s]\n5it [00:00, 5.46it/s]\n6it [00:01, 5.31it/s]\n7it [00:01, 5.30it/s]\n8it [00:01, 5.29it/s]\n9it [00:01, 5.28it/s]\n10it [00:01, 5.24it/s]\n11it [00:02, 5.19it/s]\n12it [00:02, 5.16it/s]\n13it [00:02, 5.19it/s]\n14it [00:02, 5.21it/s]\n15it [00:02, 5.22it/s]\n16it [00:02, 5.18it/s]\n17it [00:03, 5.17it/s]\n18it [00:03, 5.20it/s]\n19it [00:03, 5.21it/s]\n20it [00:03, 5.22it/s]\n21it [00:03, 5.23it/s]\n22it [00:04, 5.18it/s]\n23it [00:04, 5.19it/s]\n24it [00:04, 5.21it/s]\n25it [00:04, 5.20it/s]\n26it [00:04, 5.21it/s]\n27it [00:05, 5.18it/s]\n28it [00:05, 5.19it/s]\n28it [00:05, 5.28it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/l07jTvCNxyrRKNSafyEv0yJAm03RpDTtr92VmlLHQ229QmCKA/out-0.jpg"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-01-15T01:59:17.983Z",
"started_at": "2025-01-15T01:59:17.98932Z",
"completed_at": "2025-01-15T01:59:23.519711Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6g2ezrdwvxrmc0cmcyqswz3nz0/cancel",
"get": "https://api.replicate.com/v1/predictions/6g2ezrdwvxrmc0cmcyqswz3nz0",
"stream": "https://stream.replicate.com/v1/files/bcwr-4fz6ge3uvinuz6z365ee4n5xbn5ui25hkqwpfcgac2jzp6hayxfq",
"web": "https://replicate.com/p/6g2ezrdwvxrmc0cmcyqswz3nz0"
},
"metrics": {
"predict_time": 5.530390745,
"total_time": 5.536711
}
}