prithivMLmods commited on
Commit
703fd83
·
verified ·
1 Parent(s): 2e05081

update app

Browse files
Files changed (1) hide show
  1. wan_app.py +52 -1
wan_app.py CHANGED
@@ -21,6 +21,57 @@ from torchao.quantization import Float8DynamicActivationFloat8WeightConfig
21
  from torchao.quantization import Int8WeightOnlyConfig
22
 
23
  import aoti
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
26
 
@@ -536,4 +587,4 @@ with gr.Blocks(title="wan2.2-i2v-fast") as demo:
536
  )
537
 
538
  if __name__ == "__main__":
539
- demo.queue().launch(theme=gr.themes.Citrus(), mcp_server=True, css=css, show_error=True)
 
21
  from torchao.quantization import Int8WeightOnlyConfig
22
 
23
  import aoti
24
+ from typing import Iterable
25
+
26
+ # --------------------------- theme ---------------------------
27
+
28
+ from gradio.themes import Soft
29
+ from gradio.themes.utils import colors, fonts, sizes
30
+
31
+ colors.orange_red = colors.Color(
32
+ name="orange_red", c50="#FFF0E5", c100="#FFE0CC", c200="#FFC299", c300="#FFA366",
33
+ c400="#FF8533", c500="#FF4500", c600="#E63E00", c700="#CC3700", c800="#B33000",
34
+ c900="#992900", c950="#802200",
35
+ )
36
+
37
+ class OrangeRedTheme(Soft):
38
+ def __init__(
39
+ self, *, primary_hue: colors.Color | str = colors.gray,
40
+ secondary_hue: colors.Color | str = colors.orange_red,
41
+ neutral_hue: colors.Color | str = colors.slate, text_size: sizes.Size | str = sizes.text_lg,
42
+ font: fonts.Font | str | Iterable[fonts.Font | str] = (
43
+ fonts.GoogleFont("Outfit"), "Arial", "sans-serif",
44
+ ),
45
+ font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
46
+ fonts.GoogleFont("IBM Plex Mono"), "ui-monospace", "monospace",
47
+ ),
48
+ ):
49
+ super().__init__(
50
+ primary_hue=primary_hue, secondary_hue=secondary_hue, neutral_hue=neutral_hue,
51
+ text_size=text_size, font=font, font_mono=font_mono,
52
+ )
53
+ super().set(
54
+ background_fill_primary="*primary_50",
55
+ background_fill_primary_dark="*primary_900",
56
+ body_background_fill="linear-gradient(135deg, *primary_200, *primary_100)",
57
+ body_background_fill_dark="linear-gradient(135deg, *primary_900, *primary_800)",
58
+ button_primary_text_color="white",
59
+ button_primary_text_color_hover="white",
60
+ button_primary_background_fill="linear-gradient(90deg, *secondary_500, *secondary_600)",
61
+ button_primary_background_fill_hover="linear-gradient(90deg, *secondary_600, *secondary_700)",
62
+ button_primary_background_fill_dark="linear-gradient(90deg, *secondary_600, *secondary_700)",
63
+ button_primary_background_fill_hover_dark="linear-gradient(90deg, *secondary_500, *secondary_600)",
64
+ slider_color="*secondary_500",
65
+ slider_color_dark="*secondary_600",
66
+ block_title_text_weight="600", block_border_width="3px",
67
+ block_shadow="*shadow_drop_lg", button_primary_shadow="*shadow_drop_lg",
68
+ button_large_padding="11px", color_accent_soft="*primary_100",
69
+ block_label_background_fill="*primary_200",
70
+ )
71
+
72
+ orange_red_theme = OrangeRedTheme()
73
+
74
+ # --------------------------- theme ---------------------------
75
 
76
  MODEL_ID = "Wan-AI/Wan2.2-I2V-A14B-Diffusers"
77
 
 
587
  )
588
 
589
  if __name__ == "__main__":
590
+ demo.queue().launch(theme=orange_red_theme, mcp_server=True, css=css, show_error=True)