mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-02-01 08:48:19 +00:00
comfyui is now working
This commit is contained in:
parent
d5ee445164
commit
37a2c2366c
@ -87,6 +87,7 @@ def install_comfyui(lollms_app:LollmsApplication):
|
|||||||
|
|
||||||
lollms_app.comfyui = LollmsComfyUI(lollms_app)
|
lollms_app.comfyui = LollmsComfyUI(lollms_app)
|
||||||
ASCIIColors.green("Comfyui installed successfully")
|
ASCIIColors.green("Comfyui installed successfully")
|
||||||
|
lollms_app.HideBlockingMessage()
|
||||||
|
|
||||||
|
|
||||||
def get_comfyui(lollms_paths:LollmsPaths):
|
def get_comfyui(lollms_paths:LollmsPaths):
|
||||||
|
@ -57,6 +57,23 @@ def create_conda_env(env_name, python_version):
|
|||||||
# Create a new Conda environment with the specified Python version
|
# Create a new Conda environment with the specified Python version
|
||||||
#run_command(Commands.CREATE, "-n", env_name, f"python={python_version}")
|
#run_command(Commands.CREATE, "-n", env_name, f"python={python_version}")
|
||||||
|
|
||||||
|
def run_pip_in_env(env_name, pip_args, cwd=None):
|
||||||
|
from conda.cli.python_api import run_command, Commands
|
||||||
|
import platform
|
||||||
|
# Set the current working directory if provided, otherwise use the current directory
|
||||||
|
if cwd is None:
|
||||||
|
cwd = os.getcwd()
|
||||||
|
|
||||||
|
# Activate the Conda environment
|
||||||
|
python_path = Path(sys.executable).parent.parent/"miniconda3"/"envs"/env_name/"python"
|
||||||
|
process = subprocess.Popen(f'{python_path} -m pip {pip_args}', shell=True)
|
||||||
|
|
||||||
|
# Wait for the process to finish
|
||||||
|
process.wait()
|
||||||
|
#subprocess.Popen(f'conda activate {env_name} && {script_path}', shell=True, cwd=cwd)
|
||||||
|
#run_command(Commands.RUN, "-n", env_name, "python " + str(script_path), cwd=cwd)
|
||||||
|
|
||||||
|
|
||||||
def run_python_script_in_env(env_name, script_path, cwd=None):
|
def run_python_script_in_env(env_name, script_path, cwd=None):
|
||||||
from conda.cli.python_api import run_command, Commands
|
from conda.cli.python_api import run_command, Commands
|
||||||
import platform
|
import platform
|
||||||
|
Loading…
x
Reference in New Issue
Block a user