Readme
…
Model description
…
Intended use
…
Ethical considerations
…
Caveats and recommendations
…
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 findix/sd-scripts using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"findix/sd-scripts:43889e982cd38203192f5b6f008b147aa1d8eee795121cb4c11a034d88449bf5",
{
input: {
seed: 1337,
unet_lr: 0.00006,
clip_skip: 2,
batch_size: 1,
resolution: "512",
keep_tokens: 0,
network_dim: 32,
lr_scheduler: "cosine_with_restarts",
noise_offset: 0,
learning_rate: 0.00006,
network_alpha: 32,
save_model_as: "safetensors",
network_module: "networks.lora",
optimizer_type: "Lion",
lr_warmup_steps: 0,
max_bucket_reso: 1024,
min_bucket_reso: 256,
text_encoder_lr: 0.000007,
train_unet_only: false,
training_comment: "this LoRA model credit from replicate-sd-scripts",
max_train_epoches: 10,
save_every_n_epochs: 2,
lr_scheduler_num_cycles: 1,
train_text_encoder_only: false,
pretrained_model_name_or_path: "CompVis/stable-diffusion-v1-4",
persistent_data_loader_workers: true
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
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 A100 (80GB) GPU hardware. We don't yet have enough runs of this model to provide performance information.
…
…
…
…
…