1. 27 Jun, 2024 1 commit
    • vincedovy's avatar
      Fix json WindowsPath crash (#8662) · a536e775
      vincedovy authored
      
      
      * Add check for WindowsPath in to_json_string
      
      On Windows, os.path.join returns a WindowsPath. to_json_string does not convert this from a WindowsPath to a string. Added check for WindowsPath to to_json_saveable.
      
      * Remove extraneous convert to string in test_check_path_types (tests/others/test_config.py)
      
      * Fix style issues in tests/others/test_config.py
      
      * Add unit test to test_config.py to verify that PosixPath and WindowsPath (depending on system) both work when converted to JSON
      
      * Remove distinction between PosixPath and WindowsPath in ConfigMixIn.to_json_string(). Conditional now tests for Path, and uses Path.as_posix() to convert to string.
      
      ---------
      Co-authored-by: default avatarVincent Dovydaitis <vincedovy@gmail.com>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      a536e775
  2. 18 Mar, 2024 2 commits
  3. 08 Feb, 2024 1 commit
  4. 11 Jul, 2023 1 commit
  5. 05 Jul, 2023 1 commit
    • Pedro Cuenca's avatar
      Add `timestep_spacing` and `steps_offset` to schedulers (#3947) · 07c9a08e
      Pedro Cuenca authored
      
      
      * Add timestep_spacing to DDPM, LMSDiscrete, PNDM.
      
      * Remove spurious line.
      
      * More easy schedulers.
      
      * Add `linspace` to DDIM
      
      * Noise sigma for `trailing`.
      
      * Add timestep_spacing to DEISMultistepScheduler.
      
      Not sure the range is the way it was intended.
      
      * Fix: remove line used to debug.
      
      * Support timestep_spacing in DPMSolverMultistep, DPMSolverSDE, UniPC
      
      * Fix: convert to numpy.
      
      * Use sched. defaults when instantiating from_config
      
      For params not present in the original configuration.
      
      This makes it possible to switch pipeline schedulers even if they use
      different timestep_spacing (or any other param).
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Missing args in DPMSolverMultistep
      
      * Test: default args not in config
      
      * Style
      
      * Fix scheduler name in test
      
      * Remove duplicated entries
      
      * Add test for solver_type
      
      This test currently fails in main. When switching from DEIS to UniPC,
      solver_type is "logrho" (the default value from DEIS), which gets
      translated to "bh1" by UniPC. This is different to the default value for
      UniPC: "bh2". This is where the translation happens: https://github.com/huggingface/diffusers/blob/36d22d0709dc19776e3016fb3392d0f5578b0ab2/src/diffusers/schedulers/scheduling_unipc_multistep.py#L171
      
      
      
      * UniPC: use same default for solver_type
      
      Fixes a bug when switching from UniPC from another scheduler (i.e.,
      DEIS) that uses a different solver type. The solver is now the same as
      if we had instantiated the scheduler directly.
      
      * do not save use default values
      
      * fix more
      
      * fix all
      
      * fix schedulers
      
      * fix more
      
      * finish for real
      
      * finish for real
      
      * flaky tests
      
      * Update tests/pipelines/stable_diffusion/test_stable_diffusion_pix2pix_zero.py
      
      * Default steps_offset to 0.
      
      * Add missing docstrings
      
      * Apply suggestions from code review
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      07c9a08e
  6. 13 Apr, 2023 1 commit
  7. 01 Mar, 2023 1 commit
  8. 25 Jan, 2023 1 commit
  9. 19 Dec, 2022 1 commit
  10. 13 Dec, 2022 1 commit
  11. 30 Nov, 2022 1 commit
  12. 25 Nov, 2022 1 commit
    • Pedro Cuenca's avatar
      Deprecate `predict_epsilon` (#1393) · d52388f4
      Pedro Cuenca authored
      
      
      * Adapt ddpm, ddpmsolver to prediction_type.
      
      * Deprecate predict_epsilon in __init__.
      
      * Bring FlaxDDIMScheduler up to date with DDIMScheduler.
      
      * Set prediction_type as an ivar for consistency.
      
      * Convert pipeline_ddpm
      
      * Adapt tests.
      
      * Adapt unconditional training script.
      
      * Adapt BitDiffusion example.
      
      * Add missing kwargs in dpmsolver_multistep
      
      * Ugly workaround to accept deprecated predict_epsilon when loading
      schedulers using from_pretrained.
      
      * make style
      
      * Remove import no longer in use.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Use config.prediction_type everywhere
      
      * Add a couple of Flax prediction type tests.
      
      * make style
      
      * fix register deprecated arg
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      d52388f4
  13. 15 Nov, 2022 1 commit
  14. 08 Nov, 2022 1 commit
  15. 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
  16. 03 Nov, 2022 1 commit
  17. 31 Oct, 2022 1 commit
  18. 29 Aug, 2022 1 commit
  19. 24 Aug, 2022 1 commit
  20. 22 Aug, 2022 1 commit
  21. 18 Aug, 2022 1 commit
  22. 17 Aug, 2022 1 commit
  23. 16 Aug, 2022 5 commits
  24. 14 Aug, 2022 2 commits
  25. 09 Aug, 2022 1 commit
  26. 06 Aug, 2022 1 commit
  27. 28 Jul, 2022 2 commits
  28. 27 Jul, 2022 1 commit
  29. 21 Jul, 2022 2 commits
  30. 20 Jul, 2022 3 commits