We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31333a7 commit 1873817Copy full SHA for 1873817
ldm/invoke/config/invokeai_update.py
@@ -33,11 +33,14 @@ def get_versions()->dict:
33
34
def invokeai_is_running()->bool:
35
for p in psutil.process_iter():
36
- cmdline = p.cmdline()
37
- matches = [x for x in cmdline if x.endswith('invokeai')]
38
- if matches:
39
- print(f':exclamation: [bold red]An InvokeAI instance appears to be running as process {p.pid}[/red bold]')
40
- return True
+ try:
+ cmdline = p.cmdline()
+ matches = [x for x in cmdline if x.endswith(('invokeai','invokeai.exe'))]
+ if matches:
+ print(f':exclamation: [bold red]An InvokeAI instance appears to be running as process {p.pid}[/red bold]')
41
+ return True
42
+ except psutil.AccessDenied:
43
+ continue
44
return False
45
46
0 commit comments