Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions comfy_cli/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def load(self):
if not os.path.exists(tmp_path):
os.makedirs(tmp_path)

if "background" in self.config["DEFAULT"]:
bg_info = self.config["DEFAULT"]["background"].strip("()").split(",")
if constants.CONFIG_KEY_BACKGROUND in self.config["DEFAULT"]:
bg_info = self.config["DEFAULT"][constants.CONFIG_KEY_BACKGROUND].strip("()").split(",")
bg_info = [item.strip().strip("'") for item in bg_info]
self.background = bg_info[0], int(bg_info[1]), int(bg_info[2])

Expand All @@ -94,7 +94,7 @@ def get_env_data(self):
data.append(("Config Path", self.get_config_file_path()))

launch_extras = ""
if self.config.has_option("DEFAULT", "default_workspace"):
if self.config.has_option("DEFAULT", constants.CONFIG_KEY_DEFAULT_WORKSPACE):
data.append(
(
"Default ComfyUI workspace",
Expand All @@ -120,11 +120,15 @@ def get_env_data(self):
else:
data.append(("Recent ComfyUI workspace", "No recent run"))

if self.config.has_option("DEFAULT", "enable_tracking"):
if self.config.has_option("DEFAULT", constants.CONFIG_KEY_ENABLE_TRACKING):
data.append(
(
"Tracking Analytics",
("Enabled" if self.config["DEFAULT"]["enable_tracking"] == "True" else "Disabled"),
(
"Enabled"
if self.config["DEFAULT"][constants.CONFIG_KEY_ENABLE_TRACKING] == "True"
else "Disabled"
),
)
)

Expand All @@ -143,7 +147,7 @@ def get_env_data(self):
return data

def remove_background(self):
del self.config["DEFAULT"]["background"]
del self.config["DEFAULT"][constants.CONFIG_KEY_BACKGROUND]
self.write_config()
self.background = None

Expand Down
Loading