Port the code changes from MotionLCM c708ae2 through 81c0636: scoped legacy NumPy aliases for SMPL, correct video frame timing, and Cycles persistent data enabled by default with --no_persistent_data to opt out.
Retain the Space app, deployment metadata, and dependency pins. Verified source equality, Python syntax, NumPy alias cleanup, Blender CLI startup, and a 196-frame video at 20 FPS.
Gradio styles example chips with
.gallery-item:hover { background: var(--table-row-focus) }
and --table-row-focus defaults to --color-accent-soft, which resolves to
--primary-50 (#eef2ff) outside dark mode. The Space never gets the .dark
class, so a hovered or keyboard-selected example painted a near-white chip
under this theme's light body text (#e6e8f0) -- 1.09:1 contrast, effectively
invisible.
Pin table_row_focus to #232338 in both slots, matching how every other
override in this theme sets the light and _dark value together. Contrast
against the body text becomes 12.5:1.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop the dead .meta-text-center half of the counter rule
Gradio's progress element picks exactly one of the two classes:
oe(t, "meta-text-center", variant === "center")
oe(t, "meta-text", variant === "default")
A gr.Progress(track_tqdm=True) bound to a block renders the "default"
variant, so #runtime-info only ever matches .meta-text. The center variant
belongs to the .wrap.center path, which already paints an opaque background
and never overlapped the label to begin with.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stop the tqdm counter printing over the label on phones
Gradio styles the progress counter as .meta-text with position:absolute,
top:0, right:0, z-index above the content and no background of its own. On a
phone the label 'Inference info (runtime and device)' spans the full width, so
its tail sat directly underneath "0/1 steps | 8.2/19.0s" and the two rendered
on top of each other.
Shorten the label to 'Inference info' (the textbox already reports runtime and
device) and give the counter an opaque chip so any residual overlap stays
readable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep mld_clip.py in sync with the upstream inference_mode fix
Newer sentence-transformers wraps encode() in torch.inference_mode() instead of
torch.no_grad(), and inference tensors cannot be saved for backward. The Space
only runs inference with a frozen model, so it never hit this, but carrying the
same one-line clone keeps the vendored copy byte-identical to the main repo.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Simplify app.py and make the header usable on phones
Drop redundant layers and dead code:
- generate() now takes the UI inputs directly. generate_component's
generate_function parameter existed only to be bound by functools.partial,
and on_generate only forwarded to that partial, so three call layers
collapse into one and the partial import goes away.
- Remove the [None] padding of the returned paths. batch is built from
[text_] * MAX_VIDEOS, so model(batch)[0] always yields MAX_VIDEOS
entries and the pad was always a no-op.
- Remove WEBSITE_bottom, referenced only from a commented-out gr.HTML call.
- Drop show_label=True (already the default) and the unused Examples
binding, de-duplicate the identical click/submit wiring, and drop the
two remaining comments.
Add a max-width 640px block so the hero fits a phone: the 3.1rem wordmark
drops to 2.1rem and the author line, affiliations and badges scale down.
The video grid needs no change; Gradio gives each Row child
min-width: min(160px, 100%), so the four-across grid already …
- Dark Base theme (indigo/cyan on #0b0b12) with Inter, set on both the
light and dark theme variants so the palette holds either way.
- Hero header: gradient wordmark, ECCV 2024 tag, author line, and a badge
row linking arXiv / project page / code / video / blog. The badges were
already in the README but the Space never showed them, and
WEBSITE_bottom was dead code.
- Move motion length, inference steps and CFG into a collapsed
"Advanced settings" accordion so the prompt and Generate button lead.
- Video outputs get a .vidcard class: rounded, indigo border, glow on
hover. Generate button gets a gradient fill.
- Route both click and submit through on_generate, which declares
gr.Progress(track_tqdm=True). The existing tqdm loops over the
diffusion steps and the 8 skeleton renders now drive a real progress
bar, which matters because a cpu-basic run takes ~20s.
No change to model loading, inference, or the input/output signature.
Verified on the pinned stack (gradio 4.44…
gradio 4.44.1 calls templates.TemplateResponse(name, context) at
routes.py:432, the pre-0.29 Starlette argument order. Starlette 1.x
dropped the compatibility shim that accepted that order, so the template
name lands in the `request` parameter and the context dict lands in
`name`, giving `TypeError: unhashable type: 'dict'` from jinja2's
template cache lookup.
This is the same failure mode as the pydantic pin: demo.launch() sends a
startup self-check request to "/", the request 500s, Gradio decides
localhost is unreachable and aborts, so the Space dies at startup.
starlette was unpinned and only arrived transitively through fastapi.
fastapi <= 0.130 still resolves starlette 0.46.x, but 0.141.1 moved to
starlette 1.6.0, which is what the rebuilt image picked up.
Verified locally against the stack this resolves to on Spaces
(gradio 4.44.1, gradio_client 1.3.0, fastapi 0.141.1, starlette 0.52.1,
pydantic 2.10.6): GET / returns 200. starlette 0.52.1 still exposes
TemplateResponse(*args,…
gradio 4.44.1 pins gradio_client==1.3.0, whose
gradio_client.utils.get_type() does `"const" in schema` on every
subschema. pydantic >= 2.11 emits `additionalProperties: false` as a
bool instead of a dict, so that check raises
`TypeError: argument of type 'bool' is not iterable`.
demo.launch() issues a startup self-check request that reaches
get_api_info(), so the crash makes Gradio conclude localhost is
unreachable and abort with "When localhost is not accessible, a
shareable link must be created", killing the Space at startup.
pydantic was unpinned and only reached the image transitively, so the
2025-01 build captured a working version and the Docker layer cache hid
the drift until requirements.txt changed. Verified locally against the
exact Space stack (gradio 4.44.1, gradio_client 1.3.0, fastapi 0.141.1,
starlette 1.6.0): get_api_info() raises on pydantic 2.11.0/2.12.0/2.13.x
and succeeds on 2.10.6.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop chumpy from requirements to unbreak install on modern pip
chumpy 0.70's setup.py imports pip (`from pip._internal.req import
parse_requirements`) to parse its own requirements. pip >= 23.1 always
builds in PEP 517 isolation, and pip is not present in the isolated
build env, so `Getting requirements to build wheel` fails with
`ModuleNotFoundError: No module named 'pip'`. This broke the Space
build (HF now ships pip 26.1.2) and breaks a fresh `pip install -r
requirements.txt` for anyone on a current pip.
chumpy is never imported anywhere in the codebase; it is only needed
implicitly to unpickle the SMPL .pkl model files, i.e. by fit.py.
smplx is kept -- it does not depend on chumpy and installs cleanly.
Users who run fit.py install chumpy with
`pip install --no-build-isolation chumpy==0.70`, documented in the
upstream README.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fix install and rendering breakage caused by dependency drift
- prepare/*.sh: pass bare Google Drive file IDs to gdown instead of
`--fuzzy <url>`. gdown 5.0 removed `--fuzzy` (fuzzy parsing became the
default), so app.py's first-run bootstrap failed to fetch any
checkpoint and the Space crashed on startup. The bare ID form works on
both gdown 4.x and 6.x.
- requirements.txt: pin gdown==6.1.0, the only unpinned package and the
source of the drift above.
- plot_script.py: keep plot_3d_motion working on modern matplotlib.
Axes3D is no longer added to the figure automatically (>= 3.5),
Axes.lines / Axes.collections became read-only (>= 3.7), and
Axes3D.dist was removed (>= 3.8). Both new branches are guarded, so
matplotlib 3.3.4 still takes the original code path and its output is
byte-identical.
- configs: drop the unused DATASET.SMPL_PATH key, a leftover from MLD.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>