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

File "afy/cam_fomm.py", line 6, in <module› import requests #484

Open
Jblaac7 opened this issue Dec 16, 2022 · 98 comments
Open

File "afy/cam_fomm.py", line 6, in <module› import requests #484

Jblaac7 opened this issue Dec 16, 2022 · 98 comments

Comments

@Jblaac7
Copy link

Jblaac7 commented Dec 16, 2022

Please I need help on how to get pass this stage. After downloading the Tar file and placing it on the Avatarify-Python folder, I ran the last command and instead of the two Cam and Avatarify Camaras to pop up, I got this;

Traceback (most recent call last):
File "afy/cam_fomm.py", line 6, in <module› import requests
ModuleNotFoundError: No module named 'requests'
9A59DD23-9003-4E69-8271-AD7E9FBD5F97

@gjshegz1
Copy link

I’m having the same problem

@gjshegz1
Copy link

@alievk

@Nocturna22
Copy link

Nocturna22 commented Dec 16, 2022

Hello, just install the dependencies via miniconda.

pip install requests
pip install opencv-python
pip install face_alignment

This should install everything necessary. But then another error occurs. The SSL certificate has expired...

Download these Files:
https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip
https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth

And place them here:
C:\Users\%USERPROFILE%\.cache\torch\hub\checkpoints\

Hope this helps you :>

@geekedpriest
Copy link

@twerpyfie will it work from me too ? image I'm stuck here .

@Nocturna22
Copy link

@twerpyfie will it work from me too ? image I'm stuck here .

Yes i think so. Give it a try ^^

@gjshegz1
Copy link

Hello, just install the dependencies via miniconda.

pip install requests pip install opencv-python pip install face_alignment

This should install everything necessary. But then another error occurs. The SSL certificate has expired...

Download these Files: https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth

And place them here: C:\Users\xxxxxxUSERFOLDERxxxxxx.cache\torch\hub\checkpoints\

Make sure to replace xxxxxxUSERFOLDERxxxxxx with your WindowsUsername.

Hope this helps you :>

I’ve downloaded it where will I paste it please

@Nocturna22
Copy link

Nocturna22 commented Dec 16, 2022

I’ve downloaded it where will I paste it please

C:\Users\%USERPROFILE%\.cache\torch\hub\checkpoints\

@gjshegz1
Copy link

I’ve downloaded it where will I paste it please

C:\Users%USERPROFILE%.cache\torch\hub\checkpoints\

100A49F2-9A17-49D1-A2B8-0CB0E76C9C60
Directory not found

@Nocturna22
Copy link

Nocturna22 commented Dec 16, 2022

Directory not found

Ups i didnt mention to start the run_windows.bat again, sorry. After the process you should be able to find the folder i think.
If not, there is a problem with your PyTorch installation.

@gjshegz1
Copy link

Directory not found

Ups i didnt mention to start the run_windows.bat again, sorry. After the process you should be able to find the folder i think. If not, there is a problem with your PyTorch installation.

Thanks for the reply
But it’s still show’s directory not found
How do I fix the PyTorch installation

@gjshegz1
Copy link

@twerpyfie

@Nocturna22
Copy link

@twerpyfie

I found a better solution.
First download DeepFaceLive. Start ist. Set the settings And then use OBS to get the Stream:

https://github.com/iperov/DeepFaceLive
https://github.com/iperov/DeepFaceLive/blob/master/doc/windows/for_streaming.md

@gjshegz1
Copy link

Thank you I’ll try it now 🙏🏽

@gjshegz1
Copy link

@twerpyfie
image
Please there’s no .exe file how do I install

@Nocturna22
Copy link

Nocturna22 commented Dec 17, 2022

No, you dont have to clone the repo, you have to download the right installer under
Click me hard daddy Y-Y
Extract it and run the batfile inside that folder. Just double click it.

@gjshegz1
Copy link

Thank you,
That’s what I just did but .bat file is not found

@ayamga1
Copy link

ayamga1 commented Dec 18, 2022

Im also getting the same error message, is there a solution?

@geekedpriest
Copy link

Are there any solutions yet? Has anyone been able to download avatarify succesfully?

@Jblaac7
Copy link
Author

Jblaac7 commented Dec 18, 2022

Mine works now. I followed the message someone sent me;

I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands

pip install pyyaml
pip install requests
pip install cv2
pip install scipy
pip install face_alignment
pip install sklearn
pip install pandas

I also copied the 7 files from the modules folder into the fomm folder.
This now works

@Michael3264
Copy link

Please help how I will ran those commands I'm having problems installing avatarify......please help 🙏

@ayamga1
Copy link

ayamga1 commented Dec 19, 2022

Mine works now. I followed the message someone sent me;

