{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif2bmh6bn4gdqzlfokml4g3tkq4xxusps2uqx22rnglrx63hy6foy",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mmk7w3xlvv62"
},
"path": "/t/problems-with-duplication/176137#post_17",
"publishedAt": "2026-05-23T19:40:24.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"@spaces.GPU"
],
"textContent": "Do I also need to edit the gradio_app.py file and match the changes I made in run_diffueraser.py?\n\nInside gradio_app.py is this:\n\n# Helper function to trim videos\n\ndef trim_video(input_path, output_path, max_duration=5):\nclip = VideoFileClip(input_path)\ntrimmed_clip = clip.subclip(0, min(max_duration, clip.duration))\ntrimmed_clip.write_videofile(output_path, codec=“libx264”, audio_codec=“aac”)\nclip.close()\ntrimmed_clip.close()\n\nThere you can see the value 5, which seems to me to be the duration of the output video.\n\nAnd below you can see this:\n\n@spaces.GPU(duration=100)\ndef infer(input_video, input_mask):\n\n# Setup paths and parameters\n\nsave_path = “results”\nmask_dilation_iter = 8\nmax_img_size = 960\nref_stride = 10\nneighbor_length = 10\n\nsubvideo_length = 50\n\nThese values are also in run_diffueraser.py.\n\nPerhaps both files need to be edited and set to the same.\n\nI don’t know, it’s just something that occurred to me.\n\nTHANKS",
"title": "Problems with duplication"
}