Fix GPUMemoryManager param and simplify theme
- Fix comfyui_reserve_bytes -> comfyui_reserve_gb in main.py - Simplify Gradio theme to avoid invalid parameters 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2
main.py
2
main.py
@@ -44,7 +44,7 @@ async def initialize_services():
|
||||
logger.info("Initializing GPU manager...")
|
||||
gpu_manager = GPUMemoryManager(
|
||||
device_id=0,
|
||||
comfyui_reserve_bytes=int(settings.comfyui_reserve_gb * 1024**3),
|
||||
comfyui_reserve_gb=settings.comfyui_reserve_gb,
|
||||
)
|
||||
|
||||
# Initialize model registry
|
||||
|
||||
@@ -9,88 +9,11 @@ def create_audiocraft_theme() -> gr.themes.Base:
|
||||
Returns:
|
||||
Gradio theme instance
|
||||
"""
|
||||
# Use Soft theme with dark colors - simpler approach for compatibility
|
||||
return gr.themes.Soft(
|
||||
primary_hue=gr.themes.colors.blue,
|
||||
secondary_hue=gr.themes.colors.slate,
|
||||
neutral_hue=gr.themes.colors.gray,
|
||||
font=[
|
||||
gr.themes.GoogleFont("Inter"),
|
||||
"ui-sans-serif",
|
||||
"system-ui",
|
||||
"sans-serif",
|
||||
],
|
||||
font_mono=[
|
||||
gr.themes.GoogleFont("JetBrains Mono"),
|
||||
"ui-monospace",
|
||||
"monospace",
|
||||
],
|
||||
).set(
|
||||
# Colors
|
||||
body_background_fill="#0f172a",
|
||||
body_background_fill_dark="#0f172a",
|
||||
background_fill_primary="#1e293b",
|
||||
background_fill_primary_dark="#1e293b",
|
||||
background_fill_secondary="#334155",
|
||||
background_fill_secondary_dark="#334155",
|
||||
border_color_primary="#475569",
|
||||
border_color_primary_dark="#475569",
|
||||
|
||||
# Text
|
||||
body_text_color="#e2e8f0",
|
||||
body_text_color_dark="#e2e8f0",
|
||||
body_text_color_subdued="#94a3b8",
|
||||
body_text_color_subdued_dark="#94a3b8",
|
||||
|
||||
# Buttons
|
||||
button_primary_background_fill="#3b82f6",
|
||||
button_primary_background_fill_dark="#3b82f6",
|
||||
button_primary_background_fill_hover="#2563eb",
|
||||
button_primary_background_fill_hover_dark="#2563eb",
|
||||
button_primary_text_color="#ffffff",
|
||||
button_primary_text_color_dark="#ffffff",
|
||||
|
||||
button_secondary_background_fill="#475569",
|
||||
button_secondary_background_fill_dark="#475569",
|
||||
button_secondary_background_fill_hover="#64748b",
|
||||
button_secondary_background_fill_hover_dark="#64748b",
|
||||
|
||||
# Inputs
|
||||
input_background_fill="#1e293b",
|
||||
input_background_fill_dark="#1e293b",
|
||||
input_border_color="#475569",
|
||||
input_border_color_dark="#475569",
|
||||
input_border_color_focus="#3b82f6",
|
||||
input_border_color_focus_dark="#3b82f6",
|
||||
|
||||
# Blocks
|
||||
block_background_fill="#1e293b",
|
||||
block_background_fill_dark="#1e293b",
|
||||
block_border_color="#334155",
|
||||
block_border_color_dark="#334155",
|
||||
block_label_background_fill="#334155",
|
||||
block_label_background_fill_dark="#334155",
|
||||
block_label_text_color="#e2e8f0",
|
||||
block_label_text_color_dark="#e2e8f0",
|
||||
block_title_text_color="#f1f5f9",
|
||||
block_title_text_color_dark="#f1f5f9",
|
||||
|
||||
# Sliders
|
||||
slider_color="#3b82f6",
|
||||
slider_color_dark="#3b82f6",
|
||||
|
||||
# Shadows
|
||||
shadow_spread="4px",
|
||||
block_shadow="0 4px 6px -1px rgba(0, 0, 0, 0.3)",
|
||||
|
||||
# Spacing
|
||||
layout_gap="16px",
|
||||
block_padding="16px",
|
||||
panel_border_width="1px",
|
||||
|
||||
# Radius
|
||||
radius_sm="6px",
|
||||
radius_md="8px",
|
||||
radius_lg="12px",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user