Skip to content

Commit

Permalink
don't error out unnecessarily
Browse files Browse the repository at this point in the history
  • Loading branch information
kijai committed Jul 24, 2024
1 parent 7b26292 commit 490ff14
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@
from tqdm import tqdm
import gc

import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)

script_directory = os.path.dirname(os.path.abspath(__file__))

from .liveportrait.live_portrait_pipeline import LivePortraitPipeline
try:
from .liveportrait.utils.cropper import CropperMediaPipe
except:
raise ModuleNotFoundError("Can't load MediaPipe, MediaPipeCropper not available")
log.warning("Can't load MediaPipe, MediaPipeCropper not available")
try:
from .liveportrait.utils.cropper import CropperInsightFace
except:
raise ModuleNotFoundError("Can't load InsightFace, InsightFaceCropper not available")
log.warning("Can't load MediaPipe, MediaPipeCropper not available")

from .liveportrait.modules.spade_generator import SPADEDecoder
from .liveportrait.modules.warping_network import WarpingNetwork
Expand All @@ -33,9 +37,6 @@
from .liveportrait.utils.camera import get_rotation_matrix
from .liveportrait.utils.crop import _transform_img_kornia

import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)

class InferenceConfig:
def __init__(
Expand Down

0 comments on commit 490ff14

Please sign in to comment.