typetext
{
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "realistic photo of felix in a classy suit. very muscular, very classy, dark background",
"prompt_strength": 0.8
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_JBq**********************************
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 zeg06/felix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"zeg06/felix:f47973f2eb3f065a1e9845e6c10b3e509c4945914a4f3e7ca43994419f47019c",
{
input: {
aspect_ratio: "1:1",
extra_lora_scale: 1,
go_fast: false,
guidance_scale: 3,
lora_scale: 1,
megapixels: "1",
model: "dev",
num_inference_steps: 50,
num_outputs: 1,
output_format: "webp",
output_quality: 100,
prompt: "realistic photo of felix in a classy suit. very muscular, very classy, dark background",
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_JBq**********************************
This is your API token. Keep it to yourself.
import replicate
Run zeg06/felix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zeg06/felix:f47973f2eb3f065a1e9845e6c10b3e509c4945914a4f3e7ca43994419f47019c",
input={
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": False,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "realistic photo of felix in a classy suit. very muscular, very classy, dark background",
"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_JBq**********************************
This is your API token. Keep it to yourself.
Run zeg06/felix 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": "zeg06/felix:f47973f2eb3f065a1e9845e6c10b3e509c4945914a4f3e7ca43994419f47019c",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "realistic photo of felix in a classy suit. very muscular, very classy, dark background",
"prompt_strength": 0.8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "7dckapzs4srm80cm301tdmy2x8",
"model": "zeg06/felix",
"version": "f47973f2eb3f065a1e9845e6c10b3e509c4945914a4f3e7ca43994419f47019c",
"input": {
"aspect_ratio": "1:1",
"extra_lora_scale": 1,
"go_fast": false,
"guidance_scale": 3,
"lora_scale": 1,
"megapixels": "1",
"model": "dev",
"num_inference_steps": 50,
"num_outputs": 1,
"output_format": "webp",
"output_quality": 100,
"prompt": "realistic photo of felix in a classy suit. very muscular, very classy, dark background",
"prompt_strength": 0.8
},
"logs": "2024-12-30 14:41:41.266 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-30 14:41:41.266 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 94%|█████████▍| 287/304 [00:00<00:00, 2866.12it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2639.00it/s]\n2024-12-30 14:41:41.382 | SUCCESS | fp8.lora_loading:unload_loras:564 - LoRAs unloaded in 0.12s\n2024-12-30 14:41:41.383 | INFO | fp8.lora_loading:convert_lora_weights:498 - Loading LoRA weights for /src/weights-cache/d0b7206f8308ff5b\n2024-12-30 14:41:41.495 | INFO | fp8.lora_loading:convert_lora_weights:519 - LoRA weights loaded\n2024-12-30 14:41:41.495 | DEBUG | fp8.lora_loading:apply_lora_to_model:574 - Extracting keys\n2024-12-30 14:41:41.496 | DEBUG | fp8.lora_loading:apply_lora_to_model:581 - Keys extracted\nApplying LoRA: 0%| | 0/304 [00:00<?, ?it/s]\nApplying LoRA: 95%|█████████▍| 288/304 [00:00<00:00, 2875.72it/s]\nApplying LoRA: 100%|██████████| 304/304 [00:00<00:00, 2642.57it/s]\n2024-12-30 14:41:41.611 | SUCCESS | fp8.lora_loading:load_lora:539 - LoRA applied in 0.23s\nUsing seed: 2557\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.12it/s]\n5it [00:00, 5.01it/s]\n6it [00:01, 4.94it/s]\n7it [00:01, 4.90it/s]\n8it [00:01, 4.87it/s]\n9it [00:01, 4.85it/s]\n10it [00:01, 4.84it/s]\n11it [00:02, 4.83it/s]\n12it [00:02, 4.82it/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.80it/s]\n18it [00:03, 4.81it/s]\n19it [00:03, 4.81it/s]\n20it [00:04, 4.81it/s]\n21it [00:04, 4.81it/s]\n22it [00:04, 4.81it/s]\n23it [00:04, 4.81it/s]\n24it [00:04, 4.80it/s]\n25it [00:05, 4.81it/s]\n26it [00:05, 4.81it/s]\n27it [00:05, 4.81it/s]\n28it [00:05, 4.80it/s]\n29it [00:05, 4.80it/s]\n30it [00:06, 4.80it/s]\n31it [00:06, 4.80it/s]\n32it [00:06, 4.80it/s]\n33it [00:06, 4.80it/s]\n34it [00:06, 4.80it/s]\n35it [00:07, 4.80it/s]\n36it [00:07, 4.81it/s]\n37it [00:07, 4.80it/s]\n38it [00:07, 4.80it/s]\n39it [00:08, 4.81it/s]\n40it [00:08, 4.81it/s]\n41it [00:08, 4.81it/s]\n42it [00:08, 4.81it/s]\n43it [00:08, 4.81it/s]\n44it [00:09, 4.81it/s]\n45it [00:09, 4.81it/s]\n46it [00:09, 4.81it/s]\n47it [00:09, 4.80it/s]\n48it [00:09, 4.80it/s]\n49it [00:10, 4.80it/s]\n50it [00:10, 4.80it/s]\n50it [00:10, 4.85it/s]\nTotal safe images: 1 out of 1",
"output": [
"https://replicate.delivery/xezq/7AfwESFidNRQFqnfFhtNpgtHFKqF4jC0ltNe410rjHkhZMAoA/out-0.webp"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-12-30T14:41:41.158Z",
"started_at": "2024-12-30T14:41:41.266778Z",
"completed_at": "2024-12-30T14:41:52.289692Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7dckapzs4srm80cm301tdmy2x8/cancel",
"get": "https://api.replicate.com/v1/predictions/7dckapzs4srm80cm301tdmy2x8",
"stream": "https://stream.replicate.com/v1/files/bcwr-vefv33ozeyrphyt6evoslgckyo6pftuqnn27ikc6p24mx23qfama",
"web": "https://replicate.com/p/7dckapzs4srm80cm301tdmy2x8"
},
"metrics": {
"predict_time": 11.022914383,
"total_time": 11.131692
}
}