1. 17 May, 2023 3 commits
    • Vimarsh Chaturvedi's avatar
    • Rupert Menneer's avatar
      Adding 'strength' parameter to StableDiffusionInpaintingPipeline (#3424) · c09c4f3a
      Rupert Menneer authored
      
      
      * Added explanation of 'strength' parameter
      
      * Added get_timesteps function which relies on new strength parameter
      
      * Added `strength` parameter which defaults to 1.
      
      * Swapped ordering so `noise_timestep` can be calculated before masking the image
      
      this is required when you aren't applying 100% noise to the masked region, e.g. strength < 1.
      
      * Added strength to check_inputs, throws error if out of range
      
      * Changed `prepare_latents` to initialise latents w.r.t strength
      
      inspired from the stable diffusion img2img pipeline, init latents are initialised by converting the init image into a VAE latent and adding noise (based upon the strength parameter passed in), e.g. random when strength = 1, or the init image at strength = 0.
      
      * WIP: Added a unit test for the new strength parameter in the StableDiffusionInpaintingPipeline
      
      still need to add correct regression values
      
      * Created a is_strength_max to initialise from pure random noise
      
      * Updated unit tests w.r.t new strength parameter + fixed new strength unit test
      
      * renamed parameter to avoid confusion with variable of same name
      
      * Updated regression values for new strength test - now passes
      
      * removed 'copied from' comment as this method is now different and divergent from the cpy
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Ensure backwards compatibility for prepare_mask_and_masked_image
      
      created a return_image boolean and initialised to false
      
      * Ensure backwards compatibility for prepare_latents
      
      * Fixed copy check typo
      
      * Fixes w.r.t backward compibility changes
      
      * make style
      
      * keep function argument ordering same for backwards compatibility in callees with copied from statements
      
      * make fix-copies
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarWilliam Berman <WLBberman@gmail.com>
      c09c4f3a
    • Dev Aggarwal's avatar
      Allow arbitrary aspect ratio in IFSuperResolutionPipeline (#3298) · 6070b32f
      Dev Aggarwal authored
      
      
      * Update pipeline_if_superresolution.py
      
      Allow arbitrary aspect ratio in IFSuperResolutionPipeline by using the input image shape
      
      * IFSuperResolutionPipeline: allow the user to override the height and width through the arguments
      
      * update IFSuperResolutionPipeline width/height doc string to match StableDiffusionInpaintPipeline conventions
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      6070b32f
  2. 16 May, 2023 5 commits
  3. 15 May, 2023 1 commit
  4. 12 May, 2023 2 commits
  5. 11 May, 2023 4 commits
  6. 10 May, 2023 3 commits
  7. 09 May, 2023 3 commits
    • Steven Liu's avatar
      [docs] Improve safetensors docstring (#3368) · 26832aa5
      Steven Liu authored
      * clarify safetensor docstring
      
      * fix typo
      
      * apply feedback
      26832aa5
    • YiYi Xu's avatar
      Postprocessing refactor all others (#3337) · c5594795
      YiYi Xu authored
      
      
      * add text2img
      
      * fix-copies
      
      * add
      
      * add all other pipelines
      
      * add
      
      * add
      
      * add
      
      * add
      
      * add
      
      * make style
      
      * style + fix copies
      
      ---------
      Co-authored-by: default avataryiyixuxu <yixu310@gmail,com>
      c5594795
    • Will Berman's avatar
      if dreambooth lora (#3360) · a757b2db
      Will Berman authored
      * update IF stage I pipelines
      
      add fixed variance schedulers and lora loading
      
      * added kv lora attn processor
      
      * allow loading into alternative lora attn processor
      
      * make vae optional
      
      * throw away predicted variance
      
      * allow loading into added kv lora layer
      
      * allow load T5
      
      * allow pre compute text embeddings
      
      * set new variance type in schedulers
      
      * fix copies
      
      * refactor all prompt embedding code
      
      class prompts are now included in pre-encoding code
      max tokenizer length is now configurable
      embedding attention mask is now configurable
      
      * fix for when variance type is not defined on scheduler
      
      * do not pre compute validation prompt if not present
      
      * add example test for if lora dreambooth
      
      * add check for train text encoder and pre compute text embeddings
      a757b2db
  8. 08 May, 2023 3 commits
  9. 06 May, 2023 2 commits
  10. 05 May, 2023 4 commits
  11. 03 May, 2023 2 commits
  12. 02 May, 2023 1 commit
  13. 01 May, 2023 3 commits
  14. 28 Apr, 2023 4 commits
    • Will Berman's avatar
      temp disable spectogram diffusion tests (#3278) · 384c83aa
      Will Berman authored
      The note-seq package throws an error on import because the default installed version of Ipython
      is not compatible with python 3.8 which we run in the CI.
      https://github.com/huggingface/diffusers/actions/runs/4830121056/jobs/8605954838#step:7:9
      384c83aa
    • Patrick von Platen's avatar
      Allow disabling torch 2_0 attention (#3273) · 4d35d7fe
      Patrick von Platen authored
      * Allow disabling torch 2_0 attention
      
      * make style
      
      * Update src/diffusers/models/attention.py
      4d35d7fe
    • Jason Kuan's avatar
      add constant learning rate with custom rule (#3133) · a7b0671c
      Jason Kuan authored
      * add constant lr with rules
      
      * add constant with rules in TYPE_TO_SCHEDULER_FUNCTION
      
      * add constant lr rate with rule
      
      * hotfix code quality
      
      * fix doc style
      
      * change name constant_with_rules to piecewise constant
      a7b0671c
    • clarencechen's avatar
      Diffedit Zero-Shot Inpainting Pipeline (#2837) · be0bfcec
      clarencechen authored
      * Update Pix2PixZero Auto-correlation Loss
      
      * Add Stable Diffusion DiffEdit pipeline
      
      * Add draft documentation and import code
      
      * Bugfixes and refactoring
      
      * Add option to not decode latents in the inversion process
      
      * Harmonize preprocessing
      
      * Revert "Update Pix2PixZero Auto-correlation Loss"
      
      This reverts commit b218062fed08d6cc164206d6cb852b2b7b00847a.
      
      * Update annotations
      
      * rename `compute_mask` to `generate_mask`
      
      * Update documentation
      
      * Update docs
      
      * Update Docs
      
      * Fix copy
      
      * Change shape of output latents to batch first
      
      * Update docs
      
      * Add first draft for tests
      
      * Bugfix and update tests
      
      * Add `cross_attention_kwargs` support for all pipeline methods
      
      * Fix Copies
      
      * Add support for PIL image latents
      
      Add support for mask broadcasting
      
      Update docs and tests
      
      Align `mask` argument to `mask_image`
      
      Remove height and width arguments
      
      * Enable MPS Tests
      
      * Move example docstrings
      
      * Fix test
      
      * Fix test
      
      * fix pipeline inheritance
      
      * Harmonize `prepare_image_latents` with StableDiffusionPix2PixZeroPipeline
      
      * Register modules set to `None` in config for `test_save_load_optional_components`
      
      * Move fixed logic to specific test class
      
      * Clean changes to other pipelines
      
      * Update new tests to coordinate with #2953
      
      * Update slow tests for better results
      
      * Safety to avoid potential problems with torch.inference_mode
      
      * Add reference in SD Pipeline Overview
      
      * Fix tests again
      
      * Enforce determinism in noise for generate_mask
      
      * Fix copies
      
      * Widen test tolerance for fp16 based on `test_stable_diffusion_upscale_pipeline_fp16`
      
      * Add LoraLoaderMixin and update `prepare_image_latents`
      
      * clean up repeat and reg
      
      * bugfix
      
      * Remove invalid args from docs
      
      Suppress spurious warning by repeating image before latent to mask gen
      be0bfcec