Prepare isolated Qwen Image 2.1 evaluation
This commit is contained in:
@@ -27,6 +27,8 @@ LABEL_KEY = "com.mike-ai.llama-profile"
|
||||
IMAGE_LABEL_KEY = "com.mike-ai.image-worker"
|
||||
IMAGE_WORKER = os.environ.get("IMAGE_WORKER", "image")
|
||||
RESTORE_WORKER = os.environ.get("RESTORE_WORKER", "restore")
|
||||
QWEN_IMAGE_TEST_WORKER = os.environ.get(
|
||||
"QWEN_IMAGE_TEST_WORKER", "qwen-image-2.1-test").strip()
|
||||
TTS_LABEL_KEY = "com.mike-ai.tts-worker"
|
||||
TTS_WORKER = os.environ.get("TTS_WORKER", "qwen3")
|
||||
MUSIC_LABEL_KEY = "com.mike-ai.music-worker"
|
||||
@@ -101,6 +103,8 @@ def image_container(kind: str = IMAGE_WORKER) -> dict:
|
||||
def image_containers() -> list[dict]:
|
||||
"""All allowlisted GPU workers that must never overlap an LLM."""
|
||||
allowed = {IMAGE_WORKER, RESTORE_WORKER}
|
||||
if QWEN_IMAGE_TEST_WORKER:
|
||||
allowed.add(QWEN_IMAGE_TEST_WORKER)
|
||||
return [item for item in labelled_containers(IMAGE_LABEL_KEY)
|
||||
if item.get("Labels", {}).get(IMAGE_LABEL_KEY) in allowed]
|
||||
|
||||
@@ -359,7 +363,7 @@ def stop_inference() -> dict:
|
||||
|
||||
|
||||
def set_image_worker(running: bool, kind: str = IMAGE_WORKER) -> dict:
|
||||
if kind not in {IMAGE_WORKER, RESTORE_WORKER}:
|
||||
if kind not in {IMAGE_WORKER, RESTORE_WORKER, QWEN_IMAGE_TEST_WORKER}:
|
||||
raise ValueError("worker is not allowlisted")
|
||||
with LOCK:
|
||||
item = image_container(kind)
|
||||
@@ -797,6 +801,8 @@ class Handler(BaseHTTPRequestHandler):
|
||||
"/workers/image/stop": (IMAGE_WORKER, False),
|
||||
"/workers/restore/start": (RESTORE_WORKER, True),
|
||||
"/workers/restore/stop": (RESTORE_WORKER, False),
|
||||
"/workers/qwen-image-test/start": (QWEN_IMAGE_TEST_WORKER, True),
|
||||
"/workers/qwen-image-test/stop": (QWEN_IMAGE_TEST_WORKER, False),
|
||||
}
|
||||
if self.path in worker_paths:
|
||||
try:
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
ARG PYTORCH_IMAGE=pytorch/pytorch:2.11.0-cuda12.8-cudnn9-runtime
|
||||
FROM ${PYTORCH_IMAGE}
|
||||
|
||||
ARG COMFYUI_COMMIT
|
||||
RUN test -n "$COMFYUI_COMMIT" \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends git ca-certificates \
|
||||
&& git clone --filter=blob:none https://github.com/Comfy-Org/ComfyUI.git /opt/ComfyUI \
|
||||
&& git -C /opt/ComfyUI checkout "$COMFYUI_COMMIT" \
|
||||
&& python -m pip install --no-cache-dir -r /opt/ComfyUI/requirements.txt \
|
||||
&& apt-get purge -y --auto-remove git \
|
||||
&& rm -rf /var/lib/apt/lists/* /root/.cache
|
||||
|
||||
WORKDIR /opt/ComfyUI
|
||||
EXPOSE 8188
|
||||
Reference in New Issue
Block a user