Spaces:
Running on Zero
Running on Zero
UI: simplified — keep gradient bg + glass cards + teal sliders only, revert other CSS changes
Browse files
app.py
CHANGED
|
@@ -692,183 +692,14 @@ CSS = """
|
|
| 692 |
min-height: 100vh !important;
|
| 693 |
}
|
| 694 |
|
| 695 |
-
/* ──
|
| 696 |
-
.gradio-container .prose h1,
|
| 697 |
-
.gradio-container .prose h2 {
|
| 698 |
-
background: linear-gradient(90deg, #00e5c8, #6c5ce7, #a855f7) !important;
|
| 699 |
-
-webkit-background-clip: text !important;
|
| 700 |
-
-webkit-text-fill-color: transparent !important;
|
| 701 |
-
background-clip: text !important;
|
| 702 |
-
font-weight: 800 !important;
|
| 703 |
-
}
|
| 704 |
-
|
| 705 |
-
/* ── PROMPT INPUT — glass textarea ── */
|
| 706 |
-
#prompt-input textarea {
|
| 707 |
-
background: rgba(12, 18, 50, 0.8) !important;
|
| 708 |
-
border: 1px solid rgba(100, 180, 255, 0.3) !important;
|
| 709 |
-
border-radius: 10px !important;
|
| 710 |
-
color: #e8ecf4 !important;
|
| 711 |
-
}
|
| 712 |
-
#prompt-input textarea:focus {
|
| 713 |
-
border-color: rgba(108, 92, 231, 0.7) !important;
|
| 714 |
-
box-shadow: 0 0 16px rgba(108, 92, 231, 0.25) !important;
|
| 715 |
-
outline: none !important;
|
| 716 |
-
}
|
| 717 |
-
|
| 718 |
-
/* ── DURATION SLIDER — gradient track (Gradio sets appearance:none, so accent-color is dead) ── */
|
| 719 |
-
#duration-slider input[data-testid="range-input"] {
|
| 720 |
-
--slider-color: #00d4aa;
|
| 721 |
-
}
|
| 722 |
-
#duration-slider input[data-testid="range-input"]::-webkit-slider-runnable-track {
|
| 723 |
-
background: linear-gradient(90deg, #00d4aa, #6c5ce7) !important;
|
| 724 |
-
height: 6px !important;
|
| 725 |
-
border-radius: 3px !important;
|
| 726 |
-
}
|
| 727 |
-
#duration-slider input[data-testid="range-input"]::-webkit-slider-thumb {
|
| 728 |
-
-webkit-appearance: none !important;
|
| 729 |
-
appearance: none !important;
|
| 730 |
-
width: 18px !important;
|
| 731 |
-
height: 18px !important;
|
| 732 |
-
border-radius: 50% !important;
|
| 733 |
-
background: linear-gradient(135deg, #00e5c8, #6c5ce7) !important;
|
| 734 |
-
border: 2px solid rgba(255, 255, 255, 0.3) !important;
|
| 735 |
-
box-shadow: 0 0 8px rgba(0, 229, 200, 0.5) !important;
|
| 736 |
-
margin-top: -6px !important;
|
| 737 |
-
cursor: pointer !important;
|
| 738 |
-
}
|
| 739 |
-
#duration-slider input[data-testid="range-input"]::-moz-range-thumb {
|
| 740 |
-
width: 18px !important;
|
| 741 |
-
height: 18px !important;
|
| 742 |
-
border-radius: 50% !important;
|
| 743 |
-
background: linear-gradient(135deg, #00e5c8, #6c5ce7) !important;
|
| 744 |
-
border: 2px solid rgba(255, 255, 255, 0.3) !important;
|
| 745 |
-
box-shadow: 0 0 8px rgba(0, 229, 200, 0.5) !important;
|
| 746 |
-
cursor: pointer !important;
|
| 747 |
-
}
|
| 748 |
-
#duration-slider input[data-testid="range-input"]::-moz-range-track {
|
| 749 |
-
background: linear-gradient(90deg, #00d4aa, #6c5ce7) !important;
|
| 750 |
-
height: 6px !important;
|
| 751 |
-
border-radius: 3px !important;
|
| 752 |
-
}
|
| 753 |
-
|
| 754 |
-
/* ── GENERATE BUTTON — gradient ── */
|
| 755 |
-
#generate-btn button {
|
| 756 |
-
background: linear-gradient(135deg, #00b894, #0984e3, #6c5ce7) !important;
|
| 757 |
-
background-size: 200% 200% !important;
|
| 758 |
-
animation: btn-shimmer 4s ease-in-out infinite !important;
|
| 759 |
-
color: #ffffff !important;
|
| 760 |
-
font-weight: 700 !important;
|
| 761 |
-
border: none !important;
|
| 762 |
-
border-radius: 12px !important;
|
| 763 |
-
padding: 14px 32px !important;
|
| 764 |
-
box-shadow: 0 4px 20px rgba(0, 184, 148, 0.35), 0 0 40px rgba(108, 92, 231, 0.15) !important;
|
| 765 |
-
transition: transform 0.25s ease, box-shadow 0.3s ease !important;
|
| 766 |
-
cursor: pointer !important;
|
| 767 |
-
}
|
| 768 |
-
#generate-btn button:hover {
|
| 769 |
-
transform: translateY(-2px) !important;
|
| 770 |
-
box-shadow: 0 8px 32px rgba(0, 184, 148, 0.5), 0 0 60px rgba(108, 92, 231, 0.25) !important;
|
| 771 |
-
}
|
| 772 |
-
|
| 773 |
-
@keyframes btn-shimmer {
|
| 774 |
-
0%, 100% { background-position: 0% 50%; }
|
| 775 |
-
50% { background-position: 100% 50%; }
|
| 776 |
-
}
|
| 777 |
-
|
| 778 |
-
/* ── CHECKBOXES — teal accent ── */
|
| 779 |
-
#auto-lora-checkbox input[type="checkbox"],
|
| 780 |
-
#safe-mode-checkbox input[type="checkbox"] {
|
| 781 |
-
accent-color: #00d4aa !important;
|
| 782 |
-
}
|
| 783 |
-
|
| 784 |
-
/* ── CARDS — subtle glass ── */
|
| 785 |
.gradio-container .block {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 786 |
border-radius: 14px !important;
|
| 787 |
}
|
| 788 |
-
|
| 789 |
-
/* ── SECONDARY BUTTON — glass with purple hover ── */
|
| 790 |
-
.gradio-container button.secondary {
|
| 791 |
-
background: rgba(255, 255, 255, 0.06) !important;
|
| 792 |
-
backdrop-filter: blur(8px) !important;
|
| 793 |
-
border: 1px solid rgba(100, 180, 255, 0.2) !important;
|
| 794 |
-
color: #b8c8e0 !important;
|
| 795 |
-
border-radius: 10px !important;
|
| 796 |
-
font-weight: 600 !important;
|
| 797 |
-
transition: all 0.25s ease !important;
|
| 798 |
-
}
|
| 799 |
-
.gradio-container button.secondary:hover {
|
| 800 |
-
background: rgba(108, 92, 231, 0.15) !important;
|
| 801 |
-
border-color: rgba(108, 92, 231, 0.4) !important;
|
| 802 |
-
color: #e0e8f8 !important;
|
| 803 |
-
}
|
| 804 |
-
|
| 805 |
-
/* ── UPLOAD AREAS — dashed borders ── */
|
| 806 |
-
.gradio-container [data-testid="image"] {
|
| 807 |
-
background: rgba(255, 255, 255, 0.04) !important;
|
| 808 |
-
border: 2px dashed rgba(100, 200, 255, 0.3) !important;
|
| 809 |
-
border-radius: 12px !important;
|
| 810 |
-
transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
|
| 811 |
-
}
|
| 812 |
-
.gradio-container [data-testid="image"]:hover {
|
| 813 |
-
border-color: rgba(0, 229, 200, 0.6) !important;
|
| 814 |
-
box-shadow: 0 0 24px rgba(0, 229, 200, 0.12) !important;
|
| 815 |
-
}
|
| 816 |
-
|
| 817 |
-
/* ── ACCORDION — .label-wrap header ── */
|
| 818 |
-
.gradio-container .label-wrap {
|
| 819 |
-
background: rgba(255, 255, 255, 0.03) !important;
|
| 820 |
-
border: 1px solid rgba(100, 180, 255, 0.1) !important;
|
| 821 |
-
border-radius: 12px !important;
|
| 822 |
-
color: #c8d8e8 !important;
|
| 823 |
-
font-weight: 600 !important;
|
| 824 |
-
padding: 10px 14px !important;
|
| 825 |
-
cursor: pointer !important;
|
| 826 |
-
transition: color 0.2s ease !important;
|
| 827 |
-
}
|
| 828 |
-
.gradio-container .label-wrap:hover {
|
| 829 |
-
color: #00e5c8 !important;
|
| 830 |
-
}
|
| 831 |
-
.gradio-container .label-wrap.open {
|
| 832 |
-
color: #00e5c8 !important;
|
| 833 |
-
border-color: rgba(0, 229, 200, 0.35) !important;
|
| 834 |
-
border-radius: 12px 12px 0 0 !important;
|
| 835 |
-
}
|
| 836 |
-
|
| 837 |
-
/* ── FILE / VIDEO OUTPUT ── */
|
| 838 |
-
.gradio-container [data-testid="file"],
|
| 839 |
-
.gradio-container [data-testid="video"] {
|
| 840 |
-
background: rgba(10, 15, 40, 0.5) !important;
|
| 841 |
-
border: 1px solid rgba(100, 180, 255, 0.1) !important;
|
| 842 |
-
border-radius: 10px !important;
|
| 843 |
-
}
|
| 844 |
-
|
| 845 |
-
/* ── INFO TEXT ── */
|
| 846 |
-
.gradio-container .prose small,
|
| 847 |
-
.gradio-container small {
|
| 848 |
-
color: #7a8fa8 !important;
|
| 849 |
-
}
|
| 850 |
-
|
| 851 |
-
/* ── SCROLLBAR — themed ── */
|
| 852 |
-
.gradio-container ::-webkit-scrollbar {
|
| 853 |
-
width: 8px !important;
|
| 854 |
-
height: 8px !important;
|
| 855 |
-
}
|
| 856 |
-
.gradio-container ::-webkit-scrollbar-track {
|
| 857 |
-
background: rgba(10, 15, 40, 0.4) !important;
|
| 858 |
-
border-radius: 4px !important;
|
| 859 |
-
}
|
| 860 |
-
.gradio-container ::-webkit-scrollbar-thumb {
|
| 861 |
-
background: linear-gradient(180deg, #00b894, #6c5ce7) !important;
|
| 862 |
-
border-radius: 4px !important;
|
| 863 |
-
}
|
| 864 |
-
|
| 865 |
-
/* ── LORA PREVIEW ── */
|
| 866 |
-
#auto-lora-preview {
|
| 867 |
-
color: #b8d4e8 !important;
|
| 868 |
-
}
|
| 869 |
-
#auto-lora-preview b {
|
| 870 |
-
color: #00e5c8 !important;
|
| 871 |
-
}
|
| 872 |
"""
|
| 873 |
|
| 874 |
|
|
@@ -878,33 +709,30 @@ with gr.Blocks(delete_cache=(3600, 10800)) as demo:
|
|
| 878 |
|
| 879 |
with gr.Row():
|
| 880 |
with gr.Column():
|
| 881 |
-
input_image_component = gr.Image(type="pil", label="Input Image", sources=["upload", "clipboard"]
|
| 882 |
-
prompt_input = gr.Textbox(label="Prompt", value=default_prompt_i2v
|
| 883 |
auto_lora_checkbox = gr.Checkbox(
|
| 884 |
label="Auto-activate LoRAs from prompt",
|
| 885 |
value=True,
|
| 886 |
interactive=True,
|
| 887 |
info="Automatically detect matching LoRAs from your prompt text (deduplicated by concept).",
|
| 888 |
-
elem_id="auto-lora-checkbox",
|
| 889 |
)
|
| 890 |
auto_lora_preview = gr.HTML(
|
| 891 |
label="Auto-detected LoRAs",
|
| 892 |
value="",
|
| 893 |
elem_id="auto-lora-preview",
|
| 894 |
)
|
| 895 |
-
duration_seconds_input = gr.Slider(minimum=MIN_DURATION, maximum=MAX_DURATION, step=0.1, value=3.5, label="Duration (seconds)", info=f"Clamped to model's {MIN_FRAMES_MODEL}-{MAX_FRAMES_MODEL} frames at {FIXED_FPS}fps."
|
| 896 |
frame_multi = gr.Dropdown(
|
| 897 |
choices=[FIXED_FPS, FIXED_FPS*2, FIXED_FPS*4, FIXED_FPS*8],
|
| 898 |
value=FIXED_FPS,
|
| 899 |
label="Video Fluidity (Frames per Second)",
|
| 900 |
-
info="Extra frames will be generated using flow estimation, which estimates motion between frames to make the video smoother."
|
| 901 |
-
elem_id="frame-multi",
|
| 902 |
)
|
| 903 |
safe_mode_checkbox = gr.Checkbox(
|
| 904 |
label="🛠️ Safe Mode",
|
| 905 |
value=True,
|
| 906 |
-
info="Requests 30% extra processing time to try to prevent unfinished tasks when the server is busy."
|
| 907 |
-
elem_id="safe-mode-checkbox",
|
| 908 |
)
|
| 909 |
with gr.Accordion("Advanced Settings", open=False):
|
| 910 |
last_image_component = gr.Image(type="pil", label="Last Image (Optional)", sources=["upload", "clipboard"])
|
|
@@ -925,7 +753,7 @@ with gr.Blocks(delete_cache=(3600, 10800)) as demo:
|
|
| 925 |
lora_dropdown = gr.Dropdown(choices=lora_loader.get_lora_choices(), label="LoRA (NSFW)", multiselect=True, info="Select scenario LoRAs")
|
| 926 |
play_result_video = gr.Checkbox(label="Display result", value=True, interactive=True)
|
| 927 |
|
| 928 |
-
generate_button = gr.Button("Generate Video", variant="primary"
|
| 929 |
|
| 930 |
with gr.Column():
|
| 931 |
# ASSIGNED elem_id="generated-video" so JS can find it
|
|
@@ -985,7 +813,7 @@ with gr.Blocks(delete_cache=(3600, 10800)) as demo:
|
|
| 985 |
)
|
| 986 |
|
| 987 |
if __name__ == "__main__":
|
| 988 |
-
theme = gr.themes.Default(
|
| 989 |
slider_color="#00d4aa",
|
| 990 |
slider_color_dark="#00d4aa",
|
| 991 |
)
|
|
|
|
| 692 |
min-height: 100vh !important;
|
| 693 |
}
|
| 694 |
|
| 695 |
+
/* ── GLASS CARDS — frosted panels over gradient ── */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 696 |
.gradio-container .block {
|
| 697 |
+
background: rgba(10, 14, 40, 0.55) !important;
|
| 698 |
+
backdrop-filter: blur(16px) !important;
|
| 699 |
+
-webkit-backdrop-filter: blur(16px) !important;
|
| 700 |
+
border: 1px solid rgba(100, 180, 255, 0.12) !important;
|
| 701 |
border-radius: 14px !important;
|
| 702 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 703 |
"""
|
| 704 |
|
| 705 |
|
|
|
|
| 709 |
|
| 710 |
with gr.Row():
|
| 711 |
with gr.Column():
|
| 712 |
+
input_image_component = gr.Image(type="pil", label="Input Image", sources=["upload", "clipboard"])
|
| 713 |
+
prompt_input = gr.Textbox(label="Prompt", value=default_prompt_i2v)
|
| 714 |
auto_lora_checkbox = gr.Checkbox(
|
| 715 |
label="Auto-activate LoRAs from prompt",
|
| 716 |
value=True,
|
| 717 |
interactive=True,
|
| 718 |
info="Automatically detect matching LoRAs from your prompt text (deduplicated by concept).",
|
|
|
|
| 719 |
)
|
| 720 |
auto_lora_preview = gr.HTML(
|
| 721 |
label="Auto-detected LoRAs",
|
| 722 |
value="",
|
| 723 |
elem_id="auto-lora-preview",
|
| 724 |
)
|
| 725 |
+
duration_seconds_input = gr.Slider(minimum=MIN_DURATION, maximum=MAX_DURATION, step=0.1, value=3.5, label="Duration (seconds)", info=f"Clamped to model's {MIN_FRAMES_MODEL}-{MAX_FRAMES_MODEL} frames at {FIXED_FPS}fps.")
|
| 726 |
frame_multi = gr.Dropdown(
|
| 727 |
choices=[FIXED_FPS, FIXED_FPS*2, FIXED_FPS*4, FIXED_FPS*8],
|
| 728 |
value=FIXED_FPS,
|
| 729 |
label="Video Fluidity (Frames per Second)",
|
| 730 |
+
info="Extra frames will be generated using flow estimation, which estimates motion between frames to make the video smoother."
|
|
|
|
| 731 |
)
|
| 732 |
safe_mode_checkbox = gr.Checkbox(
|
| 733 |
label="🛠️ Safe Mode",
|
| 734 |
value=True,
|
| 735 |
+
info="Requests 30% extra processing time to try to prevent unfinished tasks when the server is busy."
|
|
|
|
| 736 |
)
|
| 737 |
with gr.Accordion("Advanced Settings", open=False):
|
| 738 |
last_image_component = gr.Image(type="pil", label="Last Image (Optional)", sources=["upload", "clipboard"])
|
|
|
|
| 753 |
lora_dropdown = gr.Dropdown(choices=lora_loader.get_lora_choices(), label="LoRA (NSFW)", multiselect=True, info="Select scenario LoRAs")
|
| 754 |
play_result_video = gr.Checkbox(label="Display result", value=True, interactive=True)
|
| 755 |
|
| 756 |
+
generate_button = gr.Button("Generate Video", variant="primary")
|
| 757 |
|
| 758 |
with gr.Column():
|
| 759 |
# ASSIGNED elem_id="generated-video" so JS can find it
|
|
|
|
| 813 |
)
|
| 814 |
|
| 815 |
if __name__ == "__main__":
|
| 816 |
+
theme = gr.themes.Default().set(
|
| 817 |
slider_color="#00d4aa",
|
| 818 |
slider_color_dark="#00d4aa",
|
| 819 |
)
|