carcruz97/style-transfer-i

Public
1 run

Input

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

npx create-replicate --model=carcruz97/style-transfer-i
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 carcruz97/style-transfer-i using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

const output = await replicate.run(
  "carcruz97/style-transfer-i:18cab4bc6d5120288bdb27ac0b476638d285ce5aff853ce1c940103be3577c72",
  {
    input: {
      seed: 1337,
      prompt: "masterpiece, best quality, highres",
      guidance_scale: 8,
      style_strength: 0.4,
      negative_prompt: "worst quality, low quality, normal quality",
      structure_strength: 0.6,
      num_inference_steps: 30
    }
  }
);

// 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 runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

This model doesn't have a readme.