Readme
This model doesn't have a readme.
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run twn39/test-sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"twn39/test-sdxl:924d4c14df44051ef5004480cbfdffb4c41487cad8c6bd25e0aa75ccad896a07",
{
input: {
prompt: "",
cn_type1: "ImagePrompt",
cn_type2: "ImagePrompt",
cn_type3: "ImagePrompt",
cn_type4: "ImagePrompt",
sharpness: 2,
image_seed: -1,
uov_method: "Disabled",
image_number: 1,
guidance_scale: 4,
refiner_switch: 0.5,
negative_prompt: "",
style_selections: "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
outpaint_selections: "",
performance_selection: "Speed",
aspect_ratios_selection: "1152×896"
}
}
);
// 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.
No output yet! Press "Submit" to start a prediction.
This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.
This model doesn't have a readme.