hhks commited on
Commit
39d3eb9
1 Parent(s): 78d5d19

Upload ponyxl_loras_n_stuff.md

Browse files
Files changed (1) hide show
  1. ponyxl_loras_n_stuff.md +53 -47
ponyxl_loras_n_stuff.md CHANGED
@@ -10,6 +10,12 @@ You can also experiment with the following lora on the base pony model, it's bas
10
 
11
  https://files.catbox.moe/kk4qjo.safetensors autismmix
12
 
 
 
 
 
 
 
13
  ##List of Ponyxl LoRAs from /h/
14
  NEW NOTE 1/24/2024: I've noticed that some LoRA bakers are using different negatives when testing their LoRAs, which can lead to discrepancies when using them. I've mostly noticed that some LoRAs have a significantly reduced effect if you don't have source_pony or some combination of the source_* tags other than source anime in the negatives. This is unfortunate but a byproduct of not having a standardized process for creating the LoRAs. There's another section down below that has more info about similar issues with PonyXL that's worth reading.
15
 
@@ -217,6 +223,8 @@ https://files.catbox.moe/c69pcl.zip JVTeemo
217
  https://mega.nz/file/o01XhDIC#8hukpUUeFCThQj2WPe1O0OT7LDWHGvGmFr_y7GVUhfI borscht
218
  https://mega.nz/folder/iZcDnbiC#Yrxa1yRPxVd9F4pQQKuYpw suga_hideo, morino831
219
  https://mega.nz/folder/dTkFHAgD#i04TRgRJUOMu9cByDe24UQ amazuyu_tatsuki, csr, enoshima, garakuta-ya, hiromitsu, kagami, kamitani, korotsuke, ohara, piromizu, JK-BlushySpicy-YD-CSR-Redrop_mix
 
 
220
  ###Characters
221
 
222
  https://files.catbox.moe/1wdl00.safetensors character_momoka helps to prompt features like hair, clothes
@@ -417,8 +425,43 @@ You can also help nudge generations with the model more towards anime style by u
417
 
418
  Other tricks tried were to include all the score tags in the LoRA's training set on every image which didn't have much success or only using the source_anime tag which also didn't seem to influence the LoRA's effectiveness much. I haven't tried actually using the score tags as intended since that takes more effort than I'm willing to put in for a LoRA for the time being but that may net the best results.
419
 
420
- ##LoRA Training Update 1/30/2024
421
- I've been messing around with Lycoris locon, which needs inputs for conv network rank and alpha which I generally saw recommendations to set it to the network rank and alpha of the model (and to not exceed 64). Not sure how easy it is to use with the UI frontends but here's what the commandline looks like for kohya-ss. As always any criticism is welcome on /hdg/ I've actually gotten some good feedback on there.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
 
423
  --network_module = networks.lora
424
  --train_data_dir = "$IMAGES_PATH$"
@@ -426,25 +469,26 @@ I've been messing around with Lycoris locon, which needs inputs for conv network
426
  --output_name = "$LORA_NAME$"
427
  --pretrained_model_name_or_path = "$PATH_TO_PONYXL_CHECKPOINT$"
428
  --max_train_epochs = $NUMBER_EPOCHS$
429
- --train_batch_size = 12
430
  --resolution = "1024,1024"
431
  --save_every_n_epochs = 1
432
  --save_last_n_epochs = 999
433
  --learning_rate = 1
434
  --lr_scheduler = cosine
435
- --lr_warmup_steps = 0
436
- --network_dim = $NETWORK_RANK$
437
- --network_alpha = $NETWORK_ALPHA$
438
- --seed = 1056283418
439
  --keep_tokens = 0
440
  --gradient_checkpointing
441
  --max_data_loader_n_workers = 16
442
  --mixed_precision = bf16
443
  --save_precision = bf16
444
  --network_module = lycoris.kohya
445
- --network_args "preset = unet-transformer-only" "conv_dim = $NETWORK_RANK$" "conv_alpha = $NETWORK_ALPHA$" "algo = locon"
446
  --optimizer_type = "prodigy"
447
  --optimizer_args "decouple = True" "weight_decay = 0.01" "d_coef = 0.8" "use_bias_correction = True" "safeguard_warmup = False" "betas = 0.9,0.99"
 
 
448
  --caption_extension = ".txt"
449
  --prior_loss_weight = 1
