1. 15 Aug, 2023 1 commit
  2. 11 Jul, 2023 1 commit
  3. 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
  4. 21 Jun, 2023 1 commit
  5. 05 Jun, 2023 1 commit
  6. 25 Apr, 2023 1 commit
    • Patrick von Platen's avatar
      add model (#3230) · e51f19ae
      Patrick von Platen authored
      
      
      * add
      
      * clean
      
      * up
      
      * clean up more
      
      * fix more tests
      
      * Improve docs further
      
      * improve
      
      * more fixes docs
      
      * Improve docs more
      
      * Update src/diffusers/models/unet_2d_condition.py
      
      * fix
      
      * up
      
      * update doc links
      
      * make fix-copies
      
      * add safety checker and watermarker to stage 3 doc page code snippets
      
      * speed optimizations docs
      
      * memory optimization docs
      
      * make style
      
      * add watermarking snippets to doc string examples
      
      * make style
      
      * use pt_to_pil helper functions in doc strings
      
      * skip mps tests
      
      * Improve safety
      
      * make style
      
      * new logic
      
      * fix
      
      * fix bad onnx design
      
      * make new stable diffusion upscale pipeline model arguments optional
      
      * define has_nsfw_concept when non-pil output type
      
      * lowercase linked to notebook name
      
      ---------
      Co-authored-by: default avatarWilliam Berman <WLBberman@gmail.com>
      e51f19ae
  7. 17 Apr, 2023 1 commit
  8. 11 Apr, 2023 1 commit
    • Patrick von Platen's avatar
      Fix config prints and save, load of pipelines (#2849) · 8b451eb6
      Patrick von Platen authored
      * [Config] Fix config prints and save, load
      
      * Only use potential nn.Modules for dtype and device
      
      * Correct vae image processor
      
      * make sure in_channels is not accessed directly
      
      * make sure in channels is only accessed via config
      
      * Make sure schedulers only access config attributes
      
      * Make sure to access config in SAG
      
      * Fix vae processor and make style
      
      * add tests
      
      * uP
      
      * make style
      
      * Fix more naming issues
      
      * Final fix with vae config
      
      * change more
      8b451eb6
  9. 27 Mar, 2023 1 commit
  10. 10 Mar, 2023 1 commit
  11. 01 Mar, 2023 1 commit
  12. 07 Feb, 2023 1 commit
  13. 26 Jan, 2023 1 commit
  14. 30 Nov, 2022 1 commit
  15. 25 Nov, 2022 2 commits
    • Patrick von Platen's avatar
      Allow to set config params directly in init (#1419) · 8faa822d
      Patrick von Platen authored
      * fix
      
      * fix deprecated kwargs logic
      
      * add tests
      
      * finish
      8faa822d
    • 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
  16. 24 Nov, 2022 1 commit
  17. 15 Nov, 2022 1 commit
  18. 08 Nov, 2022 2 commits
  19. 31 Oct, 2022 2 commits
  20. 24 Oct, 2022 1 commit
  21. 05 Oct, 2022 1 commit
  22. 27 Sep, 2022 1 commit
    • Pedro Cuenca's avatar
      Fix `main`: stable diffusion pipelines cannot be loaded (#655) · 235770dd
      Pedro Cuenca authored
      * Replace deprecation warning f-string with class name.
      
      When `__repr__` is invoked in the instance serialization of
      `config_dict` fails, because it contains `kwargs` of type `<class
      inspect._empty>`.
      
      * Revert "Replace deprecation warning f-string with class name."
      
      This reverts commit 1c4eb8cb104374bd84e43865fc3865862473799c.
      
      * Do not attempt to register `"kwargs"` as an attribute.
      
      Otherwise serialization could fail.
      This may happen for other attributes, so we should create a better
      solution.
      235770dd
  23. 22 Sep, 2022 1 commit
  24. 21 Sep, 2022 2 commits
    • Pedro Cuenca's avatar
      Return Flax scheduler state (#601) · a9fdb3de
      Pedro Cuenca authored
      * Optionally return state in from_config.
      
      Useful for Flax schedulers.
      
      * has_state is now a property, make check more strict.
      
      I don't check the class is `SchedulerMixin` to prevent circular
      dependencies. It should be enough that the class name starts with "Flax"
      the object declares it "has_state" and the "create_state" exists too.
      
      * Use state in pipeline from_pretrained.
      
      * Make style
      a9fdb3de
    • Pedro Cuenca's avatar
      Allow dtype to be specified in Flax pipeline (#600) · fb2fbab1
      Pedro Cuenca authored
      * Fix typo in docstring.
      
      * Allow dtype to be overridden on model load.
      
      This may be a temporary solution until #567 is addressed.
      
      * Create latents in float32
      
      The denoising loop always computes the next step in float32, so this
      would fail when using `bfloat16`.
      fb2fbab1
  25. 19 Sep, 2022 1 commit
  26. 17 Sep, 2022 1 commit
  27. 16 Sep, 2022 1 commit
  28. 14 Sep, 2022 1 commit
  29. 13 Sep, 2022 1 commit
  30. 08 Sep, 2022 1 commit
  31. 01 Sep, 2022 1 commit
  32. 17 Aug, 2022 1 commit
  33. 21 Jul, 2022 1 commit
  34. 20 Jul, 2022 2 commits
  35. 19 Jul, 2022 1 commit