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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run vetkastar/lora-train using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"vetkastar/lora-train:9d339c5cac9eb0dd779db28538bb67ecf1564aafad16cc520f3b73b35885bc2f",
{
input: {
seed: 1,
unet_lr: 0.0001,
flip_aug: false,
xformers: true,
clip_skip: 1,
color_aug: false,
full_bf16: false,
full_fp16: false,
lr_warmup: 10,
resolution: "512,512",
save_state: false,
keep_tokens: 0,
network_dim: 128,
lr_scheduler: "constant_with_warmup",
noise_offset: 0,
cache_latents: false,
learning_rate: 0.00008,
max_grad_norm: 1,
network_alpha: 128,
save_model_as: "safetensors",
network_module: "networks.lora",
optimizer_type: "AdamW8bit",
save_precision: "bf16",
dataset_repeats: 100,
lr_warmup_steps: 80,
max_train_steps: 0,
mixed_precision: "bf16",
shuffle_caption: false,
text_encoder_lr: 0.00005,
lora_output_name: "Name",
max_token_length: 150,
max_train_epochs: 1,
save_safetensors: true,
train_batch_size: 2,
bucket_no_upscale: true,
bucket_reso_steps: 64,
prior_loss_weight: 1,
scale_weight_norms: 0,
save_every_n_epochs: 1,
caption_dropout_rate: 0,
gradient_checkpointing: false,
lr_scheduler_num_cycles: 1,
max_data_loader_n_workers: 1,
gradient_accumulation_steps: 1,
pretrained_model_name_or_path: "Reliberate_v2.safetensors",
caption_dropout_every_n_epochs: 0,
persistent_data_loader_workers: false
}
}
);
// 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.
pip 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
Run vetkastar/lora-train using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"vetkastar/lora-train:9d339c5cac9eb0dd779db28538bb67ecf1564aafad16cc520f3b73b35885bc2f",
input={
"seed": 1,
"unet_lr": 0.0001,
"flip_aug": False,
"xformers": True,
"clip_skip": 1,
"color_aug": False,
"full_bf16": False,
"full_fp16": False,
"lr_warmup": 10,
"resolution": "512,512",
"save_state": False,
"keep_tokens": 0,
"network_dim": 128,
"lr_scheduler": "constant_with_warmup",
"noise_offset": 0,
"cache_latents": False,
"learning_rate": 0.00008,
"max_grad_norm": 1,
"network_alpha": 128,
"save_model_as": "safetensors",
"network_module": "networks.lora",
"optimizer_type": "AdamW8bit",
"save_precision": "bf16",
"dataset_repeats": 100,
"lr_warmup_steps": 80,
"max_train_steps": 0,
"mixed_precision": "bf16",
"shuffle_caption": False,
"text_encoder_lr": 0.00005,
"lora_output_name": "Name",
"max_token_length": 150,
"max_train_epochs": 1,
"save_safetensors": True,
"train_batch_size": 2,
"bucket_no_upscale": True,
"bucket_reso_steps": 64,
"prior_loss_weight": 1,
"scale_weight_norms": 0,
"save_every_n_epochs": 1,
"caption_dropout_rate": 0,
"gradient_checkpointing": False,
"lr_scheduler_num_cycles": 1,
"max_data_loader_n_workers": 1,
"gradient_accumulation_steps": 1,
"pretrained_model_name_or_path": "Reliberate_v2.safetensors",
"caption_dropout_every_n_epochs": 0,
"persistent_data_loader_workers": False
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run vetkastar/lora-train using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "vetkastar/lora-train:9d339c5cac9eb0dd779db28538bb67ecf1564aafad16cc520f3b73b35885bc2f",
"input": {
"seed": 1,
"unet_lr": 0.0001,
"flip_aug": false,
"xformers": true,
"clip_skip": 1,
"color_aug": false,
"full_bf16": false,
"full_fp16": false,
"lr_warmup": 10,
"resolution": "512,512",
"save_state": false,
"keep_tokens": 0,
"network_dim": 128,
"lr_scheduler": "constant_with_warmup",
"noise_offset": 0,
"cache_latents": false,
"learning_rate": 0.00008,
"max_grad_norm": 1,
"network_alpha": 128,
"save_model_as": "safetensors",
"network_module": "networks.lora",
"optimizer_type": "AdamW8bit",
"save_precision": "bf16",
"dataset_repeats": 100,
"lr_warmup_steps": 80,
"max_train_steps": 0,
"mixed_precision": "bf16",
"shuffle_caption": false,
"text_encoder_lr": 0.00005,
"lora_output_name": "Name",
"max_token_length": 150,
"max_train_epochs": 1,
"save_safetensors": true,
"train_batch_size": 2,
"bucket_no_upscale": true,
"bucket_reso_steps": 64,
"prior_loss_weight": 1,
"scale_weight_norms": 0,
"save_every_n_epochs": 1,
"caption_dropout_rate": 0,
"gradient_checkpointing": false,
"lr_scheduler_num_cycles": 1,
"max_data_loader_n_workers": 1,
"gradient_accumulation_steps": 1,
"pretrained_model_name_or_path": "Reliberate_v2.safetensors",
"caption_dropout_every_n_epochs": 0,
"persistent_data_loader_workers": false
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/vetkastar/lora-train@sha256:9d339c5cac9eb0dd779db28538bb67ecf1564aafad16cc520f3b73b35885bc2f \
-i 'seed=1' \
-i 'unet_lr=0.0001' \
-i 'flip_aug=false' \
-i 'xformers=true' \
-i 'clip_skip=1' \
-i 'color_aug=false' \
-i 'full_bf16=false' \
-i 'full_fp16=false' \
-i 'lr_warmup=10' \
-i 'resolution="512,512"' \
-i 'save_state=false' \
-i 'keep_tokens=0' \
-i 'network_dim=128' \
-i 'lr_scheduler="constant_with_warmup"' \
-i 'noise_offset=0' \
-i 'cache_latents=false' \
-i 'learning_rate=0.00008' \
-i 'max_grad_norm=1' \
-i 'network_alpha=128' \
-i 'save_model_as="safetensors"' \
-i 'network_module="networks.lora"' \
-i 'optimizer_type="AdamW8bit"' \
-i 'save_precision="bf16"' \
-i 'dataset_repeats=100' \
-i 'lr_warmup_steps=80' \
-i 'max_train_steps=0' \
-i 'mixed_precision="bf16"' \
-i 'shuffle_caption=false' \
-i 'text_encoder_lr=0.00005' \
-i 'lora_output_name="Name"' \
-i 'max_token_length=150' \
-i 'max_train_epochs=1' \
-i 'save_safetensors=true' \
-i 'train_batch_size=2' \
-i 'bucket_no_upscale=true' \
-i 'bucket_reso_steps=64' \
-i 'prior_loss_weight=1' \
-i 'scale_weight_norms=0' \
-i 'save_every_n_epochs=1' \
-i 'caption_dropout_rate=0' \
-i 'gradient_checkpointing=false' \
-i 'lr_scheduler_num_cycles=1' \
-i 'max_data_loader_n_workers=1' \
-i 'gradient_accumulation_steps=1' \
-i 'pretrained_model_name_or_path="Reliberate_v2.safetensors"' \
-i 'caption_dropout_every_n_epochs=0' \
-i 'persistent_data_loader_workers=false'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/vetkastar/lora-train@sha256:9d339c5cac9eb0dd779db28538bb67ecf1564aafad16cc520f3b73b35885bc2f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": 1, "unet_lr": 0.0001, "flip_aug": false, "xformers": true, "clip_skip": 1, "color_aug": false, "full_bf16": false, "full_fp16": false, "lr_warmup": 10, "resolution": "512,512", "save_state": false, "keep_tokens": 0, "network_dim": 128, "lr_scheduler": "constant_with_warmup", "noise_offset": 0, "cache_latents": false, "learning_rate": 0.00008, "max_grad_norm": 1, "network_alpha": 128, "save_model_as": "safetensors", "network_module": "networks.lora", "optimizer_type": "AdamW8bit", "save_precision": "bf16", "dataset_repeats": 100, "lr_warmup_steps": 80, "max_train_steps": 0, "mixed_precision": "bf16", "shuffle_caption": false, "text_encoder_lr": 0.00005, "lora_output_name": "Name", "max_token_length": 150, "max_train_epochs": 1, "save_safetensors": true, "train_batch_size": 2, "bucket_no_upscale": true, "bucket_reso_steps": 64, "prior_loss_weight": 1, "scale_weight_norms": 0, "save_every_n_epochs": 1, "caption_dropout_rate": 0, "gradient_checkpointing": false, "lr_scheduler_num_cycles": 1, "max_data_loader_n_workers": 1, "gradient_accumulation_steps": 1, "pretrained_model_name_or_path": "Reliberate_v2.safetensors", "caption_dropout_every_n_epochs": 0, "persistent_data_loader_workers": false } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
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.
This model doesn't have a readme.
This model is cold. You'll get a fast response if the model is warm and already running, and a slower response if the model is cold and starting up.
Choose a file from your machine
Hint: you can also drag files onto the input