facechain
facechain copied to clipboard
Colab notebook does not run
Running the Google Colab notebook from Readme on A100 returns an error at !python3 app.py
2024-01-13 13:05:34,300 - modelscope - INFO - PyTorch version 2.1.0+cu121 Found.
2024-01-13 13:05:34,302 - modelscope - INFO - TensorFlow version 2.15.0 Found.
2024-01-13 13:05:34,302 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2024-01-13 13:05:34,340 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 6d1257f1da839db94a9e60aab43fde19 and a total number of 946 components indexed
2024-01-13 13:05:36.513745: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-01-13 13:05:36.513815: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-01-13 13:05:36.515611: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
Traceback (most recent call last):
File "/content/facechain/app.py", line 16, in <module>
from facechain.inference import preprocess_pose, GenPortrait
File "/content/facechain/facechain/inference.py", line 9, in <module>
from controlnet_aux import OpenposeDetector
File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/__init__.py", line 15, in <module>
from .mediapipe_face import MediapipeFaceDetector
File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/mediapipe_face/__init__.py", line 9, in <module>
from .mediapipe_face_common import generate_annotation
File "/usr/local/lib/python3.10/dist-packages/controlnet_aux/mediapipe_face/mediapipe_face_common.py", line 5, in <module>
import mediapipe as mp
File "/usr/local/lib/python3.10/dist-packages/mediapipe/__init__.py", line 17, in <module>
import mediapipe.tasks.python as tasks
File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/__init__.py", line 17, in <module>
from . import audio
File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/__init__.py", line 18, in <module>
import mediapipe.tasks.python.audio.audio_classifier
File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/audio_classifier.py", line 26, in <module>
from mediapipe.tasks.python.audio.core import base_audio_task_api
File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/audio/core/base_audio_task_api.py", line 25, in <module>
from mediapipe.tasks.python.core.optional_dependencies import doc_controls
File "/usr/local/lib/python3.10/dist-packages/mediapipe/tasks/python/core/optional_dependencies.py", line 20, in <module>
from tensorflow.tools.docs import doc_controls
File "/usr/local/lib/python3.10/dist-packages/tensorflow/__init__.py", line 48, in <module>
from tensorflow._api.v2 import __internal__
File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/__init__.py", line 11, in <module>
from tensorflow._api.v2.__internal__ import distribute
File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/distribute/__init__.py", line 8, in <module>
from tensorflow._api.v2.__internal__.distribute import combinations
File "/usr/local/lib/python3.10/dist-packages/tensorflow/_api/v2/__internal__/distribute/combinations/__init__.py", line 8, in <module>
from tensorflow.python.distribute.combinations import env # line: 456
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/combinations.py", line 33, in <module>
from tensorflow.python.distribute import collective_all_reduce_strategy
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/collective_all_reduce_strategy.py", line 25, in <module>
from tensorflow.python.distribute import cross_device_ops as cross_device_ops_lib
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/cross_device_ops.py", line 28, in <module>
from tensorflow.python.distribute import cross_device_utils
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/cross_device_utils.py", line 22, in <module>
from tensorflow.python.distribute import values as value_lib
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/values.py", line 23, in <module>
from tensorflow.python.distribute import distribute_lib
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/distribute/distribute_lib.py", line 206, in <module>
from tensorflow.python.data.ops import dataset_ops
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/__init__.py", line 21, in <module>
from tensorflow.python.data import experimental
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/__init__.py", line 98, in <module>
from tensorflow.python.data.experimental import service
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/service/__init__.py", line 419, in <module>
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 25, in <module>
from tensorflow.python.data.ops import dataset_ops
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 33, in <module>
from tensorflow.python.data.ops import iterator_ops
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 41, in <module>
from tensorflow.python.training.saver import BaseSaverBuilder
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/training/saver.py", line 50, in <module>
from tensorflow.python.training import py_checkpoint_reader
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/training/py_checkpoint_reader.py", line 19, in <module>
from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader
SystemError: initialization of _pywrap_checkpoint_reader raised unreported exception
same issue
Same. I've managed to get it to work locally but that's the best I can do. I don't have a 24GB Ram GPU as recommended but you can hack the app.py file to get it to work with any GPU at the expense of course longer training times. Honestly, the training didn't take long at all with my 4070ti.
please try out the newest train-free, 10s inference version facechain-fact.