1. 03 Nov, 2022 5 commits
    • Suraj Patil's avatar
      default fast model loading 🔥 (#1115) · 74821781
      Suraj Patil authored
      
      
      * make accelerate hard dep
      
      * default fast init
      
      * move params to cpu when device map is None
      
      * handle device_map=None
      
      * handle torch < 1.9
      
      * remove device_map="auto"
      
      * style
      
      * add accelerate in torch extra
      
      * remove accelerate from extras["test"]
      
      * raise an error if torch is available but not accelerate
      
      * update installation docs
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * improve defautl loading speed even further, allow disabling fats loading
      
      * address review comments
      
      * adapt the tests
      
      * fix test_stable_diffusion_fast_load
      
      * fix test_read_init
      
      * temp fix for dummy checks
      
      * Trigger Build
      
      * Apply suggestions from code review
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarAnton Lozhkov <anton@huggingface.co>
      74821781
    • 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
    • Anton Lozhkov's avatar
      Allow saving `None` pipeline components (#1118) · 4a38166a
      Anton Lozhkov authored
      * Allow saving `None` pipeline components
      
      * support flax as well
      
      * style
      4a38166a
    • Anton Lozhkov's avatar
      Fix hub-dependent tests for PRs (#1119) · 0edf9ca0
      Anton Lozhkov authored
      * Remove the hub token
      
      * replace repos
      
      * style
      0edf9ca0
  2. 02 Nov, 2022 4 commits
    • Patrick von Platen's avatar
      [Loading] Ignore unneeded files (#1107) · c39a511b
      Patrick von Platen authored
      * [Loading] Ignore unneeded files
      
      * up
      c39a511b
    • Grigory Sizov's avatar
      Fix tests for equivalence of DDIM and DDPM pipelines (#1069) · 5cd29d62
      Grigory Sizov authored
      * Fix equality test for ddim and ddpm
      
      * add docs for use_clipped_model_output in DDIM
      
      * fix inline comment
      
      * reorder imports in test_pipelines.py
      
      * Ignore use_clipped_model_output if scheduler doesn't take it
      5cd29d62
    • Anton Lozhkov's avatar
      [CI] Framework and hardware-specific CI tests (#997) · 4e59bcc6
      Anton Lozhkov authored
      * [WIP][CI] Framework and hardware-specific docker images for CI tests
      
      * username
      
      * fix cpu
      
      * try out the image
      
      * push latest
      
      * update workspace
      
      * no root isolation for actions
      
      * add a flax image
      
      * flax and onnx matrix
      
      * fix runners
      
      * add reports
      
      * onnxruntime image
      
      * retry tpu
      
      * fix
      
      * fix
      
      * build onnxruntime
      
      * naming
      
      * onnxruntime-gpu image
      
      * onnxruntime-gpu image, slow tests
      
      * latest jax version
      
      * trigger flax
      
      * run flax tests in one thread
      
      * fast flax tests on cpu
      
      * fast flax tests on cpu
      
      * trigger slow tests
      
      * rebuild torch cuda
      
      * force cuda provider
      
      * fix onnxruntime tests
      
      * trigger slow
      
      * don't specify gpu for tpu
      
      * optimize
      
      * memory limit
      
      * fix flax tests
      
      * disable docker cache
      4e59bcc6
    • Lewington-pitsos's avatar
      Integration tests precision improvement for inpainting (#1052) · 8ee21915
      Lewington-pitsos authored
      
      
      * improve test precision
      
      get tests passing with greater precision using lewington images
      
      * make old numpy load function a wrapper around a more flexible numpy loading function
      
      * adhere to black formatting
      
      * add more black formatting
      
      * adhere to isort
      
      * loosen precision and replace path
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      8ee21915
  3. 31 Oct, 2022 4 commits
  4. 28 Oct, 2022 8 commits
  5. 27 Oct, 2022 2 commits
  6. 26 Oct, 2022 2 commits
    • Pi Esposito's avatar
      minimal stable diffusion GPU memory usage with accelerate hooks (#850) · b2e2d141
      Pi Esposito authored
      * add method to enable cuda with minimal gpu usage to stable diffusion
      
      * add test to minimal cuda memory usage
      
      * ensure all models but unet are onn torch.float32
      
      * move to cpu_offload along with minor internal changes to make it work
      
      * make it test against accelerate master branch
      
      * coming back, its official: I don't know how to make it test againt the master branch from accelerate
      
      * make it install accelerate from master on tests
      
      * go back to accelerate>=0.11
      
      * undo prettier formatting on yml files
      
      * undo prettier formatting on yml files againn
      b2e2d141
    • Pedro Cuenca's avatar
      Do not use torch.float64 on the mps device (#942) · 0343d8f5
      Pedro Cuenca authored
      * Add failing test for #940.
      
      * Do not use torch.float64 in mps.
      
      * style
      
      * Temporarily skip add_noise for IPNDMScheduler.
      
      Until #990 is addressed.
      0343d8f5
  7. 25 Oct, 2022 4 commits
  8. 24 Oct, 2022 1 commit
  9. 22 Oct, 2022 1 commit
  10. 21 Oct, 2022 1 commit
  11. 20 Oct, 2022 4 commits
  12. 19 Oct, 2022 4 commits