hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
40.91k stars 5.96k forks source link

The app starts transparent! #597

Closed donnadulcinea closed 2 months ago

donnadulcinea commented 2 months ago

Seems like everything was ok with the install.

When I run I get the error: / warning:

> python run.py --execution-provider cuda
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\dulci\.pyenv\pyenv-win\versions\3.10.6\lib\tkinter\__init__.py", line 1921, in __call__
    return self.func(*args)
  File "C:\Users\dulci\.pyenv\pyenv-win\versions\3.10.6\lib\tkinter\__init__.py", line 839, in callit
    func(*args)
  File "C:\Users\dulci\Documents\Development\Deep-Live-Cam\.venv\lib\site-packages\customtkinter\windows\widgets\scaling\scaling_tracker.py", line 
186, in check_dpi_scaling
    window.block_update_dimensions_event()
  File "C:\Users\dulci\.pyenv\pyenv-win\versions\3.10.6\lib\tkinter\__init__.py", line 2383, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event'
(.venv) PS C:\Users\dulci\Documents\Development\Deep-Live-Cam>

And the application starts so transparent (opacity super low) that I can barely see it and I can't use it, because it is almost invisible against the desktop background.

Can anybody suggest how to fix it?

I am working with venv python 3.10.6.

bkosowski commented 2 months ago

I have the exact same issue when running run-cuda.bat. System: Windows 11, NVIDIA, Python 3.11.

kur00kami123 commented 2 months ago

Am having the same issue too... Please some one who know.... Help us... Be our saviour T_T

hacksider commented 2 months ago

Can you share the screenshot?

hacksider commented 2 months ago

can you pip install these requirements? tkinterdnd2==0.4.2 customtkinter==5.2.2

kur00kami123 commented 2 months ago

Says error could not find a version that satisfies the requirement tkinterdnd==0.4.2

kur00kami123 commented 2 months ago

IMG-20240918-WA0063

On the left the application appears transparent

hacksider commented 2 months ago

pip install tkinterdnd2

hacksider commented 2 months ago

pip install customtkinter==5.2.2

bkosowski commented 2 months ago

This doesn't do anything, before the requirements are already there. pip list shows me:

customtkinter              5.2.2
tkinterdnd2                  0.4.2

And I have the same problem with nearly invisible window.

hacksider commented 2 months ago

can you pull again to see if this fixes the issue?

bkosowski commented 2 months ago

can you pull again to see if this fixes the issue?

The exact same thing happens on commit 1f71d274b532f6065cd0adfcce22f649de66dd93.

hacksider commented 2 months ago

can you check again now?

Adhambec commented 2 months ago

yes problem

bkosowski commented 2 months ago

can you check again now?

That's a peculiar question, since you reverted changes to a README file.

If you're asking, does it mean that it works for you on the latest main branch at the moment (3e1f333e5e05345a1f5b3481126931f0484b2858)?

kur00kami123 commented 2 months ago

Hello... If i run the code... Same error but the deepfacelive is transparant and working.... But all face swaps live or img... Have black box in them

Flansi commented 2 months ago

Got the same issue:

python run.py --execution-provider cuda --execution-threads 60 --max-memory 60 Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\asdf\anaconda3\lib\tkinter__init.py", line 1921, in call return self.func(*args) File "C:\Users\asdf\anaconda3\lib\tkinter\init.py", line 839, in callit func(*args) File "G:\App\Deep-Live-Cam\env\lib\site-packages\customtkinter\windows\widgets\scaling\scaling_tracker.py", line 186, in check_dpi_scaling window.block_update_dimensions_event() File "C:\Users\hanne\anaconda3\lib\tkinter\init.py", line 2383, in getattr__ return getattr(self.tk, attr) AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event'

bkosowski commented 2 months ago

@Flansi And what is your system? Operating system, Python version? I reckon you have an NVIDIA GPU.

hacksider commented 2 months ago

I still dont get why you have transparent UI's even after all the last UI changes are reverted 😕

kur00kami123 commented 2 months ago

Python version is 3.10.11...ffmpeg installed... But still.... That error comes out and the ui is like 5% visible AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event'

Flansi commented 2 months ago

@Flansi And what is your system? Operating system, Python version? I reckon you have an NVIDIA GPU.

Upsi, Win 11, RTX4090, python 3.10.9

hacksider commented 2 months ago

dimensions

When was your last pull? I made some changes 12 hours ago.

Flansi commented 2 months ago

dimensions

