Update webgui.py
Browse files
webgui.py
CHANGED
@@ -25,8 +25,9 @@ from moviepy.editor import VideoFileClip, AudioFileClip
|
|
25 |
from facenet_pytorch import MTCNN
|
26 |
import argparse
|
27 |
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
import gradio as gr
|
32 |
|
@@ -122,7 +123,9 @@ denoising_unet.load_state_dict(torch.load(config.denoising_unet_path, map_locati
|
|
122 |
## face locator init
|
123 |
# face_locator = FaceLocator(320, conditioning_channels=1, block_out_channels=(16, 32, 96, 256)).to(dtype=weight_dtype, device="cuda")
|
124 |
face_locator = FaceLocator(320, conditioning_channels=1, block_out_channels=(16, 32, 96, 256)).to(dtype=weight_dtype, device="cpu")
|
125 |
-
face_locator.load_state_dict(torch.load(config.face_locator_path))
|
|
|
|
|
126 |
|
127 |
## load audio processor params
|
128 |
audio_processor = load_audio_model(model_path=config.audio_model_path, device=device)
|
|
|
25 |
from facenet_pytorch import MTCNN
|
26 |
import argparse
|
27 |
|
28 |
+
# キャッシュの移行を明示的に実行
|
29 |
+
import transformers
|
30 |
+
transformers.utils.move_cache()
|
31 |
|
32 |
import gradio as gr
|
33 |
|
|
|
123 |
## face locator init
|
124 |
# face_locator = FaceLocator(320, conditioning_channels=1, block_out_channels=(16, 32, 96, 256)).to(dtype=weight_dtype, device="cuda")
|
125 |
face_locator = FaceLocator(320, conditioning_channels=1, block_out_channels=(16, 32, 96, 256)).to(dtype=weight_dtype, device="cpu")
|
126 |
+
# face_locator.load_state_dict(torch.load(config.face_locator_path))
|
127 |
+
face_locator.load_state_dict(torch.load(config.face_locator_path, map_location="cpu"), strict=False)
|
128 |
+
|
129 |
|
130 |
## load audio processor params
|
131 |
audio_processor = load_audio_model(model_path=config.audio_model_path, device=device)
|