1. 24 Apr, 2025 2 commits
    • co63oc's avatar
      Fix typos in strings and comments (#11407) · f00a9957
      co63oc authored
      f00a9957
    • Linoy Tsaban's avatar
      [HiDream LoRA] optimizations + small updates (#11381) · edd78804
      Linoy Tsaban authored
      
      
      * 1. add pre-computation of prompt embeddings when custom prompts are used as well
      2. save model card even if model is not pushed to hub
      3. remove scheduler initialization from code example - not necessary anymore (it's now if the base model's config)
      4. add skip_final_inference - to allow to run with validation, but skip the final loading of the pipeline with the lora weights to reduce memory reqs
      
      * pre encode validation prompt as well
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * pre encode validation prompt as well
      
      * Apply style fixes
      
      * empty commit
      
      * change default trained modules
      
      * empty commit
      
      * address comments + change encoding of validation prompt (before it was only pre-encoded if custom prompts are provided, but should be pre-encoded either way)
      
      * Apply style fixes
      
      * empty commit
      
      * fix validation_embeddings definition
      
      * fix final inference condition
      
      * fix pipeline deletion in last inference
      
      * Apply style fixes
      
      * empty commit
      
      * layers
      
      * remove readme remarks on only pre-computing when instance prompt is provided and change example to 3d icons
      
      * smol fix
      
      * empty commit
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
      edd78804
  2. 23 Apr, 2025 3 commits
  3. 22 Apr, 2025 1 commit
    • Linoy Tsaban's avatar
      [LoRA] add LoRA support to HiDream and fine-tuning script (#11281) · e30d3bf5
      Linoy Tsaban authored
      
      
      * initial commit
      
      * initial commit
      
      * initial commit
      
      * initial commit
      
      * initial commit
      
      * initial commit
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarBagheera <59658056+bghira@users.noreply.github.com>
      
      * move prompt embeds, pooled embeds outside
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * fix import
      
      * fix import and tokenizer 4, text encoder 4 loading
      
      * te
      
      * prompt embeds
      
      * fix naming
      
      * shapes
      
      * initial commit to add HiDreamImageLoraLoaderMixin
      
      * fix init
      
      * add tests
      
      * loader
      
      * fix model input
      
      * add code example to readme
      
      * fix default max length of text encoders
      
      * prints
      
      * nullify training cond in unpatchify for temp fix to incompatible shaping of transformer output during training
      
      * smol fix
      
      * unpatchify
      
      * unpatchify
      
      * fix validation
      
      * flip pred and loss
      
      * fix shift!!!
      
      * revert unpatchify changes (for now)
      
      * smol fix
      
      * Apply style fixes
      
      * workaround moe training
      
      * workaround moe training
      
      * remove prints
      
      * to reduce some memory, keep vae in `weight_dtype` same as we have for flux (as it's the same vae)
      https://github.com/huggingface/diffusers/blob/bbd0c161b55ba2234304f1e6325832dd69c60565/examples/dreambooth/train_dreambooth_lora_flux.py#L1207
      
      
      
      * refactor to align with HiDream refactor
      
      * refactor to align with HiDream refactor
      
      * refactor to align with HiDream refactor
      
      * add support for cpu offloading of text encoders
      
      * Apply style fixes
      
      * adjust lr and rank for train example
      
      * fix copies
      
      * Apply style fixes
      
      * update README
      
      * update README
      
      * update README
      
      * fix license
      
      * keep prompt2,3,4 as None in validation
      
      * remove reverse ode comment
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update examples/dreambooth/train_dreambooth_lora_hidream.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * vae offload change
      
      * fix text encoder offloading
      
      * Apply style fixes
      
      * cleaner to_kwargs
      
      * fix module name in copied from
      
      * add requirements
      
      * fix offloading
      
      * fix offloading
      
      * fix offloading
      
      * update transformers version in reqs
      
      * try AutoTokenizer
      
      * try AutoTokenizer
      
      * Apply style fixes
      
      * empty commit
      
      * Delete tests/lora/test_lora_layers_hidream.py
      
      * change tokenizer_4 to load with AutoTokenizer as well
      
      * make text_encoder_four and tokenizer_four configurable
      
      * save model card
      
      * save model card
      
      * revert T5
      
      * fix test
      
      * remove non diffusers lumina2 conversion
      
      ---------
      Co-authored-by: default avatarBagheera <59658056+bghira@users.noreply.github.com>
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
      e30d3bf5
  4. 21 Apr, 2025 3 commits
  5. 18 Apr, 2025 1 commit
    • Kazuki Yoda's avatar
      Fix: `StableDiffusionXLControlNetAdapterInpaintPipeline` incorrectly inherited... · ef47726e
      Kazuki Yoda authored
      Fix: `StableDiffusionXLControlNetAdapterInpaintPipeline` incorrectly inherited `StableDiffusionLoraLoaderMixin` (#11357)
      
      Fix: Inherit `StableDiffusionXLLoraLoaderMixin`
      
      `StableDiffusionXLControlNetAdapterInpaintPipeline`
      used to incorrectly inherit
      `StableDiffusionLoraLoaderMixin`
      instead of `StableDiffusionXLLoraLoaderMixin`
      ef47726e
  6. 15 Apr, 2025 1 commit
  7. 09 Apr, 2025 2 commits
  8. 08 Apr, 2025 3 commits
  9. 05 Apr, 2025 1 commit
  10. 04 Apr, 2025 1 commit
  11. 03 Apr, 2025 1 commit
  12. 02 Apr, 2025 1 commit
  13. 31 Mar, 2025 1 commit
  14. 23 Mar, 2025 1 commit
    • Tolga Cangöz's avatar
      Update README and example code for AnyText usage (#11028) · 0213179b
      Tolga Cangöz authored
      * [Documentation] Update README and example code with additional usage instructions for AnyText
      
      * [Documentation] Update README for AnyTextPipeline and improve logging in code
      
      * Remove wget command for font file from example docstring in anytext.py
      0213179b
  15. 20 Mar, 2025 1 commit
  16. 19 Mar, 2025 1 commit
  17. 18 Mar, 2025 1 commit
  18. 15 Mar, 2025 1 commit
  19. 14 Mar, 2025 2 commits
  20. 13 Mar, 2025 1 commit
  21. 11 Mar, 2025 2 commits
  22. 10 Mar, 2025 1 commit
    • Tolga Cangöz's avatar
      [`Research Project`] Add AnyText: Multilingual Visual Text Generation And Editing (#8998) · b88fef47
      Tolga Cangöz authored
      * Add initial template
      
      * Second template
      
      * feat: Add TextEmbeddingModule to AnyTextPipeline
      
      * feat: Add AuxiliaryLatentModule template to AnyTextPipeline
      
      * Add bert tokenizer from the anytext repo for now
      
      * feat: Update AnyTextPipeline's modify_prompt method
      
      This commit adds improvements to the modify_prompt method in the AnyTextPipeline class. The method now handles special characters and replaces selected string prompts with a placeholder. Additionally, it includes a check for Chinese text and translation using the trans_pipe.
      
      * Fill in the `forward` pass of `AuxiliaryLatentModule`
      
      * `make style && make quality`
      
      * `chore: Update bert_tokenizer.py with a TODO comment suggesting the use of the transformers library`
      
      * Update error handling to raise and logging
      
      * Add `create_glyph_lines` function into `TextEmbeddingModule`
      
      * make style
      
      * Up
      
      * Up
      
      * Up
      
      * Up
      
      * Remove several comments
      
      * refactor: Remove ControlNetConditioningEmbedding and update code accordingly
      
      * Up
      
      * Up
      
      * up
      
      * refactor: Update AnyTextPipeline to include new optional parameters
      
      * up
      
      * feat: Add OCR model and its components
      
      * chore: Update `TextEmbeddingModule` to include OCR model components and dependencies
      
      * chore: Update `AuxiliaryLatentModule` to include VAE model and its dependencies for masked image in the editing task
      
      * `make style`
      
      * refactor: Update `AnyTextPipeline`'s docstring
      
      * Update `AuxiliaryLatentModule` to include info dictionary so that text processing is done once
      
      * simplify
      
      * `make style`
      
      * Converting `TextEmbeddingModule` to ordinary `encode_prompt()` function
      
      * Simplify for now
      
      * `make style`
      
      * Up
      
      * feat: Add scripts to convert AnyText controlnet to diffusers
      
      * `make style`
      
      * Fix: Move glyph rendering to `TextEmbeddingModule` from `AuxiliaryLatentModule`
      
      * make style
      
      * Up
      
      * Simplify
      
      * Up
      
      * feat: Add safetensors module for loading model file
      
      * Fix device issues
      
      * Up
      
      * Up
      
      * refactor: Simplify
      
      * refactor: Simplify code for loading models and handling data types
      
      * `make style`
      
      * refactor: Update to() method in FrozenCLIPEmbedderT3 and TextEmbeddingModule
      
      * refactor: Update dtype in embedding_manager.py to match proj.weight
      
      * Up
      
      * Add attribution and adaptation information to pipeline_anytext.py
      
      * Update usage example
      
      * Will refactor `controlnet_cond_embedding` initialization
      
      * Add `AnyTextControlNetConditioningEmbedding` template
      
      * Refactor organization
      
      * style
      
      * style
      
      * Move custom blocks from `AuxiliaryLatentModule` to `AnyTextControlNetConditioningEmbedding`
      
      * Follow one-file policy
      
      * style
      
      * [Docs] Update README and pipeline_anytext.py to use AnyTextControlNetModel
      
      * [Docs] Update import statement for AnyTextControlNetModel in pipeline_anytext.py
      
      * [Fix] Update import path for ControlNetModel, ControlNetOutput in anytext_controlnet.py
      
      * Refactor AnyTextControlNet to use configurable conditioning embedding channels
      
      * Complete control net conditioning embedding in AnyTextControlNetModel
      
      * up
      
      * [FIX] Ensure embeddings use correct device in AnyTextControlNetModel
      
      * up
      
      * up
      
      * style
      
      * [UPDATE] Revise README and example code for AnyTextPipeline integration with DiffusionPipeline
      
      * [UPDATE] Update example code in anytext.py to use correct font file and improve clarity
      
      * down
      
      * [UPDATE] Refactor BasicTokenizer usage to a new Checker class for text processing
      
      * update pillow
      
      * [UPDATE] Remove commented-out code and unnecessary docstring in anytext.py and anytext_controlnet.py for improved clarity
      
      * [REMOVE] Delete frozen_clip_embedder_t3.py as it is in the anytext.py file
      
      * [UPDATE] Replace edict with dict for configuration in anytext.py and RecModel.py for consistency
      
      * 🆙
      
      
      
      * style
      
      * [UPDATE] Revise README.md for clarity, remove unused imports in anytext.py, and add author credits in anytext_controlnet.py
      
      * style
      
      * Update examples/research_projects/anytext/README.md
      Co-authored-by: default avatarAryan <contact.aryanvs@gmail.com>
      
      * Remove commented-out image preparation code in AnyTextPipeline
      
      * Remove unnecessary blank line in README.md
      b88fef47
  23. 07 Mar, 2025 1 commit
    • Kinam Kim's avatar
      Add STG to community pipelines (#10960) · b38450d5
      Kinam Kim authored
      
      
      * Support STG for video pipelines
      
      * Update README.md
      
      * Update README.md
      
      * Update README.md
      
      * Update README.md
      
      * Update README.md
      
      * Update README.md
      
      * Update pipeline_stg_cogvideox.py
      
      * Update pipeline_stg_hunyuan_video.py
      
      * Update pipeline_stg_ltx.py
      
      * Update pipeline_stg_ltx_image2video.py
      
      * Update pipeline_stg_mochi.py
      
      * Update pipeline_stg_hunyuan_video.py
      
      * Update pipeline_stg_ltx.py
      
      * Update pipeline_stg_ltx_image2video.py
      
      * Update pipeline_stg_mochi.py
      
      * update
      
      * remove rescaling
      
      * Apply style fixes
      
      ---------
      Co-authored-by: default avatargithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
      b38450d5
  24. 06 Mar, 2025 3 commits
  25. 05 Mar, 2025 1 commit
  26. 04 Mar, 2025 2 commits
  27. 24 Feb, 2025 1 commit