fix(flux): Torch 2.4 + torchvision — transformers braucht beides
Aktuelles transformers schaltet PyTorch ab wenn < 2.4
("Disabling PyTorch because PyTorch >= 2.4 is required, found 2.3.1").
Ohne PyTorch laed diffusers das FLUX-Modell nicht. torchvision wird
zusaetzlich von CLIPImageProcessor/SiglipImageProcessor gebraucht.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -10,9 +10,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# PyTorch CUDA-Wheels zuerst, damit diffusers nicht CPU-Torch zieht.
|
# PyTorch CUDA-Wheels zuerst, damit diffusers nicht CPU-Torch zieht.
|
||||||
# Versionsmatrix wie bei f5tts gehalten (cu121, Torch 2.3.1) — gleicher
|
# Torch 2.4+ ist Pflicht: aktuelle transformers (>=4.43, von diffusers
|
||||||
# Treiber-Footprint, gleicher HF-Cache-Pfad.
|
# transitiv reingezogen) lehnt aeltere Versionen ab ("Disabling PyTorch
|
||||||
RUN pip3 install --no-cache-dir torch==2.3.1 \
|
# because PyTorch >= 2.4 is required"). torchvision wird von den
|
||||||
|
# CLIP-/Siglip-ImageProcessors verlangt, sonst Fallback auf PIL +
|
||||||
|
# Warnings. cu121 bleibt — passt zum CUDA 12.2 Base-Image.
|
||||||
|
RUN pip3 install --no-cache-dir \
|
||||||
|
torch==2.4.1 torchvision==0.19.1 \
|
||||||
--index-url https://download.pytorch.org/whl/cu121
|
--index-url https://download.pytorch.org/whl/cu121
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
Reference in New Issue
Block a user