alexgenovese / train-sdxl-kohya

Kohya Training for XL models (Updated 1 year, 8 months ago)

  • Public
  • 149 runs
  • GitHub
  • License
Iterate in playground

Input

pip 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 the client:
import replicate

Run alexgenovese/train-sdxl-kohya using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

output = replicate.run(
    "alexgenovese/train-sdxl-kohya:a0b4df0a15173f25b6d55072a3ba4ea21b332c774c13bde0a0dcf18a4e20c980",
    input={
        "seed": 98796,
        "unet_lr": 1,
        "clip_skip": 1,
        "batch_size": 1,
        "resolution": "1024",
        "keep_tokens": 0,
        "network_dim": 32,
        "output_name": "new_model_name",
        "lr_scheduler": "cosine",
        "noise_offset": 0,
        "learning_rate": 4,
        "network_alpha": 16,
        "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": 1,
        "train_unet_only": False,
        "max_train_epoches": 20,
        "save_every_n_epochs": 5,
        "lr_scheduler_num_cycles": 1,
        "train_text_encoder_only": False,
        "pretrained_model_name_or_path": "stabilityai/stable-diffusion-xl-base-1.0",
        "persistent_data_loader_workers": True
    }
)
print(output)

To learn more, take a look at the guide on getting started with Python.

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.