Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-LF option doesn't get carried to the internal tools #1377

Open
tokafondo opened this issue Mar 19, 2024 · 1 comment
Open

-LF option doesn't get carried to the internal tools #1377

tokafondo opened this issue Mar 19, 2024 · 1 comment

Comments

@tokafondo
Copy link
Contributor

tokafondo commented Mar 19, 2024

Hi. I'm trying to use two faceswap instances in parallel. One of them is using GPU and I want to use the another one with only CPU for secondary tasks.

I use python faceswap.py gui -LF c:\temp\faceswap.log.2 -X0 to start the secondary instance.

When I try to run a sort task in this secondary instance, I get this:

Setting Faceswap backend to NVIDIA
Traceback (most recent call last):
File "C:\Users\Yo\faceswap\tools.py", line 48, in <module>
ARGUMENTS.func(ARGUMENTS)
File "C:\Users\Yo\faceswap\lib\cli\launcher.py", line 217, in execute_script
log_setup(arguments.loglevel, arguments.logfile, self._command, is_gui)
File "C:\Users\Yo\faceswap\lib\logger.py", line 375, in log_setup
f_handler = _file_handler(numeric_loglevel, log_file, log_format, command)
File "C:\Users\Yo\faceswap\lib\logger.py", line 419, in _file_handler
handler.doRollover()
File "C:\Users\Yo\miniconda3\envs\faceswap\lib\logging\handlers.py", line 179, in doRollover
self.rotate(self.baseFilename, dfn)
File "C:\Users\Yo\miniconda3\envs\faceswap\lib\logging\handlers.py", line 115, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'C:\\Users\\Yo\\faceswap\\faceswap.log' -> 'C:\\Users\\Yo\\faceswap\\faceswap.log.1'
Process exited.

It seems that internally, it's still using the main log, because the -LF option doesn't get carried to the sort command.

If I run python.exe faceswap\tools.py sort -i C:/workspace.blade/Ford/Ford1 -s none -g face -t -1.0 -b 5 -lf sort_log.json -L INFO -LF c:\temp\faceswap.log.3 directly in the console, it works in parallel with the main instance.

@tokafondo
Copy link
Contributor Author

[WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'C:\\Users\\Yo\\faceswap\\faceswap.log' -> 'C:\\Users\\Yo\\faceswap\\faceswap.log.1'

This is spanish for The process cannot access the file because it is being used by another process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant