Closed rpare001 closed 1 year ago
You want to use your AMD card but in the settings it's set CUDA which only works with NVIDIA cards. Please choose 'cpu' as executionprovider in the settings tab. Once this is working again and you later want to use this app with hw-acceleration from your AMD card, do a search for DirectML or dml here in the issues.
Thank you so much for the response, I really appreciate it. So when I switch to CPU, I get an "elem_id" error and it still does not work. I wonder if it was automatically switching to CPU before (after detecting no cuda) and then somehow that broke? Because again it was working perfectly fine a few days ago. I've copied the commands below, let me know if you would like to see it when I switch to CPU, get the elem_id error, and then try to upload a photo or video.
Here is what the command prompt shows:
Traceback (most recent call last): File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\queueing.py", line 388, in call_prediction output = await route_utils.call_process_api( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\route_utils.py", line 217, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\blocks.py", line 1553, in process_api result = await self.call_function( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\blocks.py", line 1191, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\utils.py", line 659, in wrapper response = f(args, **kwargs) File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\roop-unleashed\roop\ui.py", line 398, in on_settings_changed attribname = evt.target.elem_id AttributeError: 'NoneType' object has no attribute 'elem_id'
i have the same "AttributeError: 'NoneType'" after it working fine the day before. I tried multiple Times reinstalling with no success. I managed to get CPU rendering working again, but not DML. It is chosen in settings, but when rendering it selects CPU and the provider list is Empty {}.
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
Maybe an Issue with the newest AMD Driver 23.9.3, it started after that update for me aswell. But you said you downgraded without success, did you use DDU?
Yes, I did use DDU, but to no avail! Tried two different drivers (the last two released).
I just deleted the roop-unleashed Folder and cloned the repository again:
git clone https://github.com/C0untFloyd/roop-unleashed cd roop-unleashed pip install -r requirements.txt
Started with run.py, chose DML in settings, restarted server and closed everything again. Then opened with python run.py --execution-provider dml and it just works now. I have no idea why, I think i did pretty much the same thing multiple times yesterday and it didnt work then...
Also, if you are on AMD and want to use DMDNet, edit this file "Enhance_DMDNet.py" with notepad:
change
weights = torch.load('./models/DMDNet.pth')
to
weights = torch.load('./models/DMDNet.pth',map_location ='cpu')
it is very slow on CPU, but sometimes DMDNet looks the best and for short Video's or Pictures its fine
Thank you! Will try that this evening when I get a chance!
Unfortunately that did not seem to work for me; I did everything you did (except used the Windows run) and reinstalled like 3 times, and set up the settings to automatically go to CPU and no luck.
I have no idea honestly, but there is something really, really broken with your installation and it's not your driver or gpu.
attribname = evt.target.elem_id AttributeError: 'NoneType' object has no attribute 'elem_id'
This is an error happening in gradio with certain older versions, I created an issue for this a while back #156 Can you post your python, gradio and torch versions (displayed in the top of roop-unleashed)? When you say you re-installed, did you uninstall everything or just delete the roop folder? Can you try uninstalling Python completely? We should first get it working again with just CPU, after that we can care about adding HW-Acceleration back.
python run.py --execution-provider dml
The CLI args are ignored for quite some time and only the execution provider set in the config.yaml will be used.
Thank you for the advice! Here is what it says on the top of the screen:
python: 3.10.13 • torch: 2.0.1+cu118 • gradio: 3.45.2
When I re-installed I initially just deleted the roop folder, but when in a later try I went and uninstalled and reinstalled all the packages (I have no idea at this point what versions I would have had up there when it was working properly).
I'll try uninstalling python completely and report back!
I just found out that the latest gradio 3.45.2 has the old bug from #156 again! You don't need to re-install python. I'm currently writing a bug report in their forum, it would probably best to wait for them to fix it. If you have the knowledge you could uninstall the new gradio and revert to 3.44.2 using pip.
UPDATE: Just committed my working version where I set the gradio version to the last known working one. Please update to this version.
That worked!! Thank you very much for the support, I really appreciate it!!
Describe the bug Began using Roop Unleashed about 10 days ago and it worked perfectly! Then suddenly the system stopped detecting faces, either from video or photos (and tested multiple photos that had successfully worked in the past).
I am using an AMD GPU and I have tried switching to CPU and selecting "Force CPU for Face Analyzer," which has not worked.
I have also tried doing a fresh re-install of roop unleashed, as well as downgrading my GPU driver (my driver updated around the same time this error started so I thought it might somehow be related).
To Reproduce Steps to reproduce the behavior:
Details What OS are you using?
Are you using a GPU?
Which version of roop unleashed are you using?
roop unleashed 3.1.1
Screenshots From the command prompt: when using ['CUDAExecutionProvider'] Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying. Traceback (most recent call last): File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\queueing.py", line 388, in call_prediction output = await route_utils.call_process_api( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\route_utils.py", line 217, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\blocks.py", line 1553, in process_api result = await self.call_function( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\blocks.py", line 1191, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\installer_files\env\lib\site-packages\gradio\utils.py", line 659, in wrapper response = f(args, **kwargs) File "C:\Users\XXXX\Documents\roop-unleashed-main\roop-unleashed-main\installer\roop-unleashed\roop\ui.py", line 442, in on_srcimg_changed raise gr.Error('No faces detected!') gradio.exceptions.Error: 'No faces detected!'
Thank you so much for your assistance and this incredible application!