1. 05 Oct, 2023 1 commit
    • Kadir Nar's avatar
      [Core] Add FreeU mechanism (#5164) · 84b82a6c
      Kadir Nar authored
      *  Added Fourier filter function to upsample blocks
      
      * 🔧 Update Fourier_filter for float16 support
      
      *  Added UNetFreeUConfig to UNet model for FreeU adaptation 🛠
      
      ️
      
      * move unet to its original form and add fourier_filter to torch_utils.
      
      * implement freeU enable mechanism
      
      * implement disable mechanism
      
      * resolution index.
      
      * correct resolution idx condition.
      
      * fix copies.
      
      * no need to use resolution_idx in vae.
      
      * spell out the kwargs
      
      * proper config property
      
      * fix attribution setting
      
      * place unet hasattr properly.
      
      * fix: attribute access.
      
      * proper disable
      
      * remove validation method.
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * debug
      
      * potential fix.
      
      * add: doc.
      
      * fix copies
      
      * add: tests.
      
      * add: support freeU in SDXL.
      
      * set default value of resolution idx.
      
      * set default values for resolution_idx.
      
      * fix copies
      
      * fix rest.
      
      * fix copies
      
      * address PR comments.
      
      * run fix-copies
      
      * move apply_free_u to utils and other minors.
      
      * introduce support for video (unet3D)
      
      * minor ups
      
      * consistent fix-copies.
      
      * consistent stuff
      
      * fix-copies
      
      * add: rest
      
      * add: docs.
      
      * fix: tests
      
      * fix: doc path
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * style up
      
      * move to techniques.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for sd freeu.
      
      * add: slow test for video with freeu
      
      * add: slow test for video with freeu
      
      * add: slow test for video with freeu
      
      * style
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      84b82a6c
  2. 04 Oct, 2023 1 commit
  3. 29 Sep, 2023 1 commit
  4. 27 Sep, 2023 1 commit
  5. 26 Sep, 2023 1 commit
  6. 25 Sep, 2023 4 commits
  7. 24 Sep, 2023 1 commit
  8. 22 Sep, 2023 1 commit
  9. 21 Sep, 2023 1 commit
    • Ayush Mangal's avatar
      Add BLIP Diffusion (#4388) · 157c9011
      Ayush Mangal authored
      
      
      * Add BLIP Diffusion skeleton
      
      * Add other model components
      
      * Add BLIP2, need to change it for now
      
      * Fix pipeline imports
      
      * Load pretrained ViT
      
      * Make qformer fwd pass same
      
      * Replicate fwd passes
      
      * Fix device bug
      
      * Add accelerate functions
      
      * Remove extra functions from Blip2
      
      * Minor bug
      
      * Integrate initial review changes
      
      * Refactoring
      
      * Refactoring
      
      * Refactor
      
      * Add controlnet
      
      * Refactor
      
      * Update conversion script
      
      * Add image processor
      
      * Shift postprocessing to ImageProcessor
      
      * Refactor
      
      * Fix device
      
      * Add fast tests
      
      * Update conversion script
      
      * Fix checkpoint conversion script
      
      * Integrate review changes
      
      * Integrate reivew changes
      
      * Remove unused functions from test
      
      * Reuse HF image processor in Cond image
      
      * Create new BlipImageProcessor based on transfomers
      
      * Fix image preprocessor
      
      * Minor
      
      * Minor
      
      * Add canny preprocessing
      
      * Fix controlnet preprocessing
      
      * Fix blip diffusion test
      
      * Add controlnet test
      
      * Add initial doc strings
      
      * Integrate review changes
      
      * Refactor
      
      * Update examples
      
      * Remove DDIM comments
      
      * Add copied from for prepare_latents
      
      * Add type anotations
      
      * Add docstrings
      
      * Do black formatting
      
      * Add batch support
      
      * Make tests pass
      
      * Make controlnet tests pass
      
      * Black formatting
      
      * Fix progress bar
      
      * Fix some licensing comments
      
      * Fix imports
      
      * Refactor controlnet
      
      * Make tests faster
      
      * Edit examples
      
      * Black formatting/Ruff
      
      * Add doc
      
      * Minor
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Move controlnet pipeline
      
      * Make tests faster
      
      * Fix imports
      
      * Fix formatting
      
      * Fix make errors
      
      * Fix make errors
      
      * Minor
      
      * Add suggested doc changes
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Edit docs
      
      * Fix 16 bit loading
      
      * Update examples
      
      * Edit toctree
      
      * Update docs/source/en/api/pipelines/blip_diffusion.md
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Minor
      
      * Add tips
      
      * Edit examples
      
      * Update model paths
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      157c9011
  10. 20 Sep, 2023 1 commit
  11. 18 Sep, 2023 2 commits
  12. 15 Sep, 2023 2 commits
  13. 14 Sep, 2023 1 commit
  14. 13 Sep, 2023 5 commits
  15. 11 Sep, 2023 3 commits
    • Kashif Rasul's avatar
      Wuerstchen fixes (#4942) · 16a056a7
      Kashif Rasul authored
      
      
      * fix arguments and make example code work
      
      * change arguments in combined test
      
      * Add default timesteps
      
      * style
      
      * fixed test
      
      * fix broken test
      
      * formatting
      
      * fix docstrings
      
      * fix  num_images_per_prompt
      
      * fix doc styles
      
      * please dont change this
      
      * fix tests
      
      * rename to DEFAULT_STAGE_C_TIMESTEPS
      
      ---------
      Co-authored-by: default avatarDominic Rampas <d6582533@gmail.com>
      16a056a7
    • Dhruv Nair's avatar
      Lazy Import for Diffusers (#4829) · b6e0b016
      Dhruv Nair authored
      
      
      * initial commit
      
      * move modules to import struct
      
      * add dummy objects and _LazyModule
      
      * add lazy import to schedulers
      
      * clean up unused imports
      
      * lazy import on models module
      
      * lazy import for schedulers module
      
      * add lazy import to pipelines module
      
      * lazy import altdiffusion
      
      * lazy import audio diffusion
      
      * lazy import audioldm
      
      * lazy import consistency model
      
      * lazy import controlnet
      
      * lazy import dance diffusion ddim ddpm
      
      * lazy import deepfloyd
      
      * lazy import kandinksy
      
      * lazy imports
      
      * lazy import semantic diffusion
      
      * lazy imports
      
      * lazy import stable diffusion
      
      * move sd output to its own module
      
      * clean up
      
      * lazy import t2iadapter
      
      * lazy import unclip
      
      * lazy import versatile and vq diffsuion
      
      * lazy import vq diffusion
      
      * helper to fetch objects from modules
      
      * lazy import sdxl
      
      * lazy import txt2vid
      
      * lazy import stochastic karras
      
      * fix model imports
      
      * fix bug
      
      * lazy import
      
      * clean up
      
      * clean up
      
      * fixes for tests
      
      * fixes for tests
      
      * clean up
      
      * remove import of torch_utils from utils module
      
      * clean up
      
      * clean up
      
      * fix mistake import statement
      
      * dedicated modules for exporting and loading
      
      * remove testing utils from utils module
      
      * fixes from  merge conflicts
      
      * Update src/diffusers/pipelines/kandinsky2_2/__init__.py
      
      * fix docs
      
      * fix alt diffusion copied from
      
      * fix check dummies
      
      * fix more docs
      
      * remove accelerate import from utils module
      
      * add type checking
      
      * make style
      
      * fix check dummies
      
      * remove torch import from xformers check
      
      * clean up error message
      
      * fixes after upstream merges
      
      * dummy objects fix
      
      * fix tests
      
      * remove unused module import
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      b6e0b016
    • Sayak Paul's avatar
      [Docs] fix: minor formatting in the Würstchen docs (#4965) · 88735249
      Sayak Paul authored
      fix: minor formatting in the docs
      88735249
  16. 09 Sep, 2023 1 commit
  17. 08 Sep, 2023 1 commit
    • Suraj Patil's avatar
      [examples] T2IAdapter training script (#4934) · dfec61f4
      Suraj Patil authored
      
      
      * add t2i_example script
      
      * remove in channels logic
      
      * remove comments
      
      * remove use_euler arg
      
      * add requirements
      
      * only use canny example
      
      * use datasets
      
      * comments
      
      * make log_validation consistent with other scripts
      
      * add readme
      
      * fix title in readme
      
      * update check_min_version
      
      * change a few minor things.
      
      * add doc entry
      
      * add: test for t2i adapter training
      
      * remove use_auth_token
      
      * fix: logged info.
      
      * remove tests for now.
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      dfec61f4
  18. 07 Sep, 2023 1 commit
  19. 06 Sep, 2023 3 commits
    • Kashif Rasul's avatar
      Würstchen model (#3849) · 541bb6ee
      Kashif Rasul authored
      
      
      * initial
      
      * initial
      
      * added initial convert script for paella vqmodel
      
      * initial wuerstchen pipeline
      
      * add LayerNorm2d
      
      * added modules
      
      * fix typo
      
      * use model_v2
      
      * embed clip caption amd negative_caption
      
      * fixed name of var
      
      * initial modules in one place
      
      * WuerstchenPriorPipeline
      
      * inital shape
      
      * initial denoising prior loop
      
      * fix output
      
      * add WuerstchenPriorPipeline to __init__.py
      
      * use the noise ratio in the Prior
      
      * try to save pipeline
      
      * save_pretrained working
      
      * Few additions
      
      * add _execution_device
      
      * shape is int
      
      * fix batch size
      
      * fix shape of ratio
      
      * fix shape of ratio
      
      * fix output dataclass
      
      * tests folder
      
      * fix formatting
      
      * fix float16 + started with generator
      
      * Update pipeline_wuerstchen.py
      
      * removed vqgan code
      
      * add WuerstchenGeneratorPipeline
      
      * fix WuerstchenGeneratorPipeline
      
      * fix docstrings
      
      * fix imports
      
      * convert generator pipeline
      
      * fix convert
      
      * Work on Generator Pipeline. WIP
      
      * Pipeline works with our diffuzz code
      
      * apply scale factor
      
      * removed vqgan.py
      
      * use cosine schedule
      
      * redo the denoising loop
      
      * Update src/diffusers/models/resnet.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * use torch.lerp
      
      * use warp-diffusion org
      
      * clip_sample=False,
      
      * some refactoring
      
      * use model_v3_stage_c
      
      * c_cond size
      
      * use clip-bigG
      
      * allow stage b clip to be None
      
      * add dummy
      
      * würstchen scheduler
      
      * minor changes
      
      * set clip=None in the pipeline
      
      * fix attention mask
      
      * add attention_masks to text_encoder
      
      * make fix-copies
      
      * add back clip
      
      * add text_encoder
      
      * gen_text_encoder and tokenizer
      
      * fix import
      
      * updated pipeline test
      
      * undo changes to pipeline test
      
      * nip
      
      * fix typo
      
      * fix output name
      
      * set guidance_scale=0 and remove diffuze
      
      * fix doc strings
      
      * make style
      
      * nip
      
      * removed unused
      
      * initial docs
      
      * rename
      
      * toc
      
      * cleanup
      
      * remvoe test script
      
      * fix-copies
      
      * fix multi images
      
      * remove dup
      
      * remove unused modules
      
      * undo changes for debugging
      
      * no  new line
      
      * remove dup conversion script
      
      * fix doc string
      
      * cleanup
      
      * pass default args
      
      * dup permute
      
      * fix some tests
      
      * fix prepare_latents
      
      * move Prior class to modules
      
      * offload only the text encoder and vqgan
      
      * fix resolution calculation for prior
      
      * nip
      
      * removed testing script
      
      * fix shape
      
      * fix argument to set_timesteps
      
      * do not change .gitignore
      
      * fix resolution calculations + readme
      
      * resolution calculation fix + readme
      
      * small fixes
      
      * Add combined pipeline
      
      * rename generator -> decoder
      
      * Update .gitignore
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * removed efficient_net
      
      * create combined WuerstchenPipeline
      
      * make arguments consistent with VQ model
      
      * fix var names
      
      * no need to return text_encoder_hidden_states
      
      * add latent_dim_scale to config
      
      * split model into its own file
      
      * add WuerschenPipeline to docs
      
      * remove unused latent_size
      
      * register latent_dim_scale
      
      * update script
      
      * update docstring
      
      * use Attention preprocessor
      
      * concat with normed input
      
      * fix-copies
      
      * add docs
      
      * fix test
      
      * fix style
      
      * add to cpu_offloaded_model
      
      * updated type
      
      * remove 1-line func
      
      * updated type
      
      * initial decoder test
      
      * formatting
      
      * formatting
      
      * fix autodoc link
      
      * num_inference_steps is int
      
      * remove comments
      
      * fix example in docs
      
      * Update src/diffusers/pipelines/wuerstchen/diffnext.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * rename layernorm to WuerstchenLayerNorm
      
      * rename DiffNext to WuerstchenDiffNeXt
      
      * added comment about MixingResidualBlock
      
      * move paella vq-vae to pipelines' folder
      
      * initial decoder test
      
      * increased test_float16_inference expected diff
      
      * self_attn is always true
      
      * more passing decoder tests
      
      * batch image_embeds
      
      * fix failing tests
      
      * set the correct dtype
      
      * relax inference test
      
      * update prior
      
      * added combined pipeline test
      
      * faster test
      
      * faster test
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * fix issues from review
      
      * update wuerstchen.md + change generator name
      
      * resolve issues
      
      * fix copied from usage and add back batch_size
      
      * fix API
      
      * fix arguments
      
      * fix combined test
      
      * Added timesteps argument + fixes
      
      * Update tests/pipelines/test_pipelines_common.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update tests/pipelines/wuerstchen/test_wuerstchen_prior.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
      
      * up
      
      * Fix more
      
      * failing tests
      
      * up
      
      * up
      
      * correct naming
      
      * correct docs
      
      * correct docs
      
      * fix test params
      
      * correct docs
      
      * fix classifier free guidance
      
      * fix classifier free guidance
      
      * fix more
      
      * fix all
      
      * make tests faster
      
      ---------
      Co-authored-by: default avatarDominic Rampas <d6582533@gmail.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarDominic Rampas <61938694+dome272@users.noreply.github.com>
      541bb6ee
    • dg845's avatar
      [docs] Fix typo in Inpainting force unmasked area unchanged example (#4910) · b76274cb
      dg845 authored
      Fix typo by replacing init_image_arr and repainted_image_arr with init_image and repainted_image, respectively.
      b76274cb
    • Sayak Paul's avatar
      [Docs] add doc entry to explain lora fusion and use of different scales. (#4893) · 6c314ad0
      Sayak Paul authored
      
      
      * add doc entry to explain lora fusion and use of different scales.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      6c314ad0
  20. 05 Sep, 2023 1 commit
  21. 02 Sep, 2023 1 commit
  22. 01 Sep, 2023 5 commits
    • Steven Liu's avatar
      [docs] DiffEdit guide (#4722) · 22ea35cf
      Steven Liu authored
      * first draft
      
      * minor edits
      22ea35cf
    • Seongsu Park's avatar
      [Docs] Korean translation update (#4684) · 0c775544
      Seongsu Park authored
      
      
      * Docs kr update 3
      
      controlnet, reproducibility 업로드
      
      generator 그대로 사용
      seamless multi-GPU 그대로 사용
      
      create_dataset 번역 1차
      
      stable_diffusion_jax
      
      new translation
      
      Add coreml, tome
      
      kr docs minor fix
      
      translate training/instructpix2pix
      
      fix training/instructpix2pix.mdx
      
      using-diffusers/weighting_prompts 번역 1차
      
      add SDXL docs
      
      Translate using-diffuers/loading_overview.md
      
      translate using-diffusers/textual_inversion_inference.md
      
      Conditional image generation (#37)
      
      * stable_diffusion_jax
      
      * index_update
      
      * index_update
      
      * condition_image_generation
      
      ---------
      Co-authored-by: default avatarSeongsu Park <tjdtnsu@gmail.com>
      
      jihwan/stable_diffusion.mdx
      
      custom_diffusion 작업 완료
      
      quicktour 작업 완료
      
      distributed inference & control brightness (#40)
      
      * distributed_inference.mdx
      
      * control_brightness
      
      ---------
      Co-authored-by: default avataridra79haza <idra79haza@github.com>
      Co-authored-by: default avatarSeongsu Park <tjdtnsu@gmail.com>
      
      using_safetensors (#41)
      
      * distributed_inference.mdx
      
      * control_brightness
      
      * using_safetensors.mdx
      
      ---------
      Co-authored-by: default avataridra79haza <idra79haza@github.com>
      Co-authored-by: default avatarSeongsu Park <tjdtnsu@gmail.com>
      
      delete safetensor short
      
      * Repace mdx to md
      
      * toctree update
      
      * Add controlling_generation
      
      * toctree fix
      
      * colab link, minor fix
      
      * docs name typo fix
      
      * frontmatter fix
      
      * translation fix
      0c775544
    • Pedro Cuenca's avatar
      Fix link from API to using-diffusers (#4856) · 60d259ad
      Pedro Cuenca authored
      * Fix link from API to using-diffusers
      
      * Fix link
      60d259ad
    • Nguyễn Công Tú Anh's avatar
      Add GLIGEN Text Image implementation (#4777) · 38466c36
      Nguyễn Công Tú Anh authored
      * Add GLIGEN Text Image implementation
      
      * add style transfer from image
      
      * fix check_repository_consistency
      
      * add convert script GLIGEN model to Diffusers
      
      * rename attention type
      
      * fix style code
      
      * remove PositionNetTextImage
      
      * Revert "fix check_repository_consistency"
      
      This reverts commit 15f098c96e00bb9e67b831161615b30a2d28d815.
      
      * change attention type name
      
      * update docs for GLIGEN
      
      * change examples with hf-document-image
      
      * fix style
      
      * add CLIPImageProjection for GLIGEN
      
      * Add new encode_prompt, load project matrix in pipe init
      
      * move CLIPImageProjection to stable_diffusion
      
      * add comment
      38466c36
    • dg845's avatar
      [docs] Add inpainting example for forcing the unmasked area to remain unchanged to the docs (#4536) · 5f740d0f
      dg845 authored
      
      
      * Initial code to add force_unmasked_unchanged argument to StableDiffusionInpaintPipeline.__call__.
      
      * Try to improve StableDiffusionInpaintPipelineFastTests.get_dummy_inputs.
      
      * Use original mask to preserve unmasked pixels in pixel space rather than latent space.
      
      * make style
      
      * start working on note in docs to force unmasked area to be unchanged
      
      * Add example of forcing the unmasked area to remain unchanged.
      
      * Revert "make style"
      
      This reverts commit fa7759293af916c665f683387a52fd789ed10531.
      
      * Revert "Use original mask to preserve unmasked pixels in pixel space rather than latent space."
      
      This reverts commit 092bd0e9e9628f02ff917aafb2a5c9252776b6e9.
      
      * Revert "Try to improve StableDiffusionInpaintPipelineFastTests.get_dummy_inputs."
      
      This reverts commit ff41cf43c5a820057289e0852fb41b3e2074d86d.
      
      * Revert "Initial code to add force_unmasked_unchanged argument to StableDiffusionInpaintPipeline.__call__."
      
      This reverts commit 989979752a1c9e6e16e92d8f1b3d14b70829fbb5.
      
      ---------
      Co-authored-by: default avatarWill Berman <wlbberman@gmail.com>
      5f740d0f
  23. 31 Aug, 2023 1 commit
    • Steven Liu's avatar
      [docs] ControlNet guide (#4640) · aedd7876
      Steven Liu authored
      * first draft
      
      * finish first draft
      
      * feedback and remove sections from API pages
      
      * clean docstrings
      
      * add full code example
      aedd7876