windows 10: RTX 3090 24GB, running kohya locally for FLux dream. I followed SECourses video to configure kohya. The last time I used Kohya was sept 1 2024. Now it is Okt 1 2024. First I ran Kohya without updating: the performance was 14s/it. Then I cancelled training. I ran git pull, reran the setup, configured the accelerator. And now the performance is 130-160s/it.
I didn't touch most of the parameters. Most config comes from a pre-made config file. What am I doing wrong?
(venv) PS D:\Kohya_GUI_Flux_Installer_21\kohya_ss> git status
On branch sd3-flux.1
Your branch is up to date with 'origin/sd3-flux.1'.
05:11:49-505054 INFO headless: False
05:11:49-571035 INFO Using shell=True when running external commands...
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
05:12:18-344000 INFO Loading config...
05:12:23-768624 INFO Start training Dreambooth...
05:12:23-770609 INFO Validating lr scheduler arguments...
05:12:23-771608 INFO Validating optimizer arguments...
05:12:23-772608 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\log existence and writability...
SUCCESS
05:12:23-774626 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\model existence and writability...
SUCCESS
05:12:23-776608 INFO Validating
D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005.safetensor
s existence... SUCCESS
05:12:23-777627 INFO Validating
D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state
existence... SUCCESS
05:12:23-779835 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\img existence... SUCCESS
05:12:23-780608 INFO Folder 1_ohwx woman: 1 repeats found
05:12:23-783608 INFO Folder 1_ohwx woman: 220 images found
05:12:23-784607 INFO Folder 1_ohwx woman: 220 * 1 = 220 steps
05:12:23-786609 INFO Regularization factor: 1
05:12:23-787608 INFO Total steps: 220
05:12:23-789609 INFO Train batch size: 1
05:12:23-790608 INFO Gradient accumulation steps: 1
05:12:23-791608 INFO Epoch: 15
05:12:23-792608 INFO max_train_steps (220 / 1 / 1 * 15 * 1) = 3300
05:12:23-794610 INFO lr_warmup_steps = 0
05:12:23-799630 WARNING Here is the trainer command as a reference. It will not be executed:
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\Scripts\accelerate.EXE launch --dynamo_backend no --dynamo_mode default --gpu_ids 0 --mixed_precision bf16 --num_processes 1 --num_machines 1 --num_cpu_threads_per_process 2 D:/Kohya_GUI_Flux_Installer_21/kohya_ss/sd-scripts/flux_train.py --config_file D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051223.toml
05:12:23-801630 INFO Showing toml config file:
D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051223.toml
05:12:23-803628 INFO adaptive_noise_scale = 0
ae = "D:/ComfyUI_windows_portable/ComfyUI/models/vae/ae.safetensors"
blocks_to_swap = 0
bucket_no_upscale = true
bucket_reso_steps = 64
cache_latents = true
cache_latents_to_disk = true
cache_text_encoder_outputs = true
cache_text_encoder_outputs_to_disk = true
caption_dropout_every_n_epochs = 0
caption_dropout_rate = 0
caption_extension = ".txt"
clip_l = "D:/ComfyUI_windows_portable/ComfyUI/models/clip/clip_l.safetensors"
cpu_offload_checkpointing = true
discrete_flow_shift = 3.1582
double_blocks_to_swap = 5
dynamo_backend = "no"
epoch = 15
full_bf16 = true
fused_backward_pass = true
gradient_accumulation_steps = 1
gradient_checkpointing = true
guidance_scale = 1
huber_c = 0.1
huber_schedule = "snr"
keep_tokens = 0
learning_rate = 4e-6
learning_rate_te = 0
logging_dir = "D:/Kohya_GUI_Flux_Installer_21/train_4\\log"
loss_type = "l2"
lr_scheduler = "constant"
lr_scheduler_args = []
lr_scheduler_num_cycles = 1
lr_scheduler_power = 1
lr_warmup_steps = 0
max_bucket_reso = 2048
max_data_loader_n_workers = 0
max_timestep = 1000
max_token_length = 75
max_train_steps = 3300
mem_eff_save = true
min_bucket_reso = 256
mixed_precision = "bf16"
model_prediction_type = "raw"
multires_noise_discount = 0.3
multires_noise_iterations = 0
noise_offset = 0
noise_offset_type = "Original"
optimizer_args = [ "scale_parameter=False", "relative_step=False", "warmup_init=False",
"weight_decay=0.01",]
optimizer_type = "Adafactor"
output_dir = "D:/Kohya_GUI_Flux_Installer_21/train_4\\model"
output_name = "alr_p"
persistent_data_loader_workers = 0
pretrained_model_name_or_path =
"D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005.safetenso
rs"
prior_loss_weight = 1
resolution = "1024,1024"
resume =
"D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state"
sample_prompts = "D:/Kohya_GUI_Flux_Installer_21/train_4\\model\\sample/prompt.txt"
sample_sampler = "euler_a"
save_every_n_epochs = 3
save_model_as = "safetensors"
save_precision = "fp16"
save_state = true
save_state_on_train_end = true
sdpa = true
seed = 1
single_blocks_to_swap = 0
t5xxl_max_token_length = 512
timestep_sampling = "sigmoid"
train_batch_size = 1
train_blocks = "all"
train_data_dir = "D:/Kohya_GUI_Flux_Installer_21/train_4\\img"
vae_batch_size = 4
wandb_run_name = "alr_p"
05:12:23-814643 INFO end of toml config file:
D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051223.toml
05:12:26-356066 INFO Start training Dreambooth...
05:12:26-358065 INFO Validating lr scheduler arguments...
05:12:26-360065 INFO Validating optimizer arguments...
05:12:26-362065 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\log existence and writability...
SUCCESS
05:12:26-363064 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\model existence and writability...
SUCCESS
05:12:26-366065 INFO Validating
D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate__reality_0-000005.safetensor
s existence... SUCCESS
05:12:26-368064 INFO Validating
D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state
existence... SUCCESS
05:12:26-370064 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\img existence... SUCCESS
05:12:26-372065 INFO Folder 1_ohwx woman: 1 repeats found
05:12:26-377064 INFO Folder 1_ohwx woman: 220 images found
05:12:26-379064 INFO Folder 1_ohwx woman: 220 * 1 = 220 steps
05:12:26-381064 INFO Regularization factor: 1
05:12:26-382064 INFO Total steps: 220
05:12:26-384065 INFO Train batch size: 1
05:12:26-386065 INFO Gradient accumulation steps: 1
05:12:26-388065 INFO Epoch: 15
05:12:26-389064 INFO max_train_steps (220 / 1 / 1 * 15 * 1) = 3300
05:12:26-392065 INFO lr_warmup_steps = 0
05:12:26-399065 INFO Saving training config to
D:/Kohya_GUI_Flux_Installer_21/train_4\model\alr_p_20241001-051226.json...
05:12:26-404065 INFO Executing command: D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\Scripts\accelerate.EXE launch
--dynamo_backend no --dynamo_mode default --gpu_ids 0 --mixed_precision bf16 --num_processes 1
--num_machines 1 --num_cpu_threads_per_process 2
D:/Kohya_GUI_Flux_Installer_21/kohya_ss/sd-scripts/flux_train.py --config_file
D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051226.toml
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\diffusers\utils\outputs.py:63: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.
torch.utils._pytree._register_pytree_node(
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\diffusers\utils\outputs.py:63: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.
torch.utils._pytree._register_pytree_node(
2024-10-01 05:12:51 INFO Loading settings from D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051226.toml... train_util.py:4328
INFO D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051226 train_util.py:4347
2024-10-01 05:12:51 INFO Using DreamBooth method. flux_train.py:103
INFO prepare images. train_util.py:1872
INFO get image size from name of cache files train_util.py:1810
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 399.19it/s]
2024-10-01 05:12:52 INFO set image size from cache files: 220/220 train_util.py:1817
INFO found directory D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman contains 220 image files train_util.py:1819
WARNING No caption file found for 220 images. Training will continue without captions for these images. If class token exists, it will be used. / train_util.py:1850
220枚の画像にキャプションファイルが見つかりませんでした。これらの画像についてはキャプションなしで学習を続行します。class tokenが存在する場合はそれを使います。
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1413--flux1-dev-952361136.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1610--xl_stoiq_duchaiten_00001_-298273446.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092064-1.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092064.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092065-1.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1641--xl_stoiq_duchaiten_00001_-1106092067-1.jpg... and 215 more train_util.py:1855
INFO 220 train images with repeating. train_util.py:1913
INFO 0 reg images. train_util.py:1916
WARNING no regularization images / 正則化画像が見つかりませんでした train_util.py:1921
INFO [Dataset 0] config_util.py:570
batch_size: 1
resolution: (1024, 1024)
enable_bucket: False
network_multiplier: 1.0
[Subset 0 of Dataset 0]
image_dir: "D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman"
image_count: 220
num_repeats: 1
shuffle_caption: False
keep_tokens: 0
keep_tokens_separator:
caption_separator: ,
secondary_separator: None
enable_wildcard: False
caption_dropout_rate: 0
caption_dropout_every_n_epoches: 0
caption_tag_dropout_rate: 0.0
caption_prefix: None
caption_suffix: None
color_aug: False
flip_aug: False
face_crop_aug_range: None
random_crop: False
token_warmup_min: 1,
token_warmup_step: 0,
alpha_mask: False,
is_reg: False
class_tokens: ohwx woman
caption_extension: .txt
INFO [Dataset 0] config_util.py:576
INFO loading image sizes. train_util.py:909
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<?, ?it/s]
INFO prepare dataset train_util.py:917
INFO prepare accelerator flux_train.py:173
accelerator device: cuda
INFO Building AutoEncoder flux_utils.py:62
INFO Loading state dict from D:/ComfyUI_windows_portable/ComfyUI/models/vae/ae.safetensors flux_utils.py:66
INFO Loaded AE: <All keys matched successfully> flux_utils.py:69
2024-10-01 05:12:54 INFO [Dataset 0] train_util.py:2396
INFO caching latents with caching strategy. train_util.py:1017
INFO checking cache validity... train_util.py:1044
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 569.28it/s]
INFO no latents to cache train_util.py:1087
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
2024-10-01 05:12:56 INFO Building CLIP flux_utils.py:74
INFO Loading state dict from D:/ComfyUI_windows_portable/ComfyUI/models/clip/clip_l.safetensors flux_utils.py:167
INFO Loaded CLIP: <All keys matched successfully> flux_utils.py:170
INFO Loading state dict from None flux_utils.py:215
Traceback (most recent call last):
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\sd-scripts\flux_train.py", line 993, in <module>
train(args)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\sd-scripts\flux_train.py", line 211, in train
t5xxl = flux_utils.load_t5xxl(args.t5xxl, weight_dtype, "cpu", args.disable_mmap_load_safetensors)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\sd-scripts\library\flux_utils.py", line 216, in load_t5xxl
sd = load_safetensors(ckpt_path, device=str(device), disable_mmap=disable_mmap, dtype=dtype)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\sd-scripts\library\flux_utils.py", line 39, in load_safetensors
return load_file(path) # prevent device invalid Error
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\safetensors\torch.py", line 313, in load_file
with safe_open(filename, framework="pt", device=device) as f:
TypeError: argument 'filename': expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\Scripts\accelerate.EXE\__main__.py", line 7, in <module>
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 48, in main
args.func(args)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1106, in launch_command
simple_launcher(args)
File "D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 704, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\\Kohya_GUI_Flux_Installer_21\\kohya_ss\\venv\\Scripts\\python.exe', 'D:/Kohya_GUI_Flux_Installer_21/kohya_ss/sd-scripts/flux_train.py', '--config_file', 'D:/Kohya_GUI_Flux_Installer_21/train_4\\model/config_dreambooth-20241001-051226.toml']' returned non-zero exit status 1.
05:12:59-047872 INFO Training has ended.
05:14:10-841036 INFO Save...
05:14:15-063648 INFO Start training Dreambooth...
05:14:15-065647 INFO Validating lr scheduler arguments...
05:14:15-066648 INFO Validating optimizer arguments...
05:14:15-067644 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\log existence and writability... SUCCESS
05:14:15-070646 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\model existence and writability... SUCCESS
05:14:15-072647 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005.safetensors existence... SUCCESS
05:14:15-073647 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state existence... SUCCESS
05:14:15-075647 INFO Validating D:/Kohya_GUI_Flux_Installer_21/train_4\img existence... SUCCESS
05:14:15-077644 INFO Folder 1_ohwx woman: 1 repeats found
05:14:15-079647 INFO Folder 1_ohwx woman: 220 images found
05:14:15-081647 INFO Folder 1_ohwx woman: 220 * 1 = 220 steps
05:14:15-082647 INFO Regularization factor: 1
05:14:15-083647 INFO Total steps: 220
05:14:15-084646 INFO Train batch size: 1
05:14:15-086645 INFO Gradient accumulation steps: 1
05:14:15-087647 INFO Epoch: 15
05:14:15-088647 INFO max_train_steps (220 / 1 / 1 * 15 * 1) = 3300
05:14:15-090647 INFO lr_warmup_steps = 0
05:14:15-095659 INFO Saving training config to D:/Kohya_GUI_Flux_Installer_21/train_4\model\alr_p_20241001-051415.json...
05:14:15-098647 INFO Executing command: D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\Scripts\accelerate.EXE launch --dynamo_backend no --dynamo_mode default --gpu_ids 0 --mixed_precision bf16
--num_processes 1 --num_machines 1 --num_cpu_threads_per_process 2 D:/Kohya_GUI_Flux_Installer_21/kohya_ss/sd-scripts/flux_train.py --config_file
D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051415.toml
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\diffusers\utils\outputs.py:63: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.
torch.utils._pytree._register_pytree_node(
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\diffusers\utils\outputs.py:63: FutureWarning: `torch.utils._pytree._register_pytree_node` is deprecated. Please use `torch.utils._pytree.register_pytree_node` instead.
torch.utils._pytree._register_pytree_node(
2024-10-01 05:14:39 INFO Loading settings from D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051415.toml... train_util.py:4328
INFO D:/Kohya_GUI_Flux_Installer_21/train_4\model/config_dreambooth-20241001-051415 train_util.py:4347
2024-10-01 05:14:39 INFO Using DreamBooth method. flux_train.py:103
INFO prepare images. train_util.py:1872
INFO get image size from name of cache files train_util.py:1810
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 405.83it/s]
INFO set image size from cache files: 220/220 train_util.py:1817
INFO found directory D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman contains 220 image files train_util.py:1819
WARNING No caption file found for 220 images. Training will continue without captions for these images. If class token exists, it will be used. / train_util.py:1850
220枚の画像にキャプションファイルが見つかりませんでした。これらの画像についてはキャプションなしで学習を続行します。class tokenが存在する場合はそれを使います。
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1413--flux1-dev-952361136.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1610--xl_stoiq_duchaiten_00001_-298273446.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092064-1.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092064.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1639--xl_stoiq_duchaiten_00001_-1106092065-1.jpg train_util.py:1857
WARNING D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman\1641--xl_stoiq_duchaiten_00001_-1106092067-1.jpg... and 215 more train_util.py:1855
INFO 220 train images with repeating. train_util.py:1913
INFO 0 reg images. train_util.py:1916
WARNING no regularization images / 正則化画像が見つかりませんでした train_util.py:1921
INFO [Dataset 0] config_util.py:570
batch_size: 1
resolution: (1024, 1024)
enable_bucket: False
network_multiplier: 1.0
[Subset 0 of Dataset 0]
image_dir: "D:\Kohya_GUI_Flux_Installer_21\train_4\img\1_ohwx woman"
image_count: 220
num_repeats: 1
shuffle_caption: False
keep_tokens: 0
keep_tokens_separator:
caption_separator: ,
secondary_separator: None
enable_wildcard: False
caption_dropout_rate: 0
caption_dropout_every_n_epoches: 0
caption_tag_dropout_rate: 0.0
caption_prefix: None
caption_suffix: None
color_aug: False
flip_aug: False
face_crop_aug_range: None
random_crop: False
token_warmup_min: 1,
token_warmup_step: 0,
alpha_mask: False,
is_reg: False
class_tokens: ohwx woman
caption_extension: .txt
INFO [Dataset 0] config_util.py:576
INFO loading image sizes. train_util.py:909
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 220383.78it/s]
INFO prepare dataset train_util.py:917
INFO prepare accelerator flux_train.py:173
accelerator device: cuda
INFO Building AutoEncoder flux_utils.py:62
2024-10-01 05:14:40 INFO Loading state dict from D:/ComfyUI_windows_portable/ComfyUI/models/vae/ae.safetensors flux_utils.py:66
INFO Loaded AE: <All keys matched successfully> flux_utils.py:69
INFO [Dataset 0] train_util.py:2396
INFO caching latents with caching strategy. train_util.py:1017
INFO checking cache validity... train_util.py:1044
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 2050.71it/s]
INFO no latents to cache train_util.py:1087
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565
2024-10-01 05:14:41 INFO Building CLIP flux_utils.py:74
INFO Loading state dict from D:/ComfyUI_windows_portable/ComfyUI/models/clip/clip_l.safetensors flux_utils.py:167
INFO Loaded CLIP: <All keys matched successfully> flux_utils.py:170
INFO Loading state dict from D:/ComfyUI_windows_portable/ComfyUI/models/clip/t5xxl_fp16.safetensors flux_utils.py:215
2024-10-01 05:14:42 INFO Loaded T5xxl: <All keys matched successfully> flux_utils.py:218
2024-10-01 05:15:10 INFO [Dataset 0] train_util.py:2417
INFO caching Text Encoder outputs with caching strategy. train_util.py:1179
INFO checking cache validity... train_util.py:1185
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 220/220 [00:00<00:00, 563.95it/s]
2024-10-01 05:15:11 INFO no Text Encoder outputs to cache train_util.py:1207
INFO cache Text Encoder outputs for sample prompt: D:/Kohya_GUI_Flux_Installer_21/train_4\model\sample/prompt.txt flux_train.py:237
INFO Building Flux model dev flux_utils.py:45
INFO Loading state dict from D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005.safetensors flux_utils.py:52
INFO Loaded Flux: <All keys matched successfully> flux_utils.py:55
FLUX: Gradient checkpointing enabled. CPU offload: True
number of trainable parameters: 11901408320
prepare optimizer, data loader etc.
INFO use Adafactor optimizer | {'scale_parameter': False, 'relative_step': False, 'warmup_init': False, 'weight_decay': 0.01} train_util.py:4641
WARNING because max_grad_norm is set, clip_grad_norm is enabled. consider set to 0 / train_util.py:4669
max_grad_normが設定されているためclip_grad_normが有効になります。0に設定して無効にしたほうがいいかもしれません
WARNING constant_with_warmup will be good / スケジューラはconstant_with_warmupが良いかもしれません train_util.py:4673
enable full bf16 training.
2024-10-01 05:17:43 INFO resume training from local state: D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state train_util.py:4362
INFO Loading states from D:/Kohya_GUI_Flux_Installer_21/train_3/model/Alternate_reality_0-000005-state accelerator.py:3085
2024-10-01 05:18:55 INFO All model weights loaded successfully checkpointing.py:214
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\checkpointing.py:220: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
optimizer_state = torch.load(input_optimizer_file, map_location=map_location)
INFO All optimizer states loaded successfully checkpointing.py:222
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\checkpointing.py:228: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
scheduler.load_state_dict(torch.load(input_scheduler_file))
INFO All scheduler states loaded successfully checkpointing.py:229
INFO All dataloader sampler states loaded successfully checkpointing.py:241
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\accelerate\checkpointing.py:251: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
states = torch.load(input_dir.joinpath(f"{RNG_STATE_NAME}_{process_index}.pkl"))
INFO All random states loaded successfully checkpointing.py:262
INFO Loading in 0 custom states accelerator.py:3170
running training / 学習開始
num examples / サンプル数: 220
num batches per epoch / 1epochのバッチ数: 220
num epochs / epoch数: 15
batch size per device / バッチサイズ: 1
gradient accumulation steps / 勾配を合計するステップ数 = 1
total optimization steps / 学習ステップ数: 3300
steps: 0%| | 0/3300 [00:00<?, ?it/s]
epoch 1/15
2024-10-01 05:18:56 INFO epoch is incremented. current_epoch: 0, epoch: 1 train_util.py:701
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\sd-scripts\library\flux_models.py:449: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:555.)
x = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=attn_mask)
D:\Kohya_GUI_Flux_Installer_21\kohya_ss\venv\lib\site-packages\torch\utils\checkpoint.py:1399: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
with device_autocast_ctx, torch.cpu.amp.autocast(**cpu_autocast_kwargs), recompute_context: # type: ignore[attr-defined]
steps: 0%|▍ | 10/3300 [21:25<117:29:44, 128.57s/it, avr_loss=0.47]
windows 10: RTX 3090 24GB, running kohya locally for FLux dream. I followed SECourses video to configure kohya. The last time I used Kohya was sept 1 2024. Now it is Okt 1 2024. First I ran Kohya without updating: the performance was 14s/it. Then I cancelled training. I ran git pull, reran the setup, configured the accelerator. And now the performance is 130-160s/it.
I didn't touch most of the parameters. Most config comes from a pre-made config file. What am I doing wrong?