450
  --cache_latents
@@ -454,42 +498,4 @@ I've been messing around with Lycoris locon, which needs inputs for conv network
454
  --enable_bucket
455
  --min_bucket_reso = 512
456
  --max_bucket_reso = 2048
457
- --bucket_reso_steps = 256
458
-
459
- ##Old LoRA training settings
460
- These are my old LoRA training settings with prodigy, didn't really have any major issues with it, keeping it around for reference.
461
-
462
- --network_module = networks.lora
463
- --train_data_dir = "$IMAGES_PATH$"
464
- --output_dir = "$OUTPUT_FOLDER$"
465
- --output_name = "$LORA_NAME$"
466
- --pretrained_model_name_or_path = "$PATH_TO_PONYXL_CHECKPOINT$"
467
- --max_train_epochs = $NUMBER_EPOCHS$
468
- --train_batch_size = 2
469
- --resolution = "1024,1024"
470
- --save_every_n_epochs = 1
471
- --save_last_n_epochs = 999
472
- --learning_rate = 1
473
- --lr_scheduler = cosine
474
- --lr_warmup_steps = 0
475
- --network_dim = 64
476
- --seed = 1055217506
477
- --keep_tokens = 0
478
- --gradient_checkpointing
479
- --max_data_loader_n_workers = 8
480
- --mixed_precision = bf16
481
- --save_precision = bf16
482
- --optimizer_type = "prodigy"
483
- --optimizer_args "decouple = True" "weight_decay = 0.01" "d_coef = 0.8" "use_bias_correction = True" "safeguard_warmup = False" "betas = 0.9,0.99"
484
- --caption_extension = ".txt"
485
- --prior_loss_weight = 1
486
- --enable_bucket
487
- --min_bucket_reso = 512
488
- --max_bucket_reso = 2048
489
- --bucket_reso_steps=256
490
- --xformers
491
- --save_model_as = safetensors
492
- --cache_latents
493
- --cache_latents_to_disk
494
- --network_train_unet_only
495
- --cache_text_encoder_outputs
 
10
 
11
  https://files.catbox.moe/kk4qjo.safetensors autismmix
12
 
13
+ There's a finetune of Pony with additional innate artist support now here:
14
+ https://civitai.com/models/282341
15
+
16
+ An anon also created a LoRA extract of it if you want to experiment with it on base pony at varying strengths here:
17
+ https://civitai.com/models/312010/4th-tail-lora-extract
18
+
19
  ##List of Ponyxl LoRAs from /h/
20
  NEW NOTE 1/24/2024: I've noticed that some LoRA bakers are using different negatives when testing their LoRAs, which can lead to discrepancies when using them. I've mostly noticed that some LoRAs have a significantly reduced effect if you don't have source_pony or some combination of the source_* tags other than source anime in the negatives. This is unfortunate but a byproduct of not having a standardized process for creating the LoRAs. There's another section down below that has more info about similar issues with PonyXL that's worth reading.
21
 
 
223
  https://mega.nz/file/o01XhDIC#8hukpUUeFCThQj2WPe1O0OT7LDWHGvGmFr_y7GVUhfI borscht
224
  https://mega.nz/folder/iZcDnbiC#Yrxa1yRPxVd9F4pQQKuYpw suga_hideo, morino831
225
  https://mega.nz/folder/dTkFHAgD#i04TRgRJUOMu9cByDe24UQ amazuyu_tatsuki, csr, enoshima, garakuta-ya, hiromitsu, kagami, kamitani, korotsuke, ohara, piromizu, JK-BlushySpicy-YD-CSR-Redrop_mix
226
+ https://mega.nz/folder/OoYWzR6L#psN69wnC2ljJ9OQS2FDHoQ/folder/W5AjzbLD Fishine, Kakure_Eria, Navigavi, opossummachine, Shibori_Kasu, Syrupmelty, Zankuro, Kiss-Shot Azerola-Orion Heart-Under-Blade, Shinobu Oshino, Utsuho Reuji
227
+ https://mega.nz/folder/YudnhQpC#KxYS978EU9mlyDwmLbIuwA/folder/tmtzgTxK katou_jun
228
  ###Characters
229
 
230
  https://files.catbox.moe/1wdl00.safetensors character_momoka helps to prompt features like hair, clothes
 
425
 
