{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreib2vmthungqx72ljqpvyqpqwdbfrgo5wzqqfor4kfxdrec2lzmpka",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mmku2pxiyhy2"
},
"path": "/t/problems-with-duplication/176137#post_19",
"publishedAt": "2026-05-24T01:29:09.000Z",
"site": "https://discuss.huggingface.co",
"textContent": "for now, I had the AI analyze the current code and assess the situation in Space:\n\n* * *\n\nThe reason changing `run_diffueraser.py` did not affect the web demo is that the Hugging Face Space runs `gradio_app.py`, not `run_diffueraser.py`.\n\n`run_diffueraser.py` is mainly for command-line use. In the Gradio web interface, the actual inference function is inside `gradio_app.py`.\n\nThe 5-second limit comes from this function in `gradio_app.py`:\n\n\n def trim_video(input_path, output_path, max_duration=5):\n\n\nand the app calls it without passing another value:\n\n\n trim_video(input_video, trimmed_video_path)\n trim_video(input_mask, trimmed_mask_path)\n\n\nSo it always uses 5 seconds.\n\nTo make 15-second videos, you need to change `gradio_app.py`, not only `run_diffueraser.py`. A safer solution is to add a Gradio slider for the maximum duration, so you do not need to edit the code every time.\n\nAlso, if the Space is stuck on “Starting on L40S”, check the logs first. This app downloads and loads large models before the Gradio interface appears, so the first startup can take a long time. If the logs show downloads or model loading, wait. If the logs show a Python error, copy that full error message and fix that specific error.",
"title": "Problems with duplication"
}