# Problems with duplication

**URL:** <https://discuss.huggingface.co/t/problems-with-duplication/176137>\
**Category:** Beginners\
**Created:** [May 20, 2026, 8:22pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137 "2026-05-20T20:22:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 20, 2026, 8:22pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/1 "2026-05-20T20:22:40Z")

</div>

I purchased a private L40S server from your service, and it went to this space: [https://huggingface.co/spaces/fffiloni/DiffuEraser-demo](https://huggingface.co/spaces/fffiloni/DiffuEraser-demo)

I thought duplicating it on my private space would be easy and I’d be able to start using it in a few minutes, but that wasn’t the case.

I encountered numerous errors that I tried to resolve with the help of the AI, but after hours I still can’t get this space working on my private server.

I thought it would be much easier since, before paying, Huggingface seemed like the best option of all those available.

After hours and countless errors.

Can someone help me?

THANK YOU

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 20, 2026, 10:04pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/2 "2026-05-20T22:04:30Z")

</div>

This space is called “Zero GPU Spaces,” and it operates in an environment that’s slightly different from a standard GPU space. So, while it’s not difficult for developers, porting work may be required in some cases.

If you download the guide I created below, attach it to the generative AI, and ask for help, you’ll probably be able to fix it… maybe.

- [hf\_zerogpu\_space\_duplicate\_guide\_20260513.md · John6666/knowledge\_base\_md\_for\_rag\_1 at main](https://huggingface.co/datasets/John6666/knowledge_base_md_for_rag_1/blob/main/hf_zerogpu_space_duplicate_guide_20260513.md)
- [hf\_spaces\_debug\_guide\_20260513.md · John6666/knowledge\_base\_md\_for\_rag\_1 at main](https://huggingface.co/datasets/John6666/knowledge_base_md_for_rag_1/blob/main/hf_spaces_debug_guide_20260513.md)
- [hf\_migration\_drift\_guide\_20260513.md · John6666/knowledge\_base\_md\_for\_rag\_1 at main](https://huggingface.co/datasets/John6666/knowledge_base_md_for_rag_1/blob/main/hf_migration_drift_guide_20260513.md)

[Subscribers to plans like the Enterprise plan may have access to special HF support](https://huggingface.co/support).

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 21, 2026, 10:45pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/3 "2026-05-21T22:45:49Z")

</div>

Hi friend:

Thanks for your response. I appreciate your guide, but it’s very complex, and I don’t really know what steps I should follow to transfer Diffueraser from a Zero environment to my private L40S environment. Today I kept trying with the help of the AI, and it’s stuck on “STARTING ON L40S”.

I emailed Hugging, and they told me to try in a Zero environment, but I rented an L40S precisely to change Diffueraser parameters that require more VRAM, and the Zero environment won’t work for me.

I asked Hugging if someone with the necessary knowledge could access my profile and get Diffueraser working. Someone who knows what they’re doing could get it working in 5 minutes. But they haven’t responded since.

The truth is, right now I feel like I’ve wasted my money.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 22, 2026, 1:50am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/4 "2026-05-22T01:50:11Z")

</div>

Hmm, [I tried porting the code for that space just to see. Maybe it’ll work if you duplicate this](https://huggingface.co/spaces/John6666/DiffuEraser-demo-mini)? I’m not sure if the L40S has enough performance, though.

While some spaces require a lot of changes, there aren’t actually that many changes this time (in logic part):

```diff
--- a/README.md
+++ b/README.md
@@ -5,7 +5,10 @@
 colorTo: gray
 sdk: gradio
 sdk_version: 6.14.0
+python_version: 3.10.13
 app_file: gradio_app.py
+suggested_hardware: l40sx1
+startup_duration_timeout: 1h
 pinned: false
 disable_embedding: true
 short_description: A Diffusion Model for Video Inpainting
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
+--extra-index-url https://download.pytorch.org/whl/cu128
 accelerate==0.25.0
 av==14.0.1
 datasets==2.19.1
--- a/gradio_app.py
+++ b/gradio_app.py
@@ -1,4 +1,13 @@
-import spaces
+try:
+ import spaces
+except ImportError:
+ class _SpacesFallback:
+ @staticmethod
+ def GPU(*args, **kwargs):
+ def decorator(fn):
+ return fn
+ return decorator
+ spaces = _SpacesFallback()
 import torch
 import os
 import time

```

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 22, 2026, 7:50pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/5 "2026-05-22T19:50:41Z")

</div>

Hi John:

Thank you again for your help. The problem with Diffueraser is that it needs a lot of VRAM. The L40S is perfect because it has 48GB of VRAM. I rented it because I need to change a couple of things in the code. For example, I need to make it display more than 5 seconds of video and adjust another parameter that improves watermark removal. This requires VRAM, which is why I rented the L40S private server.

You sent me some code, but I don’t know where to put it. Using AI, I made changes in the README, REQUIREMENTS, etc., but the last thing I managed to do is get it stuck on “STARTING ON L40S” and never finishes booting.

If you could send me clearer instructions, I could try again.

Thanks, John

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 22, 2026, 8:11pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/6 "2026-05-22T20:11:48Z")

</div>

> but the last thing I managed to do is get it stuck on “STARTING ON L40S” and never finishes booting.

Hmm… So, also try download and upload [gradio\_app.py](https://huggingface.co/spaces/John6666/DiffuEraser-demo-mini/blob/main/gradio_app.py) . I’ve made some changes to reduce the load on the disk.

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 22, 2026, 9:06pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/7 "2026-05-22T21:06:25Z")

</div>

Hi John

Thanks again for your help. I don’t know how to do these things. I don’t know how to download and install anything. I did some research before paying for Hugging, and I thought duplicating everything would work. I thought all the software would work on all machines, like Windows, which runs faster on newer machines and slower on older ones, BUT IT WORKS.

I duplicated Filloli’s DiffuerAsser on my L40S space, and it turned out it wasn’t so easy, hahaha. I only know how to edit files within the Hugging environment. I don’t know how to install anything or anything else. I’m learning. I know you want to help me, so if you could explain it a little more clearly for a newbie like me, I would really appreciate it.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 22, 2026, 11:32pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/8 "2026-05-22T23:32:33Z")

</div>

Hmm, in that case, the easiest thing to do might be to clone my space (the modified one, that is).

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 22, 2026, 11:48pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/9 "2026-05-22T23:48:04Z")

