1. 31 Oct, 2022 1 commit
  2. 27 Oct, 2022 1 commit
  3. 26 Oct, 2022 2 commits
    • 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
    • Yuta Hayashibe's avatar
      Fix typos (#978) · cc436087
      Yuta Hayashibe authored
      cc436087
  4. 25 Oct, 2022 1 commit
  5. 24 Oct, 2022 1 commit
  6. 21 Oct, 2022 1 commit
  7. 20 Oct, 2022 2 commits
  8. 19 Oct, 2022 1 commit
  9. 16 Oct, 2022 1 commit
  10. 13 Oct, 2022 1 commit
  11. 12 Oct, 2022 4 commits
  12. 10 Oct, 2022 1 commit
    • Patrick von Platen's avatar
      [Low CPU memory] + device map (#772) · fab17528
      Patrick von Platen authored
      
      
      * add accelerate to load models with smaller memory footprint
      
      * remove low_cpu_mem_usage as it is reduntant
      
      * move accelerate init weights context to modelling utils
      
      * add test to ensure results are the same when loading with accelerate
      
      * add tests to ensure ram usage gets lower when using accelerate
      
      * move accelerate logic to single snippet under modelling utils and remove it from configuration utils
      
      * format code using to pass quality check
      
      * fix imports with isor
      
      * add accelerate to test extra deps
      
      * only import accelerate if device_map is set to auto
      
      * move accelerate availability check to diffusers import utils
      
      * format code
      
      * add device map to pipeline abstraction
      
      * lint it to pass PR quality check
      
      * fix class check to use accelerate when using diffusers ModelMixin subclasses
      
      * use low_cpu_mem_usage in transformers if device_map is not available
      
      * NoModuleLayer
      
      * comment out tests
      
      * up
      
      * uP
      
      * finish
      
      * Update src/diffusers/pipelines/stable_diffusion/safety_checker.py
      
      * finish
      
      * uP
      
      * make style
      Co-authored-by: default avatarPi Esposito <piero.skywalker@gmail.com>
      fab17528
  13. 07 Oct, 2022 1 commit
  14. 06 Oct, 2022 3 commits
  15. 05 Oct, 2022 1 commit
  16. 24 Sep, 2022 1 commit
  17. 23 Sep, 2022 1 commit
  18. 21 Sep, 2022 1 commit
  19. 20 Sep, 2022 1 commit
  20. 16 Sep, 2022 2 commits
  21. 08 Sep, 2022 3 commits
    • Anton Lozhkov's avatar
      [ONNX] Stable Diffusion exporter and pipeline (#399) · 8d9c4a53
      Anton Lozhkov authored
      
      
      * initial export and design
      
      * update imports
      
      * custom prover, import fixes
      
      * Update src/diffusers/onnx_utils.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/onnx_utils.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * remove push_to_hub
      
      * Update src/diffusers/onnx_utils.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * remove torch_device
      
      * numpify the rest of the pipeline
      
      * torchify the safety checker
      
      * revert tensor
      
      * Code review suggestions + quality
      
      * fix tests
      
      * fix provider, add an end-to-end test
      
      * style
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      8d9c4a53
    • Patrick von Platen's avatar
      [Docs] DiffusionPipeline (#418) · e7457b37
      Patrick von Platen authored
      * Start
      
      * up
      
      * up
      
      * finish
      e7457b37
    • Pedro Cuenca's avatar
      Inference support for `mps` device (#355) · 5dda1735
      Pedro Cuenca authored
      * Initial support for mps in Stable Diffusion pipeline.
      
      * Initial "warmup" implementation when using mps.
      
      * Make some deterministic tests pass with mps.
      
      * Disable training tests when using mps.
      
      * SD: generate latents in CPU then move to device.
      
      This is especially important when using the mps device, because
      generators are not supported there. See for example
      https://github.com/pytorch/pytorch/issues/84288.
      
      In addition, the other pipelines seem to use the same approach: generate
      the random samples then move to the appropriate device.
      
      After this change, generating an image in MPS produces the same result
      as when using the CPU, if the same seed is used.
      
      * Remove prints.
      
      * Pass AutoencoderKL test_output_pretrained with mps.
      
      Sampling from `posterior` must be done in CPU.
      
      * Style
      
      * Do not use torch.long for log op in mps device.
      
      * Perform incompatible padding ops in CPU.
      
      UNet tests now pass.
      See https://github.com/pytorch/pytorch/issues/84535
      
      
      
      * Style: fix import order.
      
      * Remove unused symbols.
      
      * Remove MPSWarmupMixin, do not apply automatically.
      
      We do apply warmup in the tests, but not during normal use.
      This adopts some PR suggestions by @patrickvonplaten.
      
      * Add comment for mps fallback to CPU step.
      
      * Add README_mps.md for mps installation and use.
      
      * Apply `black` to modified files.
      
      * Restrict README_mps to SD, show measures in table.
      
      * Make PNDM indexing compatible with mps.
      
      Addresses #239.
      
      * Do not use float64 when using LDMScheduler.
      
      Fixes #358.
      
      * Fix typo identified by @patil-suraj
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Adapt example to new output style.
      
      * Restore 1:1 results reproducibility with CompVis.
      
      However, mps latents need to be generated in CPU because generators
      don't work in the mps device.
      
      * Move PyTorch nightly to requirements.
      
      * Adapt `test_scheduler_outputs_equivalence` ton MPS.
      
      * mps: skip training tests instead of ignoring silently.
      
      * Make VQModel tests pass on mps.
      
      * mps ddim tests: warmup, increase tolerance.
      
      * ScoreSdeVeScheduler indexing made mps compatible.
      
      * Make ldm pipeline tests pass using warmup.
      
      * Style
      
      * Simplify casting as suggested in PR.
      
      * Add Known Issues to readme.
      
      * `isort` import order.
      
      * Remove _mps_warmup helpers from ModelMixin.
      
      And just make changes to the tests.
      
      * Skip tests using unittest decorator for consistency.
      
      * Remove temporary var.
      
      * Remove spurious blank space.
      
      * Remove unused symbol.
      
      * Remove README_mps.
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> 
      5dda1735
  22. 05 Sep, 2022 1 commit
  23. 30 Aug, 2022 1 commit
  24. 22 Aug, 2022 1 commit
  25. 19 Aug, 2022 2 commits
  26. 16 Aug, 2022 1 commit
  27. 20 Jul, 2022 3 commits