Added train example to ti

This commit is contained in:
Jaret Burkett
2023-08-23 13:30:29 -06:00
parent d298240cec
commit f200cf36c5

View File

@@ -1,70 +1,72 @@
--- ---
job: extension job: extension
config: config:
name: example_name name: test_v1
process: process:
- type: 'image_reference_slider_trainer' - type: 'textual_inversion_trainer'
training_folder: "/mnt/Train/out/LoRA" training_folder: "out/TI"
device: cuda:0 device: cuda:0
# for tensorboard logging # for tensorboard logging
log_dir: "/home/jaret/Dev/.tensorboard" log_dir: "out/.tensorboard"
network: embedding:
type: "lora" trigger: "your_trigger_here"
linear: 8 tokens: 12
linear_alpha: 8 init_words: "man with short brown hair"
save_format: "safetensors" # 'safetensors' or 'pt'
save:
dtype: float16 # precision to save
save_every: 100 # save every this many steps
max_step_saves_to_keep: 5 # only affects step counts
datasets:
- folder_path: "/path/to/dataset"
caption_type: "txt"
default_caption: "[trigger]"
buckets: true
resolution: 512
train: train:
noise_scheduler: "ddpm" # or "ddpm", "lms", "euler_a" noise_scheduler: "ddpm" # or "ddpm", "lms", "euler_a"
steps: 5000 noise_scheduler: "ddpm" # or "ddpm", "lms", "euler_a"
lr: 1e-4 steps: 3000
train_unet: true weight_jitter: 0.0
lr: 5e-5
train_unet: false
gradient_checkpointing: true gradient_checkpointing: true
train_text_encoder: true train_text_encoder: false
optimizer: "adamw" optimizer: "adamw"
# optimizer: "prodigy"
optimizer_params: optimizer_params:
weight_decay: 1e-2 weight_decay: 1e-2
lr_scheduler: "constant" lr_scheduler: "constant"
max_denoising_steps: 1000 max_denoising_steps: 1000
batch_size: 1 batch_size: 4
dtype: bf16 dtype: bf16
xformers: true xformers: true
skip_first_sample: true min_snr_gamma: 5.0
noise_offset: 0.0 # skip_first_sample: true
noise_offset: 0.0 # not needed for this
model: model:
name_or_path: "/path/to/model.safetensors" # objective reality v2
name_or_path: "https://civitai.com/models/128453?modelVersionId=142465"
is_v2: false # for v2 models is_v2: false # for v2 models
is_xl: false # for SDXL models is_xl: false # for SDXL models
is_v_pred: false # for v-prediction models (most v2 models) is_v_pred: false # for v-prediction models (most v2 models)
save:
dtype: float16 # precision to save
save_every: 1000 # save every this many steps
max_step_saves_to_keep: 2 # only affects step counts
sample: sample:
sampler: "ddpm" # must match train.noise_scheduler sampler: "ddpm" # must match train.noise_scheduler
sample_every: 100 # sample every this many steps sample_every: 100 # sample every this many steps
width: 512 width: 512
height: 512 height: 512
prompts: prompts:
- "photo of a woman with red hair taking a selfie --m -3" - "photo of [trigger] laughing"
- "photo of a woman with red hair taking a selfie --m -1" - "photo of [trigger] smiling"
- "photo of a woman with red hair taking a selfie --m 1" - "[trigger] close up"
- "photo of a woman with red hair taking a selfie --m 3" - "dark scene [trigger] frozen"
- "close up photo of a man smiling at the camera, in a tank top --m -3" - "[trigger] nighttime"
- "close up photo of a man smiling at the camera, in a tank top--m -1" - "a painting of [trigger]"
- "close up photo of a man smiling at the camera, in a tank top --m 1" - "a drawing of [trigger]"
- "close up photo of a man smiling at the camera, in a tank top --m 3" - "a cartoon of [trigger]"
- "photo of a blonde woman smiling, barista --m -3" - "[trigger] pixar style"
- "photo of a blonde woman smiling, barista --m -1" - "[trigger] costume"
- "photo of a blonde woman smiling, barista --m 1" neg: ""
- "photo of a blonde woman smiling, barista --m 3"
- "photo of a Christina Hendricks --m -1"
- "photo of a Christina Hendricks --m -1"
- "photo of a Christina Hendricks --m 1"
- "photo of a Christina Hendricks --m 3"
- "photo of a Christina Ricci --m -3"
- "photo of a Christina Ricci --m -1"
- "photo of a Christina Ricci --m 1"
- "photo of a Christina Ricci --m 3"
neg: "cartoon, fake, drawing, illustration, cgi, animated, anime"
seed: 42 seed: 42
walk_seed: false walk_seed: false
guidance_scale: 7 guidance_scale: 7
@@ -76,32 +78,15 @@ config:
use_wandb: false # not supported yet use_wandb: false # not supported yet
verbose: false verbose: false
slider: # You can put any information you want here, and it will be saved in the model.
datasets: # The below is an example, but you can put your grocery list in it if you want.
- pair_folder: "/path/to/folder/side/by/side/images" # It is saved in the model so be aware of that. The software will include this
network_weight: 2.0 # plus some other information for you automatically
target_class: "" # only used as default if caption txt are not present
size: 512
- pair_folder: "/path/to/folder/side/by/side/images"
network_weight: 4.0
target_class: "" # only used as default if caption txt are not present
size: 512
# you can put any information you want here, and it will be saved in the model
# the below is an example. I recommend doing trigger words at a minimum
# in the metadata. The software will include this plus some other information
meta: meta:
name: "[name]" # [name] gets replaced with the name above # [name] gets replaced with the name above
description: A short description of your model name: "[name]"
trigger_words: # version: '1.0'
- put # creator:
- trigger # name: Your Name
- words # email: your@gmail.com
- here # website: https://your.website
version: '0.1'
creator:
name: Your Name
email: your@email.com
website: https://yourwebsite.com
any: All meta data above is arbitrary, it can be whatever you want.