Skip to content

[Sharing Experience] Training Z-Image LoRA using 12G VRAM ~ 😁 #550

@juntaosun

Description

@juntaosun

(1) Datasets Training Preparation: Image material with a maximum side size of 768.

🎉 To minimize VRAM usage, after extensive testing, training was successful with 6~10 images, yielding good LoRa results.

A maximum image side resolution of 1024 might cause insufficient 12G VRAM. You can try it!

(2) New Job Creation: Select Z-Image Turbo, and then set your model path. Follow the settings in the screenshot below.

Image

You need to enter your own trigger words! This is just an example !
⚠️ Remember to set the Transformer Offload to 0%; we won't use it because it will throw an error, and we're unsure if this is a bug.

Image

Correction: Learning Rate 0.0001 ~ 0.0002 !
👉 After extensive testing, 2000 steps is a suitable value.

Image

Datasets: Cache Latents and Resolution 512, 768 ~

A maximum image side resolution of 1024 might cause insufficient 12G VRAM. You can try it!

Image Image

👆 As you can see, training started successfully on 12G VRAM, and the speed is quite good !👇

first_lora_v1:  26%|##5       | 519/2000 [24:43<1:10:54,  2.87s/it, lr: 2.0e-04 loss: 3.811e-01]

Training speed is approximately 2~3 seconds/it, 2000 steps take about 1 - 2 hour to complete.

Finally: Wishing users with low VRAM success in training their own z-image LoRA!
Thanks to ai-toolkit and z-image, have fun! If you have better training settings, please share! 🤗

Image

This is my second z-image LoRA. ai-toolkit\output

Now, you can use it in ComfyUI via the Lora loader ! Z-Image-Turbo ~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions