Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ec5449f
Support both huggingface_hub `v0.x` and `v1.x` (#12389)
Wauplin Sep 25, 2025
016316a
mirage pipeline first commit
Sep 26, 2025
4ac274b
use attention processors
Sep 26, 2025
904debc
use diffusers rmsnorm
Sep 26, 2025
122115a
use diffusers timestep embedding method
Sep 26, 2025
4588bbe
[CI] disable installing transformers from main in ci for now. (#12397)
sayakpaul Sep 26, 2025
e3fe0e8
remove MirageParams
Sep 26, 2025
85ae87b
checkpoint conversion script
Sep 26, 2025
9a697d0
ruff formating
Sep 26, 2025
9c09445
[docs] slight edits to the attention backends docs. (#12394)
sayakpaul Sep 26, 2025
041501a
[docs] remove docstrings from repeated methods in `lora_pipeline.py` …
sayakpaul Sep 26, 2025
19085ac
Don't skip Qwen model tests for group offloading with disk (#12382)
sayakpaul Sep 29, 2025
0a15111
Fix #12116: preserve boolean dtype for attention masks in ChromaPipe…
akshay-babbar Sep 29, 2025
64a5187
[quantization] feat: support aobaseconfig classes in `TorchAOConfig` …
sayakpaul Sep 29, 2025
ccedeca
[docs] Distributed inference (#12285)
stevhliu Sep 29, 2025
c07fcf7
[docs] Model formats (#12256)
stevhliu Sep 29, 2025
76d4e41
[modular]some small fix (#12307)
yiyixuxu Sep 29, 2025
20fd00b
[Tests] Add single file tester mixin for Models and remove unittest d…
DN6 Sep 30, 2025
0e12ba7
fix 3 xpu failures uts w/ latest pytorch (#12408)
yao-matrix Sep 30, 2025
b596545
Install latest prerelease from huggingface_hub when installing transf…
Wauplin Sep 30, 2025
d7a1a03
[docs] CP (#12331)
stevhliu Sep 30, 2025
cc5b31f
[docs] Migrate syntax (#12390)
stevhliu Sep 30, 2025
34fa9dd
remove dependencies to old checkpoints
Sep 30, 2025
5cc965a
remove old checkpoints dependency
Sep 30, 2025
d79cd8f
move default height and width in checkpoint config
Sep 30, 2025
f2759fd
add docstrings
Sep 30, 2025
394f725
if conditions and raised as ValueError instead of asserts
Sep 30, 2025
54fb063
small fix
Sep 30, 2025
c49fafb
nit remove try block at import
Sep 30, 2025
7e7df35
mirage pipeline doc
Sep 30, 2025
814d710
[tests] cache non lora pipeline outputs. (#12298)
sayakpaul Oct 1, 2025
9ae5b62
[ci] xfail failing tests in CI. (#12418)
sayakpaul Oct 2, 2025
b429796
[core] conditionally import torch distributed stuff. (#12420)
sayakpaul Oct 2, 2025
7242b5f
FIX Test to ignore warning for enable_lora_hotswap (#12421)
BenjaminBossan Oct 2, 2025
941ac9c
[training-scripts] Make more examples UV-compatible (follow up on #12…
linoytsaban Oct 3, 2025
2b7deff
fix scale_shift_factor being on cpu for wan and ltx (#12347)
vladmandic Oct 5, 2025
c3675d4
[core] support QwenImage Edit Plus in modular (#12416)
sayakpaul Oct 5, 2025
ce90f9b
[FIX] Text to image training peft version (#12434)
SahilCarterr Oct 6, 2025
7f3e9b8
make flux ready for mellon (#12419)
sayakpaul Oct 6, 2025
cf4b97b
[perf] Cache version checks (#12399)
cbensimon Oct 6, 2025
0974b4c
[i18n-KO] Fix typo and update translation in ethical_guidelines.md (#…
braintrue Oct 6, 2025
2d69bac
handle offload_state_dict when initing transformers models (#12438)
sayakpaul Oct 7, 2025
de03851
update doc
Oct 7, 2025
a69aa4b
rename model to photon
Oct 7, 2025
1066de8
[Qwen LoRA training] fix bug when offloading (#12440)
linoytsaban Oct 7, 2025
2dc3167
Align Flux modular more and more with Qwen modular (#12445)
sayakpaul Oct 8, 2025
35e538d
fix dockerfile definitions. (#12424)
sayakpaul Oct 8, 2025
345864e
fix more torch.distributed imports (#12425)
sayakpaul Oct 8, 2025
9e099a7
mirage pipeline first commit
Sep 26, 2025
6e10ed4
use attention processors
Sep 26, 2025
866c6de
use diffusers rmsnorm
Sep 26, 2025
4e8b647
use diffusers timestep embedding method
Sep 26, 2025
472ad97
remove MirageParams
Sep 26, 2025
97a231e
checkpoint conversion script
Sep 26, 2025
35d721f
ruff formating
Sep 26, 2025
775a115
remove dependencies to old checkpoints
Sep 30, 2025
1c6c25c
remove old checkpoints dependency
Sep 30, 2025
b0d965c
move default height and width in checkpoint config
Sep 30, 2025
235fe49
add docstrings
Sep 30, 2025
a6ff579
if conditions and raised as ValueError instead of asserts
Sep 30, 2025
3a91503
small fix
Sep 30, 2025
e200cf6
nit remove try block at import
Sep 30, 2025
2ea8976
mirage pipeline doc
Sep 30, 2025
26429a3
update doc
Oct 7, 2025
0abe136
rename model to photon
Oct 7, 2025
fe0e3d5
add text tower and vae in checkpoint
Oct 8, 2025
855b068
update doc
Oct 8, 2025
d2c6bdd
Merge branch 'mirage' of https://github.com/Photoroom/diffusers into …
Oct 8, 2025
89beae8
update photon doc
Oct 8, 2025
2df0e2f
ruff fixes
Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/build_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
image-name:
- diffusers-pytorch-cpu
- diffusers-pytorch-cuda
- diffusers-pytorch-cuda
- diffusers-pytorch-xformers-cuda
- diffusers-pytorch-minimum-cuda
- diffusers-doc-builder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_modular_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test]
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps

- name: Environment
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test]
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps

- name: Environment
Expand Down Expand Up @@ -253,9 +253,9 @@ jobs:
python -m uv pip install -e [quality,test]
# TODO (sayakpaul, DN6): revisit `--no-deps`
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
python -m uv pip install -U tokenizers
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git

- name: Environment
run: |
Expand Down Expand Up @@ -286,4 +286,3 @@ jobs:
with:
name: pr_main_test_reports
path: reports

6 changes: 3 additions & 3 deletions .github/workflows/pr_tests_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test]
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git

- name: Environment
run: |
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
python -m uv pip install -e [quality,test]
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git

- name: Environment
run: |
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
- name: Install dependencies
run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
python -m uv pip install -e [quality,test,training]

- name: Environment
Expand Down
80 changes: 33 additions & 47 deletions docker/diffusers-doc-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,42 @@
FROM ubuntu:20.04
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa

RUN apt install -y bash \
build-essential \
git \
git-lfs \
curl \
ca-certificates \
libsndfile1-dev \
python3.10 \
python3-pip \
libgl1 \
zip \
wget \
python3.10-venv && \
rm -rf /var/lib/apt/lists

# make sure to use venv
RUN python3.10 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN apt-get -y update && apt-get install -y bash \
build-essential \
git \
git-lfs \
curl \
ca-certificates \
libsndfile1-dev \
libgl1

ENV UV_PYTHON=/usr/local/bin/python

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
python3.10 -m uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
invisible_watermark \
--extra-index-url https://download.pytorch.org/whl/cpu && \
python3.10 -m uv pip install --no-cache-dir \
accelerate \
datasets \
hf-doc-builder \
huggingface-hub \
Jinja2 \
librosa \
numpy==1.26.4 \
scipy \
tensorboard \
transformers \
matplotlib \
setuptools==69.5.1 \
bitsandbytes \
torchao \
gguf \
optimum-quanto
RUN pip install uv
RUN uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cpu

RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]"

# Extra dependencies
RUN uv pip install --no-cache-dir \
accelerate \
numpy==1.26.4 \
hf_transfer \
setuptools==69.5.1 \
bitsandbytes \
torchao \
gguf \
optimum-quanto

RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean

CMD ["/bin/bash"]
69 changes: 28 additions & 41 deletions docker/diffusers-pytorch-cpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,37 @@
FROM ubuntu:20.04
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa

RUN apt install -y bash \
build-essential \
git \
git-lfs \
curl \
ca-certificates \
libsndfile1-dev \
python3.10 \
python3.10-dev \
python3-pip \
libgl1 \
python3.10-venv && \
rm -rf /var/lib/apt/lists

# make sure to use venv
RUN python3.10 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN apt-get -y update && apt-get install -y bash \
build-essential \
git \
git-lfs \
curl \
ca-certificates \
libsndfile1-dev \
libgl1

ENV UV_PYTHON=/usr/local/bin/python

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
python3.10 -m uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
invisible_watermark \
--extra-index-url https://download.pytorch.org/whl/cpu && \
python3.10 -m uv pip install --no-cache-dir \
accelerate \
datasets \
hf-doc-builder \
huggingface-hub \
Jinja2 \
librosa \
numpy==1.26.4 \
scipy \
tensorboard \
transformers matplotlib \
hf_transfer
RUN pip install uv
RUN uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cpu

RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]"

# Extra dependencies
RUN uv pip install --no-cache-dir \
accelerate \
numpy==1.26.4 \
hf_transfer

RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean

CMD ["/bin/bash"]
43 changes: 20 additions & 23 deletions docker/diffusers-pytorch-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ARG PYTHON_VERSION=3.12
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa
&& add-apt-repository ppa:deadsnakes/ppa && \
apt-get update

RUN apt install -y bash \
build-essential \
Expand All @@ -16,36 +18,31 @@ RUN apt install -y bash \
ca-certificates \
libsndfile1-dev \
libgl1 \
python3.10 \
python3.10-dev \
python3 \
python3-pip \
python3.10-venv && \
rm -rf /var/lib/apt/lists
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# make sure to use venv
RUN python3.10 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
ENV VIRTUAL_ENV="/opt/venv"
ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python
RUN uv venv --python ${PYTHON_VERSION} --seed ${VIRTUAL_ENV}
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
python3.10 -m uv pip install --no-cache-dir \
RUN uv pip install --no-cache-dir \
torch \
torchvision \
torchaudio \
invisible_watermark && \
python3.10 -m pip install --no-cache-dir \
torchaudio

RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]"

# Extra dependencies
RUN uv pip install --no-cache-dir \
accelerate \
datasets \
hf-doc-builder \
huggingface-hub \
hf_transfer \
Jinja2 \
librosa \
numpy==1.26.4 \
scipy \
tensorboard \
transformers \
pytorch-lightning \
pytorch-lightning \
hf_transfer

CMD ["/bin/bash"]
42 changes: 20 additions & 22 deletions docker/diffusers-pytorch-minimum-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
LABEL maintainer="Hugging Face"
LABEL repository="diffusers"

ARG PYTHON_VERSION=3.10
ENV DEBIAN_FRONTEND=noninteractive
ENV MINIMUM_SUPPORTED_TORCH_VERSION="2.1.0"
ENV MINIMUM_SUPPORTED_TORCHVISION_VERSION="0.16.0"
ENV MINIMUM_SUPPORTED_TORCHAUDIO_VERSION="2.1.0"

RUN apt-get -y update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa
&& add-apt-repository ppa:deadsnakes/ppa && \
apt-get update

RUN apt install -y bash \
build-essential \
Expand All @@ -19,35 +21,31 @@ RUN apt install -y bash \
ca-certificates \
libsndfile1-dev \
libgl1 \
python3.10 \
python3.10-dev \
python3 \
python3-pip \
python3.10-venv && \
rm -rf /var/lib/apt/lists
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# make sure to use venv
RUN python3.10 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
ENV VIRTUAL_ENV="/opt/venv"
ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python
RUN uv venv --python ${PYTHON_VERSION} --seed ${VIRTUAL_ENV}
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
python3.10 -m uv pip install --no-cache-dir \
RUN uv pip install --no-cache-dir \
torch==$MINIMUM_SUPPORTED_TORCH_VERSION \
torchvision==$MINIMUM_SUPPORTED_TORCHVISION_VERSION \
torchaudio==$MINIMUM_SUPPORTED_TORCHAUDIO_VERSION \
invisible_watermark && \
python3.10 -m pip install --no-cache-dir \
torchaudio==$MINIMUM_SUPPORTED_TORCHAUDIO_VERSION

RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/diffusers.git@main#egg=diffusers[test]"

# Extra dependencies
RUN uv pip install --no-cache-dir \
accelerate \
datasets \
hf-doc-builder \
huggingface-hub \
hf_transfer \
Jinja2 \
librosa \
numpy==1.26.4 \
scipy \
tensorboard \
transformers \
pytorch-lightning \
hf_transfer

CMD ["/bin/bash"]
Loading