mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-06 12:49:02 +08:00
auto install uv
This commit is contained in:
parent
9f670bc7e8
commit
c59a2badd2
@ -1,3 +1,4 @@
|
||||
import sys
|
||||
import shlex
|
||||
import subprocess
|
||||
from functools import wraps
|
||||
@ -8,6 +9,11 @@ def patch():
|
||||
return
|
||||
|
||||
print("using uv")
|
||||
try:
|
||||
subprocess.run(['uv', '-V'])
|
||||
except FileNotFoundError:
|
||||
subprocess.run([sys.executable, '-m', 'pip', 'install', 'uv'])
|
||||
|
||||
subprocess.__original_run = subprocess.run
|
||||
|
||||
@wraps(subprocess.__original_run)
|
||||
|
Loading…
x
Reference in New Issue
Block a user