mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-07 00:03:31 -08:00
auto install uv
This commit is contained in:
parent
9f670bc7e8
commit
c59a2badd2
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue