Skip to content

Commit

Permalink
Test : module import error
Browse files Browse the repository at this point in the history
  • Loading branch information
soyoonjeong committed Mar 13, 2024
1 parent b14e247 commit 562d7f9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions serving/sf2f/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import torch
import os, glob
import mlflow
from utils.wav2mel import wav_to_mel
from utils.upload_minio import upload_object
from utils import wav2mel, upload_minio
from datasets import imagenet_deprocess_batch, set_mel_transform, \
deprocess_and_save, window_segment
import mlflow
Expand Down Expand Up @@ -46,7 +45,7 @@ def generate_voice_to_face(voice_url,request_id,result_id):

mel_transform = set_mel_transform("vox_mel")
image_normalize_method = 'imagenet'
log_mel = wav_to_mel(save_path)
log_mel = wav2mel.wav_to_mel(save_path)
log_mel = mel_transform(log_mel).type(torch.cuda.FloatTensor)

log_mel_segs = window_segment(log_mel, window_length=125, stride_length=63)
Expand All @@ -71,7 +70,7 @@ def generate_voice_to_face(voice_url,request_id,result_id):
img_byte_arr = in_mem_file.getvalue()


upload_object(client, f"web_artifact/output/{request_id}_{result_id}_image.png",in_mem_file,len(img_byte_arr),BUCKET_NAME)
upload_minio.upload_object(client, f"web_artifact/output/{request_id}_{result_id}_image.png",in_mem_file,len(img_byte_arr),BUCKET_NAME)
os.remove(save_path)
return "202"
except:
Expand Down

0 comments on commit 562d7f9

Please sign in to comment.