0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

LoRA作成時にsd-scriptsを実行したら出た 「Error no kernel image is available for execution on the device at line 167 in file D:\ai\tool\bitsandbytes\csrc\ops.cu」 エラーの解消法

Posted at

結論

--optimizer_type=AdamW8bit

--optimizer_type=AdamW

に書き換えて実行する

コマンド

修正した以下のコマンドで上手く行きました。

複数行ver(置換で改行コードを削除したのちコマンドラインで実行して下さい)

accelerate launch --num_cpu_threads_per_process 1 train_network.py
 --pretrained_model_name_or_path=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\models\Stable-diffusion\Brav6.safetensors
 --output_dir=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\kohyaSS\TrainingData\outputs
 --output_name=FILE_NAME_HERE
 --dataset_config=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\kohyaSS\TrainingData\datasetconfig.toml
 --train_batch_size=1
 --max_train_epochs=10
 --resolution=512,512
 --optimizer_type=Adam
 --learning_rate=1e-4
 --network_dim=128
 --network_alpha=64
 --enable_bucket
 --bucket_no_upscale
 --lr_scheduler=cosine_with_restarts
 --lr_scheduler_num_cycles=4
 --lr_warmup_steps=500
 --keep_tokens=1
 --shuffle_caption
 --caption_dropout_rate=0.05
 --save_model_as=safetensors
 --clip_skip=2
 --seed=42
 --color_aug
 --xformers
 --mixed_precision=fp16
 --network_module=networks.lora
 --persistent_data_loader_workers

1行ver

accelerate launch --num_cpu_threads_per_process 1 train_network.py --pretrained_model_name_or_path=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\models\Stable-diffusion\Brav6.safetensors --output_dir=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\kohyaSS\TrainingData\outputs --output_name=FILE_NAME_HERE --dataset_config=D:\workspace\stable-diffusion-202308\stable-diffusion-webui\kohyaSS\TrainingData\datasetconfig.toml --train_batch_size=1 --max_train_epochs=10 --resolution=512,512 --optimizer_type=AdamW --learning_rate=1e-4 --network_dim=128 --network_alpha=64 --enable_bucket --bucket_no_upscale --lr_scheduler=cosine_with_restarts --lr_scheduler_num_cycles=4 --lr_warmup_steps=500 --keep_tokens=1 --shuffle_caption --caption_dropout_rate=0.05 --save_model_as=safetensors --clip_skip=2 --seed=42 --color_aug --xformers --mixed_precision=fp16 --network_module=networks.lora --persistent_data_loader_workers
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?