catcathh / UltraPixel

Implementation of UltraPixel: Advancing Ultra-High-Resolution Image Synthesis to New Peaks
GNU Affero General Public License v3.0
558 stars 21 forks source link

TRAINING LORA please give more info #17

Open Maelstrom2014 opened 2 months ago

Maelstrom2014 commented 2 months ago

HI, thanx for excelent solution and resolution! Plase give more information about training LORA: 1) How much VRAM I need? 2) How long it takes to train? epochs, how many pics I need? 3) What resolution/aspects, of pics I need in dataset?

catcathh commented 2 months ago

Thanks for your interest.

  1. When training a LoRA , the VRAM usage is highly dependent on the image resolution. For instance, with an image resolution of 4096x4096, the VRAM requirement can reach approximately 60 GB on A100.
  2. For the cat example I provided, training took around 5,000 iterations.To optimize the process, you may first train the model at a lower base resolution (such as 1024x1024) and then fine-tune it on higher resolutions.
  3. Using ~ 10 images with varying resolutions and aspect ratios should be sufficient for effective training. I provide data used for lora at https://github.com/catcathh/UltraPixel/tree/main/figures/example_lora_cat.