修改facefusion 3.0 缓存目录的方法

人工智能 · 2024-10-07 · 3571 人浏览

这个算迟来的修改方法吧

之前有热心小伙伴已经分享了修改方法,今天我抽空看了下 有点嫌弃他写的代码有点过于复杂,所以我今天抽空完善了一下

打开temp_helper.py 这个文件找到

这一行

def get_temp_directory_path(file_path : str) -> str:
    temp_file_name, _ = os.path.splitext(os.path.basename(file_path))
    base_directory_path = get_base_directory_path()
    return os.path.join(base_directory_path, temp_file_name)


然后修改成

def get_temp_directory_path(file_path: str) -> str:
    temp_file_name, _ = os.path.splitext(os.path.basename(file_path))
    base_directory_path = 'temp'  # 直接设置为固定的 temp 文件夹
    return os.path.join(base_directory_path, temp_file_name)


这样就可以了

我分享的FaceFusion 3.0 20241007 已经修改好了,无需再改

个性修改 AI 换脸 人工智能
Theme Jasmine by Kent Liao