MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / is_installed

Function is_installed

ui/easydiffusion/backends/webui.py:192–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190
191
192def is_installed():
193 if not os.path.exists(BACKEND_DIR) or not os.path.exists(SYSTEM_DIR) or not os.path.exists(WEBUI_DIR):
194 return True
195
196 env = dict(os.environ)
197 env.update(get_env())
198
199 try:
200 out = check_output_in_conda(["python", "-m", "pip", "show", "torch"], env=env)
201 return "Version" in out.decode()
202 except subprocess.CalledProcessError:
203 pass
204
205 return False
206
207
208def run_in_conda(cmds: list, *args, **kwargs):

Callers 1

start_backendFunction · 0.70

Calls 2

get_envFunction · 0.85
check_output_in_condaFunction · 0.85

Tested by

no test coverage detected