{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreigd7kga23x3manpvzedktrv3c254okl6vhpswkqc4cy6pgvkd3bky",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mne6tcqwdrn2"
},
"path": "/t/problems-with-duplication/176137?page=2#post_29",
"publishedAt": "2026-06-03T02:31:51.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"DiffuEraser paper",
"DiffuEraser project/code",
"ProPainter paper",
"ProPainter project"
],
"textContent": "To be honest, I’ve hardly ever used this kind of model, so I can’t really picture it…\n\nFor now, I’ve modified the GUI settings to make them a bit more flexible. However, when it comes to improving the model’s logic, there’s probably a limit to what I can do…\n\nEdit:\nOh. I asked an AI, and apparently it has some ideas about the settings:\n\n* * *\n\n## Practical answer: there are two different “large logo” cases\n\nFor a huge logo, the most important point is that inpainting is not really “recovering the hidden original pixels.” It is generating a plausible replacement for the masked region.\n\nThat distinction matters a lot here.\n\nDiffuEraser is a diffusion-based video inpainting model. Its paper says it uses prior information for initialization and weak conditioning to reduce noisy artifacts and suppress hallucinations, but that still does not mean it can know exactly what was behind a fully covered logo: DiffuEraser paper, DiffuEraser project/code. The prior stage is related to ProPainter-style video inpainting, which uses propagation and transformer mechanisms to fill masked regions from neighboring frames: ProPainter paper, ProPainter project.\n\nSo I would think about your case as one of these two tasks:\n\nGoal | Best mode | What it tries to do | Main risk\n---|---|---|---\nRemove the big logo as completely as possible | `Remove object / person` | Treat the logo area as something to replace | It may distort text/logos/faces underneath\nReduce the logo while preserving jersey text, faces, logos, or other details underneath | `Watermark over faces / text` | Blend some original/ProPainter detail back into the result | Some of the watermark may remain\n\nIf the huge logo is over plain background, use the first approach.\nIf the huge logo is over jersey text, a team logo, a face, a number, or another detail you want to keep, use the second approach.\n\n## My suggested first try for your case\n\nBecause you mentioned that the model does not “imagine” the hidden area correctly and the result becomes distorted, I would first try the detail-preserving route.\n\nUse:\n\n\n Task mode: Watermark over faces / text\n\n PCM checkpoint: 8-Step\n Scheduler: Auto\n Maximum image size: 1152\n Frame rate limit: Original\n Output frame rate: Same as processed video\n\n Mask refine mode: Keep\n Mask refine iterations: 0\n Mask dilation iterations: 3\n Mask feather: 6\n\n Detail preservation mode: Preserve original details\n Detail correction strength: 0.60\n\n Prompt: empty\n Negative prompt: distorted text, distorted logo, warped face, blurry face\n\n\nWhy this configuration:\n\nSetting | Why\n---|---\n`Watermark over faces / text` | This is for watermarks over details you want to keep, such as faces, jersey text, logos, numbers, or patterns.\n`8-Step` | Slower than 4-Step, but usually a better starting point when you care about details.\n`Maximum image size: 1152` | Gives the model more detail to work with.\n`Mask dilation: 3` | Covers the logo edge a little, but does not expand the mask too aggressively.\n`Mask feather: 6` | Softens the transition around the edited region.\n`Detail preservation: Preserve original details` | Blends some of the original video back into the masked region, so the result is less likely to completely regenerate jersey text or face details.\n`Detail correction strength: 0.60` | A middle value: strong enough to reduce the watermark, but not so strong that it replaces everything underneath.\n\nThe important trade-off is this:\n\n\n Higher Detail correction strength\n → removes more watermark\n → but may distort jersey text, logos, faces, or numbers\n\n Lower Detail correction strength\n → preserves more original detail\n → but may leave more of the watermark visible\n\n\n## How I would tune it after the first result\n\nStart with `Detail correction strength: 0.60`, then adjust from the result.\n\nResult problem | Change\n---|---\nThe watermark is still too visible | Increase `Detail correction strength` to `0.70` or `0.80`\nJersey text / logo / face is distorted | Lower `Detail correction strength` to `0.45` or `0.50`\nThe edge of the huge logo remains | Increase `Mask dilation iterations` from `3` to `5` or `6`\nToo much of the surrounding jersey or face changes | Lower `Mask dilation iterations` to `1` or `2`\nThe raw DiffuEraser result looks good but slightly unstable | Keep `Preserve original details`\nThe raw DiffuEraser result is too hallucinated, but the ProPainter prior looks more stable | Try `Detail preservation mode: Use ProPainter-prior blend`\nThe watermark is over plain background, not important details | Switch to `Remove object / person`\n\n## If you want maximum removal instead\n\nIf your priority is “remove the big logo as much as possible,” and you do not care much about preserving whatever is underneath it, then use a more normal object-removal setup:\n\n\n Task mode: Remove object / person\n\n PCM checkpoint: 4-Step or 8-Step\n Scheduler: Auto\n Maximum image size: 960 or 1152\n Frame rate limit: Original\n\n Mask refine mode: Keep\n Mask refine iterations: 0\n Mask dilation iterations: 8\n Mask feather: 0 or 2\n\n Detail preservation mode: Off\n\n\nIf the logo outline remains:\n\n\n Mask dilation iterations: 10 or 12\n\n\nThis is more aggressive. It can remove the big logo more completely, but it is also more likely to regenerate or distort anything inside the mask.\n\n## Why the jersey logos/text can get distorted\n\nIf the watermark covers a jersey logo, team crest, number, face, or text, then the mask tells the model:\n\n\n This region should be edited/replaced.\n\n\nSo the model does not know which pixels inside the mask are “bad watermark pixels” and which pixels are “good jersey/logo/face pixels.” If the jersey logo is inside the masked region, it may be treated as something to replace too.\n\nThat is why the new detail-preservation mode exists. It is not magic reconstruction, but it gives you a better trade-off:\n\n\n less full removal\n more original detail preservation\n\n\nFor large logos over important details, that is often better than asking the model to completely regenerate the whole masked region.\n\n## Debug outputs to check\n\nThe current improved UI has several debug outputs. They are useful for deciding what to change next.\n\nDebug output | What to check\n---|---\n`Refined mask preview` | White/bright areas are edited. If important details are white, they may be regenerated or distorted.\n`ProPainter priori video` | If this already looks badly distorted, the problem is probably the mask or the prior stage.\n`Raw DiffuEraser result` | Shows the result before detail-preservation blending.\n`Final result` | Shows the result after the selected detail-preservation mode.\n`Run settings file` | Useful for sharing exact settings so the result can be reproduced or tuned.\n\nA practical check:\n\nObservation | What I would try\n---|---\n`Raw DiffuEraser result` is clean, but final result leaves watermark | Increase `Detail correction strength`\n`Raw DiffuEraser result` distorts faces/text/logos | Lower `Detail correction strength` or try `Use ProPainter-prior blend`\n`ProPainter priori video` is better than raw DiffuEraser | Try `Detail preservation mode: Use ProPainter-prior blend`\nBoth ProPainter and raw DiffuEraser are bad | The mask is probably too large, too small, or covering too much important detail\nRefined mask covers the jersey logo you want to keep | Lower `Mask dilation`, increase `Detail preservation`, or use a smaller mask\n\n## Suggested test sequence\n\nI would test in this order:\n\nTest | Settings | Purpose\n---|---|---\n1 | `Watermark over faces / text`, strength `0.60`, dilation `3`, feather `6` | Balanced first try\n2 | Same, strength `0.45` | More detail preservation\n3 | Same, strength `0.75` | More watermark removal\n4 | Same, `Use ProPainter-prior blend` | If DiffuEraser hallucination is the main problem\n5 | `Remove object / person`, dilation `8–12`, detail preservation `Off` | Maximum removal, less concern for underlying details\n\nThis is the main idea:\n\n\n If you want the logo gone:\n use stronger object-removal settings.\n\n If you want the hidden jersey/face/text to stay recognizable:\n use detail preservation and accept that a little watermark may remain.\n\n\n## One more practical suggestion\n\nIf possible, use the smallest accurate mask that covers the unwanted logo. For large overlaid logos, the mask quality matters a lot.\n\nA too-small mask leaves logo edges.\nA too-large mask makes the model regenerate useful details underneath.\n\nThat is also why `Mask dilation` is important:\n\nDilation | Typical effect\n---|---\n`1–3` | Better for preserving details under a watermark\n`4–6` | Middle ground\n`8–12` | Better for full object/logo replacement, but more likely to distort covered details\n\n## Bottom line\n\nFor your specific question, I would not start with the most aggressive object-removal settings. I would start with:\n\n\n Task mode: Watermark over faces / text\n Detail preservation mode: Preserve original details\n Detail correction strength: 0.60\n Mask dilation: 3\n Mask feather: 6\n PCM checkpoint: 8-Step\n Maximum image size: 1152\n\n\nThen:\n\n\n If the watermark remains:\n raise Detail correction strength.\n\n If the jersey logo, face, or text is distorted:\n lower Detail correction strength.\n\n If the logo border remains:\n raise Mask dilation.\n\n If the whole masked area looks hallucinated:\n try Use ProPainter-prior blend.\n\n\nIf you can share the `Run settings file` from the debug output after a test run, it should be easier to suggest a more precise next setting.",
"title": "Problems with duplication"
}