Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

NSFW option doesn't appear on the application

Open Achraf80000 opened this issue 1 year ago • 18 comments

image

Achraf80000 avatar Aug 16 '24 01:08 Achraf80000

edit the ui.py file in the modules directory: Find these -

nsfw_value = ctk.BooleanVar(value=modules.globals.nsfw)

nsfw_switch = ctk.CTkSwitch(root, text='NSFW', variable=nsfw_value, cursor='hand2', command=lambda: setattr(modules.globals, 'nsfw', nsfw_value.get()))

nsfw_switch.place(relx=0.6, rely=0.7)

Uncomment all three.

This should add the NSFW button back to the UI. It worked for me Mac mini 2020 M1.

I've running now - will see how it goes - it didn't crash and die like it did before I reenabled the button, and turned it on.

Good Luck.

APD-01 avatar Aug 16 '24 03:08 APD-01

edit the ui.py file in the modules directory: Find these -

nsfw_value = ctk.BooleanVar(value=modules.globals.nsfw)

nsfw_switch = ctk.CTkSwitch(root, text='NSFW', variable=nsfw_value, cursor='hand2', command=lambda: setattr(modules.globals, 'nsfw', nsfw_value.get()))

nsfw_switch.place(relx=0.6, rely=0.7)

Uncomment all three.

This should add the NSFW button back to the UI. It worked for me Mac mini 2020 M1.

I've running now - will see how it goes - it didn't crash and die like it did before I reenabled the button, and turned it on.

Good Luck.

Alright it worked, thanks for helping me out image

Achraf80000 avatar Aug 16 '24 05:08 Achraf80000

This function is working not very well in the main branch. I will merge the fixed-PR in the experimental branch to the main branch soon.

PR @ https://github.com/hacksider/Deep-Live-Cam/pull/237

vic4key avatar Aug 16 '24 09:08 vic4key

edit the ui.py file in the modules directory: Find these -

nsfw_value = ctk.BooleanVar(value=modules.globals.nsfw)

nsfw_switch = ctk.CTkSwitch(root, text='NSFW', variable=nsfw_value, cursor='hand2', command=lambda: setattr(modules.globals, 'nsfw', nsfw_value.get()))

nsfw_switch.place(relx=0.6, rely=0.7)

Uncomment all three.

This should add the NSFW button back to the UI. It worked for me Mac mini 2020 M1.

I've running now - will see how it goes - it didn't crash and die like it did before I reenabled the button, and turned it on.

Good Luck.

whenever i uncomment the three lines it automatically crashes when i try to run the program but if i comment those three lines again it works, is there any fix?

spangurs avatar Aug 16 '24 12:08 spangurs

I mean i followed the exact instructions, followed mutahars video too and Everything works well but when uncommenting through either notepad or pycharm it just breaks until i comment them again. I got no clue what im doing, im not a coder or anything just wanna mess around haha

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows


From: denrinm @.> Sent: Friday, August 16, 2024 6:17:00 PM To: hacksider/Deep-Live-Cam @.> Cc: spangurs @.>; Mention @.> Subject: Re: [hacksider/Deep-Live-Cam] NSFW option doesn't appear on the application (Issue #355)

@spangurshttps://github.com/spangurs, it works for me.

I recommend using Python 3.10 or 3.11 and setting up a virtual environment. Once you have the environment ready, install all the dependencies listed in the requirements.txt file as described in the repository. After that, you should be able to uncomment those three lines without encountering any issues.

— Reply to this email directly, view it on GitHubhttps://github.com/hacksider/Deep-Live-Cam/issues/355#issuecomment-2293789199, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BKR6V7TND3R3WUY7CVJYYF3ZRYQXZAVCNFSM6AAAAABMTGOGKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTG44DSMJZHE. You are receiving this because you were mentioned.Message ID: @.***>

spangurs avatar Aug 16 '24 16:08 spangurs

@spangurs , could you please send your ui.py file? I'd be happy to take a look and see what changes you've made.

You also mentioned that the program crashes and doesn't run at all. If that's the case, it's probably that something might have been altered in the ui.py file. Please send it over so I can help you troubleshoot the issue.

denrinm avatar Aug 16 '24 16:08 denrinm

@denrinm, Yeah sure I mean it works when i have the hashes in there and im pretty sure thats when its commented but once I remove them it opens the terminal then spews some words for a split seconds and close. Also I have no clue how to attach it because when i try to attach the file it says that they dont support the file type

spangurs avatar Aug 16 '24 16:08 spangurs

@spangurs , upload it somewhere and give me the link .

denrinm avatar Aug 16 '24 16:08 denrinm

@denrinm, I think this should work. https://file.io/LLAd903TN6WE

spangurs avatar Aug 16 '24 16:08 spangurs

@spangurs , have you deleted it ? I can no longer download it ?

denrinm avatar Aug 16 '24 16:08 denrinm

@denrinm, https://file.io/FMrW3gMQvmUV try now. swear these file sharers suck so bad

spangurs avatar Aug 16 '24 16:08 spangurs

@spangurs spangurs, I tested it and found a minor typo that was causing the issue. It should work now. Please confirm: https://file.io/VGJOFvmIYls7

denrinm avatar Aug 16 '24 16:08 denrinm

@denrinm image there we go, thank you man. Not sure what you did but still thanks haha

spangurs avatar Aug 16 '24 16:08 spangurs

@spangurs , it turns out there was an indentation issue, which is common if you haven't done much coding. When you mentioned that the software crashes without producing any logs, I suspected this might be the cause. Anyway, it's fixed now—enjoy!

denrinm avatar Aug 16 '24 16:08 denrinm

@denrinm it got deleted again, can u reupload? thanks

alexvndre01 avatar Aug 17 '24 03:08 alexvndre01

@APD-01 Hi, I uncommented all three lines as you told, but now when I run "python run.py --execution-provider cuda" I get the following error: image Could you assist please? Thank you in advance.

philinqq avatar Aug 19 '24 14:08 philinqq

@ ilyaphilin I've not played with the CUDA version, I'm using an M1 Mac... but from the error message above looks like you've created an indentation error. When you remove the "#" to uncomment the line, you need to replace it with a space - not just delete it. E.g.

needs to become: Not: <code Here>


It's just the way python works. The number of spaces (rather the level of indentation), matters.

Good luck.

APD-01 avatar Aug 19 '24 23:08 APD-01

@Achraf80000 The NSFW function has been re-enabled. You can pull the latest codes and check it out.

vic4key avatar Aug 20 '24 19:08 vic4key

Feel free to re-open this issue if you’re still having trouble.

vic4key avatar Aug 21 '24 18:08 vic4key

Feel free to re-open this issue if you’re still having trouble.

It seems this PR was not propper merged into main imho.

If you look for example in the "ui.py" those lines are still uncommented:

https://github.com/hacksider/Deep-Live-Cam/blob/446487a70c60e66f8c088ee718cfa128d9d6505a/modules/ui.py#L93

nabel0 avatar Aug 25 '24 18:08 nabel0

Sorry, the NSFW function is currently unavailable. We have temporarily disabled it due to a violation of GitHub’s terms of service.

vic4key avatar Aug 26 '24 05:08 vic4key