Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Resolve the optional LAN password module at import time again in the launcher session

Bowen Xuec6fc7b105e43
diff --git a/freevideo_engine/launcher_session.py b/freevideo_engine/launcher_session.py
index 53f3639..fc0b336 100644
--- a/freevideo_engine/launcher_session.py
+++ b/freevideo_engine/launcher_session.py
@@ -1,7 +1,6 @@
"""Widget-independent state for the Qt launcher; uses the existing installer."""
from copy import deepcopy
from functools import lru_cache
-import importlib
import json
import os
from pathlib import Path
@@ -12,7 +11,7 @@ import time
from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit
from . import __version__
-from . import disk_space
+from . import disk_space, lan_password
from .comfy_launcher_runtime import Controller, layout, local_url, loopback_url, managed_frontend, new_layout, queue_busy
from .desktop_runtime import launcher_root, materialize_source
from .download_settings import Probe, read as download_preferences, speed_text
@@ -46,11 +45,6 @@ ARCHIVE_FAILURES = {
@lru_cache(maxsize=4)
-def _lan_password():
- # Resolved per call: the access module is optional and may be absent.
- return importlib.import_module('.lan_password', __package__)
-
-
def _qr_rows(text):
from .qr_code import encode
try:
@@ -2011,14 +2005,14 @@ class Session:
"""(supported, set) for the optional LAN password; unsupported without the access module."""
engine = (self.controller.selection or {}).get('engine')
try:
- lan_password = _lan_password()
+ from . import lan_password
return True, bool(engine) and bool(lan_password.is_set(engine))
except (ImportError, OSError):
return False, False
def lan_password_min(self):
try:
- lan_password = _lan_password()
+ from . import lan_password
return int(getattr(lan_password, 'MIN_LENGTH', 6))
except (ImportError, OSError, TypeError, ValueError):
return 6
@@ -2028,7 +2022,7 @@ class Session:
engine = (self.controller.selection or {}).get('engine')
if not engine:
return
- lan_password = _lan_password()
+ from . import lan_password
if text is None:
lan_password.remove(engine)
else: