diff --git a/app/services/task.py b/app/services/task.py index 32b0e44..5735731 100644 --- a/app/services/task.py +++ b/app/services/task.py @@ -433,7 +433,7 @@ def start_subclip(task_id, params: VideoClipParams, subclip_path_videos): final_video_path = path.join(utils.task_dir(task_id), f"final-{index}.mp4") - logger.info(f"\n\n## 6. 生成视频: {index} => {final_video_path}") + logger.info(f"\n\n## 6. 最后一步: {index} => {final_video_path}") # 把所有东西合到在一起 video.generate_video(video_path=combined_video_path, audio_path=audio_file, diff --git a/docker/Dockerfile_MiniCPM b/docker/Dockerfile_MiniCPM new file mode 100644 index 0000000..71ab7f9 --- /dev/null +++ b/docker/Dockerfile_MiniCPM @@ -0,0 +1,31 @@ +ARG BASE=nvidia/cuda:12.1.0-devel-ubuntu22.04 +FROM ${BASE} + +# 设置环境变量 +ENV http_proxy=http://host.docker.internal:7890 +ENV https_proxy=http://host.docker.internal:7890 +ENV DEBIAN_FRONTEND=noninteractive + +# 安装系统依赖 +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc g++ make git python3 python3-dev python3-pip python3-venv python3-wheel \ + espeak-ng libsndfile1-dev nano vim unzip wget xz-utils && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# 设置工作目录 +WORKDIR /root/MiniCPM-V/ + +# 安装 Python 依赖 +RUN git clone https://github.com/OpenBMB/MiniCPM-V.git && \ + cd MiniCPM-V && \ + pip3 install decord && \ + pip3 install --no-cache-dir -r requirements.txt && \ + pip3 install flash_attn + +# 清理代理环境变量 +ENV http_proxy="" +ENV https_proxy="" + +# 设置 PYTHONPATH +ENV PYTHONPATH="/root/MiniCPM-V/" diff --git a/webui/Main.py b/webui/Main.py index 4c87202..8eb4103 100644 --- a/webui/Main.py +++ b/webui/Main.py @@ -732,7 +732,11 @@ start_button = st.button(tr("Generate Video"), use_container_width=True, type="p if start_button: config.save_config() task_id = st.session_state.get('task_id') - params.video_clip_json = st.session_state['video_clip_json_path'] + if st.session_state.get('video_script_json_path') is not None: + params.video_clip_json = st.session_state.get('video_script_json_path') + + logger.debug(f"当前的脚本为:{params.video_clip_json}") + if not task_id: st.error(tr("请先裁剪视频")) scroll_to_bottom()