charlesmccarthy / zeroscope2

ZeroScope2 on a40

  • Public
  • 56.4K runs
  • L40S
Iterate in playground

Input

Run this model in Node.js with one line of code:

npx create-replicate --model=charlesmccarthy/zeroscope2
or set up a project from scratch
npm install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

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 charlesmccarthy/zeroscope2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

const output = await replicate.run(
  "charlesmccarthy/zeroscope2:5eaf92046a5ce431ab31d5dc58c422fa2c53284ea486c80132755c3892a12fd3",
  {
    input: {
      fps: 8,
      model: "xl",
      width: 576,
      height: 320,
      prompt: "An astronaut riding a horse",
      batch_size: 1,
      num_frames: 24,
      init_weight: 0.5,
      guidance_scale: 7.5,
      remove_watermark: false,
      num_inference_steps: 50
    }
  }
);

// 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.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model costs approximately $0.34 to run on Replicate, or 2 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 6 minutes. The predict time for this model varies significantly based on the inputs.

Readme

ZeroScope2 no changes except moving to T4