Merge pull request #67 from allenhooo/transparent_background_executable_path

If the path of the virtual environment is not venv, it will crashed when call transparent_background
pull/102/head
s9roll7 2023-05-31 08:53:32 +09:00 committed by GitHub
commit e4944feea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,8 @@ def create_mask_clipseg(input_dir, output_dir, clipseg_mask_prompt, clipseg_excl
def create_mask_transparent_background(input_dir, output_dir, tb_use_fast_mode, tb_use_jit, st1_mask_threshold):
fast_str = " --fast" if tb_use_fast_mode else ""
jit_str = " --jit" if tb_use_jit else ""
bin_path = os.path.join("venv", "Scripts")
venv = os.environ['VIRTUAL_ENV']
bin_path = os.path.join(venv, "Scripts")
bin_path = os.path.join(bin_path, "transparent-background")
if os.path.isfile(bin_path) or os.path.isfile(bin_path + ".exe"):