typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"guidance_scale": 3.5,
"lora_scale": 1,
"model": "schnell",
"num_inference_steps": 8,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.",
"prompt_strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_fHv**********************************
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 miike-ai/flux-sprites using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"miike-ai/flux-sprites:bfbaa4240a9948bcc5483cceb9abd73db68c63018a4a7ba5b8a01616d291dcc9",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
guidance_scale: 3.5,
lora_scale: 1,
model: "schnell",
num_inference_steps: 8,
num_outputs: 1,
output_format: "webp",
output_quality: 100,
prompt: "A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.",
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_fHv**********************************
This is your API token. Keep it to yourself.
import replicate
Run miike-ai/flux-sprites using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"miike-ai/flux-sprites:bfbaa4240a9948bcc5483cceb9abd73db68c63018a4a7ba5b8a01616d291dcc9",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"guidance_scale": 3.5,
"lora_scale": 1,
"model": "schnell",
"num_inference_steps": 8,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.",
"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_fHv**********************************
This is your API token. Keep it to yourself.
Run miike-ai/flux-sprites 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": "miike-ai/flux-sprites:bfbaa4240a9948bcc5483cceb9abd73db68c63018a4a7ba5b8a01616d291dcc9",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"guidance_scale": 3.5,
"lora_scale": 1,
"model": "schnell",
"num_inference_steps": 8,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.",
"prompt_strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "9e8wqefx0xrj00cj95bbjwvd24",
"model": "miike-ai/flux-sprites",
"version": "bfbaa4240a9948bcc5483cceb9abd73db68c63018a4a7ba5b8a01616d291dcc9",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"guidance_scale": 3.5,
"lora_scale": 1,
"model": "schnell",
"num_inference_steps": 8,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.",
"prompt_strength": 0.8
},
"logs": "Using seed: 56556\nPrompt: A sprite sheet of SPRITES showcasing an animated Paladin character in various action poses. The SPRITES are arranged in a grid pattern equal distance between each other, with each Link having a unique poses and weapons.\n[!] txt2img mode\nUsing schnell model\nfree=2980394508288\nDownloading weights\n2024-10-01T18:28:10Z | INFO | [ Initiating ] chunk_size=150M dest=/tmp/tmpea5snvdf/weights url=https://replicate.delivery/yhqm/BrBhiiwPD0ZSM1m5lv38DSuTd9xXKLJQFFpUR5vM7Q0Erj4E/trained_model.tar\n2024-10-01T18:28:12Z | INFO | [ Complete ] dest=/tmp/tmpea5snvdf/weights size=\"1.4 GB\" total_elapsed=1.744s url=https://replicate.delivery/yhqm/BrBhiiwPD0ZSM1m5lv38DSuTd9xXKLJQFFpUR5vM7Q0Erj4E/trained_model.tar\nDownloaded weights in 1.82s\nLoaded LoRAs in 2.94s\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:04, 1.59it/s]\n 25%|██▌ | 2/8 [00:01<00:03, 1.80it/s]\n 38%|███▊ | 3/8 [00:01<00:02, 1.70it/s]\n 50%|█████ | 4/8 [00:02<00:02, 1.65it/s]\n 62%|██████▎ | 5/8 [00:03<00:01, 1.63it/s]\n 75%|███████▌ | 6/8 [00:03<00:01, 1.62it/s]\n 88%|████████▊ | 7/8 [00:04<00:00, 1.61it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.60it/s]\n100%|██████████| 8/8 [00:04<00:00, 1.63it/s]",
"output": [
"https://replicate.delivery/yhqm/VPaxqOrgmWLYI1rNwGo5jrA2ynFk5GWj3Jfrdq8ShvPhiPxJA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-10-01T18:28:10.631Z",
"started_at": "2024-10-01T18:28:10.641195Z",
"completed_at": "2024-10-01T18:28:19.16148Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/9e8wqefx0xrj00cj95bbjwvd24/cancel",
"get": "https://api.replicate.com/v1/predictions/9e8wqefx0xrj00cj95bbjwvd24",
"web": "https://replicate.com/p/9e8wqefx0xrj00cj95bbjwvd24"
},
"metrics": {
"predict_time": 8.520285038,
"total_time": 8.53048
}
}