1. 21 Nov, 2023 1 commit
    • Linoy Tsaban's avatar
      Add features to the Dreambooth LoRA SDXL training script (#5508) · 6fac1369
      Linoy Tsaban authored
      
      
      * Additions:
      - support for different lr for text encoder
      - support for Prodigy optimizer
      - support for min snr gamma
      - support for custom captions and dataset loading from the hub
      
      * adjusted --caption_column behaviour (to -not- use the second column of the dataset by default if --caption_column is not provided)
      
      * fixed --output_dir / --model_dir_name confusion
      
      * added --repeats, --adam_weight_decay_text_encoder
      + some fixes
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_sdxl.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * - import compute_snr from diffusers/training_utils.py
      - cluster adamw together
      - when using 'prodigy', if --train_text_encoder == True and --text_encoder_lr != --learning rate, changes the lr of the text encoders optimization params to be --learning_rate (otherwise errors)
      
      * shape fixes when custom captions are used
      
      * formatting and a little cleanup
      
      * code styling
      
      * --repeats default value fixed, changed to 1
      
      * bug fix - removed redundant lines of embedding concatenation when using prior_preservation (that duplicated class_prompt embeddings)
      
      * changed dataset loading logic according to the following usecases (to avoid unnecessary dependency on datasets)-
      1. user provides --dataset_name
      2. user provides local dir --instance_data_dir that contains a metadata .jsonl file
      3. user provides local dir --instance_data_dir that contains only images
      in cases [1,2] we import datasets and use load_dataset method, in case [3] we process the data same as in the original script setting
      
      * styling fix
      
      * arg name fix
      
      * adjusted the --repeats logic
      
      * -removed redundant arg and 'if' when loading local folder with prompts
      -updated readme template
      -some default val fixes
      -custom caption tests
      
      * image path fix for readme
      
      * code style
      
      * bug fix
      
      * --caption_column arg
      
      * readme fix
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarLinoy Tsaban <linoy@huggingface.co>
      6fac1369
  2. 08 Sep, 2023 1 commit
  3. 28 Aug, 2023 1 commit
  4. 25 Aug, 2023 1 commit
  5. 23 Aug, 2023 1 commit
  6. 17 Aug, 2023 1 commit
  7. 16 Aug, 2023 1 commit
  8. 06 Aug, 2023 1 commit
  9. 25 Jul, 2023 2 commits
    • Sayak Paul's avatar
      [SDXL DreamBooth LoRA] add support for text encoder fine-tuning (#4097) · 365e8461
      Sayak Paul authored
      
      
      * Allow low precision sd xl
      
      * finish
      
      * finish
      
      * feat: initial draft for supporting text encoder lora finetuning for SDXL DreamBooth
      
      * fix: variable assignments.
      
      * add: autocast block.
      
      * add debugging
      
      * vae dtype hell
      
      * fix: vae dtype hell.
      
      * fix: vae dtype hell 3.
      
      * clean up
      
      * lora text encoder loader.
      
      * fix: unwrapping models.
      
      * add: tests.
      
      * docs.
      
      * handle unexpected keys.
      
      * fix vae dtype in the final inference.
      
      * fix scope problem.
      
      * fix: save_model_card args.
      
      * initialize: prefix to None.
      
      * fix: dtype issues.
      
      * apply gixes.
      
      * debgging.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * add: fast tests.
      
      * pre-tokenize.
      
      * address: will's comments.
      
      * fix: loader and tests.
      
      * fix: dataloader.
      
      * simplify dataloader.
      
      * length.
      
      * simplification.
      
      * make style && make quality
      
      * simplify state_dict munging
      
      * fix: tests.
      
      * fix: state_dict packing.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      365e8461
    • Sayak Paul's avatar
      [ControlNet SDXL training] fixes in the training script (#4223) · fed12376
      Sayak Paul authored
      * fix: #4206
      
      * add: sdxl controlnet training smoketest.
      
      * remove unnecessary token inits.
      
      * add: licensing to model card.
      
      * include SDXL licensing in the model card and make public visibility default
      
      * debugging
      
      * debugging
      
      * disable local file download.
      
      * fix: training test.
      
      * fix: ckpt prefix.
      fed12376
  10. 11 Jul, 2023 1 commit
    • Sayak Paul's avatar
      [Examples] Add a training script for SDXL DreamBooth LoRA (#4016) · 3d74dc2a
      Sayak Paul authored
      
      
      * add dreambooth lora script for SDXL incorporating latest changes.
      
      * remove use_auth_token=True.
      
      * add: documentation
      
      * remove unneeded cli.
      
      * increase the number of training steps in the readme.
      
      * add LoraLoaderMixin to the subclassing mix.
      
      * add sdxl lora dreambooth test.
      
      * add: inference code sample.
      
      * add: refiner output.
      
      * add LoraLoaderMixin to the mix of classes of StableDiffusionXLImg2ImgPipeline.
      
      * change default resolution of DreamBoothDataset.
      
      * better sdxl report path.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      ---------
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      3d74dc2a
  11. 15 Jun, 2023 1 commit
  12. 17 May, 2023 1 commit
  13. 09 May, 2023 1 commit
    • Will Berman's avatar
      if dreambooth lora (#3360) · a757b2db
      Will Berman authored
      * update IF stage I pipelines
      
      add fixed variance schedulers and lora loading
      
      * added kv lora attn processor
      
      * allow loading into alternative lora attn processor
      
      * make vae optional
      
      * throw away predicted variance
      
      * allow loading into added kv lora layer
      
      * allow load T5
      
      * allow pre compute text embeddings
      
      * set new variance type in schedulers
      
      * fix copies
      
      * refactor all prompt embedding code
      
      class prompts are now included in pre-encoding code
      max tokenizer length is now configurable
      embedding attention mask is now configurable
      
      * fix for when variance type is not defined on scheduler
      
      * do not pre compute validation prompt if not present
      
      * add example test for if lora dreambooth
      
      * add check for train text encoder and pre compute text embeddings
      a757b2db
  14. 28 Apr, 2023 1 commit
  15. 21 Apr, 2023 1 commit
  16. 20 Apr, 2023 2 commits
  17. 01 Mar, 2023 1 commit
  18. 16 Feb, 2023 1 commit
  19. 13 Feb, 2023 1 commit
  20. 08 Feb, 2023 1 commit
  21. 07 Feb, 2023 1 commit
  22. 12 Jan, 2023 1 commit
  23. 24 Oct, 2022 1 commit
  24. 06 Oct, 2022 1 commit
  25. 04 Oct, 2022 1 commit
  26. 03 Oct, 2022 1 commit
  27. 21 Sep, 2022 1 commit