426
  Other tricks tried were to include all the score tags in the LoRA's training set on every image which didn't have much success or only using the source_anime tag which also didn't seem to influence the LoRA's effectiveness much. I haven't tried actually using the score tags as intended since that takes more effort than I'm willing to put in for a LoRA for the time being but that may net the best results.
427
 
428
+ ##Various Anon LoRA Training Settings
429
+ ####Specific block alphas and dims
430
+ I've been seeing some pretty good LoRAs that are making use of the following settings, I couldn't really tell what these settings are doing that's different from just setting the overall dims/alpha of the LoRA but I have seen some of the generated LoRAs and they do seem good, especially considering they're typically just 40 megs.
431
+
432
+ block_alphas=0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625,0.0625
433
+ block_dims=8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
434
+
435
+ There's also been a couple anons playing with the multires settings like so, again I couldn't tell you what exactly this is doing, maybe adding some noise to the images while training to prevent burning up the network?
436
+
437
+ multires_noise_discount=0.3
438
+ multires_noise_iterations=6
439
+ or
440
+ multires_noise_discount=0.5
441
+ multires_noise_iterations=8
442
+
443
+ Here are a couple shared json config files that have utilized these settings, these settings also reduce the effective learning rate significantly so you'll notice the unet learning rate is much higher than you might typically expect:
444
+ https://files.catbox.moe/p1m50y.json
445
+ https://files.catbox.moe/fgp24t.json
446
+ https://files.catbox.moe/s75mc6.json
447
+
448
+ Typically with these settings anons are trying to hit 1.5k-3k steps, so adjust your epoch count based on image count accordingly.
449
+
450
+ I have incorporated the multires_noise_discount and multires_noise_iterations into my own trainings and it seems to improve the quality, although to be honest I haven't really been able to hit the quality I like at just 2k steps and am still targeting more like 5k+, I'm also still mostly using prodigy as my go-to optimizer.
451
+
452
+ ####Custom scheduler
453
+ Another anon that has had some good LoRAs has gone a different route with a custom consine annealing scheduler:
454
+
455
+ https://files.catbox.moe/ua9jua.toml
456
+
457
+ ####Prodigy and multires
458
+
459
+ There's another anon that's been using prodigy with the above multires settings which is what I've been doing lately, seems better than the old settings I was using.
460
+
461
+ https://files.catbox.moe/m861nn.json
462
+
463
+ ####My Current Settings
464
+ My current settings are pretty similar to the prodigy one above, a couple times I've had a hard time getting prodigy to get that last bit of distance to really recreate the artist and have used AdamW in those cases, which takes a bit more tweaking with the learning rates. Usually I'll resize the resulting LoRA down to 16ish dims (for a style) and make sure it still looks good.
465
 
466
  --network_module = networks.lora
467
  --train_data_dir = "$IMAGES_PATH$"
 
469
  --output_name = "$LORA_NAME$"
470
  --pretrained_model_name_or_path = "$PATH_TO_PONYXL_CHECKPOINT$"
471
  --max_train_epochs = $NUMBER_EPOCHS$
472
+ --train_batch_size = 8
473
  --resolution = "1024,1024"
474
  --save_every_n_epochs = 1
475
  --save_last_n_epochs = 999
476
  --learning_rate = 1
477
  --lr_scheduler = cosine
478
+ --network_dim = 64
479
+ --network_alpha = 32
480
+ --seed = 1337
 
481
  --keep_tokens = 0
482
  --gradient_checkpointing
483
  --max_data_loader_n_workers = 16
484
  --mixed_precision = bf16
485
  --save_precision = bf16
486
  --network_module = lycoris.kohya
487
+ --network_args "preset = unet-transformer-only" "conv_dim = 64" "conv_alpha = 32" "algo = locon"
488
  --optimizer_type = "prodigy"
489
  --optimizer_args "decouple = True" "weight_decay = 0.01" "d_coef = 0.8" "use_bias_correction = True" "safeguard_warmup = False" "betas = 0.9,0.99"
490
+ --multires_noise_iterations 6
491
+ --multires_noise_discount 0.3
492
  --caption_extension = ".txt"
493
  --prior_loss_weight = 1
494
  --cache_latents
 
498
  --enable_bucket
499
  --min_bucket_reso = 512
500
  --max_bucket_reso = 2048
501
+ --bucket_reso_steps = 128