1. 30 Sep, 2025 1 commit
  2. 02 Aug, 2025 1 commit
  3. 19 Jun, 2025 1 commit
  4. 30 May, 2025 1 commit
  5. 19 May, 2025 1 commit
  6. 28 Jan, 2025 1 commit
    • Aryan's avatar
      Refactor gradient checkpointing (#10611) · c4d4ac21
      Aryan authored
      * update
      
      * remove unused fn
      
      * apply suggestions based on review
      
      * update + cleanup 🧹
      
      * more cleanup 🧹
      
      * make fix-copies
      
      * update test
      c4d4ac21
  7. 03 Dec, 2024 1 commit
  8. 26 Sep, 2024 1 commit
  9. 24 Jul, 2024 1 commit
    • Sayak Paul's avatar
      [Core] fix QKV fusion for attention (#8829) · 50d21f7c
      Sayak Paul authored
      * start debugging the problem,
      
      * start
      
      * fix
      
      * fix
      
      * fix imports.
      
      * handle hunyuan
      
      * remove residuals.
      
      * add a check for making sure there's appropriate procs.
      
      * add more rigor to the tests.
      
      * fix test
      
      * remove redundant check
      
      * fix-copies
      
      * move check_qkv_fusion_matches_attn_procs_length and check_qkv_fusion_processors_exist.
      50d21f7c
  10. 23 Jul, 2024 1 commit
  11. 11 Jul, 2024 1 commit
  12. 21 Jun, 2024 1 commit
  13. 12 Jun, 2024 1 commit
  14. 29 May, 2024 1 commit
  15. 20 May, 2024 1 commit
  16. 10 May, 2024 1 commit
    • Mark Van Aken's avatar
      #7535 Update FloatTensor type hints to Tensor (#7883) · be4afa0b
      Mark Van Aken authored
      * find & replace all FloatTensors to Tensor
      
      * apply formatting
      
      * Update torch.FloatTensor to torch.Tensor in the remaining files
      
      * formatting
      
      * Fix the rest of the places where FloatTensor is used as well as in documentation
      
      * formatting
      
      * Update new file from FloatTensor to Tensor
      be4afa0b
  17. 09 May, 2024 1 commit
    • Dhruv Nair's avatar
      [Refactor] Better align `from_single_file` logic with `from_pretrained` (#7496) · cb0f3b49
      Dhruv Nair authored
      
      
      * refactor unet single file loading a bit.
      
      * retrieve the unet from create_diffusers_unet_model_from_ldm
      
      * update
      
      * update
      
      * updae
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * tests
      
      * update
      
      * update
      
      * update
      
      * Update docs/source/en/api/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update docs/source/en/api/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * Update docs/source/en/api/loaders/single_file.md
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * Update src/diffusers/loaders/single_file.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * Update docs/source/en/api/loaders/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update docs/source/en/api/loaders/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update docs/source/en/api/loaders/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update docs/source/en/api/loaders/single_file.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      * update
      
      ---------
      Co-authored-by: default avatarsayakpaul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      cb0f3b49
  18. 30 Apr, 2024 1 commit
    • Sayak Paul's avatar
      [Core] introduce _no_split_modules to `ModelMixin` (#6396) · 3fd31eef
      Sayak Paul authored
      * introduce _no_split_modules.
      
      * unnecessary spaces.
      
      * remove unnecessary kwargs and style
      
      * fix: accelerate imports.
      
      * change to _determine_device_map
      
      * add the blocks that have residual connections.
      
      * add: CrossAttnUpBlock2D
      
      * add: testin
      
      * style
      
      * line-spaces
      
      * quality
      
      * add disk offload test without safetensors.
      
      * checking disk offloading percentages.
      
      * change model split
      
      * add: utility for checking multi-gpu requirement.
      
      * model parallelism test
      
      * splits.
      
      * splits.
      
      * splits
      
      * splits.
      
      * splits.
      
      * splits.
      
      * offload folder to test_disk_offload_with_safetensors
      
      * add _no_split_modules
      
      * fix-copies
      3fd31eef
  19. 02 Apr, 2024 1 commit
    • Sayak Paul's avatar
      add: utility to format our docs too 📜 (#7314) · 4a343077
      Sayak Paul authored
      * add: utility to format our docs too 📜
      
      * debugging saga
      
      * fix: message
      
      * checking
      
      * should be fixed.
      
      * revert pipeline_fixture
      
      * remove empty line
      
      * make style
      
      * fix: setup.py
      
      * style.
      4a343077
  20. 27 Feb, 2024 1 commit
  21. 08 Feb, 2024 1 commit
  22. 23 Jan, 2024 1 commit
    • Sayak Paul's avatar
      [Big refactor] move unets to `unets` module 🦋 (#6630) · 1f0705ad
      Sayak Paul authored
      * move unets to  module 🦋
      
      * parameterize unet-level import.
      
      * fix flax unet2dcondition model import
      
      * models __init__
      
      * mildly depcrecating models.unet_2d_blocks in favor of models.unets.unet_2d_blocks.
      
      * noqa
      
      * correct depcrecation behaviour
      
      * inherit from the actual classes.
      
      * Empty-Commit
      
      * backwards compatibility for unet_2d.py
      
      * backward compatibility for unet_2d_condition
      
      * bc for unet_1d
      
      * bc for unet_1d_blocks
      1f0705ad
  23. 03 Jan, 2024 1 commit
  24. 18 Dec, 2023 1 commit
  25. 06 Dec, 2023 1 commit
    • Sayak Paul's avatar
      [feat] allow SDXL pipeline to run with fused QKV projections (#6030) · a2bc2e14
      Sayak Paul authored
      
      
      * debug
      
      * from step
      
      * print
      
      * turn sigma a list
      
      * make str
      
      * init_noise_sigma
      
      * comment
      
      * remove prints
      
      * feat: introduce fused projections
      
      * change to a better name
      
      * no grad
      
      * device.
      
      * device
      
      * dtype
      
      * okay
      
      * print
      
      * more print
      
      * fix: unbind -> split
      
      * fix: qkv >-> k
      
      * enable disable
      
      * apply attention processor within the method
      
      * attn processors
      
      * _enable_fused_qkv_projections
      
      * remove print
      
      * add fused projection to vae
      
      * add todos.
      
      * add: documentation and cleanups.
      
      * add: test for qkv projection fusion.
      
      * relax assertions.
      
      * relax further
      
      * fix: docs
      
      * fix-copies
      
      * correct error message.
      
      * Empty-Commit
      
      * better conditioning on disable_fused_qkv_projections
      
      * check
      
      * check processor
      
      * bfloat16 computation.
      
      * check latent dtype
      
      * style
      
      * remove copy temporarily
      
      * cast latent to bfloat16
      
      * fix: vae -> self.vae
      
      * remove print.
      
      * add _change_to_group_norm_32
      
      * comment out stuff that didn't work
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * reflect patrick's suggestions.
      
      * fix imports
      
      * fix: disable call.
      
      * fix more
      
      * fix device and dtype
      
      * fix conditions.
      
      * fix more
      
      * 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>
      a2bc2e14
  26. 29 Nov, 2023 1 commit
    • Suraj Patil's avatar
      Add SVD (#5895) · 63f767ef
      Suraj Patil authored
      
      
      * begin model
      
      * finish blocks
      
      * add_embedding
      
      * addition_time_embed_dim
      
      * use TimestepEmbedding
      
      * fix temporal res block
      
      * fix time_pos_embed
      
      * fix add_embedding
      
      * add conversion script
      
      * fix model
      
      * up
      
      * add new resnet blocks
      
      * make forward work
      
      * return sample in original shape
      
      * fix temb shape in TemporalResnetBlock
      
      * add spatio temporal transformers
      
      * add vae blocks
      
      * fix blocks
      
      * update
      
      * update
      
      * fix shapes in Alphablender and add time activation in res blcok
      
      * use new blocks
      
      * style
      
      * fix temb shape
      
      * fix SpatioTemporalResBlock
      
      * reuse TemporalBasicTransformerBlock
      
      * fix TemporalBasicTransformerBlock
      
      * use TransformerSpatioTemporalModel
      
      * fix TransformerSpatioTemporalModel
      
      * fix time_context dim
      
      * clean up
      
      * make temb optional
      
      * add blocks
      
      * rename model
      
      * update conversion script
      
      * remove UNetMidBlockSpatioTemporal
      
      * add in init
      
      * remove unused arg
      
      * remove unused arg
      
      * remove more unsed args
      
      * up
      
      * up
      
      * check for None
      
      * update vae
      
      * update up/mid blocks for decoder
      
      * begin pipeline
      
      * adapt scheduler
      
      * add guidance scalings
      
      * fix norm eps in temporal transformers
      
      * add temporal autoencoder
      
      * make pipeline run
      
      * fix frame decodig
      
      * decode in float32
      
      * decode n frames at a time
      
      * pass decoding_t to decode_latents
      
      * fix decode_latents
      
      * vae encode/decode in fp32
      
      * fix dtype in TransformerSpatioTemporalModel
      
      * type image_latents same as image_embeddings
      
      * allow using differnt eps in temporal block for video decoder
      
      * fix default values in vae
      
      * pass num frames in decode
      
      * switch spatial to temporal for mixing in VAE
      
      * fix num frames during split decoding
      
      * cast alpha to sample dtype
      
      * fix attention in MidBlockTemporalDecoder
      
      * fix typo
      
      * fix guidance_scales dtype
      
      * fix missing activation in TemporalDecoder
      
      * skip_post_quant_conv
      
      * add vae conversion
      
      * style
      
      * take guidance scale as input
      
      * up
      
      * allow passing PIL to export_video
      
      * accept fps as arg
      
      * add pipeline and vae in init
      
      * remove hack
      
      * use AutoencoderKLTemporalDecoder
      
      * don't scale image latents
      
      * add unet tests
      
      * clean up unet
      
      * clean TransformerSpatioTemporalModel
      
      * add slow svd test
      
      * clean up
      
      * make temb optional in Decoder mid block
      
      * fix norm eps in TransformerSpatioTemporalModel
      
      * clean up temp decoder
      
      * clean up
      
      * clean up
      
      * use c_noise values for timesteps
      
      * use math for log
      
      * update
      
      * fix copies
      
      * doc
      
      * upcast vae
      
      * update forward pass for gradient checkpointing
      
      * make added_time_ids is tensor
      
      * up
      
      * fix upcasting
      
      * remove post quant conv
      
      * add _resize_with_antialiasing
      
      * fix _compute_padding
      
      * cleanup model
      
      * more cleanup
      
      * more cleanup
      
      * more cleanup
      
      * remove freeu
      
      * remove attn slice
      
      * small clean
      
      * up
      
      * up
      
      * remove extra step kwargs
      
      * remove eta
      
      * remove dropout
      
      * remove callback
      
      * remove merge factor args
      
      * clean
      
      * clean up
      
      * move to dedicated folder
      
      * remove attention_head_dim
      
      * docstr and small fix
      
      * update unet doc strings
      
      * rename decoding_t
      
      * correct linting
      
      * store c_skip and c_out
      
      * cleanup
      
      * clean TemporalResnetBlock
      
      * more cleanup
      
      * clean up vae
      
      * clean up
      
      * begin doc
      
      * more cleanup
      
      * up
      
      * up
      
      * doc
      
      * Improve
      
      * better naming
      
      * better naming
      
      * better naming
      
      * better naming
      
      * better naming
      
      * better naming
      
      * better naming
      
      * better naming
      
      * Apply suggestions from code review
      
      * Default chunk size to None
      
      * add example
      
      * Better
      
      * Apply suggestions from code review
      
      * update doc
      
      * Update src/diffusers/pipelines/stable_diffusion_video/pipeline_stable_diffusion_video.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * style
      
      * Get torch compile working
      
      * up
      
      * rename
      
      * fix doc
      
      * add chunking
      
      * torch compile
      
      * torch compile
      
      * add modelling outputs
      
      * torch compile
      
      * Improve chunking
      
      * Apply suggestions from code review
      
      * Update docs/source/en/using-diffusers/svd.md
      
      * Close diff tag
      
      * remove slicing
      
      * resnet docstr
      
      * add docstr in resnet
      
      * rename
      
      * Apply suggestions from code review
      
      * update tests
      
      * Fix output type latents
      
      * fix more
      
      * fix more
      
      * Update docs/source/en/using-diffusers/svd.md
      
      * fix more
      
      * add pipeline tests
      
      * remove unused arg
      
      * clean  up
      
      * make sure get_scaling receives tensors
      
      * fix euler scheduler
      
      * fix get_scalings
      
      * simply euler for now
      
      * remove old test file
      
      * use randn_tensor to create noise
      
      * fix device for rand tensor
      
      * increase expected_max_difference
      
      * fix test_inference_batch_single_identical
      
      * actually fix test_inference_batch_single_identical
      
      * disable test_save_load_float16
      
      * skip test_float16_inference
      
      * skip test_inference_batch_single_identical
      
      * fix test_xformers_attention_forwardGenerator_pass
      
      * Apply suggestions from code review
      
      * update StableVideoDiffusionPipelineSlowTests
      
      * update image
      
      * add diffusers example
      
      * fix more
      
      ---------
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarapolinário <joaopaulo.passos@gmail.com>
      63f767ef
  27. 16 Nov, 2023 1 commit
  28. 09 Nov, 2023 1 commit
  29. 02 Oct, 2023 2 commits
  30. 27 Sep, 2023 1 commit
  31. 11 Sep, 2023 1 commit
    • 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
  32. 01 Sep, 2023 1 commit
    • 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
  33. 28 Aug, 2023 1 commit
    • Patrick von Platen's avatar
      [LoRA Attn Processors] Refactor LoRA Attn Processors (#4765) · 766aa50f
      Patrick von Platen authored
      * [LoRA Attn] Refactor LoRA attn
      
      * correct for network alphas
      
      * fix more
      
      * fix more tests
      
      * fix more tests
      
      * Move below
      
      * Finish
      
      * better version
      
      * correct serialization format
      
      * fix
      
      * fix more
      
      * fix more
      
      * fix more
      
      * Apply suggestions from code review
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py
      
      * deprecation
      
      * relax atol for slow test slighly
      
      * Finish tests
      
      * make style
      
      * make style
      766aa50f
  34. 19 Jul, 2023 1 commit
  35. 14 Jul, 2023 1 commit
  36. 02 Jul, 2023 1 commit
    • Patrick von Platen's avatar
      Add video img2img (#3900) · 62825064
      Patrick von Platen authored
      * Add image to image video
      
      * Improve
      
      * better naming
      
      * make fix copies
      
      * add docs
      
      * finish tests
      
      * trigger tests
      
      * make style
      
      * correct
      
      * finish
      
      * Fix more
      
      * make style
      
      * finish
      62825064
  37. 30 Jun, 2023 1 commit
    • Steven Liu's avatar
      [docs] Model API (#3562) · 174dcd69
      Steven Liu authored
      * add modelmixin and unets
      
      * remove old model page
      
      * minor fixes
      
      * fix unet2dcondition
      
      * add vqmodel and autoencoderkl
      
      * add rest of models
      
      * fix autoencoderkl path
      
      * fix toctree
      
      * fix toctree again
      
      * apply feedback
      
      * apply feedback
      
      * fix copies
      
      * fix controlnet copy
      
      * fix copies
      174dcd69
  38. 15 Jun, 2023 1 commit
  39. 16 May, 2023 1 commit