Open doniaa24 opened 1 month ago
Fazendo pelo servidor do Google, também dá erro na etapa "Inference". Sou leigo na área, mas eu queria tanto que lá funcionasse para eu restaurar algumas fotos..
@jean943 What error did you encounter?
I solved this issue by by removing "torch.distributed.launch --nproc_per_node= 4 --master_port= 22021", so train the GFPGAN model you can simply run !torchrun gfpgan/train.py -opt options/train_gfpgan_v1.yml
If you got the error: " name "fused_act_ex"t is not defined run: !BASICSR_JIT=True torchrun gfpgan/train.py -opt options/train_gfpgan_v1.yml
Perdoe-me pela ignorância, não sou um programador, sou apenas um curioso no assunto. Estou tentando restaurar algumas imagens pelo servidor do google Colab, não tenho o torch e nem o python instalado, executo tudo na nuvem. Vou copiar o erro que está aparecendo quando eu tento processar as imagens. Se você puder, tente subir uma imagem nesse link abaixo para tentar processar e veja se no "3. Inference" vai acontecer o mesmo erro que acontece comigo.
Esse é o site do Colab: https://colab.research.google.com/drive/1sVsoBd9AjckIXThgtZhGrHRfFI6UUYOo
Esse é o erro no Passo "3. Inference"
!rm -rf results !python inference_gfpgan.py -i inputs/upload -o results -v 1.3 -s 2 --bg_upsampler realesrgan
#
!ls results/cmp
Traceback (most recent call last):
File "/content/GFPGAN/inference_gfpgan.py", line 7, in
Eu deixei as duas últimas linhas do código em negrito pois eu creio que o erro esteja aí, não sei como resolver.. Poderia me ajudar?
@jean943 on the file degradation.py line 8 simply change: from torchvision.transforms.functional_tensor import rgb_to_grayscale to: from torchvision.transforms.functional import rgb_to_grayscale
@doniaa24, eu consigo mudar essa linha de código pelo próprio Google Colab? Você poderia me dar uma direção de como fazer isso? Pois os códigos são gerados quando eu aperto o play do "3. Inference"
@jean943 run this code on colab before running 3. Inference. it will replace the degradation.py line 8 from torchvision.transforms.functional_tensor import rgb_to_grayscale to: from torchvision.transforms.functional import rgb_to_grayscale
# Define the file path
file_path = '/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py'
# Define the new import statement
new_import_statement = "from torchvision.transforms.functional import rgb_to_grayscale\n"
# Read the content of the file
with open(file_path, 'r') as file:
lines = file.readlines()
# Modify the desired line (line 8 in this case)
if len(lines) >= 8:
lines[7] = new_import_statement # Index 7 corresponds to line 8 (0-based indexing)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.writelines(lines)
print("Replacement completed successfully!")
@jean943 try the code given by @shishirahm3d I did the same. .
Deu tudo certo, você foi a única que conseguiu me ajudar!! Você nem imagina o quanto sou grato pela sua ajuda!!
estou restaurando uma fita VHS, eu exportei todos os frames em JPG para que eu pudesse tratar dentro do GFPGAN.. Como eu tinha visto alguns vídeos mostrando os resultados eu fiquei empolgado mas infelizmente os resultados deixaram a desejar. Não sei se você conhece outra IA que possa me ajudar, mas aceito novas sugestões.. Eu selecionei alguns frames pra fazer alguns testes e infelizmente o resultado foi bem decepcionante.. :(
@jean943 which version of GFPGAN you were testing ?
hello everyone,
I'm encountering errors while training a GFPGAN model using PyTorch's distributed training setup on Google Colab. The primary issues are a ChildFailedError with a SIGKILL signal and multiple plugin registration errors for cuDNN, cuFFT, and cuBLAS.
Anyy help please !!!!