1. 25 Aug, 2024 1 commit
  2. 13 Aug, 2024 1 commit
  3. 07 Aug, 2024 1 commit
  4. 01 Aug, 2024 1 commit
  5. 30 Jul, 2024 1 commit
    • Yoach Lacombe's avatar
      Stable Audio integration (#8716) · 69e72b1d
      Yoach Lacombe authored
      
      
      * WIP modeling code and pipeline
      
      * add custom attention processor + custom activation + add to init
      
      * correct ProjectionModel forward
      
      * add stable audio to __initèè
      
      * add autoencoder and update pipeline and modeling code
      
      * add half Rope
      
      * add partial rotary v2
      
      * add temporary modfis to scheduler
      
      * add EDM DPM Solver
      
      * remove TODOs
      
      * clean GLU
      
      * remove att.group_norm to attn processor
      
      * revert back src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
      
      * refactor GLU -> SwiGLU
      
      * remove redundant args
      
      * add channel multiples in autoencoder docstrings
      
      * changes in docsrtings and copyright headers
      
      * clean pipeline
      
      * further cleaning
      
      * remove peft and lora and fromoriginalmodel
      
      * Delete src/diffusers/pipelines/stable_audio/diffusers.code-workspace
      
      * make style
      
      * dummy models
      
      * fix copied from
      
      * add fast oobleck tests
      
      * add brownian tree
      
      * oobleck autoencoder slow tests
      
      * remove TODO
      
      * fast stable audio pipeline tests
      
      * add slow tests
      
      * make style
      
      * add first version of docs
      
      * wrap is_torchsde_available to the scheduler
      
      * fix slow test
      
      * test with input waveform
      
      * add input waveform
      
      * remove some todos
      
      * create stableaudio gaussian projection + make style
      
      * add pipeline to toctree
      
      * fix copied from
      
      * make quality
      
      * refactor timestep_features->time_proj
      
      * refactor joint_attention_kwargs->cross_attention_kwargs
      
      * remove forward_chunk
      
      * move StableAudioDitModel to transformers folder
      
      * correct convert + remove partial rotary embed
      
      * apply suggestions from yiyixuxu -> removing attn.kv_heads
      
      * remove temb
      
      * remove cross_attention_kwargs
      
      * further removal of cross_attention_kwargs
      
      * remove text encoder autocast to fp16
      
      * continue removing autocast
      
      * make style
      
      * refactor how text and audio are embedded
      
      * add paper
      
      * update example code
      
      * make style
      
      * unify projection model forward + fix device placement
      
      * make style
      
      * remove fuse qkv
      
      * apply suggestions from review
      
      * Update src/diffusers/pipelines/stable_audio/pipeline_stable_audio.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * make style
      
      * smaller models in fast tests
      
      * pass sequential offloading fast tests
      
      * add docs for vae and autoencoder
      
      * make style and update example
      
      * remove useless import
      
      * add cosine scheduler
      
      * dummy classes
      
      * cosine scheduler docs
      
      * better description of scheduler
      
      ---------
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      69e72b1d
  6. 26 Jul, 2024 1 commit
    • Aryan's avatar
      [core] AnimateDiff SparseCtrl (#8897) · 5c53ca5e
      Aryan authored
      * initial sparse control model draft
      
      * remove unnecessary implementation
      
      * copy animatediff pipeline
      
      * remove deprecated callbacks
      
      * update
      
      * update pipeline implementation progress
      
      * make style
      
      * make fix-copies
      
      * update progress
      
      * add partially working pipeline
      
      * remove debug prints
      
      * add model docs
      
      * dummy objects
      
      * improve motion lora conversion script
      
      * fix bugs
      
      * update docstrings
      
      * remove unnecessary model params; docs
      
      * address review comment
      
      * add copied from to zero_module
      
      * copy animatediff test
      
      * add fast tests
      
      * update docs
      
      * update
      
      * update pipeline docs
      
      * fix expected slice values
      
      * fix license
      
      * remove get_down_block usage
      
      * remove temporal_double_self_attention from get_down_block
      
      * update
      
      * update docs with org and documentation images
      
      * make from_unet work in sparsecontrolnetmodel
      
      * add latest freeinit test from #8969
      
      * make fix-copies
      
      * LoraLoaderMixin -> StableDiffsuionLoraLoaderMixin
      5c53ca5e
  7. 11 Jul, 2024 2 commits
    • Sayak Paul's avatar
      [Core] Add AuraFlow (#8796) · 2261510b
      Sayak Paul authored
      
      
      * add lavender flow transformer
      
      ---------
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      2261510b
    • Xin Ma's avatar
      Latte: Latent Diffusion Transformer for Video Generation (#8404) · b8cf84a3
      Xin Ma authored
      
      
      * add Latte to diffusers
      
      * remove print
      
      * remove print
      
      * remove print
      
      * remove unuse codes
      
      * remove layer_norm_latte and add a flag
      
      * remove layer_norm_latte and add a flag
      
      * update latte_pipeline
      
      * update latte_pipeline
      
      * remove unuse squeeze
      
      * add norm_hidden_states.ndim == 2: # for Latte
      
      * fixed test latte pipeline bugs
      
      * fixed test latte pipeline bugs
      
      * delete sh
      
      * add doc for latte
      
      * add licensing
      
      * Move Transformer3DModelOutput to modeling_outputs
      
      * give a default value to sample_size
      
      * remove the einops dependency
      
      * change norm2 for latte
      
      * modify pipeline of latte
      
      * update test for Latte
      
      * modify some codes for latte
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * modify for Latte pipeline
      
      * video_length -> num_frames; update prepare_latents copied from
      
      * make fix-copies
      
      * make style
      
      * typo: videe -> video
      
      * update
      
      * modify for Latte pipeline
      
      * modify latte pipeline
      
      * modify latte pipeline
      
      * modify latte pipeline
      
      * modify latte pipeline
      
      * modify for Latte pipeline
      
      * Delete .vscode directory
      
      * make style
      
      * make fix-copies
      
      * add latte transformer 3d to docs _toctree.yml
      
      * update example
      
      * reduce frames for test
      
      * fixed bug of _text_preprocessing
      
      * set num frame to 1 for testing
      
      * remove unuse print
      
      * add text = self._clean_caption(text) again
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      Co-authored-by: default avatarAryan <contact.aryanvs@gmail.com>
      Co-authored-by: default avatarAryan <aryan@huggingface.co>
      b8cf84a3
  8. 08 Jul, 2024 1 commit
  9. 26 Jun, 2024 1 commit
  10. 19 Jun, 2024 1 commit
  11. 12 Jun, 2024 1 commit
  12. 01 Jun, 2024 1 commit
  13. 31 May, 2024 1 commit
    • Sayak Paul's avatar
      [Core] Introduce class variants for `Transformer2DModel` (#7647) · 983dec3b
      Sayak Paul authored
      * init for patches
      
      * finish patched model.
      
      * continuous transformer
      
      * vectorized transformer2d.
      
      * style.
      
      * inits.
      
      * fix-copies.
      
      * introduce DiTTransformer2DModel.
      
      * fixes
      
      * use REMAPPING as suggested by @DN6
      
      * better logging.
      
      * add pixart transformer model.
      
      * inits.
      
      * caption_channels.
      
      * attention masking.
      
      * fix use_additional_conditions.
      
      * remove print.
      
      * debug
      
      * flatten
      
      * fix: assertion for sigma
      
      * handle remapping for modeling_utils
      
      * add tests for dit transformer2d
      
      * quality
      
      * placeholder for pixart tests
      
      * pixart tests
      
      * add _no_split_modules
      
      * add docs.
      
      * check
      
      * check
      
      * check
      
      * check
      
      * fix tests
      
      * fix tests
      
      * move Transformer output to modeling_output
      
      * move errors better and bring back use_additional_conditions attribute.
      
      * add unnecessary things from DiT.
      
      * clean up pixart
      
      * fix remapping
      
      * fix device_map things in pixart2d.
      
      * replace Transformer2DModel with appropriate classes in dit, pixart tests
      
      * empty
      
      * legacy mixin classes./
      
      * use a remapping dict for fetching class names.
      
      * change to specifc model types in the pipeline implementations.
      
      * move _fetch_remapped_cls_from_config to modeling_loading_utils.py
      
      * fix dependency problems.
      
      * add deprecation note.
      983dec3b
  14. 16 Apr, 2024 1 commit
    • UmerHA's avatar
      Fixing implementation of ControlNet-XS (#6772) · fda1531d
      UmerHA authored
      
      
      * CheckIn - created DownSubBlocks
      
      * Added extra channels, implemented subblock fwd
      
      * Fixed connection sizes
      
      * checkin
      
      * Removed iter, next in forward
      
      * Models for SD21 & SDXL run through
      
      * Added back pipelines, cleared up connections
      
      * Cleaned up connection creation
      
      * added debug logs
      
      * updated logs
      
      * logs: added input loading
      
      * Update umer_debug_logger.py
      
      * log: Loading hint
      
      * Update umer_debug_logger.py
      
      * added logs
      
      * Changed debug logging
      
      * debug: added more logs
      
      * Fixed num_norm_groups
      
      * Debug: Logging all of SDXL input
      
      * Update umer_debug_logger.py
      
      * debug: updated logs
      
      * checkim
      
      * Readded tests
      
      * Removed debug logs
      
      * Fixed Slow Tests
      
      * Added value ckecks | Updated model_cpu_offload_seq
      
      * accelerate-offloading works ; fast tests work
      
      * Made unet & addon explicit in controlnet
      
      * Updated slow tests
      
      * Added dtype/device to ControlNetXS
      
      * Filled in test model paths
      
      * Added image_encoder/feature_extractor to XL pipe
      
      * Fixed fast tests
      
      * Added comments and docstrings
      
      * Fixed copies
      
      * Added docs ; Updates slow tests
      
      * Moved changes to UNetMidBlock2DCrossAttn
      
      * tiny cleanups
      
      * Removed stray prints
      
      * Removed ip adapters + freeU
      
      - Removed ip adapters + freeU as they don't make sense for ControlNet-XS
      - Fixed imports of UNet components
      
      * Fixed test_save_load_float16
      
      * Make style, quality, fix-copies
      
      * Changed loading/saving API for ControlNetXS
      
      - Changed loading/saving API for ControlNetXS
      - other small fixes
      
      * Removed ControlNet-XS from research examples
      
      * Make style, quality, fix-copies
      
      * Small fixes
      
      - deleted ControlNetXSModel.init_original
      - added time_embedding_mix to StableDiffusionControlNetXSPipeline .from_pretrained / StableDiffusionXLControlNetXSPipeline.from_pretrained
      - fixed copy hints
      
      * checkin May 11 '23
      
      * CheckIn Mar 12 '24
      
      * Fixed tests for SD
      
      * Added tests for UNetControlNetXSModel
      
      * Fixed SDXL tests
      
      * cleanup
      
      * Delete Pipfile
      
      * CheckIn Mar 20
      
      Started replacing sub blocks  by `ControlNetXSCrossAttnDownBlock2D` and `ControlNetXSCrossAttnUplock2D`
      
      * check-in Mar 23
      
      * checkin 24 Mar
      
      * Created init for UNetCnxs and CnxsAddon
      
      * CheckIn
      
      * Made from_modules, from_unet and no_control work
      
      * make style,quality,fix-copies & small changes
      
      * Fixed freezing
      
      * Added gradient ckpt'ing; fixed tests
      
      * Fix slow tests(+compile) ; clear naming confusion
      
      * Don't create UNet in init ; removed class_emb
      
      * Incorporated review feedback
      
      - Deleted get_base_pipeline /  get_controlnet_addon for pipes
      - Pipes inherit from StableDiffusionXLPipeline
      - Made module dicts for cnxs-addon's down/mid/up classes
      - Added support for qkv fusion and freeU
      
      * Make style, quality, fix-copies
      
      * Implemented review feedback
      
      * Removed compatibility check for vae/ctrl embedding
      
      * make style, quality, fix-copies
      
      * Delete Pipfile
      
      * Integrated review feedback
      
      - Importing ControlNetConditioningEmbedding now
      - get_down/mid/up_block_addon now outside class
      - renamed `do_control` to `apply_control`
      
      * Reduced size of test tensors
      
      For this, added `norm_num_groups` as parameter everywhere
      
      * Renamed cnxs-`Addon` to cnxs-`Adapter`
      
      - `ControlNetXSAddon` -> `ControlNetXSAdapter`
      - `ControlNetXSAddonDownBlockComponents` -> `DownBlockControlNetXSAdapter`, and similarly for mid/up
      - `get_mid_block_addon` -> `get_mid_block_adapter`, and similarly for mid/up
      
      * Fixed save_pretrained/from_pretrained bug
      
      * Removed redundant code
      
      ---------
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      fda1531d
  15. 05 Mar, 2024 1 commit
  16. 28 Feb, 2024 1 commit
  17. 27 Feb, 2024 2 commits
  18. 31 Jan, 2024 1 commit
  19. 22 Jan, 2024 1 commit
  20. 27 Dec, 2023 1 commit
  21. 21 Dec, 2023 1 commit
    • Will Berman's avatar
      open muse (#5437) · 40398152
      Will Berman authored
      
      
      amused
      
      rename
      
      Update docs/source/en/api/pipelines/amused.md
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      AdaLayerNormContinuous default values
      
      custom micro conditioning
      
      micro conditioning docs
      
      put lookup from codebook in constructor
      
      fix conversion script
      
      remove manual fused flash attn kernel
      
      add training script
      
      temp remove training script
      
      add dummy gradient checkpointing func
      
      clarify temperatures is an instance variable by setting it
      
      remove additional SkipFF block args
      
      hardcode norm args
      
      rename tests folder
      
      fix paths and samples
      
      fix tests
      
      add training script
      
      training readme
      
      lora saving and loading
      
      non-lora saving/loading
      
      some readme fixes
      
      guards
      
      Update docs/source/en/api/pipelines/amused.md
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      Update examples/amused/README.md
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      Update examples/amused/train_amused.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      vae upcasting
      
      add fp16 integration tests
      
      use tuple for micro cond
      
      copyrights
      
      remove casts
      
      delegate to torch.nn.LayerNorm
      
      move temperature to pipeline call
      
      upsampling/downsampling changes
      40398152
  22. 06 Dec, 2023 1 commit
    • UmerHA's avatar
      Add ControlNet-XS support (#5827) · e192ae08
      UmerHA authored
      
      
      * Check in 23-10-05
      
      * check-in 23-10-06
      
      * check-in 23-10-07 2pm
      
      * check-in 23-10-08
      
      * check-in 231009T1200
      
      * check-in 230109
      
      * checkin 231010
      
      * init + forward run
      
      * checkin
      
      * checkin
      
      * ControlNetXSModel is now saveable+loadable
      
      * Forward works
      
      * checkin
      
      * Pipeline works with `no_control=True`
      
      * checkin
      
      * debug: save intermediate outputs of resnet
      
      * checkin
      
      * Understood time error + fixed connection error
      
      * checkin
      
      * checkin 231106T1600
      
      * turned off detailled debug prints
      
      * time debug logs
      
      * small fix
      
      * Separated control_scale for connections/time
      
      * simplified debug logging
      
      * Full denoising works with control scale = 0
      
      * aligned logs
      
      * Added control_attention_head_dim param
      
      * Passing n_heads instead of dim_head into ctrl unet
      
      * Fixed ctrl midblock bug
      
      * Cleanup
      
      * Fixed time dtype bug
      
      * checkin
      
      * 1. from_unet, 2. base passed, 3. all unet params
      
      * checkin
      
      * Finished docstrings
      
      * cleanup
      
      * make style
      
      * checkin
      
      * more tests pass
      
      * Fixed tests
      
      * removed debug logs
      
      * make style + quality
      
      * make fix-copies
      
      * fixed documentation
      
      * added cnxs to doc toc
      
      * added control start/end param
      
      * Update controlnetxs_sdxl.md
      
      * tried to fix copies..
      
      * Fixed norm_num_groups in from_unet
      
      * added sdxl-depth test
      
      * created SD2.1 controlnet-xs pipeline
      
      * re-added debug logs
      
      * Adjusting group norm ; readded logs
      
      * Added debug log statements
      
      * removed debug logs ; started tests for sd2.1
      
      * updated sd21 tests
      
      * fixed tests
      
      * fixed tests
      
      * slightly increased error tolerance for 1 test
      
      * make style & quality
      
      * Added docs for CNXS-SD
      
      * make fix-copies
      
      * Fixed sd compile test ; fixed gradient ckpointing
      
      * vae downs = cnxs conditioning downs; removed guess
      
      * make style & quality
      
      * Fixed tests
      
      * fixed test
      
      * Incorporated review feedback
      
      * simplified control model surgery
      
      * fixed tests & make style / quality
      
      * Updated docs; deleted pip & cursor files
      
      * Rolled back minimal change to resnet
      
      * Update resnet.py
      
      * Update resnet.py
      
      * Update src/diffusers/models/controlnetxs.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/models/controlnetxs.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Incorporated review feedback
      
      * Update docs/source/en/api/pipelines/controlnetxs_sdxl.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/api/pipelines/controlnetxs.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/api/pipelines/controlnetxs.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/api/pipelines/controlnetxs.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/diffusers/models/controlnetxs.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/diffusers/models/controlnetxs.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update docs/source/en/api/pipelines/controlnetxs.md
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Update src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs_sd_xl.py
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * Incorporated doc feedback
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      e192ae08
  23. 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
  24. 24 Nov, 2023 1 commit
    • Patrick von Platen's avatar
      [@cene555][Kandinsky 3.0] Add Kandinsky 3.0 (#5913) · b978334d
      Patrick von Platen authored
      * finalize
      
      * finalize
      
      * finalize
      
      * add slow test
      
      * add slow test
      
      * add slow test
      
      * Fix more
      
      * add slow test
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * fix more
      
      * Better
      
      * Fix more
      
      * Fix more
      
      * add slow test
      
      * Add auto pipelines
      
      * add slow test
      
      * Add all
      
      * add slow test
      
      * add slow test
      
      * add slow test
      
      * add slow test
      
      * add slow test
      
      * Apply suggestions from code review
      
      * add slow test
      
      * add slow test
      b978334d
  25. 09 Nov, 2023 1 commit
  26. 02 Nov, 2023 1 commit
    • 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
  27. 24 Oct, 2023 1 commit
    • 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
  28. 21 Sep, 2023 1 commit
    • Ayush Mangal's avatar
      Add BLIP Diffusion (#4388) · 157c9011
      Ayush Mangal authored
      
      
      * Add BLIP Diffusion skeleton
      
      * Add other model components
      
      * Add BLIP2, need to change it for now
      
      * Fix pipeline imports
      
      * Load pretrained ViT
      
      * Make qformer fwd pass same
      
      * Replicate fwd passes
      
      * Fix device bug
      
      * Add accelerate functions
      
      * Remove extra functions from Blip2
      
      * Minor bug
      
      * Integrate initial review changes
      
      * Refactoring
      
      * Refactoring
      
      * Refactor
      
      * Add controlnet
      
      * Refactor
      
      * Update conversion script
      
      * Add image processor
      
      * Shift postprocessing to ImageProcessor
      
      * Refactor
      
      * Fix device
      
      * Add fast tests
      
      * Update conversion script
      
      * Fix checkpoint conversion script
      
      * Integrate review changes
      
      * Integrate reivew changes
      
      * Remove unused functions from test
      
      * Reuse HF image processor in Cond image
      
      * Create new BlipImageProcessor based on transfomers
      
      * Fix image preprocessor
      
      * Minor
      
      * Minor
      
      * Add canny preprocessing
      
      * Fix controlnet preprocessing
      
      * Fix blip diffusion test
      
      * Add controlnet test
      
      * Add initial doc strings
      
      * Integrate review changes
      
      * Refactor
      
      * Update examples
      
      * Remove DDIM comments
      
      * Add copied from for prepare_latents
      
      * Add type anotations
      
      * Add docstrings
      
      * Do black formatting
      
      * Add batch support
      
      * Make tests pass
      
      * Make controlnet tests pass
      
      * Black formatting
      
      * Fix progress bar
      
      * Fix some licensing comments
      
      * Fix imports
      
      * Refactor controlnet
      
      * Make tests faster
      
      * Edit examples
      
      * Black formatting/Ruff
      
      * Add doc
      
      * Minor
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Move controlnet pipeline
      
      * Make tests faster
      
      * Fix imports
      
      * Fix formatting
      
      * Fix make errors
      
      * Fix make errors
      
      * Minor
      
      * Add suggested doc changes
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Edit docs
      
      * Fix 16 bit loading
      
      * Update examples
      
      * Edit toctree
      
      * Update docs/source/en/api/pipelines/blip_diffusion.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Minor
      
      * Add tips
      
      * Edit examples
      
      * Update model paths
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      157c9011
  29. 06 Sep, 2023 1 commit
    • Kashif Rasul's avatar
      Würstchen model (#3849) · 541bb6ee
      Kashif Rasul authored
      
      
      * initial
      
      * initial
      
      * added initial convert script for paella vqmodel
      
      * initial wuerstchen pipeline
      
      * add LayerNorm2d
      
      * added modules
      
      * fix typo
      
      * use model_v2
      
      * embed clip caption amd negative_caption
      
      * fixed name of var
      
      * initial modules in one place
      
      * WuerstchenPriorPipeline
      
      * inital shape
      
      * initial denoising prior loop
      
      * fix output
      
      * add WuerstchenPriorPipeline to __init__.py
      
      * use the noise ratio in the Prior
      
      * try to save pipeline
      
      * save_pretrained working
      
      * Few additions
      
      * add _execution_device
      
      * shape is int
      
      * fix batch size
      
      * fix shape of ratio
      
      * fix shape of ratio
      
      * fix output dataclass
      
      * tests folder
      
      * fix formatting
      
      * fix float16 + started with generator
      
      * Update pipeline_wuerstchen.py
      
      * removed vqgan code
      
      * add WuerstchenGeneratorPipeline
      
      * fix WuerstchenGeneratorPipeline
      
      * fix docstrings
      
      * fix imports
      
      * convert generator pipeline
      
      * fix convert
      
      * Work on Generator Pipeline. WIP
      
      * Pipeline works with our diffuzz code
      
      * apply scale factor
      
      * removed vqgan.py
      
      * use cosine schedule
      
      * redo the denoising loop
      
      * Update src/diffusers/models/resnet.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * use torch.lerp
      
      * use warp-diffusion org
      
      * clip_sample=False,
      
      * some refactoring
      
      * use model_v3_stage_c
      
      * c_cond size
      
      * use clip-bigG
      
      * allow stage b clip to be None
      
      * add dummy
      
      * würstchen scheduler
      
      * minor changes
      
      * set clip=None in the pipeline
      
      * fix attention mask
      
      * add attention_masks to text_encoder
      
      * make fix-copies
      
      * add back clip
      
      * add text_encoder
      
      * gen_text_encoder and tokenizer
      
      * fix import
      
      * updated pipeline test
      
      * undo changes to pipeline test
      
      * nip
      
      * fix typo
      
      * fix output name
      
      * set guidance_scale=0 and remove diffuze
      
      * fix doc strings
      
      * make style
      
      * nip
      
      * removed unused
      
      * initial docs
      
      * rename
      
      * toc
      
      * cleanup
      
      * remvoe test script
      
      * fix-copies
      
      * fix multi images
      
      * remove dup
      
      * remove unused modules
      
      * undo changes for debugging
      
      * no  new line
      
      * remove dup conversion script
      
      * fix doc string
      
      * cleanup
      
      * pass default args
      
      * dup permute
      
      * fix some tests
      
      * fix prepare_latents
      
      * move Prior class to modules
      
      * offload only the text encoder and vqgan
      
      * fix resolution calculation for prior
      
      * nip
      
      * removed testing script
      
      * fix shape
      
      * fix argument to set_timesteps
      
      * do not change .gitignore
      
      * fix resolution calculations + readme
      
      * resolution calculation fix + readme
      
      * small fixes
      
      * Add combined pipeline
      
      * rename generator -> decoder
      
      * Update .gitignore
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * removed efficient_net
      
      * create combined WuerstchenPipeline
      
      * make arguments consistent with VQ model
      
      * fix var names
      
      * no need to return text_encoder_hidden_states
      
      * add latent_dim_scale to config
      
      * split model into its own file
      
      * add WuerschenPipeline to docs
      
      * remove unused latent_size
      
      * register latent_dim_scale
      
      * update script
      
      * update docstring
      
      * use Attention preprocessor
      
      * concat with normed input
      
      * fix-copies
      
      * add docs
      
      * fix test
      
      * fix style
      
      * add to cpu_offloaded_model
      
      * updated type
      
      * remove 1-line func
      
      * updated type
      
      * initial decoder test
      
      * formatting
      
      * formatting
      
      * fix autodoc link
      
      * num_inference_steps is int
      
      * remove comments
      
      * fix example in docs
      
      * Update src/diffusers/pipelines/wuerstchen/diffnext.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * rename layernorm to WuerstchenLayerNorm
      
      * rename DiffNext to WuerstchenDiffNeXt
      
      * added comment about MixingResidualBlock
      
      * move paella vq-vae to pipelines' folder
      
      * initial decoder test
      
      * increased test_float16_inference expected diff
      
      * self_attn is always true
      
      * more passing decoder tests
      
      * batch image_embeds
      
      * fix failing tests
      
      * set the correct dtype
      
      * relax inference test
      
      * update prior
      
      * added combined pipeline test
      
      * faster test
      
      * faster test
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * fix issues from review
      
      * update wuerstchen.md + change generator name
      
      * resolve issues
      
      * fix copied from usage and add back batch_size
      
      * fix API
      
      * fix arguments
      
      * fix combined test
      
      * Added timesteps argument + fixes
      
      * Update tests/pipelines/test_pipelines_common.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/wuerstchen/test_wuerstchen_prior.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      
      * up
      
      * Fix more
      
      * failing tests
      
      * up
      
      * up
      
      * correct naming
      
      * correct docs
      
      * correct docs
      
      * fix test params
      
      * correct docs
      
      * fix classifier free guidance
      
      * fix classifier free guidance
      
      * fix more
      
      * fix all
      
      * make tests faster
      
      ---------
      Co-authored-by: default avatarDominic Rampas <d6582533@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarDominic Rampas <61938694+dome272@users.noreply.github.com>
      541bb6ee
  30. 01 Sep, 2023 1 commit
    • 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
  31. 02 Aug, 2023 1 commit
    • Sayak Paul's avatar
      [Feat] add tiny Autoencoder for (almost) instant decoding (#4384) · 18fc40c1
      Sayak Paul authored
      
      
      * add: model implementation of tiny autoencoder.
      
      * add: inits.
      
      * push the latest devs.
      
      * add: conversion script and finish.
      
      * add: scaling factor args.
      
      * debugging
      
      * fix denormalization.
      
      * fix: positional argument.
      
      * handle use_torch_2_0_or_xformers.
      
      * handle post_quant_conv
      
      * handle dtype
      
      * fix: sdxl image processor for tiny ae.
      
      * fix: sdxl image processor for tiny ae.
      
      * unify upcasting logic.
      
      * copied from madness.
      
      * remove trailing whitespace.
      
      * set is_tiny_vae = False
      
      * address PR comments.
      
      * change to AutoencoderTiny
      
      * make act_fn an str throughout
      
      * fix: apply_forward_hook decorator call
      
      * get rid of the special is_tiny_vae flag.
      
      * directly scale the output.
      
      * fix dummies?
      
      * fix: act_fn.
      
      * get rid of the Clamp() layer.
      
      * bring back copied from.
      
      * movement of the blocks to appropriate modules.
      
      * add: docstrings to AutoencoderTiny
      
      * add: documentation.
      
      * changes to the conversion script.
      
      * add doc entry.
      
      * settle tests.
      
      * style
      
      * add one slow test.
      
      * fix
      
      * fix 2
      
      * fix 2
      
      * fix: 4
      
      * fix: 5
      
      * finish integration tests
      
      * 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>
      18fc40c1
  32. 25 Jul, 2023 1 commit
  33. 20 Jul, 2023 1 commit
  34. 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
  35. 05 Jul, 2023 1 commit
    • dg845's avatar
      Add Consistency Models Pipeline (#3492) · aed7499a
      dg845 authored
      
      
      * initial commit
      
      * Improve consistency models sampling implementation.
      
      * Add CMStochasticIterativeScheduler, which implements the multi-step sampler (stochastic_iterative_sampler) in the original code, and make further improvements to sampling.
      
      * Add Unet blocks for consistency models
      
      * Add conversion script for Unet
      
      * Fix bug in new unet blocks
      
      * Fix attention weight loading
      
      * Make design improvements to ConsistencyModelPipeline and CMStochasticIterativeScheduler and add initial version of tests.
      
      * make style
      
      * Make small random test UNet class conditional and set resnet_time_scale_shift to 'scale_shift' to better match consistency model checkpoints.
      
      * Add support for converting a test UNet and non-class-conditional UNets to the consistency models conversion script.
      
      * make style
      
      * Change num_class_embeds to 1000 to better match the original consistency models implementation.
      
      * Add support for distillation in pipeline_consistency_models.py.
      
      * Improve consistency model tests:
      	- Get small testing checkpoints from hub
      	- Modify tests to take into account "distillation" parameter of ConsistencyModelPipeline
      	- Add onestep, multistep tests for distillation and distillation + class conditional
      	- Add expected image slices for onestep tests
      
      * make style
      
      * Improve ConsistencyModelPipeline:
      	- Add initial support for class-conditional generation
      	- Fix initial sigma for onestep generation
      	- Fix some sigma shape issues
      
      * make style
      
      * Improve ConsistencyModelPipeline:
      	- add latents __call__ argument and prepare_latents method
      	- add check_inputs method
      	- add initial docstrings for ConsistencyModelPipeline.__call__
      
      * make style
      
      * Fix bug when randomly generating class labels for class-conditional generation.
      
      * Switch CMStochasticIterativeScheduler to configuring a sigma schedule and make related changes to the pipeline and tests.
      
      * Remove some unused code and make style.
      
      * Fix small bug in CMStochasticIterativeScheduler.
      
      * Add expected slices for multistep sampling tests and make them pass.
      
      * Work on consistency model fast tests:
      	- in pipeline, call self.scheduler.scale_model_input before denoising
      	- get expected slices for Euler and Heun scheduler tests
      	- make Euler test pass
      	- mark Heun test as expected fail because it doesn't support prediction_type "sample" yet
      	- remove DPM and Euler Ancestral tests because they don't support use_karras_sigmas
      
      * make style
      
      * Refactor conversion script to make it easier to add more model architectures to convert in the future.
      
      * Work on ConsistencyModelPipeline tests:
      	- Fix device bug when handling class labels in ConsistencyModelPipeline.__call__
      	- Add slow tests for onestep and multistep sampling and make them pass
      	- Refactor fast tests
      	- Refactor ConsistencyModelPipeline.__init__
      
      * make style
      
      * Remove the add_noise and add_noise_to_input methods from CMStochasticIterativeScheduler for now.
      
      * Run python utils/check_copies.py --fix_and_overwrite
      python utils/check_dummies.py --fix_and_overwrite to make dummy objects for new pipeline and scheduler.
      
      * Make fast tests from PipelineTesterMixin pass.
      
      * make style
      
      * Refactor consistency models pipeline and scheduler:
      	- Remove support for Karras schedulers (only support CMStochasticIterativeScheduler)
      	- Move sigma manipulation, input scaling, denoising from pipeline to scheduler
      	- Make corresponding changes to tests and ensure they pass
      
      * make style
      
      * Add docstrings and further refactor pipeline and scheduler.
      
      * make style
      
      * Add initial version of the consistency models documentation.
      
      * Refactor custom timesteps logic following DDPMScheduler/IFPipeline and temporarily add torch 2.0 SDPA kernel selection logic for debugging.
      
      * make style
      
      * Convert current slow tests to use fp16 and flash attention.
      
      * make style
      
      * Add slow tests for normal attention on cuda device.
      
      * make style
      
      * Fix attention weights loading
      
      * Update consistency model fast tests for new test checkpoints with attention fix.
      
      * make style
      
      * apply suggestions
      
      * Add add_noise method to CMStochasticIterativeScheduler (copied from EulerDiscreteScheduler).
      
      * Conversion script now outputs pipeline instead of UNet and add support for LSUN-256 models and different schedulers.
      
      * When both timesteps and num_inference_steps are supplied, raise warning instead of error (timesteps take precedence).
      
      * make style
      
      * Add remaining diffusers model checkpoints for models in the original consistency model release and update usage example.
      
      * apply suggestions from review
      
      * make style
      
      * fix attention naming
      
      * Add tests for CMStochasticIterativeScheduler.
      
      * make style
      
      * Make CMStochasticIterativeScheduler tests pass.
      
      * make style
      
      * Override test_step_shape in CMStochasticIterativeSchedulerTest instead of modifying it in SchedulerCommonTest.
      
      * make style
      
      * rename some models
      
      * Improve API
      
      * rename some models
      
      * Remove duplicated block
      
      * Add docstring and make torch compile work
      
      * More fixes
      
      * Fixes
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      
      * add more docstring
      
      * update consistency conversion script
      
      ---------
      Co-authored-by: default avatarayushmangal <ayushmangal@microsoft.com>
      Co-authored-by: default avatarAyush Mangal <43698245+ayushtues@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      aed7499a
  36. 20 Jun, 2023 1 commit
  37. 16 May, 2023 1 commit
  38. 23 Mar, 2023 1 commit
    • Kashif Rasul's avatar
      Music Spectrogram diffusion pipeline (#1044) · 2ef9bdd7
      Kashif Rasul authored
      
      
      * initial TokenEncoder and ContinuousEncoder
      
      * initial modules
      
      * added ContinuousContextTransformer
      
      * fix copy paste error
      
      * use numpy for get_sequence_length
      
      * initial terminal relative positional encodings
      
      * fix weights keys
      
      * fix assert
      
      * cross attend style: concat encodings
      
      * make style
      
      * concat once
      
      * fix formatting
      
      * Initial SpectrogramPipeline
      
      * fix input_tokens
      
      * make style
      
      * added mel output
      
      * ignore weights for config
      
      * move mel to numpy
      
      * import pipeline
      
      * fix class names and import
      
      * moved models to models folder
      
      * import ContinuousContextTransformer and SpectrogramDiffusionPipeline
      
      * initial spec diffusion converstion script
      
      * renamed config to t5config
      
      * added weight loading
      
      * use arguments instead of t5config
      
      * broadcast noise time to batch dim
      
      * fix call
      
      * added scale_to_features
      
      * fix weights
      
      * transpose laynorm weight
      
      * scale is a vector
      
      * scale the query outputs
      
      * added comment
      
      * undo scaling
      
      * undo depth_scaling
      
      * inital get_extended_attention_mask
      
      * attention_mask is none in self-attention
      
      * cleanup
      
      * manually invert attention
      
      * nn.linear need bias=False
      
      * added T5LayerFFCond
      
      * remove to fix conflict
      
      * make style and dummy
      
      * remove unsed variables
      
      * remove predict_epsilon
      
      * Move accelerate to a soft-dependency (#1134)
      
      * finish
      
      * finish
      
      * Update src/diffusers/modeling_utils.py
      
      * Update src/diffusers/pipeline_utils.py
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      
      * more fixes
      
      * fix
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      
      * fix order
      
      * added initial midi to note token data pipeline
      
      * added int to int tokenizer
      
      * remove duplicate
      
      * added logic for segments
      
      * add melgan to pipeline
      
      * move autoregressive gen into pipeline
      
      * added note_representation_processor_chain
      
      * fix dtypes
      
      * remove immutabledict req
      
      * initial doc
      
      * use np.where
      
      * require note_seq
      
      * fix typo
      
      * update dependency
      
      * added note-seq to test
      
      * added is_note_seq_available
      
      * fix import
      
      * added toc
      
      * added example usage
      
      * undo for now
      
      * moved docs
      
      * fix merge
      
      * fix imports
      
      * predict first segment
      
      * avoid un-needed copy to and from cpu
      
      * make style
      
      * Copyright
      
      * fix style
      
      * add test and fix inference steps
      
      * remove bogus files
      
      * reorder models
      
      * up
      
      * remove transformers dependency
      
      * make work with diffusers cross attention
      
      * clean more
      
      * remove @
      
      * improve further
      
      * up
      
      * uP
      
      * Apply suggestions from code review
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      
      * loop over all tokens
      
      * make style
      
      * Added a section on the model
      
      * fix formatting
      
      * grammer
      
      * formatting
      
      * make fix-copies
      
      * Update src/diffusers/pipelines/__init__.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/spectrogram_diffusion/pipeline_spectrogram_diffusion.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * added callback ad optional ionnx
      
      * do not squeeze batch dim
      
      * clean up more
      
      * upload
      
      * convert jax to nnumpy
      
      * make style
      
      * fix warning
      
      * make fix-copies
      
      * fix warning
      
      * add initial fast tests
      
      * add initial pipeline_params
      
      * eval mode due to dropout
      
      * skip batch tests as pipeline runs on a single file
      
      * make style
      
      * fix relative path
      
      * fix doc tests
      
      * Update src/diffusers/models/t5_film_transformer.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/models/t5_film_transformer.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update docs/source/en/api/pipelines/spectrogram_diffusion.mdx
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * add MidiProcessor
      
      * format
      
      * fix org
      
      * Apply suggestions from code review
      
      * Update tests/pipelines/spectrogram_diffusion/test_spectrogram_diffusion.py
      
      * make style
      
      * pin protobuf to <4
      
      * fix formatting
      
      * white space
      
      * tensorboard needs protobuf
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      2ef9bdd7