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

Function checkBasicRequirements

apps/node/src/modules/comfyui/bootstrap.ts:22–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20const appDir = getAppDataDir();
21
22export async function checkBasicRequirements() {
23 let isSetupedConfig = await checkIsSetupedConfig();
24 let isCondaInstalled = false,
25 isPythonInstalled = false,
26 isTorchInstalled = false,
27 isComfyUIInstalled = false,
28 isComfyUIStarted = false,
29 isCustomComfyEnv = false,
30 isGitInstalled = false;
31 if (isSetupedConfig) {
32 isComfyUIInstalled = await checkIfInstalledComfyUI();
33 const appConfig = appConfigManager.getSetupConfig();
34 isCustomComfyEnv = appConfig?.isCustomComfyEnv ?? false;
35 /**
36 * if user delete ComfyUI, user should re-setup the config
37 */
38 if (!isComfyUIInstalled) {
39 appConfigManager.delete(CONFIG_KEYS.appSetupConfig);
40 isSetupedConfig = false;
41 }
42 isComfyUIStarted = await comfyuiService.isComfyUIAlive();
43 }
44 isCondaInstalled = await checkIfInstalled("conda");
45 isPythonInstalled = !!conda.env?.PYTHON_PATH;
46 isGitInstalled = await checkIfInstalled("git --version");
47 if (isCondaInstalled && isPythonInstalled) {
48 isTorchInstalled = await verifyIsTorchInstalled()
49 }
50
51 return {
52 isCondaInstalled,
53 isPythonInstalled,
54 isCustomComfyEnv,
55 isGitInstalled,
56 isTorchInstalled,
57 isComfyUIInstalled,
58 isComfyUIStarted,
59 isSetupedConfig,
60 isBasicModelInstalled: true,
61 isBasicExtensionInstalled: true,
62 comfyUIVersion: await checkComfyUIVersion()
63 }
64}
65
66export async function checkComfyUIVersion() {
67 try {

Callers 1

ApiEnvCheckFunction · 0.90

Calls 8

verifyIsTorchInstalledFunction · 0.90
checkIsSetupedConfigFunction · 0.85
checkIfInstalledComfyUIFunction · 0.85
checkIfInstalledFunction · 0.85
checkComfyUIVersionFunction · 0.85
getSetupConfigMethod · 0.80
isComfyUIAliveMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected