Skip to content

Sync mode generation #343

@rafationgsonwc

Description

@rafationgsonwc

Hi I have a question regarding the replicate.run API call. How can I decrease the response time to less than 2 seconds? I am using the official Flux Schnell model and have the following settings, but I am still receiving the output in 2 seconds even though generation time in Replicate is less than 1 second. I have also tried using the HTTP call with Prefer: wait in the headers and still not receiving the output in less than 2 seconds.

const input = {
    prompt: "an astronaut on the moon"
    num_inference_steps: 1, 
    go_fast: true, 
    num_outputs: 1, 
    megapixels : "0.25"
};

const output = await replicate.run("black-forest-labs/flux-schnell", { input });

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions