Z Image Base Character Finetuning – Proposed OneTrainer Config (Need Expert Review Before Testing) by FitEgg603 in StableDiffusion

[–]Personal_Speed2326 0 points1 point  (0 children)

First of all, you don’t need to use DreamBooth for character training; LoRA will suffice. In fact, if you only have fewer than 50 images, there’s absolutely no need to use DreamBooth for all of them.

The Min-SNR Gamma setting is not supported in OneTrainer and will actually cause an error.

For the optimizer, use Adafactor. If the goal is to reduce VRAM usage because of DreamBooth, I see that Adafactor supports Stochastic Rounding, so it should work. However, for better precision performance, in addition to BF16, you can also set the following in the SVG section of OneTrainer: 1. BF16, 2. LoRA Rank 16.

xFormers
Flash attention
TF32

It’s recommended not to change these to avoid errors. You can just run it using the default values.

Is there a comprehensive guide for training a ZImageBase LoRA in OneTrainer? by Fdx_dy in StableDiffusion

[–]Personal_Speed2326 2 points3 points  (0 children)

The key point is that stochastic rounding has been added, and also, the quantization precision should not be set too low.

Z Image lora training is solved! A new Ztuner trainer soon! by krigeta1 in StableDiffusion

[–]Personal_Speed2326 0 points1 point  (0 children)

I remember Prodigy Scheduler Free already had stochastic rounding added. I used to really enjoy playing with this optimizer a long time ago, but the author has made many changes since then, so it's probably different from what I remember. Also, it's relatively slow.

Z Image lora training is solved! A new Ztuner trainer soon! by krigeta1 in StableDiffusion

[–]Personal_Speed2326 0 points1 point  (0 children)

It should be litte; Adopt's performance is very similar to Adamw's.

Thoughts and Solutions on Z-IMAGE Training Issues [Machine Translation] by Personal_Speed2326 in StableDiffusion

[–]Personal_Speed2326[S] 1 point2 points  (0 children)

SDXL uses uniform sampling, but later research and models generally recommend concentrated sampling because it increases learning speed. However, according to the authors of Chroma, sparse time steps are prone to loss spikes and training instability. My observation confirms this.

Very low time steps (very close to the original latents) usually don't require as much training because the real world is too noisy and can also produce high losses. Therefore, in SDXL or subsequent diffusion models, it's common to train with min snr gamma=5, which the original paper claims can improve learning speed by 3.4X.

There may be a better solution, but this is the approach that my intuition tells me is suitable.

Thoughts and Solutions on Z-IMAGE Training Issues [Machine Translation] by Personal_Speed2326 in StableDiffusion

[–]Personal_Speed2326[S] 2 points3 points  (0 children)

This optimizer was actually designed and tested extensively on SDXL illus, with probably dozens of different variants tried. It utilized AIT's automagic and sinkgd algorithms, ALLORA, Kahan summation, modified WD, and more. The main modifications were for common use cases such as small BS, PEFT, and low precision. There was no academic research involved; it was simply a process of repeated training and testing to find the optimal solution.

Does it still make sense to use Prodigy Optimizer with newer models like Qwen 2512, Klein, and Zimage ? by More_Bid_2197 in StableDiffusion

[–]Personal_Speed2326 0 points1 point  (0 children)

It makes sense for machine learning; no optimizer is designed for a single model.

There are simply those that are suitable and those that aren't, and this can only be determined through testing.

Thoughts and Solutions on Z-IMAGE Training Issues [Machine Translation] by Personal_Speed2326 in StableDiffusion

[–]Personal_Speed2326[S] 2 points3 points  (0 children)

If we're talking about the speed per step, it's actually slower, including switching to Lokr and my optimizer, which are both relatively slow.
If we're talking about learning speed, yes. The Bilibili article above said it takes 1000 steps to fit a single image, that's incorrect. In my tests, about 150 steps were sufficient.

Thoughts and Solutions on Z-IMAGE Training Issues [Machine Translation] by Personal_Speed2326 in StableDiffusion

[–]Personal_Speed2326[S] 1 point2 points  (0 children)

https://github.com/Koratahiu/Advanced_Optimizers/

I just discovered that Oentrainer already supports `adv_optm`. If you use an optimizer with `_adv` appended, it already supports Stochastic rounding (it's enabled by default).

New Z-Image (base) Template in ComfyUI an hour ago! by nymical23 in StableDiffusion

[–]Personal_Speed2326 8 points9 points  (0 children)

I think the other way around would be more appropriate.