update node
This commit is contained in:
@@ -20,17 +20,19 @@ class Eden_LoRa_trainer:
|
||||
"required": {
|
||||
"training_images_folder_path": ("STRING", {"default": "."}),
|
||||
"ckpt_name": (folder_paths.get_filename_list("checkpoints"), ),
|
||||
"lora_name": ("STRING", {"default": "Eden_LoRa"}),
|
||||
"lora_name": ("STRING", {"default": "Eden_Token_LoRa"}),
|
||||
"mode": (["style", "face", "object"], ),
|
||||
"training_resolution": ("INT", {"default": 512, "min": 256, "max": 1024}),
|
||||
"train_batch_size": ("INT", {"default": 4, "min": 1, "max": 8}),
|
||||
"max_train_steps": ("INT", {"default": 360, "min": 10, "max": 10000}),
|
||||
"ti_lr": ("FLOAT", {"default": 0.001, "min": 0.0001, "max": 0.01, "step": 0.0001}),
|
||||
"unet_lr": ("FLOAT", {"default": 0.001, "min": 0.0001, "max": 0.01, "step": 0.0001}),
|
||||
"max_train_steps": ("INT", {"default": 300, "min": 10, "max": 10000}),
|
||||
"ti_lr": ("FLOAT", {"default": 0.001, "min": 0.0, "max": 0.005, "step": 0.0001}),
|
||||
"unet_lr": ("FLOAT", {"default": 0.0005, "min": 0.0, "max": 0.005, "step": 0.0001}),
|
||||
"lora_rank": ("INT", {"default": 16, "min": 1, "max": 64}),
|
||||
"disable_ti": ("BOOLEAN", {"default": False}),
|
||||
"n_tokens": ("INT", {"default": 3, "min": 1, "max": 5}),
|
||||
"debug_mode": ("BOOLEAN", {"default": False}),
|
||||
"save_checkpoint_every_n_steps": ("INT", {"default": 180, "min": 10, "max": 10000}),
|
||||
"save_checkpoint_every_n_steps": ("INT", {"default": 200, "min": 10, "max": 10000}),
|
||||
"sample_imgs_lora_scale": ("FLOAT", {"default": 0.7, "min": 0.0, "max": 1.25}),
|
||||
"seed": ("INT", {"default": 0, "min": 0, "max": 100000}),
|
||||
}
|
||||
}
|
||||
@@ -43,24 +45,27 @@ class Eden_LoRa_trainer:
|
||||
def train_lora(self,
|
||||
training_images_folder_path,
|
||||
ckpt_name,
|
||||
lora_name = "eden_lora",
|
||||
mode = "style",
|
||||
seed = 0,
|
||||
train_batch_size = 4,
|
||||
max_train_steps = 360,
|
||||
ti_lr = 0.001,
|
||||
unet_lr = 0.001,
|
||||
lora_rank = 16,
|
||||
disable_ti = False,
|
||||
n_tokens = 3,
|
||||
debug_mode = False,
|
||||
save_checkpoint_every_n_steps = 180,
|
||||
lora_name,
|
||||
mode,
|
||||
training_resolution,
|
||||
train_batch_size,
|
||||
max_train_steps ,
|
||||
ti_lr,
|
||||
unet_lr,
|
||||
lora_rank,
|
||||
disable_ti,
|
||||
n_tokens,
|
||||
debug_mode,
|
||||
save_checkpoint_every_n_steps,
|
||||
sample_imgs_lora_scale,
|
||||
seed,
|
||||
):
|
||||
|
||||
print("Starting new training job...")
|
||||
|
||||
# Overwrite hardcoded paths to point to comfyUI folders:
|
||||
model_paths.set_path("CLIP", os.path.join(folder_paths.models_dir, "clipseg"))
|
||||
model_paths.set_path("FLORENCE", os.path.join(folder_paths.models_dir, "LLM"))
|
||||
model_paths.set_path("BLIP", os.path.join(folder_paths.models_dir, "blip"))
|
||||
model_paths.set_path("SR", os.path.join(folder_paths.models_dir, "upscale_models"))
|
||||
model_paths.set_path("SD", os.path.join(folder_paths.models_dir, "checkpoints"))
|
||||
@@ -74,10 +79,11 @@ class Eden_LoRa_trainer:
|
||||
concept_mode=mode,
|
||||
ckpt_path=ckpt_path,
|
||||
seed=seed,
|
||||
resolution=512,
|
||||
resolution=training_resolution,
|
||||
train_batch_size=train_batch_size,
|
||||
max_train_steps=max_train_steps,
|
||||
checkpointing_steps=save_checkpoint_every_n_steps,
|
||||
sample_imgs_lora_scale=sample_imgs_lora_scale,
|
||||
ti_lr=ti_lr,
|
||||
unet_lr=unet_lr,
|
||||
lora_rank=lora_rank,
|
||||
|
||||
Reference in New Issue
Block a user