I'm trying to train a LoRA with Kohya and I appear to be having a problem with bitsandbytes but have no idea what I'm looking for or if this is the right place. Please help! #1083
Unanswered
CRIPPLED-Z0MBIE
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
23:10:35-016652 INFO Start training Dreambooth...
23:10:35-018153 INFO Valid image folder names found in: E:/Stable Diffusion/LoRA/GABY LORA v1/Image
23:10:35-019153 INFO Folder 100_GabyLora : steps 1600
23:10:35-019653 INFO max_train_steps (1600 / 2 / 1 * 1 * 1) = 800
23:10:35-020654 INFO stop_text_encoder_training = 0
23:10:35-021655 INFO lr_warmup_steps = 0
23:10:35-022156 INFO Saving training config to E:/Stable Diffusion/LoRA/GABY LORA v1/Model\Gaby V1_20240224-231035.json...
23:10:35-023658 INFO accelerate launch --num_cpu_threads_per_process=2 "./train_db.py" --bucket_no_upscale --bucket_reso_steps=64
--cache_latents --caption_extension=".txt" --clip_skip=2 --enable_bucket --min_bucket_reso=256 --max_bucket_reso=2048
--learning_rate="0.0001" --learning_rate_te="1e-05" --logging_dir="E:/Stable Diffusion/LoRA/GABY LORA v1/Log"
--lr_scheduler="constant" --lr_scheduler_num_cycles="1" --max_data_loader_n_workers="1" --resolution="512,512"
--max_train_steps="800" --mixed_precision="fp16" --optimizer_type="AdamW8bit" --output_dir="E:/Stable Diffusion/LoRA/GABY
LORA v1/Model" --output_name="Gaby V1" --pretrained_model_name_or_path="runwayml/stable-diffusion-v1-5"
--save_every_n_epochs="1" --save_model_as=safetensors --save_precision="fp16" --seed="1234" --train_batch_size="2"
--train_data_dir="E:/Stable Diffusion/LoRA/GABY LORA v1/Image" --xformers
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
prepare tokenizer
prepare images.
found directory E:\Stable Diffusion\LoRA\GABY LORA v1\Image\100_GabyLora contains 16 image files
1600 train images with repeating.
0 reg images.
no regularization images / 正則化画像が見つかりませんでした
[Dataset 0]
batch_size: 2
resolution: (512, 512)
enable_bucket: True
network_multiplier: 1.0
min_bucket_reso: 256
max_bucket_reso: 2048
bucket_reso_steps: 64
bucket_no_upscale: True
[Subset 0 of Dataset 0]
image_dir: "E:\Stable Diffusion\LoRA\GABY LORA v1\Image\100_GabyLora"
image_count: 16
num_repeats: 100
shuffle_caption: False
keep_tokens: 0
keep_tokens_separator:
caption_dropout_rate: 0.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,
is_reg: False
class_tokens: GabyLora
caption_extension: .txt
[Dataset 0]
loading image sizes.
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<00:00, 2283.62it/s]
make buckets
min_bucket_reso and max_bucket_reso are ignored if bucket_no_upscale is set, because bucket reso is defined by image size automatically / bucket_no_upscaleが指定された場合は、bucketの解像度は画像サイズから自動計算されるため、min_bucket_resoとmax_bucket_resoは無視されます
number of images (including repeats) / 各bucketの画像枚数(繰り返し回数を含む)
bucket 0: resolution (448, 576), count: 1600
mean ar error (without repeats): 0.0
prepare accelerator
loading model for process 0/1
load Diffusers pretrained models: runwayml/stable-diffusion-v1-5
Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 19.40it/s]
You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing
safety_checker=None
. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at huggingface/diffusers#254 .UNet2DConditionModel: 64, 8, 768, False, False
U-Net converted to original U-Net
Enable xformers for U-Net
[Dataset 0]
caching latents.
checking cache validity...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<?, ?it/s]
caching latents...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:02<00:00, 7.80it/s]
prepare optimizer, data loader etc.
Traceback (most recent call last):
File "E:\Kohya\kohya_ss\library\train_util.py", line 3510, in get_optimizer
import bitsandbytes as bnb
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes_init_.py", line 6, in
from . import cuda_setup, utils, research
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\research_init_.py", line 1, in
from . import nn
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\research\nn_init_.py", line 1, in
from .modules import LinearFP8Mixed, LinearFP8Global
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in
from bitsandbytes.optim import GlobalOptimManager
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\optim_init_.py", line 6, in
from bitsandbytes.cextension import COMPILED_WITH_CUDA
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\cextension.py", line 5, in
from .cuda_setup.main import evaluate_cuda_setup
File "E:\Kohya\kohya_ss\venv\lib\site-packages\bitsandbytes\cuda_setup\main.py", line 21, in
from .paths import determine_cuda_runtime_lib_path
ModuleNotFoundError: No module named 'bitsandbytes.cuda_setup.paths'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Kohya\kohya_ss\train_db.py", line 498, in
train(args)
File "E:\Kohya\kohya_ss\train_db.py", line 177, in train
_, _, optimizer = train_util.get_optimizer(args, trainable_params)
File "E:\Kohya\kohya_ss\library\train_util.py", line 3512, in get_optimizer
raise ImportError("No bitsandbytes / bitsandbytesがインストールされていないようです")
ImportError: No bitsandbytes / bitsandbytesがインストールされていないようです
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "E:\Kohya\kohya_ss\venv\Scripts\accelerate.exe_main.py", line 7, in
File "E:\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 47, in main
args.func(args)
File "E:\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1017, in launch_command
simple_launcher(args)
File "E:\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 637, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['E:\Kohya\kohya_ss\venv\Scripts\python.exe', './train_db.py', '--bucket_no_upscale', '--bucket_reso_steps=64', '--cache_latents', '--caption_extension=.txt', '--clip_skip=2', '--enable_bucket', '--min_bucket_reso=256', '--max_bucket_reso=2048', '--learning_rate=0.0001', '--learning_rate_te=1e-05', '--logging_dir=E:/Stable Diffusion/LoRA/GABY LORA v1/Log', '--lr_scheduler=constant', '--lr_scheduler_num_cycles=1', '--max_data_loader_n_workers=1', '--resolution=512,512', '--max_train_steps=800', '--mixed_precision=fp16', '--optimizer_type=AdamW8bit', '--output_dir=E:/Stable Diffusion/LoRA/GABY LORA v1/Model', '--output_name=Gaby V1', '--pretrained_model_name_or_path=runwayml/stable-diffusion-v1-5', '--save_every_n_epochs=1', '--save_model_as=safetensors', '--save_precision=fp16', '--seed=1234', '--train_batch_size=2', '--train_data_dir=E:/Stable Diffusion/LoRA/GABY LORA v1/Image', '--xformers']' returned non-zero exit status 1.
Beta Was this translation helpful? Give feedback.
All reactions