1. 16 Nov, 2023 1 commit
  2. 09 Nov, 2023 1 commit
  3. 05 Nov, 2023 1 commit
    • YiYi Xu's avatar
      add callbacks to denoising step (#5427) · 2b23ec82
      YiYi Xu authored
      
      
      * draft1
      
      * update
      
      * style
      
      * move to the end of loop
      
      * update
      
      * update callbak_on_step_end_inputs
      
      * Revert "update"
      
      This reverts commit 5f9b153183d0cde3b850f14024d2e37ae8c19576.
      
      * Revert "update callbak_on_step_end_inputs"
      
      This reverts commit 44889f4dabad95b7ebb330faa5f1955b5d008c88.
      
      * update
      
      * update test required_optional_params
      
      * remove self.lora_scale
      
      * img2img
      
      * inpaint
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * fix
      
      * apply feedbacks on img2img + inpaint: keep only important pipeline attributes
      
      * depth
      
      * pix2pix
      
      * make _callback_tensor_inputs an class variable so that we can use it for testing
      
      * add a basic tst for callback
      
      * add a read-only tensor input timesteps + fix tests
      
      * add second test for callback cfg
      
      * sdxl
      
      * sdxl img2img
      
      * sdxl inpaint
      
      * kandinsky prior
      
      * kandinsky decoder
      
      * kandinsky img2img + combined
      
      * kandinsky inpaint
      
      * fix copies
      
      * fix
      
      * consistent default inputs
      
      * fix copies
      
      * wuerstchen_prior prior
      
      * test_wuerstchen_decoder + fix test for prior
      
      * wuerstchen_combined pipeline + skip tests
      
      * skip test for kandinsky combined
      
      * lcm
      
      * remove timesteps etc
      
      * add doc string
      
      * copies
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * make style and improve tests
      
      * up
      
      * up
      
      * fix more
      
      * fix cfg test
      
      * tests for callbacks
      
      * fix for real
      
      * update
      
      * lcm img2img
      
      * add doc
      
      * add doc page to index
      
      ---------
      Co-authored-by: default avataryiyixuxu <yixu310@gmail,com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      2b23ec82
  4. 03 Nov, 2023 1 commit
  5. 23 Oct, 2023 2 commits
    • Dhruv Nair's avatar
      Fix Slow Tests (#5469) · 33293ed5
      Dhruv Nair authored
      fix tests
      33293ed5
    • Ryan Dick's avatar
      Make T2I-Adapter downscale padding match the UNet (#5435) · 0eac9cd0
      Ryan Dick authored
      
      
      * Update get_dummy_inputs(...) in T2I-Adapter tests to take image height and width as params.
      
      * Update the T2I-Adapter unit tests to run with the standard number of UNet down blocks so that all T2I-Adapter down blocks get exercised.
      
      * Update the T2I-Adapter down blocks to better match the padding behavior of the UNet.
      
      * Revert "Update the T2I-Adapter unit tests to run with the standard number of UNet down blocks so that all T2I-Adapter down blocks get exercised."
      
      This reverts commit 6d4a060a34415ec973a252944216f4fb8b9926cd.
      
      * Create  utility functions for testing the T2I-Adapter downscaling bahevior.
      
      * (minor) Improve readability with an intermediate named variable.
      
      * Statically parameterize  T2I-Adapter test dimensions rather than generating them dynamically.
      
      * Fix static checks.
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      0eac9cd0
  6. 17 Oct, 2023 1 commit
  7. 09 Oct, 2023 1 commit
  8. 05 Oct, 2023 1 commit
    • Kadir Nar's avatar
      [Core] Add FreeU mechanism (#5164) · 84b82a6c
      Kadir Nar authored
      *  Added Fourier filter function to upsample blocks
      
      * 🔧 Update Fourier_filter for float16 support
      
      *  Added UNetFreeUConfig to UNet model for FreeU adaptation 🛠
      
      ️
      
      * move unet to its original form and add fourier_filter to torch_utils.
      
      * implement freeU enable mechanism
      
      * implement disable mechanism
      
      * resolution index.
      
      * correct resolution idx condition.
      
      * fix copies.
      
      * no need to use resolution_idx in vae.
      
      * spell out the kwargs
      
      * proper config property
      
      * fix attribution setting
      
      * place unet hasattr properly.
      
      * fix: attribute access.
      
      * proper disable
      
      * remove validation method.
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * potential fix.
      
      * add: doc.
      
      * fix copies
      
      * add: tests.
      
      * add: support freeU in SDXL.
      
      * set default value of resolution idx.
      
      * set default values for resolution_idx.
      
      * fix copies
      
      * fix rest.
      
      * fix copies
      
      * address PR comments.
      
      * run fix-copies
      
      * move apply_free_u to utils and other minors.
      
      * introduce support for video (unet3D)
      
      * minor ups
      
      * consistent fix-copies.
      
      * consistent stuff
      
      * fix-copies
      
      * add: rest
      
      * add: docs.
      
      * fix: tests
      
      * fix: doc path
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * style up
      
      * move to techniques.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for video with freeu
      
      * add: slow test for video with freeu
      
      * add: slow test for video with freeu
      
      * style
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      84b82a6c
  9. 29 Sep, 2023 1 commit
  10. 28 Sep, 2023 1 commit
  11. 26 Sep, 2023 2 commits
  12. 19 Sep, 2023 3 commits
  13. 18 Sep, 2023 3 commits
  14. 12 Sep, 2023 1 commit
  15. 11 Sep, 2023 2 commits
    • Dhruv Nair's avatar
      Lazy Import for Diffusers (#4829) · b6e0b016
      Dhruv Nair authored
      
      
      * initial commit
      
      * move modules to import struct
      
      * add dummy objects and _LazyModule
      
      * add lazy import to schedulers
      
      * clean up unused imports
      
      * lazy import on models module
      
      * lazy import for schedulers module
      
      * add lazy import to pipelines module
      
      * lazy import altdiffusion
      
      * lazy import audio diffusion
      
      * lazy import audioldm
      
      * lazy import consistency model
      
      * lazy import controlnet
      
      * lazy import dance diffusion ddim ddpm
      
      * lazy import deepfloyd
      
      * lazy import kandinksy
      
      * lazy imports
      
      * lazy import semantic diffusion
      
      * lazy imports
      
      * lazy import stable diffusion
      
      * move sd output to its own module
      
      * clean up
      
      * lazy import t2iadapter
      
      * lazy import unclip
      
      * lazy import versatile and vq diffsuion
      
      * lazy import vq diffusion
      
      * helper to fetch objects from modules
      
      * lazy import sdxl
      
      * lazy import txt2vid
      
      * lazy import stochastic karras
      
      * fix model imports
      
      * fix bug
      
      * lazy import
      
      * clean up
      
      * clean up
      
      * fixes for tests
      
      * fixes for tests
      
      * clean up
      
      * remove import of torch_utils from utils module
      
      * clean up
      
      * clean up
      
      * fix mistake import statement
      
      * dedicated modules for exporting and loading
      
      * remove testing utils from utils module
      
      * fixes from  merge conflicts
      
      * Update src/diffusers/pipelines/kandinsky2_2/__init__.py
      
      * fix docs
      
      * fix alt diffusion copied from
      
      * fix check dummies
      
      * fix more docs
      
      * remove accelerate import from utils module
      
      * add type checking
      
      * make style
      
      * fix check dummies
      
      * remove torch import from xformers check
      
      * clean up error message
      
      * fixes after upstream merges
      
      * dummy objects fix
      
      * fix tests
      
      * remove unused module import
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      b6e0b016
    • Will Berman's avatar
      Revert revert and install accelerate main (#4963) · 4191ddee
      Will Berman authored
      * Revert "Temp Revert "[Core] better support offloading when side loading is enabled… (#4927)"
      
      This reverts commit 2ab17049.
      
      * tests: install accelerate from main
      4191ddee
  16. 09 Sep, 2023 1 commit
  17. 05 Sep, 2023 1 commit
    • Sayak Paul's avatar
      [Core] better support offloading when side loading is enabled. (#4855) · e4b8e792
      Sayak Paul authored
      * better support offloading when side loading is enabled.
      
      * load_textual_inversion
      
      * better messaging for textual inversion.
      
      * fixes
      
      * address PR feedback.
      
      * sdxl support.
      
      * improve messaging
      
      * recursive removal when cpu sequential offloading is enabled.
      
      * add: lora tests
      
      * recruse.
      
      * add: offload tests for textual inversion.
      e4b8e792
  18. 04 Sep, 2023 1 commit
  19. 01 Sep, 2023 3 commits
    • YiYi Xu's avatar
      [WIP] masked_latent_inputs for inpainting pipeline (#4819) · 5c404f20
      YiYi Xu authored
      
      
      * add
      
      ---------
      Co-authored-by: default avataryiyixuxu <yixu310@gmail,com>
      5c404f20
    • Dhruv Nair's avatar
      Test Cleanup Precision issues (#4812) · 189e9f01
      Dhruv Nair authored
      
      
      * proposal for flaky tests
      
      * more precision fixes
      
      * move more tests to use cosine distance
      
      * more test fixes
      
      * clean up
      
      * use default attn
      
      * clean up
      
      * update expected value
      
      * make style
      
      * make style
      
      * Apply suggestions from code review
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py
      
      * make style
      
      * fix failing tests
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      189e9f01
    • Nguyễn Công Tú Anh's avatar
      Add GLIGEN Text Image implementation (#4777) · 38466c36
      Nguyễn Công Tú Anh authored
      * Add GLIGEN Text Image implementation
      
      * add style transfer from image
      
      * fix check_repository_consistency
      
      * add convert script GLIGEN model to Diffusers
      
      * rename attention type
      
      * fix style code
      
      * remove PositionNetTextImage
      
      * Revert "fix check_repository_consistency"
      
      This reverts commit 15f098c96e00bb9e67b831161615b30a2d28d815.
      
      * change attention type name
      
      * update docs for GLIGEN
      
      * change examples with hf-document-image
      
      * fix style
      
      * add CLIPImageProjection for GLIGEN
      
      * Add new encode_prompt, load project matrix in pipe init
      
      * move CLIPImageProjection to stable_diffusion
      
      * add comment
      38466c36
  20. 30 Aug, 2023 1 commit
    • Sayak Paul's avatar
      [Core] refactor encode_prompt (#4617) · 3768d4d7
      Sayak Paul authored
      
      
      * refactoring of encode_prompt()
      
      * better handling of device.
      
      * fix: device determination
      
      * fix: device determination 2
      
      * handle num_images_per_prompt
      
      * revert changes in loaders.py and give birth to encode_prompt().
      
      * minor refactoring for encode_prompt()/
      
      * make backward compatible.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * fix: concatenation of the neg and pos embeddings.
      
      * incorporate encode_prompt() in test_stable_diffusion.py
      
      * turn it into big PR.
      
      * make it bigger
      
      * gligen fixes.
      
      * more fixes to fligen
      
      * _encode_prompt -> encode_prompt in tests
      
      * first batch
      
      * second batch
      
      * fix blasphemous mistake
      
      * fix
      
      * fix: hopefully for the final time.
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      3768d4d7
  21. 29 Aug, 2023 1 commit
  22. 28 Aug, 2023 1 commit
  23. 24 Aug, 2023 1 commit
  24. 16 Aug, 2023 1 commit
    • nikhil-masterful's avatar
      Add GLIGEN implementation (#4441) · da5ab51d
      nikhil-masterful authored
      * Add GLIGEN implementation
      
      * GLIGEN: Fix code quality check failures
      
      * GLIGEN: Fix Import block un-sorted or un-formatted failures
      
      * GLIGEN: Fix check_repository_consistency failures
      
      * GLIGEN: Add 'PositionNet' to versatile_diffusion/modeling_text_unet.py
      
      * GLIGEN: check_repository_consistency: fix 'copy does not match' error
      
      * GLIGEN: Fix review comments (1)
      
      * GLIGEN: Fix E721 Do not compare types, use `isinstance()` failures
      
      * GLIGEN : Ensure _encode_prompt() copy matches to StableDiffusionPipeline
      
      * GLIGEN: Fix ruff E721 failure in unidiffuser/test_unidiffuser.py
      
      * GLIGEN: doc_builder: restyle pipeline_stable_diffusion_gligen.py
      
      * GIGLEN: reset files unrelated to gligen
      
      * GLIGEN: Fix documentation comments (1)
      
      * GLIGEN: Fix review comments (2)
      
      * GLIGEN: Added FastTest
      
      * GLIGEN: Fix review comments (3)
      da5ab51d
  25. 09 Aug, 2023 1 commit
    • Dhruv Nair's avatar
      Move slow tests to nightly (#4526) · a67ff323
      Dhruv Nair authored
      * move slow pix2pixzero tests to nightly
      
      * move slow panorama tests to nightly
      
      * move txt2video full test to nightly
      
      * clean up
      
      * remove nightly test from text to video pipeline
      a67ff323
  26. 04 Aug, 2023 1 commit
  27. 01 Aug, 2023 1 commit
    • Dhruv Nair's avatar
      Cleanup pass for flaky Slow Tests for Stable diffusion (#4415) · 6f4355f8
      Dhruv Nair authored
      * update expected slice so img2img compile tests pass
      
      * use default attn processor
      
      * use default attn processor and update expected slice value to pass test
      
      * use default attn processor
      
      * set default attn processor and update expected slice
      
      * set default attn processor and change precision for check
      
      * set unet to use default attn processor
      6f4355f8
  28. 20 Jul, 2023 1 commit
  29. 18 Jul, 2023 2 commits
    • clarencechen's avatar
      Add Recent Timestep Scheduling Improvements to DDIM Inverse Scheduler (#3865) · c6e56e92
      clarencechen authored
      * Add Recent Timestep Scheduling Improvements to DDIM Inverse Scheduler
      
      Roll timesteps by one to reflect origin-destination semantic discrepancy
      
      Restore `set_alpha_to_one` option to handle negative initial timesteps
      
      Remove `set_alpha_to_zero` option not used due to previous truncation
      
      * Bugfix
      
      * Remove unnecessary calls to `detach()`
      
      Use `self.image_processor.preprocess` in DiffEdit pipeline functions
      
      * Preprocess list input for inverted image latents in diffedit pipeline
      
      * Add `timestep_spacing` and `steps_offset` to `DPMSolverMultistepInverseScheduler`
      
      * Update expected test results to account for inverting last forward diffusion step
      
      * Fix inversion progress bar bug
      
      * Add first draft for proper fast tests for DDIMInverseScheduler
      
      * Add deprecated DDIMInverseScheduler kwarg to ConfigMixer registry
      
      * Fix test failure in DPMMultistepInverseScheduler
      
      Invert step specification leads to negative noise variance in SDE-based algs
      
      Add first draft for proper fast tests for DPMMultistepInverseScheduler
      
      * Update expected test results to account for inverting last forward diffusion step
      
      Clean up diffedit fast test
      c6e56e92
    • Patrick von Platen's avatar
      Refactor execution device & cpu offload (#4114) · 27062c36
      Patrick von Platen authored
      * create general cpu offload & execution device
      
      * Remove boiler plate
      
      * finish
      
      * kp
      
      * Correct offload more pipelines
      
      * up
      
      * Update src/diffusers/pipelines/pipeline_utils.py
      
      * make style
      
      * up
      27062c36
  30. 17 Jul, 2023 1 commit
    • Will Berman's avatar
      t2i pipeline (#3932) · a0597f33
      Will Berman authored
      
      
      * Quick implementation of t2i-adapter
      
      Load adapter module with from_pretrained
      
      Prototyping generalized adapter framework
      
      Writeup doc string for sideload framework(WIP) + some minor update on implementation
      
      Update adapter models
      
      Remove old adapter optional args in UNet
      
      Add StableDiffusionAdapterPipeline unit test
      
      Handle cpu offload in StableDiffusionAdapterPipeline
      
      Auto correct coding style
      
      Update model repo name to "RzZ/sd-v1-4-adapter-pipeline"
      
      Refactor MultiAdapter to better compatible with config system
      
      Export MultiAdapter
      
      Create pipeline document template from controlnet
      
      Create dummy objects
      
      Supproting new AdapterLight model
      
      Fix StableDiffusionAdapterPipeline common pipeline test
      
      [WIP] Update adapter pipeline document
      
      Handle num_inference_steps in StableDiffusionAdapterPipeline
      
      Update definition of Adapter "channels_in"
      
      Update documents
      
      Apply code style
      
      Fix doc typo and merge error
      
      Update doc string and example
      
      Quality of life improvement
      
      Remove redundant code and file from prototyping
      
      Remove unused pageage
      
      Remove comments
      
      Fix title
      
      Fix typo
      
      Add conditioning scale arg
      
      Bring back old implmentation
      
      Offload sideload
      
      Add supply info on document
      
      Update src/diffusers/models/adapter.py
      Co-authored-by: default avatarWill Berman <wlbberman@gmail.com>
      
      Update MultiAdapter constructor
      
      Swap out custom checkpoint and update pipeline constructor
      
      Update docment
      
      Apply suggestions from code review
      Co-authored-by: default avatarWill Berman <wlbberman@gmail.com>
      
      Correcting style
      
      Following single-file policy
      
      Update auto size in image preprocess func
      
      Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_adapter.py
      Co-authored-by: default avatarWill Berman <wlbberman@gmail.com>
      
      fix copies
      
      Update adapter pipeline behavior
      
      Add adapter_conditioning_scale doc string
      
      Add the missing doc string
      
      Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      Fix few bugs from suggestion
      
      Handle L-mode PIL image as control image
      
      Rename to differentiate adapter resblock
      
      Update src/diffusers/models/adapter.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      Fix typo
      
      Update adapter parameter name
      
      Update test case and code style
      
      Fix copies
      
      Fix typo
      
      Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_adapter.py
      Co-authored-by: default avatarWill Berman <wlbberman@gmail.com>
      
      Update Adapter class name
      
      Add checkpoint converting script
      
      Fix style
      
      Fix-copies
      
      Remove dev script
      
      Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      Updates for parameter rename
      
      Fix convert_adapter
      
      remove main
      
      fix diff
      
      more
      
      refactoring
      
      more
      
      more
      
      small fixes
      
      refactor
      
      tests
      
      more slow tests
      
      more tests
      
      Update docs/source/en/api/pipelines/overview.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      add community contributor to docs
      
      Update docs/source/en/api/pipelines/stable_diffusion/adapter.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      Update docs/source/en/api/pipelines/stable_diffusion/adapter.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      Update docs/source/en/api/pipelines/stable_diffusion/adapter.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      Update docs/source/en/api/pipelines/stable_diffusion/adapter.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      Update docs/source/en/api/pipelines/stable_diffusion/adapter.mdx
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      fix
      
      remove from_adapters
      
      license
      
      paper link
      
      docs
      
      more url fixes
      
      more docs
      
      fix
      
      fixes
      
      fix
      
      fix
      
      * fix sample inplace add
      
      * additional_kwargs -> additional_residuals
      
      * move t2i adapter pipeline to own module
      
      * preprocess -> _preprocess_adapter_image
      
      * add TencentArc to license
      
      * fix example code links
      
      * add image converter and fix example doc string
      
      * fix links
      
      * clearer additional residual application
      
      ---------
      Co-authored-by: default avatarHimariO <dsfhe49854@gmail.com>
      a0597f33