1. 06 Nov, 2023 1 commit
    • Sayak Paul's avatar
      [Feat] PixArt-Alpha (#5642) · d61889fc
      Sayak Paul authored
      
      
      * init pixart alpha pipeline
      
      * fix: import
      
      * script
      
      * script
      
      * script
      
      * add: vae to the pipeline
      
      * add: vae_scale_factor
      
      * add: checkpoint_path
      
      * clean conversion script a bit.
      
      * size embeddings.
      
      * fix: size embedding
      
      * update scrip
      
      * support for interpolation of position embedding.
      
      * support for conditioning.
      
      * ..
      
      * ..
      
      * ..
      
      * final layer
      
      * final layer
      
      * align if encode_prompt
      
      * support for caption embedding
      
      * refactor
      
      * refactor
      
      * refactor
      
      * start cross attention
      
      * start cross attention
      
      * cross_attention_dim
      
      * cross
      
      * cross
      
      * support for resolution and aspect_ratio
      
      * support for caption projection
      
      * refactor patch embeddings
      
      * batch_size
      
      * up
      
      * commit
      
      * commit
      
      * commit.
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze
      
      * squeeze.
      
      * squeeze.
      
      * fix final block./
      
      * fix final block./
      
      * fix final block./
      
      * clean
      
      * fix: interpolation scale.
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging'
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * make --checkpoint_path non-required.
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * debugging
      
      * remove num_tokens
      
      * timesteps -> timestep
      
      * timesteps -> timestep
      
      * timesteps -> timestep
      
      * timesteps -> timestep
      
      * timesteps -> timestep
      
      * timesteps -> timestep
      
      * debug
      
      * debug
      
      * update conversion script.
      
      * update conversion script.
      
      * update conversion script.
      
      * debug
      
      * debug
      
      * debug
      
      * clean
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * deug
      
      * debug
      
      * debug
      
      * debug
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * clean
      
      * fix
      
      * fix
      
      * boom
      
      * boom
      
      * some changes
      
      * boom
      
      * save
      
      * up
      
      * remove i
      
      * fix more tests
      
      * DPMSolverMultistepScheduler
      
      * fix
      
      * offloading
      
      * fix conversion script
      
      * fix conversion script
      
      * remove print
      
      * remove support for negative prompt embeds.
      
      * typo.
      
      * remove extra kwargs
      
      * bring conversion script to where it was
      
      * fix
      
      * trying mu luck
      
      * trying my luck again
      
      * again
      
      * again
      
      * again
      
      * clean up
      
      * up
      
      * up
      
      * update example
      
      * support for 512
      
      * remove spacing
      
      * finalize docs.
      
      * test debug
      
      * fix: assertion values.
      
      * debug
      
      * debug
      
      * debug
      
      * fix: repeat
      
      * remove prints.
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * Correct more
      
      * Apply suggestions from code review
      
      * Change all
      
      * Clean more
      
      * fix more
      
      * Fix more
      
      * Fix more
      
      * Correct more
      
      * address patrick's comments.
      
      * remove unneeded args
      
      * clean up pipeline.
      
      * sty;e
      
      * make the use of additional conditions better conditioned.
      
      * None better
      
      * dtype
      
      * height and width validation
      
      * add a note about size brackets.
      
      * fix
      
      * spit out slow test outputs.
      
      * fix?
      
      * fix optional test
      
      * fix more
      
      * remove unneeded comment
      
      * debug
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      d61889fc
  2. 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
  3. 03 Nov, 2023 4 commits
  4. 02 Nov, 2023 2 commits
    • Patrick von Platen's avatar
      [LCM] Make sure img2img works (#5632) · 072e0089
      Patrick von Platen authored
      * [LCM] Clean up implementations
      
      * Add all
      
      * correct more
      
      * correct more
      
      * finish
      
      * up
      072e0089
    • Dhruv Nair's avatar
      Animatediff Proposal (#5413) · 2a8cf8e3
      Dhruv Nair authored
      * draft design
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * clean  up
      
      * clean up
      
      * clean up
      
      * clean up
      
      * update pipeline
      
      * clean up
      
      * clean up
      
      * clean up
      
      * add tests
      
      * change motion block
      
      * clean up
      
      * clean up
      
      * clean up
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * clean up
      
      * update
      
      * update
      
      * update model test
      
      * update
      
      * update
      
      * update
      
      * update
      
      * make style
      
      * update
      
      * fix embeddings
      
      * update
      
      * merge upstream
      
      * max fix copies
      
      * fix bug
      
      * fix mistake
      
      * add docs
      
      * update
      
      * clean up
      
      * update
      
      * clean up
      
      * clean up
      
      * fix docstrings
      
      * fix docstrings
      
      * update
      
      * update
      
      * clean  up
      
      * update
      2a8cf8e3
  5. 01 Nov, 2023 4 commits
  6. 30 Oct, 2023 3 commits
  7. 27 Oct, 2023 1 commit
  8. 26 Oct, 2023 1 commit
  9. 25 Oct, 2023 4 commits
  10. 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
  11. 23 Oct, 2023 3 commits
  12. 21 Oct, 2023 1 commit
  13. 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
  14. 18 Oct, 2023 4 commits
  15. 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
  16. 16 Oct, 2023 4 commits
  17. 13 Oct, 2023 2 commits
  18. 11 Oct, 2023 1 commit