Vicente Alvarez Claude Sonnet 4.5 commited on
Commit
5a33bb3
·
1 Parent(s): 0859d72

Fix watermark transparency: use gr.File instead of gr.Image

Browse files

gr.Image may convert/process uploads losing alpha channel. gr.File preserves original PNG with transparency.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -777,7 +777,7 @@ with gr.Blocks(title="Element-8 Video", delete_cache=(3600, 7200)) as demo: # c
777
  remove_music = gr.Checkbox(label="Remove Music", value=False)
778
  with gr.Row():
779
  add_subtitles = gr.Checkbox(label="Add Subtitles (Whisper)", value=False)
780
- watermark = gr.Image(label="Watermark PNG (full-video size, position in your editor)", type="filepath", sources=["upload"])
781
  negative_prompt = gr.Textbox(
782
  label="Negative Prompt",
783
  value=DEFAULT_NEGATIVE_PROMPT,
 
777
  remove_music = gr.Checkbox(label="Remove Music", value=False)
778
  with gr.Row():
779
  add_subtitles = gr.Checkbox(label="Add Subtitles (Whisper)", value=False)
780
+ watermark = gr.File(label="Watermark PNG (full-video size, position in your editor)", file_types=[".png"])
781
  negative_prompt = gr.Textbox(
782
  label="Negative Prompt",
783
  value=DEFAULT_NEGATIVE_PROMPT,