Giter VIP home page Giter VIP logo

Comments (6)

screan avatar screan commented on May 27, 2024 1

@nukadelic this happened to me at first to. just run

pip install transparent-background

from ebsynth_utility.

s9roll7 avatar s9roll7 commented on May 27, 2024

You're using python in an odd place.
I think it would be faster to redo the installation honestly.

from ebsynth_utility.

nukadelic avatar nukadelic commented on May 27, 2024

@s9roll7 reinstalled everything , but seems like it wants to install some sort of pth file , not sure what to make of it ,
also tried installing transparent-background as @screan suggested , but didn't help

Skip frame extraction
Access denied with the following error:

        Too many users have viewed or downloaded this file recently. Please
        try accessing the file again later. If the file you are trying to
        access is particularly large or is shared with many people, it may
        take up to 24 hours to be able to view or download the file. If you
        still can't access a file after 24 hours, contact your domain
        administrator.

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=13oBl5MTVcWER3YU4fSxW3ATlVfueFQPY

Traceback (most recent call last):
  File "C:\Dev\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Dev\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\StableDiffusion\Auto1111\venv\Scripts\transparent-background.exe\__main__.py", line 7, in <module>
  File "C:\StableDiffusion\Auto1111\venv\lib\site-packages\transparent_background\Remover.py", line 151, in console
    remover = Remover(fast=args.fast, jit=args.jit, device=args.device, ckpt=args.ckpt)
  File "C:\StableDiffusion\Auto1111\venv\lib\site-packages\transparent_background\Remover.py", line 79, in __init__
    self.model.load_state_dict(torch.load(os.path.join(ckpt_dir, ckpt_name), map_location='cpu'), strict=True)
  File "C:\StableDiffusion\Auto1111\venv\lib\site-packages\torch\serialization.py", line 771, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "C:\StableDiffusion\Auto1111\venv\lib\site-packages\torch\serialization.py", line 270, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "C:\StableDiffusion\Auto1111\venv\lib\site-packages\torch\serialization.py", line 251, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Stealth\\.transparent-background\\ckpt_base.pth'
mask created

completed.

from ebsynth_utility.

nukadelic avatar nukadelic commented on May 27, 2024

oh nvm , i think i got it , just needed to manually dl and rename the file , more info here ( see issue 26 ) , any ideas what is this file , and why do we need to download from someone else's google drive ?

from ebsynth_utility.

s9roll7 avatar s9roll7 commented on May 27, 2024

https://github.com/plemeri/InSPyReNet
I believe that file is a pre-trained model used internally by transparent-background

from ebsynth_utility.

nukadelic avatar nukadelic commented on May 27, 2024

@s9roll7 So i moved my Auto1111 folder again ( this time to an external device ) and the same problem resurfaced. But I did find a way to fix that , in the stage1.py , create_mask_transparent_background( method ) I invoked system command instead :

    fast_str = " --fast" if tb_use_fast_mode else ""
    jit_str = " --jit" if tb_use_jit else ""
    bin_path = os.path.join("venv", "Scripts")
    bin_path = os.path.join(bin_path, "transparent-background.exe")  # note the "exe" addition
    # print("--> Bin = " + bin_path ) 
 
    # if os.path.isfile(bin_path) or os.path.isfile(bin_path + ".exe"):
    #     print("local")
    #     subprocess.call(bin_path + " --source " + input_dir + " --dest " + output_dir + " --type map" + fast_str + jit_str, shell=True)
    # else:
    #     print("global")
    #     subprocess.call("transparent-background --source " + input_dir + " --dest " + output_dir + " --type map" + fast_str + jit_str, shell=True)

    current_dir = os.path.abspath(__file__)

    # print("--> Current Dir = " + current_dir )

    a1111_dir = os.path.abspath( os.path.abspath( os.path.dirname( current_dir ) + "/../" ) + "/../" )
    # print("--> A1111 Dir = " + a1111_dir )

    py_dir = os.path.join( a1111_dir , "venv" , "Scripts", "python.exe" )
    # print("--> Py Dir = " + py_dir )

    exe_dir = os.path.join( a1111_dir , bin_path )
    # print("--> Exec Dir = " + exe_dir )

    cmd_out = py_dir + " " + exe_dir + " --source " + input_dir + " --dest " + output_dir + " --type map" + fast_str + jit_str
    # print( "--> Invoke: " + cmd_out )
    
    # subprocess.call( exe_dir + " --source " + input_dir + " --dest " + output_dir + " --type map" + fast_str + jit_str, cwd=a1111_dir, shell=True)
    
    os.system( cmd_out )
    
    # rest of the method is unchanged 

    mask_imgs = ...

from ebsynth_utility.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.