MCPcopy Create free account
hub / github.com/6174/comflowyspace / checkIfInstalledComfyUI

Function checkIfInstalledComfyUI

apps/node/src/modules/comfyui/bootstrap.ts:83–93  ·  view source on GitHub ↗
(comfy_path?: string)

Source from the content-addressed store, hash-verified

81}
82
83export async function checkIfInstalledComfyUI(comfy_path?: string): Promise<boolean> {
84 try {
85 const comfyUIPath = comfy_path || getComfyUIDir();
86 const isGitRepo = await fsExtra.exists(path.resolve(comfyUIPath, ".git"));
87 const isExistMain = await fsExtra.exists(path.resolve(comfyUIPath, "main.py"));
88 const isExisComfySrc = await fsExtra.exists(path.resolve(comfyUIPath, "comfy"));
89 return isGitRepo && isExistMain && isExisComfySrc;
90 } catch(err) {
91 return false;
92 }
93}
94
95// 检查一个程序是否已经安装
96export async function checkIfInstalled(name: string): Promise<boolean> {

Callers 5

downloadDefaultModelFunction · 0.90
ApiBootstrapFunction · 0.90
ApiSetupConfigFunction · 0.90
checkBasicRequirementsFunction · 0.85
cloneComfyUIFunction · 0.85

Calls 1

getComfyUIDirFunction · 0.90

Tested by

no test coverage detected