When was your last pull? I made some changes 12 hours ago.

Just pulled, still transparent.

python run.py --execution-provider cuda --execution-threads 60 --max-memory 60 Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\hanne\anaconda3\lib\tkinter__init.py", line 1921, in call return self.func(*args) File "C:\Users\hanne\anaconda3\lib\tkinter\init.py", line 839, in callit func(*args) File "G:\App\Deep-Live-Cam\env\lib\site-packages\customtkinter\windows\widgets\scaling\scaling_tracker.py", line 186, in check_dpi_scaling window.block_update_dimensions_event() File "C:\Users\hanne\anaconda3\lib\tkinter\init.py", line 2383, in getattr__ return getattr(self.tk, attr) AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event'

nguyensi22 commented 2 months ago

I also encountered the same phenomenon when opening the app but it still didn't work because 'tkinterdnd2' was missing.

hacksider commented 2 months ago

Kindly get the latest pull

Flansi commented 2 months ago

Now it starts a few ms without the transparency and then it gets transparent again. As it gets transparent the error message is shown

transparent

python run.py --execution-provider cuda --execution-threads 60 --max-memory 60 Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\hanne\anaconda3\lib\tkinter__init.py", line 1921, in call return self.func(*args) File "C:\Users\hanne\anaconda3\lib\tkinter\init.py", line 839, in callit func(*args) File "G:\App\Deep-Live-Cam\env\lib\site-packages\customtkinter\windows\widgets\scaling\scaling_tracker.py", line 186, in check_dpi_scaling window.block_update_dimensions_event() File "C:\Users\hanne\anaconda3\lib\tkinter\init.py", line 2383, in getattr__ return getattr(self.tk, attr) AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event'

kur00kami123 commented 2 months ago

Same error out here too AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event' ... T_T comon great minds of the world.... Help T_T

bkosowski commented 2 months ago

@hacksider Yesterday you reverted some irrelevant changes to the README file. But today you reverted breaking changes to the UI code. And I confirm that the revert fixed the issue.

The UI looks good now.

kur00kami123 commented 2 months ago

@bkosowski... Your Ui is visible? If so how did u do it... Also u dont get the error AttributeError: '_tkinter.tkapp' object has no attribute 'block_update_dimensions_event' Anymore?

bkosowski commented 2 months ago

@kur00kami123 Yes, today's version is working fine. I suggest deleting the folder and cloning the repository anew. (You may want to save your models though).

hacksider commented 2 months ago

Closing this as the fix is confirmed

hacksider commented 1 month ago

@KRSHH

KRSHH commented 1 month ago

Hi @donnadulcinea , although I wasn't able to reproduce your issue, I have made a few changes to the code, and have tested it (It worked properly). Please test it out by cloning my fork and tell us if you face any issues.

donnadulcinea commented 1 month ago

Hi @donnadulcinea , although I wasn't able to reproduce your issue, I have made a few changes to the code, and have tested it (It worked properly). Please test it out by cloning my fork and tell us if you face any issues.

Thank you! The last fixes are working. Then I had other problems with the models (https://github.com/hacksider/Deep-Live-Cam/issues/613) but I fixed them with a new shared model.

KRSHH commented 1 month ago

Hi @donnadulcinea , although I wasn't able to reproduce your issue, I have made a few changes to the code, and have tested it (It worked properly). Please test it out by cloning my fork and tell us if you face any issues.

Thank you! The last fixes are working. Then I had other problems with the models (#613) but I fixed them with a new shared model.

So, is my fork working without issues? @donnadulcinea

donnadulcinea commented 1 month ago

Hi @donnadulcinea , although I wasn't able to reproduce your issue, I have made a few changes to the code, and have tested it (It worked properly). Please test it out by cloning my fork and tell us if you face any issues.

Thank you! The last fixes are working. Then I had other problems with the models (#613) but I fixed them with a new shared model.

So, is my fork working without issues? @donnadulcinea

Yes, I cloned everything and the fork is working as well. I had previously fixed the issue with the commit cad40b25dc23d13c533d2696b987af922f10e225.

Thanks again @KRSHH .

KRSHH commented 1 month ago

@donnadulcinea Thanks @hacksider I guess you can remerge the updated version now...

hacksider commented 1 month ago

Will do :) thanks @KRSHH

hacksider commented 1 month ago

@KRSHH kindly send me an email (email is in my profile)

KRSHH commented 1 month ago

@KRSHH kindly send me an email (email is in my profile)

Done