1. 12 Apr, 2023 1 commit
    • Sayak Paul's avatar
      [LoRA] Enabling limited LoRA support for text encoder (#2918) · a89a14fa
      Sayak Paul authored
      * add: first draft for a better LoRA enabler.
      
      * make fix-copies.
      
      * feat: backward compatibility.
      
      * add: entry to the docs.
      
      * add: tests.
      
      * fix: docs.
      
      * fix: norm group test for UNet3D.
      
      * feat: add support for flat dicts.
      
      * add depcrcation message instead of warning.
      a89a14fa
  2. 30 Mar, 2023 1 commit
  3. 28 Mar, 2023 1 commit
  4. 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
  5. 22 Mar, 2023 1 commit
    • Patrick von Platen's avatar
      [MS Text To Video] Add first text to video (#2738) · ca1a2229
      Patrick von Platen authored
      
      
      * [MS Text To Video} Add first text to video
      
      * upload
      
      * make first model example
      
      * match unet3d params
      
      * make sure weights are correcctly converted
      
      * improve
      
      * forward pass works, but diff result
      
      * make forward work
      
      * fix more
      
      * finish
      
      * refactor video output class.
      
      * feat: add support for a video export utility.
      
      * fix: opencv availability check.
      
      * run make fix-copies.
      
      * add: docs for the model components.
      
      * add: standalone pipeline doc.
      
      * edit docstring of the pipeline.
      
      * add: right path to TransformerTempModel
      
      * add: first set of tests.
      
      * complete fast tests for text to video.
      
      * fix bug
      
      * up
      
      * three fast tests failing.
      
      * add: note on slow tests
      
      * make work with all schedulers
      
      * apply styling.
      
      * add slow tests
      
      * change file name
      
      * update
      
      * more correction
      
      * more fixes
      
      * finish
      
      * up
      
      * Apply suggestions from code review
      
      * up
      
      * finish
      
      * make copies
      
      * fix pipeline tests
      
      * fix more tests
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * apply suggestions
      
      * up
      
      * revert
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      ca1a2229
  6. 10 Mar, 2023 1 commit
  7. 01 Mar, 2023 1 commit
  8. 16 Feb, 2023 2 commits
  9. 15 Feb, 2023 1 commit
  10. 08 Feb, 2023 1 commit
  11. 25 Jan, 2023 1 commit
    • Patrick von Platen's avatar
      Reproducibility 3/3 (#1924) · 6ba2231d
      Patrick von Platen authored
      
      
      * make tests deterministic
      
      * run slow tests
      
      * prepare for testing
      
      * finish
      
      * refactor
      
      * add print statements
      
      * finish more
      
      * correct some test failures
      
      * more fixes
      
      * set up to correct tests
      
      * more corrections
      
      * up
      
      * fix more
      
      * more prints
      
      * add
      
      * up
      
      * up
      
      * up
      
      * uP
      
      * uP
      
      * more fixes
      
      * uP
      
      * up
      
      * up
      
      * up
      
      * up
      
      * fix more
      
      * up
      
      * up
      
      * clean tests
      
      * up
      
      * up
      
      * up
      
      * more fixes
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * make
      
      * correct
      
      * finish
      
      * finish
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      6ba2231d
  12. 20 Jan, 2023 2 commits
  13. 18 Jan, 2023 1 commit
  14. 17 Jan, 2023 2 commits
    • Kashif Rasul's avatar
      DiT Pipeline (#1806) · 37d113cc
      Kashif Rasul authored
      
      
      * added dit model
      
      * import
      
      * initial pipeline
      
      * initial convert script
      
      * initial pipeline
      
      * make style
      
      * raise valueerror
      
      * single function
      
      * rename classes
      
      * use DDIMScheduler
      
      * timesteps embedder
      
      * samples to cpu
      
      * fix var names
      
      * fix numpy type
      
      * use timesteps class for proj
      
      * fix typo
      
      * fix arg name
      
      * flip_sin_to_cos and better var names
      
      * fix C shape cal
      
      * make style
      
      * remove unused imports
      
      * cleanup
      
      * add back patch_size
      
      * initial dit doc
      
      * typo
      
      * Update docs/source/api/pipelines/dit.mdx
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * added copyright license headers
      
      * added example usage and toc
      
      * fix variable names asserts
      
      * remove comment
      
      * added docs
      
      * fix typo
      
      * upstream changes
      
      * set proper device for drop_ids
      
      * added initial dit pipeline test
      
      * update docs
      
      * fix imports
      
      * make fix-copies
      
      * isort
      
      * fix imports
      
      * get rid of more magic numbers
      
      * fix code when guidance is off
      
      * remove block_kwargs
      
      * cleanup script
      
      * removed to_2tuple
      
      * use FeedForward class instead of another MLP
      
      * style
      
      * work on mergint DiTBlock with BasicTransformerBlock
      
      * added missing final_dropout and args to BasicTransformerBlock
      
      * use norm from block
      
      * fix arg
      
      * remove unused arg
      
      * fix call to class_embedder
      
      * use timesteps
      
      * make style
      
      * attn_output gets multiplied
      
      * removed commented code
      
      * use Transformer2D
      
      * use self.is_input_patches
      
      * fix flags
      
      * fixed conversion to use Transformer2DModel
      
      * fixes for pipeline
      
      * remove dit.py
      
      * fix timesteps device
      
      * use randn_tensor and fix fp16 inf.
      
      * timesteps_emb already the right dtype
      
      * fix dit test class
      
      * fix test and style
      
      * fix norm2 usage in vq-diffusion
      
      * added author names to pipeline and lmagenet labels link
      
      * fix tests
      
      * use norm_type as string
      
      * rename dit to transformer
      
      * fix name
      
      * fix test
      
      * set  norm_type = "layer" by default
      
      * fix tests
      
      * do not skip common tests
      
      * Update src/diffusers/models/attention.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * revert AdaLayerNorm API
      
      * fix norm_type name
      
      * make sure all components are in eval mode
      
      * revert norm2 API
      
      * compact
      
      * finish deprecation
      
      * add slow tests
      
      * remove @
      
      * refactor some stuff
      
      * upload
      
      * Update src/diffusers/pipelines/dit/pipeline_dit.py
      
      * finish more
      
      * finish docs
      
      * improve docs
      
      * finish docs
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: default avatarWilliam Berman <WLBberman@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      37d113cc
    • Pedro Cuenca's avatar
      Check k-diffusion version is at least 0.0.12 (#2022) · 7e29b747
      Pedro Cuenca authored
      * Check k-diffusion version is at least 0.0.12
      
      * make style
      7e29b747
  15. 04 Jan, 2023 1 commit
    • Patrick von Platen's avatar
      Improve reproduceability 2/3 (#1906) · 9b638548
      Patrick von Platen authored
      * [Repro] Correct reproducability
      
      * up
      
      * up
      
      * uP
      
      * up
      
      * need better image
      
      * allow conversion from no state dict checkpoints
      
      * up
      
      * up
      
      * up
      
      * up
      
      * check tensors
      
      * check tensors
      
      * check tensors
      
      * check tensors
      
      * next try
      
      * up
      
      * up
      
      * better name
      
      * up
      
      * up
      
      * Apply suggestions from code review
      
      * correct more
      
      * up
      
      * replace all torch randn
      
      * fix
      
      * correct
      
      * correct
      
      * finish
      
      * fix more
      
      * up
      9b638548
  16. 03 Jan, 2023 2 commits
  17. 02 Jan, 2023 1 commit
  18. 30 Dec, 2022 1 commit
  19. 16 Dec, 2022 1 commit
  20. 08 Dec, 2022 2 commits
  21. 07 Dec, 2022 1 commit
  22. 06 Dec, 2022 1 commit
  23. 05 Dec, 2022 1 commit
    • Robert Dargavel Smith's avatar
      add AudioDiffusionPipeline and LatentAudioDiffusionPipeline #1334 (#1426) · 48d0123f
      Robert Dargavel Smith authored
      
      
      * add AudioDiffusionPipeline and LatentAudioDiffusionPipeline
      
      * add docs to toc
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * fix tests
      
      * Update pr_tests.yml
      
      Fix tests
      
      * parent 499ff34b3edc3e0c506313ab48f21514d8f58b09
      author teticio <teticio@gmail.com> 1668765652 +0000
      committer teticio <teticio@gmail.com> 1669041721 +0000
      
      parent 499ff34b3edc3e0c506313ab48f21514d8f58b09
      author teticio <teticio@gmail.com> 1668765652 +0000
      committer teticio <teticio@gmail.com> 1669041704 +0000
      
      add colab notebook
      
      [Flax] Fix loading scheduler from subfolder (#1319)
      
      [FLAX] Fix loading scheduler from subfolder
      
      Fix/Enable all schedulers for in-painting (#1331)
      
      * inpaint fix k lms
      
      * onnox as well
      
      * up
      
      Correct path to schedlure (#1322)
      
      * [Examples] Correct path
      
      * uP
      
      Avoid nested fix-copies (#1332)
      
      * Avoid nested `# Copied from` statements during `make fix-copies`
      
      * style
      
      Fix img2img speed with LMS-Discrete Scheduler (#896)
      
      Casting `self.sigmas` into a different dtype (the one of original_samples) is not advisable. In my img2img pipeline this leads to a long running time in the  `integrate.quad` call later on- by long I mean more than 10x slower.
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      
      Fix the order of casts for onnx inpainting (#1338)
      
      Legacy Inpainting Pipeline for Onnx Models (#1237)
      
      * Add legacy inpainting pipeline compatibility for onnx
      
      * remove commented out line
      
      * Add onnx legacy inpainting test
      
      * Fix slow decorators
      
      * pep8 styling
      
      * isort styling
      
      * dummy object
      
      * ordering consistency
      
      * style
      
      * docstring styles
      
      * Refactor common prompt encoding pattern
      
      * Update tests to permanent repository home
      
      * support all available schedulers until ONNX IO binding is available
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * updated styling from PR suggested feedback
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      Jax infer support negative prompt (#1337)
      
      * support negative prompts in sd jax pipeline
      
      * pass batched neg_prompt
      
      * only encode when negative prompt is None
      Co-authored-by: default avatarJuan Acevedo <jfacevedo@google.com>
      
      Update README.md: Minor change to Imagic code snippet, missing dir error (#1347)
      
      Minor change to Imagic Readme
      
      Missing dir causes an error when running the example code.
      
      make style
      
      change the sample model (#1352)
      
      * Update alt_diffusion.mdx
      
      * Update alt_diffusion.mdx
      
      Add bit diffusion [WIP] (#971)
      
      * Create bit_diffusion.py
      
      Bit diffusion based on the paper, arXiv:2208.04202, Chen2022AnalogBG
      
      * adding bit diffusion to new branch
      
      ran tests
      
      * tests
      
      * tests
      
      * tests
      
      * tests
      
      * removed test folders + added to README
      
      * Update README.md
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * move Mel to module in pipeline construction, make librosa optional
      
      * fix imports
      
      * fix copy & paste error in comment
      
      * fix style
      
      * add missing register_to_config
      
      * fix class docstrings
      
      * fix class docstrings
      
      * tweak docstrings
      
      * tweak docstrings
      
      * update slow test
      
      * put trailing commas back
      
      * respect alphabetical order
      
      * remove LatentAudioDiffusion, make vqvae optional
      
      * move Mel from models back to pipelines :-)
      
      * allow loading of pretrained audiodiffusion models
      
      * fix tests
      
      * fix dummies
      
      * remove reference to latent_audio_diffusion in docs
      
      * unused import
      
      * inherit from SchedulerMixin to make loadable
      
      * Apply suggestions from code review
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      48d0123f
  24. 28 Nov, 2022 2 commits
  25. 23 Nov, 2022 1 commit
  26. 16 Nov, 2022 1 commit
  27. 15 Nov, 2022 1 commit
  28. 08 Nov, 2022 1 commit
  29. 04 Nov, 2022 1 commit
  30. 02 Nov, 2022 1 commit
  31. 28 Oct, 2022 3 commits
  32. 04 Oct, 2022 1 commit