Spaces:
Paused
Paused
suppression du model Realistic
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
# ----------------------------------------------------
|
| 2 |
-
# Dockerfile Comfy UI (Mode CPU) -
|
|
|
|
| 3 |
# ----------------------------------------------------
|
| 4 |
|
| 5 |
# 1. Image de base
|
|
@@ -22,6 +23,7 @@ WORKDIR /app/ComfyUI
|
|
| 22 |
|
| 23 |
# 4. Installation des dépendances Python (Mode CPU)
|
| 24 |
RUN pip install "numpy<2.0"
|
|
|
|
| 25 |
RUN pip install torch==2.3.1+cpu torchvision==0.18.1+cpu torchaudio==2.3.1+cpu --index-url https://download.pytorch.org/whl/cpu
|
| 26 |
RUN pip install -r requirements.txt
|
| 27 |
RUN pip install transformers==4.41.2 tokenizers==0.19.1
|
|
@@ -30,12 +32,9 @@ RUN pip install transformers==4.41.2 tokenizers==0.19.1
|
|
| 30 |
RUN mkdir -p models/checkpoints \
|
| 31 |
&& curl -L "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" -o ./models/checkpoints/v1-5-pruned-emaonly.safetensors
|
| 32 |
|
| 33 |
-
# 5A. Téléchargement du modèle Dreamshaper
|
| 34 |
RUN curl -L "https://civitai.com/api/download/models/126689?type=Model&format=SafeTensor&size=full" -o ./models/checkpoints/dreamshaper_8.safetensors
|
| 35 |
|
| 36 |
-
# 5B. Téléchargement du modèle RealisticVision
|
| 37 |
-
RUN curl -L "https://civitai.com/api/download/models/4201?type=Model&format=SafeTensor&size=full&fp16=false" -o ./models/checkpoints/realisticVisionV51_v51VAE.safetensors
|
| 38 |
-
|
| 39 |
# 5C. AJOUT CRITIQUE : VAEs et CLIP
|
| 40 |
RUN mkdir -p models/vae models/clip \
|
| 41 |
&& curl -L "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors" -o ./models/vae/vae-ft-mse-840000-ema-pruned.safetensors \
|
|
@@ -43,7 +42,8 @@ RUN mkdir -p models/vae models/clip \
|
|
| 43 |
&& curl -L "https://huggingface.co/comfyanonymous/clip_g/resolve/main/clip_g.safetensors" -o ./models/clip/clip_g.safetensors
|
| 44 |
|
| 45 |
# 5D. AJOUT : Workflow de Génération Stable Diffusion Simple (default_workflow.json)
|
| 46 |
-
|
|
|
|
| 47 |
|
| 48 |
# 6. Configuration Hugging Face Space (Port 7860 Obligatoire)
|
| 49 |
ENV PORT 7860
|
|
|
|
| 1 |
# ----------------------------------------------------
|
| 2 |
+
# Dockerfile Comfy UI (Mode CPU) - V11 (Final)
|
| 3 |
+
# Modèle par défaut pour le workflow: dreamshaper_8.safetensors
|
| 4 |
# ----------------------------------------------------
|
| 5 |
|
| 6 |
# 1. Image de base
|
|
|
|
| 23 |
|
| 24 |
# 4. Installation des dépendances Python (Mode CPU)
|
| 25 |
RUN pip install "numpy<2.0"
|
| 26 |
+
# Installation de PyTorch pour CPU
|
| 27 |
RUN pip install torch==2.3.1+cpu torchvision==0.18.1+cpu torchaudio==2.3.1+cpu --index-url https://download.pytorch.org/whl/cpu
|
| 28 |
RUN pip install -r requirements.txt
|
| 29 |
RUN pip install transformers==4.41.2 tokenizers==0.19.1
|
|
|
|
| 32 |
RUN mkdir -p models/checkpoints \
|
| 33 |
&& curl -L "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors" -o ./models/checkpoints/v1-5-pruned-emaonly.safetensors
|
| 34 |
|
| 35 |
+
# 5A. Téléchargement du modèle Dreamshaper
|
| 36 |
RUN curl -L "https://civitai.com/api/download/models/126689?type=Model&format=SafeTensor&size=full" -o ./models/checkpoints/dreamshaper_8.safetensors
|
| 37 |
|
|
|
|
|
|
|
|
|
|
| 38 |
# 5C. AJOUT CRITIQUE : VAEs et CLIP
|
| 39 |
RUN mkdir -p models/vae models/clip \
|
| 40 |
&& curl -L "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors" -o ./models/vae/vae-ft-mse-840000-ema-pruned.safetensors \
|
|
|
|
| 42 |
&& curl -L "https://huggingface.co/comfyanonymous/clip_g/resolve/main/clip_g.safetensors" -o ./models/clip/clip_g.safetensors
|
| 43 |
|
| 44 |
# 5D. AJOUT : Workflow de Génération Stable Diffusion Simple (default_workflow.json)
|
| 45 |
+
# Le CheckpointLoaderSimple est réglé sur dreamshaper_8.safetensors
|
| 46 |
+
RUN echo '{ "last_node_id": 9, "last_link_id": 10, "nodes": [ { "id": 3, "type": "KSampler", "pos": [311, 281], "size": [337.89, 226.24], "flags": {}, "order": 4, "mode": 0, "inputs": [ { "name": "model", "type": "MODEL", "link": 6 }, { "name": "positive", "type": "CONDITIONING", "link": 7 }, { "name": "negative", "type": "CONDITIONING", "link": 8 }, { "name": "latent_image", "type": "LATENT", "link": 9 } ] }, { "id": 4, "type": "EmptyLatentImage", "pos": [38, 513], "size": [235.84, 105.85], "flags": {}, "order": 3, "mode": 0, "outputs": [ { "name": "LATENT", "type": "LATENT", "links": [9], "shape": 3 } ] }, { "id": 6, "type": "SaveImage", "pos": [1021, 281], "size": [220, 50], "flags": {}, "order": 7, "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", "link": 5 } ], "widgets_values": [ "ComfyUI" ] }, { "id": 7, "type": "CheckpointLoaderSimple", "pos": [38, 281], "size": [291.6, 98], "flags": {}, "order": 0, "mode": 0, "outputs": [ { "name": "MODEL", "type": "MODEL", "links": [6], "shape": 3 }, { "name": "CLIP", "type": "CLIP", "links": [1, 2], "shape": 3 }, { "name": "VAE", "type": "VAE", "links": [4], "shape": 3 } ], "widgets_values": [ "dreamshaper_8.safetensors" ] }, { "id": 8, "type": "CLIPTextEncode", "pos": [38, 0], "size": [337.89, 150.11], "flags": {}, "order": 1, "mode": 0, "inputs": [ { "name": "clip", "type": "CLIP", "link": 1 } ], "outputs": [ { "name": "CONDITIONING", "type": "CONDITIONING", "links": [7], "shape": 3 } ], "widgets_values": [ "a photograph of an astronaut riding a horse, cinematic, epic" ] }, { "id": 9, "type": "CLIPTextEncode", "pos": [38, 175], "size": [337.89, 150.11], "flags": {}, "order": 2, "mode": 0, "inputs": [ { "name": "clip", "type": "CLIP", "link": 2 } ], "outputs": [ { "name": "CONDITIONING", "type": "CONDITIONING", "links": [8], "shape": 3 } ], "widgets_values": [ "blurry, low resolution, worst quality, deformed, bad anatomy, bad quality, lowres" ] }, { "id": 5, "type": "VAEDecode", "pos": [689, 281], "size": [220, 46], "flags": {}, "order": 5, "mode": 0, "inputs": [ { "name": "samples", "type": "LATENT", "link": 10 }, { "name": "vae", "type": "VAE", "link": 4 } ] } ], "links": [ [1, 7, 1, 8, 0, "CLIP"], [2, 7, 1, 9, 0, "CLIP"], [4, 7, 3, 5, 1, "VAE"], [5, 5, 0, 6, 0, "IMAGE"], [6, 7, 0, 3, 0, "MODEL"], [7, 8, 0, 3, 1, "CONDITIONING"], [8, 9, 0, 3, 2, "CONDITIONING"], [9, 4, 0, 3, 3, "LATENT"], [10, 3, 0, 5, 0, "LATENT"] ], "groups": [], "config": {}, "extra": { "ds": "Lw==", "ds_ver": "1.33.10" }, "version": 1.33} ' > default_workflow.json
|
| 47 |
|
| 48 |
# 6. Configuration Hugging Face Space (Port 7860 Obligatoire)
|
| 49 |
ENV PORT 7860
|