</div>

Hi

That would be fantastic! Did you create a space using Diffueraser that works on an L40S?

Do I just have to tap the three dots and select “clone” and it works?

What’s the link to Diffueraser for your space?

Thanks

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 22, 2026, 11:53pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/10 "2026-05-22T23:53:29Z")

</div>

HI again:

Is this one? [DiffuEraser Demo - a Hugging Face Space by John6666](https://huggingface.co/spaces/John6666/DiffuEraser-demo-mini)

Does it only work by cloning it, or also by duplicating it?

Does it work on the L40S on the first try, or do I need to make further modifications?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 22, 2026, 11:54pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/11 "2026-05-22T23:54:15Z")

</div>

Yeah. That one. With just duplication, it would work. (hopefully)

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 22, 2026, 11:56pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/12 "2026-05-22T23:56:25Z")

</div>

Hahaha, okay, I’ll let you know in 10 minutes.

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 23, 2026, 12:13am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/13 "2026-05-23T00:13:02Z")

</div>

Oh my god, it’s working!

THANK YOU SO MUCH, JOHN!

Can I change certain parameters I need in the run\_diffueraser.py file and will it still work?

How long, what, and where do I have to study to learn what you know, or at least something?

I know I bothered you a lot, John, but you were the only one who helped me.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 23, 2026, 12:57am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/14 "2026-05-23T00:57:34Z")

</div>

Great.

Hmm, I’ve been coding as a hobby on and off for decades, so strictly speaking, it might take that long to master. That said, I’m only at an intermediate level.🙄

Still, the fix you’re talking about shouldn’t be too difficult. These days, if you feed the URL of either your or my HF space, along with the URL of this thread, to a generative AI (like ChatGPT or Gemini) and ask it a question, I think it’ll write the code for you. If you tell the AI to “give it to me as a zip file,” it’ll give it to you as a zip. If an error pops up, just copy and paste the error message into the AI and ask it to fix it… If you keep repeating that process, you’ll probably need almost no knowledge at all.

If we have the knowledge, we can anticipate those kinds of issues, instruct the AI accordingly, and avoid them, which makes it easier (that’s what I did this time actually). But what’s essential is the request itself, not our knowledge. Well, for HF users, using the free CPU space for testing saves money. You only use the GPU space for actual execution. You can practice programming for free.

Edit:  
e.g.

