1. 30 Nov, 2022 1 commit
  2. 29 Nov, 2022 1 commit
    • Ilmari Heikkinen's avatar
      StableDiffusion: Decode latents separately to run larger batches (#1150) · c28d3c82
      Ilmari Heikkinen authored
      
      
      * StableDiffusion: Decode latents separately to run larger batches
      
      * Move VAE sliced decode under enable_vae_sliced_decode and vae.enable_sliced_decode
      
      * Rename sliced_decode to slicing
      
      * fix whitespace
      
      * fix quality check and repository consistency
      
      * VAE slicing tests and documentation
      
      * API doc hooks for VAE slicing
      
      * reformat vae slicing tests
      
      * Skip VAE slicing for one-image batches
      
      * Documentation tweaks for VAE slicing
      Co-authored-by: default avatarIlmari Heikkinen <ilmari@fhtr.org>
      c28d3c82
  3. 25 Nov, 2022 3 commits
  4. 23 Nov, 2022 2 commits
    • Patrick von Platen's avatar
      [Versatile Diffusion] Add versatile diffusion model (#1283) · 2625fb59
      Patrick von Platen authored
      
      
      * up
      
      * convert dual unet
      
      * revert dual attn
      
      * adapt for vd-official
      
      * test the full pipeline
      
      * mixed inference
      
      * mixed inference for text2img
      
      * add image prompting
      
      * fix clip norm
      
      * split text2img and img2img
      
      * fix format
      
      * refactor text2img
      
      * mega pipeline
      
      * add optimus
      
      * refactor image var
      
      * wip text_unet
      
      * text unet end to end
      
      * update tests
      
      * reshape
      
      * fix image to text
      
      * add some first docs
      
      * dual guided pipeline
      
      * fix token ratio
      
      * propose change
      
      * dual transformer as a native module
      
      * DualTransformer(nn.Module)
      
      * DualTransformer(nn.Module)
      
      * correct unconditional image
      
      * save-load with mega pipeline
      
      * remove image to text
      
      * up
      
      * uP
      
      * fix
      
      * up
      
      * final fix
      
      * remove_unused_weights
      
      * test updates
      
      * save progress
      
      * uP
      
      * fix dual prompts
      
      * some fixes
      
      * finish
      
      * style
      
      * finish renaming
      
      * up
      
      * fix
      
      * fix
      
      * fix
      
      * finish
      Co-authored-by: default avataranton-l <anton@huggingface.co>
      2625fb59
    • Suraj Patil's avatar
      StableDiffusionImageVariationPipeline (#1365) · 0eb507f2
      Suraj Patil authored
      
      
      * add StableDiffusionImageVariationPipeline
      
      * add ini init
      
      * use CLIPVisionModelWithProjection
      
      * fix _encode_image
      
      * add copied from
      
      * fix copies
      
      * add doc
      
      * handle tensor in _encode_image
      
      * add tests
      
      * correct model_id
      
      * remove copied from in enable_sequential_cpu_offload
      
      * fix tests
      
      * make slow tests pass
      
      * update slow tests
      
      * use temp model for now
      
      * fix test_stable_diffusion_img_variation_intermediate_state
      
      * fix test_stable_diffusion_img_variation_intermediate_state
      
      * check for torch.Tensor
      
      * quality
      
      * fix name
      
      * fix slow tests
      
      * install transformers from source
      
      * fix install
      
      * fix install
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * input_image -> image
      
      * remove deprication warnings
      
      * fix test_stable_diffusion_img_variation_multiple_images
      
      * make flake happy
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      0eb507f2
  5. 22 Nov, 2022 1 commit
    • Manuel Brack's avatar
      Add Safe Stable Diffusion Pipeline (#1244) · e50c25d8
      Manuel Brack authored
      
      
      * Add pipeline_stable_diffusion_safe.py to pipelines
      
      * Fix repository consistency
      
      Ran make fix-copies after adding new pipline
      
      * Add Paper/Equation reference for parameters to doc string
      
      * Ensure code style and quality
      
      * Perform code refactoring
      
      * Fix copies inherited from merge with huggingface/main
      
      * Add docs
      
      * Fix code style
      
      * Fix errors in documentation
      
      * Fix refactoring error
      
      * remove debugging print statement
      
      * added Safe Latent Diffusion tests
      
      * Fix style
      
      * Fix style
      
      * Add pre-defined safety configurations
      
      * Fix line-break
      
      * fix some tests
      
      * finish
      
      * Change safety checker
      
      * Add missing safety_checker.py file
      
      * Remove unused imports
      Co-authored-by: default avatarPatrickSchrML <patrick_schramowski@hotmail.de>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      e50c25d8
  6. 21 Nov, 2022 1 commit
  7. 17 Nov, 2022 2 commits
  8. 16 Nov, 2022 1 commit
  9. 15 Nov, 2022 2 commits
  10. 09 Nov, 2022 2 commits
  11. 04 Nov, 2022 1 commit
    • Chen Wu (吴尘)'s avatar
      Add CycleDiffusion pipeline using Stable Diffusion (#888) · 9d8943b7
      Chen Wu (吴尘) authored
      
      
      * Add CycleDiffusion pipeline for Stable Diffusion
      
      * Add the option of passing noise to DDIMScheduler
      
      Add the option of providing the noise itself to DDIMScheduler, instead of the random seed generator.
      
      * Update README.md
      
      * Update README.md
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update scheduling_ddim.py
      
      * Update import format
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update scheduling_ddim.py
      
      * Update src/diffusers/schedulers/scheduling_ddim.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/schedulers/scheduling_ddim.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/schedulers/scheduling_ddim.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/schedulers/scheduling_ddim.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/schedulers/scheduling_ddim.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update scheduling_ddim.py
      
      * Update scheduling_ddim.py
      
      * Update scheduling_ddim.py
      
      * add two tests
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Update README.md
      
      * Rename pipeline name as suggested in the latest reviewer comment
      
      * Update test_pipelines.py
      
      * Update test_pipelines.py
      
      * Update test_pipelines.py
      
      * Update pipeline_stable_diffusion_cycle_diffusion.py
      
      * Remove the generator
      
      This generator does not control all randomness during sampling, which can be misleading.
      
      * Update optimal hyperparameters
      
      * Update src/diffusers/pipelines/stable_diffusion/README.md
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Update src/diffusers/pipelines/stable_diffusion/README.md
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Update src/diffusers/pipelines/stable_diffusion/README.md
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * Apply suggestions from code review
      
      * uP
      
      * Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_cycle_diffusion.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      
      * up
      
      * up
      
      * Replace assert with ValueError
      
      * finish docs
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      9d8943b7
  12. 03 Nov, 2022 2 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
    • 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
  13. 02 Nov, 2022 2 commits
  14. 25 Oct, 2022 1 commit
  15. 24 Oct, 2022 2 commits
  16. 20 Oct, 2022 1 commit
  17. 19 Oct, 2022 1 commit
  18. 05 Oct, 2022 2 commits
  19. 23 Sep, 2022 1 commit
  20. 22 Sep, 2022 1 commit
  21. 12 Sep, 2022 1 commit
  22. 08 Sep, 2022 4 commits
  23. 07 Sep, 2022 5 commits