I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands

pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas

I also copied the 7 files from the modules folder into the fomm folder. This now works

Thanks alot, it solved the issue

@Michael3264
Copy link

then

Hello help me how can i solve mine

@Michael3264
Copy link

How can i run those commands? Plz help

@gjshegz1
Copy link

Mine works now. I followed the message someone sent me;

I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands

pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas

I also copied the 7 files from the modules folder into the fomm folder. This now works

@Jblaac7 please if you can help just do a simple tutorial on this it’ll help a lot thanks 🙏🏽

@ayamga1
Copy link

ayamga1 commented Dec 19, 2022

Mine works now. I followed the message someone sent me;
I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands
pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas
I also copied the 7 files from the modules folder into the fomm folder. This now works

@Jblaac7 please if you can help just do a simple tutorial on this it’ll help a lot thanks 🙏🏽

Bro just run those command in the miniconda thats all

@gjshegz1
Copy link

Mine works now. I followed the message someone sent me;
I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands
pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas
I also copied the 7 files from the modules folder into the fomm folder. This now works

@Jblaac7 please if you can help just do a simple tutorial on this it’ll help a lot thanks 🙏🏽

Bro just run those command in the miniconda thats all

Pip install CV2 doesn’t work

@ayamga1
Copy link

ayamga1 commented Dec 19, 2022

Mine works now. I followed the message someone sent me;
I had this error, so I reran a clean install and then I had the yaml module not found error I ran these commands
pip install pyyaml pip install requests pip install cv2 pip install scipy pip install face_alignment pip install sklearn pip install pandas
I also copied the 7 files from the modules folder into the fomm folder. This now works

@Jblaac7 please if you can help just do a simple tutorial on this it’ll help a lot thanks 🙏🏽

Bro just run those command in the miniconda thats all

Pip install CV2 doesn’t work

Now run the bat file it should work now

@yawacc yawacc mentioned this issue Dec 29, 2022
@Impaler6
Copy link

Impaler6 commented Jan 5, 2023

pip install pandas

Bro I have tried this method for three days now and I can't still solve this issue. I need your help please. This is my snap handle i_mpaler

@CharlesFranklin1

This comment was marked as off-topic.

@dada10123
Copy link

dada10123 commented Sep 1, 2023 via email

@SanPatrick01
Copy link

Ok

@SanPatrick01
Copy link

If your laptop has nvidia
GPU
It will work
But you can WhatsApp text me if we can discuss

@dada10123
Copy link

dada10123 commented Sep 1, 2023 via email

@SanPatrick01
Copy link

@Empirezoom
Copy link

Hello, just install the dependencies via miniconda.

pip install requests pip install opencv-python pip install face_alignment

This should install everything necessary. But then another error occurs. The SSL certificate has expired...

Download these Files: https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth

And place them here: C:\Users%USERPROFILE%.cache\torch\hub\checkpoints\

Hope this helps you :>

Please I can't find this location C:\Users%USERPROFILE%.cache\torch\hub\checkpoints\

@Empirezoom
Copy link

Hello, just install the dependencies via miniconda.
pip install requests pip install opencv-python pip install face_alignment
This should install everything necessary. But then another error occurs. The SSL certificate has expired...
Download these Files: https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth
And place them here: C:\Users%USERPROFILE%.cache\torch\hub\checkpoints
Hope this helps you :>

This worked for me, I just followed the steps. Thank you!!

Please how did u place this in the location C:\Users%USERPROFILE%.cache\torch\hub\checkpoints\

@Empirezoom
Copy link

face_alignment

this sma error im having at the moment

@SanPatrick01
Copy link

@Rusell7736
Copy link

I'm still having they same issue here please help

@SanPatrick01
Copy link

I'm still having they same issue here please help

Dm with the error and anydesk in whatsapp
https://wa.me/message/Q2R3YYTP46XKG1

@vicktaw
Copy link

vicktaw commented Feb 24, 2024

I finally got it to work.. thanks to me not being a quitter and the countless number of tuts I'll try to refer to, but I tried a mix of unconventional methods which led to me seeing different error codes like y'all are seeing.
After getting error codes despite following the official instructions, First I installed a lower version of face-alignment by typing:
pip install face-alignment==1.3.3
(This should install v1.3.3 over the previously 1.4.xx thereby causing certification issues)

