1. 28 Apr, 2025 1 commit
  2. 09 Apr, 2025 1 commit
  3. 08 Apr, 2025 1 commit
  4. 04 Apr, 2025 1 commit
  5. 02 Apr, 2025 1 commit
  6. 20 Mar, 2025 1 commit
  7. 19 Mar, 2025 1 commit
  8. 14 Mar, 2025 1 commit
  9. 21 Jan, 2025 1 commit
    • Fanli Lin's avatar
      [tests] make tests device-agnostic (part 3) (#10437) · ec37e209
      Fanli Lin authored
      
      
      * initial comit
      
      * fix empty cache
      
      * fix one more
      
      * fix style
      
      * update device functions
      
      * update
      
      * update
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update tests/pipelines/controlnet/test_controlnet.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * Update tests/pipelines/controlnet/test_controlnet.py
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      
      * with gc.collect
      
      * update
      
      * make style
      
      * check_torch_dependencies
      
      * add mps empty cache
      
      * bug fix
      
      * Apply suggestions from code review
      
      ---------
      Co-authored-by: default avatarhlky <hlky@hlky.ac>
      ec37e209
  10. 14 Jan, 2025 1 commit
    • Marc Sun's avatar
      [FEAT] DDUF format (#10037) · fbff43ac
      Marc Sun authored
      
      
      * load and save dduf archive
      
      * style
      
      * switch to zip uncompressed
      
      * updates
      
      * Update src/diffusers/pipelines/pipeline_utils.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update src/diffusers/pipelines/pipeline_utils.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * first draft
      
      * remove print
      
      * switch to dduf_file for consistency
      
      * switch to huggingface hub api
      
      * fix log
      
      * add a basic test
      
      * Update src/diffusers/configuration_utils.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update src/diffusers/pipelines/pipeline_utils.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Update src/diffusers/pipelines/pipeline_utils.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * fix
      
      * fix variant
      
      * change saving logic
      
      * DDUF - Load transformers components manually (#10171)
      
      * update hfh version
      
      * Load transformers components manually
      
      * load encoder from_pretrained with state_dict
      
      * working version with transformers and tokenizer !
      
      * add generation_config case
      
      * fix tests
      
      * remove saving for now
      
      * typing
      
      * need next version from transformers
      
      * Update src/diffusers/configuration_utils.py
      Co-authored-by: default avatarLucain <lucain@huggingface.co>
      
      * check path corectly
      
      * Apply suggestions from code review
      Co-authored-by: default avatarLucain <lucain@huggingface.co>
      
      * udapte
      
      * typing
      
      * remove check for subfolder
      
      * quality
      
      * revert setup changes
      
      * oups
      
      * more readable condition
      
      * add loading from the hub test
      
      * add basic docs.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarLucain <lucain@huggingface.co>
      
      * add example
      
      * add
      
      * make functions private
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * minor.
      
      * fixes
      
      * fix
      
      * change the precdence of parameterized.
      
      * error out when custom pipeline is passed with dduf_file.
      
      * updates
      
      * fix
      
      * updates
      
      * fixes
      
      * updates
      
      * fix xfail condition.
      
      * fix xfail
      
      * fixes
      
      * sharded checkpoint compat
      
      * add test for sharded checkpoint
      
      * add suggestions
      
      * Update src/diffusers/models/model_loading_utils.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * from suggestions
      
      * add class attributes to flag dduf tests
      
      * last one
      
      * fix logic
      
      * remove comment
      
      * revert changes
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarLucain <lucain@huggingface.co>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      fbff43ac
  11. 23 Dec, 2024 1 commit
  12. 17 Dec, 2024 1 commit
  13. 16 Dec, 2024 1 commit
  14. 22 Nov, 2024 1 commit
    • Fanli Lin's avatar
      make `pipelines` tests device-agnostic (part1) (#9399) · 64b3e0f5
      Fanli Lin authored
      
      
      * enable on xpu
      
      * add 1 more
      
      * add one more
      
      * enable more
      
      * add 1 more
      
      * add more
      
      * enable 1
      
      * enable more cases
      
      * enable
      
      * enable
      
      * update comment
      
      * one more
      
      * enable 1
      
      * add more cases
      
      * enable xpu
      
      * add one more caswe
      
      * add more cases
      
      * add 1
      
      * add more
      
      * add more cases
      
      * add case
      
      * enable
      
      * add more
      
      * add more
      
      * add more
      
      * enbale more
      
      * add more
      
      * update code
      
      * update test marker
      
      * add skip back
      
      * update comment
      
      * remove single files
      
      * remove
      
      * style
      
      * add
      
      * revert
      
      * reformat
      
      * update decorator
      
      * update
      
      * update
      
      * update
      
      * Update tests/pipelines/deepfloyd_if/test_if.py
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * Update src/diffusers/utils/testing_utils.py
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * Update tests/pipelines/animatediff/test_animatediff_controlnet.py
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * Update tests/pipelines/animatediff/test_animatediff.py
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * Update tests/pipelines/animatediff/test_animatediff_controlnet.py
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      
      * update float16
      
      * no unitest.skipt
      
      * update
      
      * apply style check
      
      * reapply format
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      64b3e0f5
  15. 31 Oct, 2024 1 commit
    • Sayak Paul's avatar
      [CI] add a big GPU marker to run memory-intensive tests separately on CI (#9691) · ff182ad6
      Sayak Paul authored
      
      
      * add a marker for big gpu tests
      
      * update
      
      * trigger on PRs temporarily.
      
      * onnx
      
      * fix
      
      * total memory
      
      * fixes
      
      * reduce memory threshold.
      
      * bigger gpu
      
      * empty
      
      * g6e
      
      * Apply suggestions from code review
      
      * address comments.
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * fix
      
      * okay
      
      * further reduce.
      
      * updates
      
      * remove
      
      * updates
      
      * updates
      
      * updates
      
      * updates
      
      * fixes
      
      * fixes
      
      * updates.
      
      * fix
      
      * workflow fixes.
      
      ---------
      Co-authored-by: default avatarAryan <aryan@huggingface.co>
      ff182ad6
  16. 23 Oct, 2024 1 commit
  17. 21 Oct, 2024 1 commit
    • Sayak Paul's avatar
      [Quantization] Add quantization support for `bitsandbytes` (#9213) · b821f006
      Sayak Paul authored
      * quantization config.
      
      * fix-copies
      
      * fix
      
      * modules_to_not_convert
      
      * add bitsandbytes utilities.
      
      * make progress.
      
      * fixes
      
      * quality
      
      * up
      
      * up
      
      rotary embedding refactor 2: update comments, fix dtype for use_real=False (#9312)
      
      fix notes and dtype
      
      up
      
      up
      
      * minor
      
      * up
      
      * up
      
      * fix
      
      * provide credits where due.
      
      * make configurations work.
      
      * fixes
      
      * fix
      
      * update_missing_keys
      
      * fix
      
      * fix
      
      * make it work.
      
      * fix
      
      * provide credits to transformers.
      
      * empty commit
      
      * handle to() better.
      
      * tests
      
      * change to bnb from bitsandbytes
      
      * fix tests
      
      fix slow quality tests
      
      SD3 remark
      
      fix
      
      complete int4 tests
      
      add a readme to the test files.
      
      add model cpu offload tests
      
      warning test
      
      * better safeguard.
      
      * change merging status
      
      * courtesy to transformers.
      
      * move  upper.
      
      * better
      
      * make the unused kwargs warning friendlier.
      
      * harmonize changes with https://github.com/huggingface/transformers/pull/33122
      
      
      
      * style
      
      * trainin tests
      
      * feedback part i.
      
      * Add Flux inpainting and Flux Img2Img (#9135)
      
      ---------
      Co-authored-by: default avataryiyixuxu <yixu310@gmail.com>
      
      Update `UNet2DConditionModel`'s error messages (#9230)
      
      * refactor
      
      [CI] Update Single file Nightly Tests (#9357)
      
      * update
      
      * update
      
      feedback.
      
      improve README for flux dreambooth lora (#9290)
      
      * improve readme
      
      * improve readme
      
      * improve readme
      
      * improve readme
      
      fix one uncaught deprecation warning for accessing vae_latent_channels in VaeImagePreprocessor (#9372)
      
      deprecation warning vae_latent_channels
      
      add mixed int8 tests and more tests to nf4.
      
      [core] Freenoise memory improvements (#9262)
      
      * update
      
      * implement prompt interpolation
      
      * make style
      
      * resnet memory optimizations
      
      * more memory optimizations; todo: refactor
      
      * update
      
      * update animatediff controlnet with latest changes
      
      * refactor chunked inference changes
      
      * remove print statements
      
      * update
      
      * chunk -> split
      
      * remove changes from incorrect conflict resolution
      
      * remove changes from incorrect conflict resolution
      
      * add explanation of SplitInferenceModule
      
      * update docs
      
      * Revert "update docs"
      
      This reverts commit c55a50a271b2cefa8fe340a4f2a3ab9b9d374ec0.
      
      * update docstring for freenoise split inference
      
      * apply suggestions from review
      
      * add tests
      
      * apply suggestions from review
      
      quantization docs.
      
      docs.
      
      * Revert "Add Flux inpainting and Flux Img2Img (#9135)"
      
      This reverts commit 5799954dd4b3d753c7c1b8d722941350fe4f62ca.
      
      * tests
      
      * don
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      
      * contribution guide.
      
      * changes
      
      * empty
      
      * fix tests
      
      * harmonize with https://github.com/huggingface/transformers/pull/33546
      
      .
      
      * numpy_cosine_distance
      
      * config_dict modification.
      
      * remove if config comment.
      
      * note for load_state_dict changes.
      
      * float8 check.
      
      * quantizer.
      
      * raise an error for non-True low_cpu_mem_usage values when using quant.
      
      * low_cpu_mem_usage shenanigans when using fp32 modules.
      
      * don't re-assign _pre_quantization_type.
      
      * make comments clear.
      
      * remove comments.
      
      * handle mixed types better when moving to cpu.
      
      * add tests to check if we're throwing warning rightly.
      
      * better check.
      
      * fix 8bit test_quality.
      
      * handle dtype more robustly.
      
      * better message when keep_in_fp32_modules.
      
      * handle dtype casting.
      
      * fix dtype checks in pipeline.
      
      * fix warning message.
      
      * Update src/diffusers/models/modeling_utils.py
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      
      * mitigate the confusing cpu warning
      
      ---------
      Co-authored-by: default avatarVishnu V Jaddipal <95531133+Gothos@users.noreply.github.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarYiYi Xu <yixu310@gmail.com>
      b821f006
  18. 09 Oct, 2024 1 commit
  19. 02 Oct, 2024 1 commit
  20. 26 Jun, 2024 1 commit
  21. 15 May, 2024 1 commit
    • Isamu Isozaki's avatar
      Adding VQGAN Training script (#5483) · d27e996c
      Isamu Isozaki authored
      
      
      * Init commit
      
      * Removed einops
      
      * Added default movq config for training
      
      * Update explanation of prompts
      
      * Fixed inheritance of discriminator and init_tracker
      
      * Fixed incompatible api between muse and here
      
      * Fixed output
      
      * Setup init training
      
      * Basic structure done
      
      * Removed attention for quick tests
      
      * Style fixes
      
      * Fixed vae/vqgan styles
      
      * Removed redefinition of wandb
      
      * Fixed log_validation and tqdm
      
      * Nothing commit
      
      * Added commit loss to lookup_from_codebook
      
      * Update src/diffusers/models/vq_model.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Adding perliminary README
      
      * Fixed one typo
      
      * Local changes
      
      * Fixed main issues
      
      * Merging
      
      * Update src/diffusers/models/vq_model.py
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      
      * Testing+Fixed bugs in training script
      
      * Some style fixes
      
      * Added wandb to docs
      
      * Fixed timm test
      
      * get testing suite ready.
      
      * remove return loss
      
      * remove return_loss
      
      * Remove diffs
      
      * Remove diffs
      
      * fix ruff format
      
      ---------
      Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
      Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
      d27e996c
  22. 10 Apr, 2024 1 commit
    • Sayak Paul's avatar
      [Core] add "balanced" `device_map` support to pipelines (#6857) · 3e4a6bd2
      Sayak Paul authored
      
      
      * get device <-> component mapping when using multiple gpus.
      
      * condition the device_map bits.
      
      * relax condition
      
      * device_map progress.
      
      * device_map enhancement
      
      * some cleaning up and debugging
      
      * Apply suggestions from code review
      Co-authored-by: default avatarMarc Sun <57196510+SunMarc@users.noreply.github.com>
      
      * incorporate suggestions from PR.
      
      * remove multi-gpu condition for now.
      
      * guard check the component -> device mapping
      
      * fix: device_memory variable
      
      * dispatching transformers model to have force_hooks=True
      
      * better guarding for transformers device_map
      
      * introduce support balanced_low_memory and balanced_ultra_low_memory.
      
      * remove device_map patch.
      
      * fix: intermediate variable scoping.
      
      * fix: condition in cpu offload.
      
      * fix: flax class restrictions.
      
      * remove modifications from cpu_offload and model_offload
      
      * incorporate changes.
      
      * add a simple forward pass test
      
      * add: torch_device in get_inputs()
      
      * add: tests
      
      * remove print
      
      * safe-guard to(), model offloading and cpu offloading when balanced is used as a device_map.
      
      * style
      
      * remove .
      
      * safeguard device_map with more checks and remove invalid device_mapping strategues.
      
      * make  a class attribute and adjust tests accordingly.
      
      * fix device_map check
      
      * fix test
      
      * adjust comment
      
      * fix: device_map attribute
      
      * fix: dispatching.
      
      * max_memory test for pipeline
      
      * version guard the tests
      
      * fix guard.
      
      * address review feedback.
      
      * reset_device_map method.
      
      * add: test for reset_hf_device_map
      
      * fix a couple things.
      
      * add reset_device_map() in the error message.
      
      * add tests for checking reset_device_map doesn't have unintended consequences.
      
      * fix reset_device_map and offloading tests.
      
      * create _get_final_device_map utility.
      
      * hf_device_map -> _hf_device_map
      
      * add documentation
      
      * add notes suggested by Marc.
      
      * styling.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      
      * move updates within gpu condition.
      
      * other docs related things
      
      * note on ignore a device not specified in .
      
      * provide a suggestion if device mapping errors out.
      
      * fix: typo.
      
      * _hf_device_map -> hf_device_map
      
      * Empty-Commit
      
      * add: example hf_device_map.
      
      ---------
      Co-authored-by: default avatarMarc Sun <57196510+SunMarc@users.noreply.github.com>
      Co-authored-by: default avatarSteven Liu <59462357+stevhliu@users.noreply.github.com>
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      3e4a6bd2
  23. 02 Apr, 2024 1 commit
    • Sayak Paul's avatar
      add: utility to format our docs too 📜 (#7314) · 4a343077
      Sayak Paul authored
      * add: utility to format our docs too 📜
      
      * debugging saga
      
      * fix: message
      
      * checking
      
      * should be fixed.
      
      * revert pipeline_fixture
      
      * remove empty line
      
      * make style
      
      * fix: setup.py
      
      * style.
      4a343077
  24. 29 Mar, 2024 1 commit
    • Sayak Paul's avatar
      [Tests] Speed up some fast pipeline tests (#7477) · fac76169
      Sayak Paul authored
      * speed up test_vae_slicing in animatediff
      
      * speed up test_karras_schedulers_shape for attend and excite.
      
      * style.
      
      * get the static slices out.
      
      * specify torch print options.
      
      * modify
      
      * test run with controlnet
      
      * specify kwarg
      
      * fix: things
      
      * not None
      
      * flatten
      
      * controlnet img2img
      
      * complete controlet sd
      
      * finish more
      
      * finish more
      
      * finish more
      
      * finish more
      
      * finish the final batch
      
      * add cpu check for expected_pipe_slice.
      
      * finish the rest
      
      * remove print
      
      * style
      
      * fix ssd1b controlnet test
      
      * checking ssd1b
      
      * disable the test.
      
      * make the test_ip_adapter_single controlnet test more robust
      
      * fix: simple inpaint
      
      * multi
      
      * disable panorama
      
      * enable again
      
      * panorama is shaky so leave it for now
      
      * remove print
      
      * raise tolerance.
      fac76169
  25. 26 Mar, 2024 1 commit
  26. 25 Mar, 2024 2 commits
  27. 05 Feb, 2024 1 commit
  28. 03 Feb, 2024 1 commit
  29. 02 Feb, 2024 1 commit
  30. 18 Jan, 2024 1 commit
  31. 16 Jan, 2024 1 commit
  32. 26 Dec, 2023 1 commit
  33. 15 Dec, 2023 1 commit
  34. 05 Dec, 2023 1 commit
    • Arsalan's avatar
      Device agnostic testing (#5612) · f427345a
      Arsalan authored
      * utils and test modifications to enable device agnostic testing
      
      * device for manual seed in unet1d
      
      * fix generator condition in vae test
      
      * consistency changes to testing
      
      * make style
      
      * add device agnostic testing changes to source and one model test
      
      * make dtype check fns private, log cuda fp16 case
      
      * remove dtype checks from import utils, move to testing_utils
      
      * adding tests for most model classes and one pipeline
      
      * fix vae import
      f427345a
  35. 26 Sep, 2023 1 commit
  36. 25 Sep, 2023 1 commit
  37. 22 Sep, 2023 1 commit
  38. 25 Aug, 2023 1 commit
  39. 22 Aug, 2023 1 commit
    • Alex McKinney's avatar
      Replaces `DIFFUSERS_TEST_DEVICE` backend list with trying device (#4673) · e34d9aa6
      Alex McKinney authored
      This is a better method than comparing against a list of supported backends as it allows for supporting any number of backends provided they are installed on the user's system.
      This should have no effect on the behaviour of tests in Huggingface's CI workers.
      See transformers#25506 where this approach has already been added.
      e34d9aa6