1. 15 Nov, 2022 1 commit
  2. 14 Nov, 2022 1 commit
  3. 13 Nov, 2022 2 commits
  4. 09 Nov, 2022 8 commits
  5. 08 Nov, 2022 4 commits
  6. 07 Nov, 2022 2 commits
  7. 06 Nov, 2022 1 commit
    • Cheng Lu's avatar
      Add multistep DPM-Solver discrete scheduler (#1132) · b4a1ed85
      Cheng Lu authored
      
      
      * add dpmsolver discrete pytorch scheduler
      
      * fix some typos in dpm-solver pytorch
      
      * add dpm-solver pytorch in stable-diffusion pipeline
      
      * add jax/flax version dpm-solver
      
      * change code style
      
      * change code style
      
      * add docs
      
      * add `add_noise` method for dpmsolver
      
      * add pytorch unit test for dpmsolver
      
      * add dummy object for pytorch dpmsolver
      
      * Update src/diffusers/schedulers/scheduling_dpmsolver_discrete.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Update tests/test_config.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Update tests/test_config.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * resolve the code comments
      
      * rename the file
      
      * change class name
      
      * fix code style
      
      * add auto docs for dpmsolver multistep
      
      * add more explanations for the stabilizing trick (for steps < 15)
      
      * delete the dummy file
      
      * change the API name of predict_epsilon, algorithm_type and solver_type
      
      * add compatible lists
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      b4a1ed85
  8. 04 Nov, 2022 2 commits
  9. 03 Nov, 2022 3 commits
    • Will Berman's avatar
      VQ-diffusion (#658) · ef2ea33c
      Will Berman authored
      
      
      * Changes for VQ-diffusion VQVAE
      
      Add specify dimension of embeddings to VQModel:
      `VQModel` will by default set the dimension of embeddings to the number
      of latent channels. The VQ-diffusion VQVAE has a smaller
      embedding dimension, 128, than number of latent channels, 256.
      
      Add AttnDownEncoderBlock2D and AttnUpDecoderBlock2D to the up and down
      unet block helpers. VQ-diffusion's VQVAE uses those two block types.
      
      * Changes for VQ-diffusion transformer
      
      Modify attention.py so SpatialTransformer can be used for
      VQ-diffusion's transformer.
      
      SpatialTransformer:
      - Can now operate over discrete inputs (classes of vector embeddings) as well as continuous.
      - `in_channels` was made optional in the constructor so two locations where it was passed as a positional arg were moved to kwargs
      - modified forward pass to take optional timestep embeddings
      
      ImagePositionalEmbeddings:
      - added to provide positional embeddings to discrete inputs for latent pixels
      
      BasicTransformerBlock:
      - norm layers were made configurable so that the VQ-diffusion could use AdaLayerNorm with timestep embeddings
      - modified forward pass to take optional timestep embeddings
      
      CrossAttention:
      - now may optionally take a bias parameter for its query, key, and value linear layers
      
      FeedForward:
      - Internal layers are now configurable
      
      ApproximateGELU:
      - Activation function in VQ-diffusion's feedforward layer
      
      AdaLayerNorm:
      - Norm layer modified to incorporate timestep embeddings
      
      * Add VQ-diffusion scheduler
      
      * Add VQ-diffusion pipeline
      
      * Add VQ-diffusion convert script to diffusers
      
      * Add VQ-diffusion dummy objects
      
      * Add VQ-diffusion markdown docs
      
      * Add VQ-diffusion tests
      
      * some renaming
      
      * some fixes
      
      * more renaming
      
      * correct
      
      * fix typo
      
      * correct weights
      
      * finalize
      
      * fix tests
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * finish
      
      * finish
      
      * up
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      ef2ea33c
    • Pedro Cuenca's avatar
      Continuation of #1035 (#1120) · 269109db
      Pedro Cuenca authored
      
      
      * remove batch size from repeat
      
      * repeat empty string if uncond_tokens is none
      
      * fix inpaint pipes
      
      * return back whitespace to pass code quality
      
      * Apply suggestions from code review
      
      * Fix typos.
      Co-authored-by: default avatarHad <had-95@yandex.ru>
      269109db
    • Revist's avatar
      feat: add repaint (#974) · d38c8043
      Revist authored
      
      
      * feat: add repaint
      
      * fix: fix quality check with `make fix-copies`
      
      * fix: remove old unnecessary arg
      
      * chore: change default to DDPM (looks better in experiments)
      
      * ".to(device)" changed to "device="
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * make generator device-specific
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * make generator device-specific and change shape
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * fix: add preprocessing for image and mask
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * fix: update test
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      
      * Update src/diffusers/pipelines/repaint/pipeline_repaint.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Add docs and examples
      
      * Fix toctree
      Co-authored-by: default avatarfja <fja@zurich.ibm.com>
      Co-authored-by: default avatarAnton Lozhkov <aglozhkov@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      d38c8043
  10. 02 Nov, 2022 4 commits
    • Denis's avatar
      Training to predict x0 in training example (#1031) · cbcd0512
      Denis authored
      
      
      * changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly
      
      * Revert "changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly"
      
      This reverts commit c5efb525648885f2e7df71f4483a9f248515ad61.
      
      * changed training example to add option to train model that predicts x0 (instead of eps), changed DDPM pipeline accordingly
      
      * fixed code style
      Co-authored-by: default avatarlukovnikov <lukovnikov@users.noreply.github.com>
      cbcd0512
    • Grigory Sizov's avatar
      Fix tests for equivalence of DDIM and DDPM pipelines (#1069) · 5cd29d62
      Grigory Sizov authored
      * Fix equality test for ddim and ddpm
      
      * add docs for use_clipped_model_output in DDIM
      
      * fix inline comment
      
      * reorder imports in test_pipelines.py
      
      * Ignore use_clipped_model_output if scheduler doesn't take it
      5cd29d62
    • Patrick von Platen's avatar
      Rename latent (#1102) · d53ffbbd
      Patrick von Platen authored
      * Rename latent
      
      * uP
      d53ffbbd
    • MatthieuTPHR's avatar
      Up to 2x speedup on GPUs using memory efficient attention (#532) · 98c42134
      MatthieuTPHR authored
      
      
      * 2x speedup using memory efficient attention
      
      * remove einops dependency
      
      * Swap K, M in op instantiation
      
      * Simplify code, remove unnecessary maybe_init call and function, remove unused self.scale parameter
      
      * make xformers a soft dependency
      
      * remove one-liner functions
      
      * change one letter variable to appropriate names
      
      * Remove Env variable dependency, remove MemoryEfficientCrossAttention class and use enable_xformers_memory_efficient_attention method
      
      * Add memory efficient attention toggle to img2img and inpaint pipelines
      
      * Clearer management of xformers' availability
      
      * update optimizations markdown to add info about memory efficient attention
      
      * add benchmarks for TITAN RTX
      
      * More detailed explanation of how the mem eff benchmark were ran
      
      * Removing autocast from optimization markdown
      
      * import_utils: import torch only if is available
      Co-authored-by: default avatarNouamane Tazi <nouamane98@gmail.com>
      98c42134
  11. 31 Oct, 2022 4 commits
  12. 30 Oct, 2022 1 commit
  13. 29 Oct, 2022 1 commit
  14. 28 Oct, 2022 1 commit
  15. 27 Oct, 2022 2 commits
  16. 26 Oct, 2022 2 commits
    • Hu Ye's avatar
      bd06dd02
    • Pi Esposito's avatar
      minimal stable diffusion GPU memory usage with accelerate hooks (#850) · b2e2d141
      Pi Esposito authored
      * add method to enable cuda with minimal gpu usage to stable diffusion
      
      * add test to minimal cuda memory usage
      
      * ensure all models but unet are onn torch.float32
      
      * move to cpu_offload along with minor internal changes to make it work
      
      * make it test against accelerate master branch
      
      * coming back, its official: I don't know how to make it test againt the master branch from accelerate
      
      * make it install accelerate from master on tests
      
      * go back to accelerate>=0.11
      
      * undo prettier formatting on yml files
      
      * undo prettier formatting on yml files againn
      b2e2d141
  17. 25 Oct, 2022 1 commit