After running the command "run_windows.bat" i got new SSL certificate issues, then I resorted to reinstalling face-alignment app from its source code into the "avatarify-python" folder(reference link: https://github.com/1adrianb/face-alignment):
git clone https://github.com/1adrianb/face-alignment
pip install -r requirements.txt
python setup.py install

At this point after running the "run_windows.bat" cmd, i got new lines of error, I proceeded to download and copy the two files stated by @twerpyfie above (#484 (comment)) into "C:\Users\USERNAME.cache\torch\hub\checkpoints", and ran the "run_windows.bat" command then it worked.
Link to files::
https://www.adrianbulat.com/downloads/python-fan/2DFAN4-cd938726ad.zip https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth

For those of you who have "ModuleNotFoundError" or missing "fomm" folder issues, well you can just import it from the Master's file by running "Git CMD"(Already installed on your pc if you followed the initial steps), then go to the 'avatarify-python' directory by typing "cd avatarify-python", now execute the command "git clone https://github.com/alievk/first-order-model.git fomm"(If done correctly, this would fetch the missing "fomm" folder into your avatarify-python). Reference: https://github.com/alievk/avatarify-python/issues/198#issuecomment-1605588448
NOTE: After fetching the "fomm" folder, I navigated to the "avatarify-python\fomm\modules", then i copied all 7 files in the modules folder into the "avatarify-python\fomm" folder.

Feel free to comment with your error notices, and I'll try to help you however I can. We never quit!
Thanks to @alievk, @twerpyfie, @abc906093117, and @seegunz for their wonderful contributions and myself

@vicktaw vicktaw mentioned this issue Feb 24, 2024
@seegunz
Copy link

seegunz commented Feb 26, 2024

I finally got it to work.. thanks to me not being a quitter and the countless number of tuts I'll try to refer to, but I tried a mix of unconventional methods which led to me seeing different error codes like y'all are seeing.......

That s the beauty of it. you already gain more knowledge by not relenting ... the fomm folder is needed with the error no module named module..... I can't remember the exact statement but something like that....

@new4299
Copy link

new4299 commented Mar 26, 2024

pls help me

File "afy/cam_fomm.py", line 216, in
from afy import predictor_local
File "C:\Users\Y3 Guy\avatarify-python\afy\predictor_local.py", line 4, in
from modules.keypoint_detector import KPDetector
ModuleNotFoundError: No module named 'modules

@SanPatrick01
Copy link

call git clone https://github.com/alievk/first-order-model.git fomm

@new4299
Copy link

new4299 commented Mar 26, 2024

After i use the link to send me it work but this is what pop up

Traceback (most recent call last):
File "afy/cam_fomm.py", line 6, in
import requests
ModuleNotFoundError: No module named 'requests'

@new4299
Copy link

new4299 commented Mar 26, 2024

pls help me

Traceback (most recent call last):
File "afy/cam_fomm.py", line 6, in
import requests
ModuleNotFoundError: No module named 'requests'

@SanPatrick01
Copy link

pls help me

Traceback (most recent call last):

File "afy/cam_fomm.py", line 6, in

import requests

ModuleNotFoundError: No module named 'requests'

Call pip install -r requirements.txt

call git clone https://github.com/alievk/first-order-model.git fomm

Use the two codes

@OLAPOH
Copy link

OLAPOH commented Aug 22, 2024

EXECUTE ESSE PASSO A PASSO EM PTBR

1- INSTALAR O GIT

2- INSTALAR MINICONDA 3.8

3- ABRA O MINICONDA INSTALADO

4- COLE CÓDIGO PROGRAMAÇÃO INSTALADOR DO AVATARIFY
COD: git clone https://github.com/alievk/avatarify

5- NA SEQUANCIA COLE COMANDO CD VERSÃO AVATARIFY
COD: cd avatarify

6- LOCALIZE O DIRETORIO DO SCRIPT INSTALADOR PARA WINDOWS UTILIZANDO O COMANDO
COD: avatarify>dir

7- COPIE DIRETÓRIO DO O SCRIPIT REVELADO
ENDEREÇO DO SCRIPT: type install_windows.bat

8- COLE O DIRETÓRIO NO COMANDO INSTALADOR
ENDEREÇO SCRIPT: type install_windows.bat

[SERÁ EXECUTADO AUTO O SEGUINTE COD DE INSTALAÇÃO]
COD:
call scripts\settings_windows.bat

call conda create -y -n %CONDA_ENV_NAME% python=3.8

call conda activate %CONDA_ENV_NAME%

call mamba install -y numpy==1.19.0 scikit-image python-blosc==1.7.0 -c conda-forge

call conda install -y pytorch==1.7.1 torchvision cudatoolkit=11.0 -c pytorch

call conda install -y -c anaconda git

call rmdir fomm /s /q

call git clone https://github.com/alievk/first-order... fomm

call pip install -r requirements.txt

[VERIFIQUE SE O CODIGO APRESENTADO ESTÁ IGUAL, SE TIVER MUDANÇAS ALGO DEU ERRADO]
[LEMBRE-SE DE MUDAR A BARRA "/" NO COMEÇO DO COD PARA A BARRA "" CASO NAO ALTERE O PROGRAMA NÃO INSTALA-RÁ]
[ALTERE A VERSÃO DE "3.7" PARA "3.8" NO PRÓPRIO CODIGO]
[DELETE O TEXTO REM FOMM]
[DE ESPAÇOS DE UMA LINHA DE CADA CALL. JA QUE MESMO VEM SEM ESPAÇAMENTO CAUSANDO ERROS NA INSTALAÇÃO]
[CÓDIGO DO MINICONDA DEVE ESTAR IDENTICO AO CÓDIGO ACIMA. USE ESSE MODELO COMO EXEMPLO]

APÓS ESSE PROCESSO PRÉ INSTALATÓRIO A PRIMEIRA PARTE ESTÁ FEITA PODE FECHAR O MINICONDA, VOCÊ ACABOU DE CRIAR PASTAS E BLOCOS DE COMANDOS INDICANDO AO COMPUTADOR O DIRETÓRIO ONDE SERÁ FEITA A VERDADEIRA INSTALAÇÃO

INSTALANDO MAMBA

1- ABRA O MINICONDA NOVAMENTE

2- COLA O COMANDO ABAIXO
COD: conda install -c conda-forge mamba
[A INSTALAÇÃO PODE DEMORAR ALGUMAS HORAS TENHA PACIENCIA]

3- APÓS O COMANDO FINALIZAR FARÁ A SEGUINTE PERFUNTA (proceed y/n)? RESPONDA DIGITNADO O CÓDIGO ABAIXO
COD: y

4- INSIRA SEU CD DE COMANDO DIGITANDO O CÓDIGO ABAIXO
COD: cd avatarify

5- COPIE O SCRIPT QUE SALVAMOS E ALTERAMOS ANTERIORMENTE E COLE UM [CALL] DE CADA VEZ NA SEQUENCIA
SCRIPT COD:
call scripts\settings_windows.bat

call conda create -y -n %CONDA_ENV_NAME% python=3.8

call conda activate %CONDA_ENV_NAME%

call mamba install -y numpy==1.19.0 scikit-image python-blosc==1.7.0 -c conda-forge

call conda install -y pytorch==1.7.1 torchvision cudatoolkit=11.0 -c pytorch

call conda install -y -c anaconda git

call rmdir fomm /s /q

call git clone https://github.com/alievk/first-order... fomm

call pip install -r requirements.txt

[A INSTALAÇÃO INDIVIDUAL DE CADA COD [CALL] É MUITO DEMORADA E DEVE LEVAR HORAS ATÉ FINALIZAR. APÓS FINALIZAR O ULTIMO COMANDO VAMOS EXECUTAR O PROGRAMA]

6- EXECUTE O PROGRAMA UTILIZANDO O COMANDO ABAIXO
COD: run_windows.bar

@12ayfa
Copy link

12ayfa commented Oct 15, 2024

\miniconda3\envs\avatarify\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3191.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "afy/cam_fomm.py", line 218, in **predictor_args File "C:\Users\OMEN\avatarify-python-youtube\afy\predictor_local.py", line 49, in init self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=self.device) File "C:\Users\OMEN\miniconda3\envs\avatarify\lib\enum.py", line 354, in getattr raise AttributeError(name) from None AttributeError: _2D

hello is anyone there to help me out on this one

Hi please did you get this solved???

@Nene020
Copy link

Nene020 commented Oct 19, 2024

\miniconda3\envs\avatarify\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3191.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "afy/cam_fomm.py", line 218, in **predictor_args File "C:\Users\OMEN\avatarify-python-youtube\afy\predictor_local.py", line 49, in init self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=True, device=self.device) File "C:\Users\OMEN\miniconda3\envs\avatarify\lib\enum.py", line 354, in getattr raise AttributeError(name) from None AttributeError: _2D

hello is anyone there to help me out on this one

Hi please did you get this solved???

Yes

@dark408
Copy link

dark408 commented Dec 13, 2024

please how can i resolve this
avatarify

@SanPatrick01
Copy link

please how can i resolve this

avatarify

What type of laptop

@dark408
Copy link

dark408 commented Dec 13, 2024

dell intel corei5

@dark408
Copy link

dark408 commented Dec 13, 2024

and i am using google collab to run this

@dark408
Copy link

dark408 commented Dec 13, 2024

please how can i resolve this
avatarify

What type of laptop

dell itel corei5 64 bit

@dark408
Copy link

dark408 commented Dec 15, 2024

error
please i am getting this error

@SanPatrick01
Copy link

Oh no
I don't work on cpu pc

@workholic11
Copy link

Run these commands

Call pip install -r requirements.txt

Pip install requests

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