FunCineForge icon indicating copy to clipboard operation
FunCineForge copied to clipboard

新版效果測試不符合預期

Open hl2dm opened this issue 8 months ago • 3 comments

我拿自己的影片去測試 發現很容易糊成一團不知道在講什麼 甚至極高的機率出現細碎的氣音碎碎念

我使用你們的範例影片 所有設定都一樣 還是會有問題

語音跟影片根本對不上

是不是我哪邊設定錯了呢?

hl2dm avatar Mar 17 '26 06:03 hl2dm

您是根据 setup.py 配置的环境和下载的模型吗?有修改过 config 和 demo.jsonl 输入信息吗?输入中是有面部信息 pkl 文件的,依据 speaker diarization 提取的。建议您先重新配置一下。

我拿自己的影片去測試 發現很容易糊成一團不知道在講什麼 甚至極高的機率出現細碎的氣音碎碎念

我使用你們的範例影片 所有設定都一樣 還是會有問題

語音跟影片根本對不上

是不是我哪邊設定錯了呢?

xuan3986 avatar Mar 17 '26 08:03 xuan3986

Fun-CineForge 本地部署環境說明

系統環境

┌─────────┬─────────────────────────────────────────────┐ │ 項目 │ 版本 │ ├─────────┼─────────────────────────────────────────────┤ │ OS │ Ubuntu (WSL2 on Windows, kernel 5.15.167.4) │ ├─────────┼─────────────────────────────────────────────┤ │ GPU │ NVIDIA GeForce RTX 4090 (24 GB VRAM) │ ├─────────┼─────────────────────────────────────────────┤ │ PyTorch │ 2.4.1+cu124 │ ├─────────┼─────────────────────────────────────────────┤ │ CUDA │ 12.4 │ ├─────────┼─────────────────────────────────────────────┤ │ Python │ 3.10 (conda env: FunCineForge) │ ├─────────┼─────────────────────────────────────────────┤ │ Gradio │ 6.9.0 │ └─────────┴─────────────────────────────────────────────┘


