chervonij / DFL-Colab

DeepFaceLab fork which provides IPython Notebook to use DFL with Google Colab
1.05k stars 265 forks source link

ModuleNotFoundError: No module named 'tensorflow.compat.v2 #44

Closed hargums closed 2 years ago

hargums commented 2 years ago

im facing issue with DFL_Colab_1-0.ipynb (because im using amd in my physical pc so i choose DFL_Colab_1-0.ipynb in colab)

Using TensorFlow backend. Error: No module named 'tensorflow.compat.v2' Traceback (most recent call last): File "/content/DeepFaceLab/mainscripts/Trainer.py", line 52, in trainerThread device_args=device_args) File "/content/DeepFaceLab/models/ModelBase.py", line 142, in init nnlib.import_all(self.device_config) File "/content/DeepFaceLab/nnlib/nnlib.py", line 1613, in import_all nnlib.import_keras(device_config) File "/content/DeepFaceLab/nnlib/nnlib.py", line 229, in importkeras import keras as keras File "/usr/local/lib/python3.7/dist-packages/keras/init.py", line 3, in from . import utils File "/usr/local/lib/python3.7/dist-packages/keras/utils/init.py", line 27, in from .multi_gpu_utils import multi_gpu_model File "/usr/local/lib/python3.7/dist-packages/keras/utils/multi_gpu_utils.py", line 7, in from ..layers.merge import concatenate File "/usr/local/lib/python3.7/dist-packages/keras/layers/init.py", line 4, in from ..engine.base_layer import Layer File "/usr/local/lib/python3.7/dist-packages/keras/engine/init.py", line 3, in from .input_layer import Input File "/usr/local/lib/python3.7/dist-packages/keras/engine/input_layer.py", line 7, in from .base_layer import Layer File "/usr/local/lib/python3.7/dist-packages/keras/engine/base_layer.py", line 12, in from .. import initializers File "/usr/local/lib/python3.7/dist-packages/keras/initializers/init.py", line 17, in import tensorflow.compat.v2 as tf ModuleNotFoundError: No module named 'tensorflow.compat.v2'

please help

hargums commented 2 years ago

i already use this version of colabs for couple weeks, but i think it because new update from DFL so it stop working. please solution suggested for OpenCL user. manythanks

chervonij commented 2 years ago

@hargums First of all, DFL 1.0 — outdated. It has not been supported since release of version 2.0 and is there for nothing more than backward compatibility. Moreover. OpenCL version of DFL no longer exists since April. It was replaced by DirectX version. And it works with DFL 2.0

So, there is no reason to use DFL 1.0

hargums commented 2 years ago

@chervonij im using amd rx460 is it compatible with dfl 2.0 ? Thanks Previously when using dfl 1.0 im using physical PC (AMD RX 460) for extract dst and src, after that im upload workspace to google drive then using dfl colabs 1.0 for training saehd to 100.000++, after that im download workspace to my physical pc (rx 460) for convert saehd and convert to mp4. That steps working fine for weeks. But since couple days ago, dfl 1.0 colabs stop working with that error message. I dont know why. Please help how to using amd rx 460 to working with dfl 2.0 colabs.. many thanks

chervonij commented 2 years ago

@hargums Just download DFL DirectX build and try. It works with AMD cards.