```plaintext
https://discuss.huggingface.co/t/problems-with-duplication/176137

First, please read this thread carefully as background context.

I’d like to modify this HF Space of mine:
https://huggingface.co/spaces/John6666/DiffuEraser-demo-mini

Could you help me with the coding?

Ideally, I’d like to keep the original line endings and code as much as possible so that the changes are easy to understand, and make only small modifications where possible.

Please provide the modified result as a ZIP file, excluding files such as ` __pycache__ `.

For information about the current Hugging Face Spaces runtime, please also refer to the `.md` file linked in the thread.

Specifically, I’d first like to make it possible to specify several generation parameters from the GUI.

```

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 23, 2026, 1:49am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/15 "2026-05-23T01:49:29Z")

</div>

Great info. Thank you so much for your help. I know you are there for any question.

Thank you

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 23, 2026, 7:30pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/16 "2026-05-23T19:30:00Z")

</div>

Hi John:

I’m bothering you again because I made a change and it’s not working.

The problem is this: I go to run\_diffueraser.py and change the parameter parser.add\_argument(‘–video\_length’, type=int, default=15, help=‘The maximum length of output video’) to 15 so it creates a 15-second video, but it always outputs a 5-second video.

What’s the problem?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 23, 2026, 7:40pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/17 "2026-05-23T19:40:24Z")

</div>

Do I also need to edit the gradio\_app.py file and match the changes I made in run\_diffueraser.py?

Inside gradio\_app.py is this:

# Helper function to trim videos

def trim\_video(input\_path, output\_path, max\_duration=5):  
clip = VideoFileClip(input\_path)  
trimmed\_clip = clip.subclip(0, min(max\_duration, clip.duration))  
trimmed\_clip.write\_videofile(output\_path, codec=“libx264”, audio\_codec=“aac”)  
clip.close()  
trimmed\_clip.close()

There you can see the value 5, which seems to me to be the duration of the output video.

And below you can see this:

@spaces.GPU(duration=100)  
def infer(input\_video, input\_mask):

# Setup paths and parameters

save\_path = “results”  
mask\_dilation\_iter = 8  
max\_img\_size = 960  
ref\_stride = 10  
neighbor\_length = 10

subvideo\_length = 50

These values ​​are also in run\_diffueraser.py.

Perhaps both files need to be edited and set to the same.

I don’t know, it’s just something that occurred to me.

THANKS

---

<div class="post-metadata">

**Author:** ![Maradonainedito](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maradonainedito/32/60330_2.png) [@Maradonainedito](https://discuss.huggingface.co/u/Maradonainedito)\
**Post date:** [May 23, 2026, 9:26pm UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/18 "2026-05-23T21:26:24Z")

</div>

Hi John:

I’m having problems again. I made some changes and it’s stuck on “STARTING ON L40S”.

I deleted the duplication from my private account, went to your account, accessed your Difueraser Demo Mini, and duplicated it again to start from scratch, but it never finishes. It’s stuck on “Starting on L40S”.

It’s strange because the duplication worked yesterday and now it doesn’t.

Sorry for the trouble.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 24, 2026, 1:29am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/19 "2026-05-24T01:29:09Z")

</div>

for now, I had the AI analyze the current code and assess the situation in Space:

* * *

The 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`.

`run_diffueraser.py` is mainly for command-line use. In the Gradio web interface, the actual inference function is inside `gradio_app.py`.

The 5-second limit comes from this function in `gradio_app.py`:

```python
def trim_video(input_path, output_path, max_duration=5):

```

and the app calls it without passing another value:

```python
trim_video(input_video, trimmed_video_path)
trim_video(input_mask, trimmed_mask_path)

```

So it always uses 5 seconds.

To 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.

Also, 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.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [May 24, 2026, 1:33am UTC](https://discuss.huggingface.co/t/problems-with-duplication/176137/20 "2026-05-24T01:33:49Z")

</div>

Well, I don’t think you need to study programming “just yet.”

If you can get a general grasp of “which files the computer reads and in what order,” you’ll be able to effectively ask the AI for solutions. Probably.

You can safely ignore files that the computer doesn’t read (practically) and when you tinker with files that the computer does read, watch carefully to see if anything breaks or changes in its behaviour. How it breaks can also be a clue. In some cases, it might not be someone’s mistake, but rather a system constraint.

[Next page](https://discuss.huggingface.co/t/problems-with-duplication/176137.md?page=2)
