Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions examples/cosmos3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,13 @@ RUN mkdir -p /cache/torchinductor /cache/triton
COPY patches /workspace/deepinfra-patches
RUN git -C /workspace apply --verbose deepinfra-patches/*.patch

# DeepInfra Dynamo videogen worker. Runtime args
# (--served-model-name, --model, --num-gpus, ...) are appended to this command.
# worker.py self-relaunches under torchrun when --num-gpus > 1.
COPY worker.py /workspace/worker.py
# DeepInfra Dynamo videogen worker. MM2's dynamo deployment runs
# `python3 worker.py` with workingDir=/opt/app (the videogen-worker convention),
# so worker.py MUST live at /opt/app/worker.py — NOT /workspace (where the
# framework is cloned). cosmos_framework is installed editable, so it imports
# fine regardless of cwd. Runtime args (--served-model-name, --model=/data/default,
# --num-gpus) are appended by the deployment; worker.py self-relaunches under
# torchrun when --num-gpus > 1.
COPY worker.py /opt/app/worker.py
WORKDIR /opt/app
ENTRYPOINT ["python3", "worker.py"]
5 changes: 4 additions & 1 deletion examples/cosmos3/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ def resolve(self) -> tuple[int, str, str | None, int, int | None, str | None]:
if (w, h) in _SIZE_TO_RES_AR:
res, ar = _SIZE_TO_RES_AR[(w, h)]
except ValueError:
pass
log.warning(
"ignoring unparseable size %r; using resolution defaults",
self.size,
)
vision_url = self.video_url or self.image_url or self.input_reference
return nf, res, ar, fps, seed, vision_url

Expand Down
Loading