1. 30 Oct, 2023 3 commits
  2. 27 Oct, 2023 1 commit
  3. 26 Oct, 2023 1 commit
  4. 25 Oct, 2023 4 commits
  5. 24 Oct, 2023 2 commits
    • dg845's avatar
      Add Latent Consistency Models Pipeline (#5448) · 958e17da
      dg845 authored
      
      
      * initial commit for LatentConsistencyModelPipeline and LCMScheduler based on the community pipeline
      
      * Add callback and freeu support.
      
      * apply suggestions from review
      
      * Clean up LCMScheduler
      
      * Remove timeindex argument to LCMScheduler.step.
      
      * Add support for clipping or thresholding the predicted original sample.
      
      * Remove unused methods and arguments in LCMScheduler.
      
      * Improve comment about (lack of) negative prompt support.
      
      * Change input guidance_scale to match the StableDiffusionPipeline (Imagen) CFG formulation.
      
      * Move lcm_origin_steps from pipeline __call__ to LCMScheduler.__init__/config (as origin_steps).
      
      * Fix typo when clipping/thresholding in LCMScheduler.
      
      * Add some initial LCMScheduler tests.
      
      * add type annotations from review
      
      * Fix type annotation bug.
      
      * Override test_add_noise_device in LCMSchedulerTest since hardcoded timesteps doesn't work under default settings.
      
      * Add generator argument pipeline prepare_latents call.
      
      * Cast LCMScheduler.timesteps to long in set_timesteps.
      
      * Add onestep and multistep full loop scheduler tests.
      
      * Set default height/width to None and don't hardcode guidance scale embedding dim.
      
      * Add initial LatentConsistencyPipeline fast and slow tests.
      
      * Add initial documentation for LatentConsistencyModelPipeline and LCMScheduler.
      
      * Make remaining failing fast tests pass.
      
      * make style
      
      * Make original_inference_steps configurable from pipeline __call__ again.
      
      * make style
      
      * Remove guidance_rescale arg from pipeline __call__ since LCM currently doesn't support CFG.
      
      * Make LCMScheduler defaults match config of LCM_Dreamshaper_v7 checkpoint.
      
      * Fix LatentConsistencyPipeline slow tests and add dummy expected slices.
      
      * Add checks for original_steps in LCMScheduler.set_timesteps.
      
      * make fix-copies
      
      * Improve LatentConsistencyModelPipeline docs.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAryan V S <avs050602@gmail.com>
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAryan V S <avs050602@gmail.com>
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAryan V S <avs050602@gmail.com>
      
      * Update src/diffusers/schedulers/scheduling_lcm.py
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAryan V S <avs050602@gmail.com>
      
      * finish
      
      ---------
      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 avatarAryan V S <avs050602@gmail.com>
      958e17da
    • Sayak Paul's avatar
      [Core] Refactor activation and normalization layers (#5493) · 77241c48
      Sayak Paul authored
      
      
      * move out the activations.
      
      * move normalization layers.
      
      * add doc.
      
      * add doc.
      
      * fix: paths
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * style
      
      ---------
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      77241c48
  6. 23 Oct, 2023 3 commits
  7. 21 Oct, 2023 1 commit
  8. 20 Oct, 2023 1 commit
    • Vishnu V Jaddipal's avatar
      Added support to create asymmetrical U-Net structures (#5400) · 8dba1808
      Vishnu V Jaddipal authored
      
      
      * Added args, kwargs to ```U
      
      * Add UNetMidBlock2D as a supported mid block type
      
      * Fix extra init input for UNetMidBlock2D, change allowed types for Mid-block init
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_blocks.py
      
      * Update unet_2d_blocks.py
      
      * Update unet_2d_blocks.py
      
      * Update unet_2d_condition.py
      
      * Update unet_2d_blocks.py
      
      * Updated docstring, increased check strictness
      
      Updated the docstring for ```UNet2DConditionModel``` to include ```reverse_transformer_layers_per_block``` and updated checking for nested list type ```transformer_layers_per_block```
      
      * Add basic shape-check test for asymmetrical unets
      
      * Update src/diffusers/models/unet_2d_blocks.py
      
      Removed blank line
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update unet_2d_condition.py
      
      Remove blank space
      
      * Update unet_2d_condition.py
      
      Changed docstring for `mid_block_type`
      
      * Fixed docstring and wrong default value
      
      * Reformat with black
      
      * Reformat with necessary commands
      
      * Add UNetMidBlockFlat to versatile_diffusion/modeling_text_unet.py to ensure consistency
      
      * Removed args, kwargs, use on mid-block type
      
      * Make fix-copies
      
      * Update src/diffusers/models/unet_2d_condition.py
      
      Wrap into single line
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * make fix-copies
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      8dba1808
  9. 18 Oct, 2023 4 commits
  10. 17 Oct, 2023 1 commit
    • Sayak Paul's avatar
      [Core] Fix/pipeline without text encoders for SDXL (#5301) · 8b3d2aea
      Sayak Paul authored
      
      
      * fix: sdxl pipeline when unet is not available.
      
      * fix moe
      
      * account for text
      
      * ifx more
      
      * don't make unet optional.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * split conditionals.
      
      * add optional components to sdxl pipeline
      
      * propagate changes to the rest of the pipelines.
      
      * add: test
      
      * add to all
      
      * fix: rest of the pipelines.
      
      * use pipeline_class variable
      
      * separate pipeline mixin
      
      * use safe_serialization
      
      * fix: test
      
      * access actual output.
      
      * add: optional test to adapter and ip2p sdxl pipeline tests/
      
      * add optional test to controlnet sdxl.
      
      * fix tests
      
      * fix ip2p tests
      
      * fix more
      
      * fifx more.
      
      * use np output type.
      
      * fix for StableDiffusionXLMultiControlNetPipelineFastTests.
      
      * fix: SDXLOptionalComponentsTesterMixin
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * fix tests
      
      * Empty-Commit
      
      * revert previous
      
      * quality
      
      * fix: test
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      8b3d2aea
  11. 16 Oct, 2023 4 commits
  12. 13 Oct, 2023 2 commits
  13. 11 Oct, 2023 1 commit
  14. 09 Oct, 2023 5 commits
  15. 06 Oct, 2023 2 commits
    • vedant2003's avatar
      [Hacktoberfest]Fixing issues #5241 (#5255) · dd25ef56
      vedant2003 authored
      
      
      * Update pipeline_wuerstchen_prior.py
      
      * prior_num_inference_steps updated
      
      * height, width, num_inference_steps, and guidance_scale synced
      
      * parameters synced
      
      * latent_mean, latent_std, and resolution_multiple synced
      
      * prior_num_inference_steps changed
      
      * Formatted pipeline_wuerstchen_prior.py
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py
      
      ---------
      Co-authored-by: default avatarKashif Rasul <kashif.rasul@gmail.com>
      dd25ef56
    • Dhruv Nair's avatar
      Add from single file to StableDiffusionUpscalePipeline and... · 872ae1dd
      Dhruv Nair authored
      Add from single file to StableDiffusionUpscalePipeline and StableDiffusionLatentUpscalePipeline (#5194)
      
      * add from single file
      
      * clean up
      
      * make style
      
      * add single file loading for upscaling
      872ae1dd
  16. 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
  17. 04 Oct, 2023 1 commit
    • Dhruv Nair's avatar
      New Pipeline Slow Test runners (#5131) · dd5a3629
      Dhruv Nair authored
      
      
      * pipline fetcher
      
      * update script
      
      * clean up
      
      * clean up
      
      * clean up
      
      * new pipeline runner
      
      * rename tests to match modules
      
      * test actions in pr
      
      * change runner to gpu
      
      * clean up
      
      * clean up
      
      * clean up
      
      * fix report
      
      * fix reporting
      
      * clean up
      
      * show test stats in failure reports
      
      * give names to jobs
      
      * add lora tests
      
      * split torch cuda tests and add compile tests
      
      * clean up
      
      * fix tests
      
      * change push to run only on main
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      dd5a3629
  18. 02 Oct, 2023 3 commits
    • Patrick von Platen's avatar
      [Schedulers] Fix callback steps (#5261) · bdd16116
      Patrick von Platen authored
      * fix all
      
      * make fix copies
      
      * make fix copies
      bdd16116
    • dg845's avatar
      [WIP] Refactor UniDiffuser Pipeline and Tests (#4948) · cd1b8d7c
      dg845 authored
      
      
      * Add VAE slicing and tiling methods.
      
      * Switch to using VaeImageProcessing for preprocessing and postprocessing of images.
      
      * Rename the VaeImageProcessor to vae_image_processor to avoid a name clash with the CLIPImageProcessor (image_processor).
      
      * Remove the postprocess() function because we're using a VaeImageProcessor instead.
      
      * Remove UniDiffuserPipeline.decode_image_latents because we're using VaeImageProcessor instead.
      
      * Refactor generating text from text latents into a decode_text_latents method.
      
      * Add enable_full_determinism() to UniDiffuser tests.
      
      * make style
      
      * Add PipelineLatentTesterMixin to UniDiffuserPipelineFastTests.
      
      * Remove enable_model_cpu_offload since it is now part of DiffusionPipeline.
      
      * Rename the VaeImageProcessor instance to self.image_processor for consistency with other pipelines and rename the CLIPImageProcessor instance to clip_image_processor to avoid a name clash.
      
      * Update UniDiffuser conversion script.
      
      * Make safe_serialization configurable in UniDiffuser conversion script.
      
      * Rename image_processor to clip_image_processor in UniDiffuser tests.
      
      * Add PipelineKarrasSchedulerTesterMixin to UniDiffuserPipelineFastTests.
      
      * Add initial test for compiling the UniDiffuser model (not tested yet).
      
      * Update encode_prompt and _encode_prompt to match that of StableDiffusionPipeline.
      
      * Turn off standard classifier-free guidance for now.
      
      * make style
      
      * make fix-copies
      
      * apply suggestions from review
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      cd1b8d7c
    • Pedro Cuenca's avatar
      Flax: Ignore PyTorch, ONNX files when they coexist with Flax weights (#5237) · 0c7cb9a6
      Pedro Cuenca authored
      Ignore PyTorch, ONNX files when they coexist with Flax weights
      0c7cb9a6