安裝方式

  1. git clone 原始 repo → /mnt/e/gg/FunCineForge
  2. 按 setup.py 安裝: conda create -n FunCineForge python=3.10 conda activate FunCineForge pip install torch==2.4.1 torchaudio==2.4.1 torchvision==0.19.1 --index-url https://download.pytorch.org/whl/cu124 python setup.py # 安裝 dependencies + 下載模型 注意:setup.py 的 install_dependencies() 會拉 deepspeed==0.18.0,它會把 torch 降版為 2.10.0,所以 setup.py 跑完後需重新裝一次 torch 2.4.1+cu124。
  3. 未修改 demo.jsonl,直接使用原始 demo 資料。
  4. PKL 檔(人臉特徵)使用 repo 自帶的 exps/data/embs_video/*.pkl,非自行提取。

修改的設定檔

exps/funcineforge_zh_en/llm/config.yaml

原始硬編碼 NFS 路徑,改為本地路徑:

原始(無法存取)

llm_conf: init_param_path: /nfs/yanzhang.ljx/workspace/FunCineForge/tokenizer/Qwen2-0.5B-CosyVoice-BlankEN

face_encoder_conf: init_param_path: /nfs/yanzhang.ljx/workspace/FunCineForge/speaker_diarization/pretrained_models/face_recog_ir101.onnx

改為

llm_conf: init_param_path: /mnt/e/gg/FunCineForge/tokenizer/Qwen2-0.5B-CosyVoice-BlankEN

face_encoder_conf: init_param_path: /mnt/e/gg/FunCineForge/speaker_diarization/pretrained_models/face_recog_ir101.onnx

train_conf.deepspeed_config 仍為 NFS 路徑(僅訓練用,推理未讀取,故未修改)。

exps/funcineforge_zh_en/flow/config.yaml

未修改(推理中未讀取到此路徑,demo 跑通)

frontend_conf: filters_path: /cpfs_speech/zhifu.gzf/... # 仍為原始路徑


Demo 推理驗證

cd /mnt/e/gg/FunCineForge/exps python infer.py --config-path decode_conf --config-name decode.yaml
++data_jsonl=data/demo.jsonl ++output_dir=results
++lm_ckpt_path=... ++fm_ckpt_path=... ++voc_ckpt_path=...

結果:50 筆 demo 樣本全數成功,輸出在 exps/results/wav/(50 個)和 exps/results/mp4/(50 個)。


新增的 Web UI(branch: web-ui)

檔案:app.py(Gradio 介面,web-ui 分支)

啟動方式: conda activate FunCineForge cd /mnt/e/gg/FunCineForge python app.py # http://localhost:7860

流程:影片上傳 → FunASR 字幕識別 → VisionProcesser ASD pipeline 提取人臉 pkl → FunCineForge 三階段推理(LM→FM→VOC)→ 輸出 MP4/WAV

hl2dm avatar Mar 17 '26 09:03 hl2dm

Fun-CineForge 本地部署環境說明

系統環境

┌─────────┬─────────────────────────────────────────────┐ │ 項目 │ 版本 │ ├─────────┼─────────────────────────────────────────────┤ │ OS │ Ubuntu (WSL2 on Windows, kernel 5.15.167.4) │ ├─────────┼─────────────────────────────────────────────┤ │ GPU │ NVIDIA GeForce RTX 4090 (24 GB VRAM) │ ├─────────┼─────────────────────────────────────────────┤ │ PyTorch │ 2.4.1+cu124 │ ├─────────┼─────────────────────────────────────────────┤ │ CUDA │ 12.4 │ ├─────────┼─────────────────────────────────────────────┤ │ Python │ 3.10 (conda env: FunCineForge) │ ├─────────┼─────────────────────────────────────────────┤ │ Gradio │ 6.9.0 │ └─────────┴─────────────────────────────────────────────┘

安裝方式

  1. git clone 原始 repo → /mnt/e/gg/FunCineForge
  2. 按 setup.py 安裝: conda create -n FunCineForge python=3.10 conda activate FunCineForge pip install torch==2.4.1 torchaudio==2.4.1 torchvision==0.19.1 --index-url https://download.pytorch.org/whl/cu124 python setup.py # 安裝 dependencies + 下載模型 注意:setup.py 的 install_dependencies() 會拉 deepspeed==0.18.0,它會把 torch 降版為 2.10.0,所以 setup.py 跑完後需重新裝一次 torch 2.4.1+cu124。
  3. 未修改 demo.jsonl,直接使用原始 demo 資料。
  4. PKL 檔(人臉特徵)使用 repo 自帶的 exps/data/embs_video/*.pkl,非自行提取。

修改的設定檔

exps/funcineforge_zh_en/llm/config.yaml

原始硬編碼 NFS 路徑,改為本地路徑:

原始(無法存取)

llm_conf: init_param_path: /nfs/yanzhang.ljx/workspace/FunCineForge/tokenizer/Qwen2-0.5B-CosyVoice-BlankEN

face_encoder_conf: init_param_path: /nfs/yanzhang.ljx/workspace/FunCineForge/speaker_diarization/pretrained_models/face_recog_ir101.onnx

改為

llm_conf: init_param_path: /mnt/e/gg/FunCineForge/tokenizer/Qwen2-0.5B-CosyVoice-BlankEN

face_encoder_conf: init_param_path: /mnt/e/gg/FunCineForge/speaker_diarization/pretrained_models/face_recog_ir101.onnx

train_conf.deepspeed_config 仍為 NFS 路徑(僅訓練用,推理未讀取,故未修改)。

exps/funcineforge_zh_en/flow/config.yaml

未修改(推理中未讀取到此路徑,demo 跑通)

frontend_conf: filters_path: /cpfs_speech/zhifu.gzf/... # 仍為原始路徑

Demo 推理驗證

cd /mnt/e/gg/FunCineForge/exps python infer.py --config-path decode_conf --config-name decode.yaml ++data_jsonl=data/demo.jsonl ++output_dir=results ++lm_ckpt_path=... ++fm_ckpt_path=... ++voc_ckpt_path=...

結果:50 筆 demo 樣本全數成功,輸出在 exps/results/wav/(50 個)和 exps/results/mp4/(50 個)。

新增的 Web UI(branch: web-ui)

檔案:app.py(Gradio 介面,web-ui 分支)

啟動方式: conda activate FunCineForge cd /mnt/e/gg/FunCineForge python app.py # http://localhost:7860

流程:影片上傳 → FunASR 字幕識別 → VisionProcesser ASD pipeline 提取人臉 pkl → FunCineForge 三階段推理(LM→FM→VOC)→ 輸出 MP4/WAV

llm_conf 和 flow_conf 在 Huggingface 上没有问题,modelscope 上的 v1.0.0 模型版本是之前的老版本,已经将 master 最新的 config 更新了,不会有路径问题了。

xuan3986 avatar Mar 17 '26 09:03 xuan3986