全球首款无限时长电影生成模型SkyReels-V2本地部署教程:视频时长无限制!

news2025/7/17 22:00:06

一、简介

SkyReels-V2 模型集成了多模态大语言模型(MLLM)、多阶段预训练、强化学习以及创新的扩散强迫(Diffusion-forcing)框架,实现了在提示词遵循、视觉质量、运动动态以及视频时长等方面的全面突破。通过扩散强迫框架和 多阶段优化技术 ,首次实现了单镜头 30 秒、40 秒的流畅输出,并通过“ Extend ”无限延伸,彻底打破了时长枷锁。

二、环境部署

基础环境要求:

环境名称版本信息 1
Ubuntu22.04.5 LTS
CudaV12.4.131
Python3.12.7
NVIDIA CorporationRTX 4090

从算家云基础镜像开始创建:

image.png

三、SkyReels-V2安装

首先查看环境信息:

image.png

从github 克隆代码,然后 pip 安装依赖包。

# clone the repository.
git clone https://github.com/SkyworkAI/SkyReels-V2
cd SkyReels-V2
pip install -r requirements.txt

若遇到 flash_attn 一起在安装的问题:可以真的到Releases · Dao-AILab/flash-attention 下载它的编译好的 whl 包,一定要选择对应的版本,

wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
pip install flash_attn-2.7.4.post1+cu12torch2.5cxx11abiFALSE-cp312-cp312-linux_x86_64.whl

然后在执行 pip install -r requirements.txt

四、下载模型文件

目前开源的模型如下:

TypeModel VariantRecommended Height/Width/FrameLink
Diffusion Forcing1.3B-540P544 * 960 * 97f🤗Huggingface 🤖 ModelScope
5B-540P544 * 960 * 97fComing Soon
5B-720P720 * 1280 * 121fComing Soon
14B-540P544 * 960 * 97f🤗Huggingface 🤖 ModelScope
14B-720P720 * 1280 * 121fComing Soon
Text-to-Video1.3B-540P544 * 960 * 97fComing Soon
5B-540P544 * 960 * 97fComing Soon
5B-720P720 * 1280 * 121fComing Soon
14B-540P544 * 960 * 97f🤗Huggingface 🤖 ModelScope
14B-720P720 * 1280 * 121f🤗Huggingface 🤖 ModelScope
Image-to-Video1.3B-540P544 * 960 * 97f🤗Huggingface 🤖 ModelScope
5B-540P544 * 960 * 97fComing Soon
5B-720P720 * 1280 * 121fComing Soon
14B-540P544 * 960 * 97f🤗Huggingface 🤖 ModelScope
14B-720P720 * 1280 * 121fComing Soon
Camera Director5B-540P544 * 960 * 97fComing Soon
5B-720P720 * 1280 * 121fComing Soon
14B-720P720 * 1280 * 121fComing Soon

从ModelScope 下载 Diffusion Forcing1.3B-540P 的模型:

git lfs install
git clone https://www.modelscope.cn/Skywork/SkyReels-V2-DF-1.3B-540P.git

五、运行测试

下载完模型后,将下列代码写入:test.sh

model_id=Skywork/SkyReels-V2-DF-1.3B-540P
# synchronous inference
python generate_video_df.py \
  --model_id ${model_id} \
  --resolution 540P \
  --ar_step 0 \
  --base_num_frames 97 \
  --num_frames 257 \
  --overlap_history 17 \
  --prompt "A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn, its reflection perfectly mirrored in the still water as mist rises from the surface, with the swan occasionally dipping its head into the water to feed." \
  --addnoise_condition 20 \
  --offload

运行 sh test.sh 完成后结果保存在:root/SkyReels-V2/result/diffusion_forcing

image.png

  • 若出现在问题:Error opening output file: File name too long 是由于导出视频的文件名太长所导致的,可以修改 generate_video_df.py 的代码 :找到下列代码,将 [:100] 修改为 [:10]
    if local_rank == 0:
        current_time = time.strftime("%Y-%m-%d_%H-%M-%S", time.localtime())
        video_out_file = f"{args.prompt[:10].replace('/','')}_{args.seed}_{current_time}.mp4"
        output_path = os.path.join(save_dir, video_out_file)
        imageio.mimwrite(output_path, video_frames, fps=fps, quality=8, output_params=["-loglevel", "error"])

  • 无法使用14B模型,若要使用需要至少一张大于60G显存的显卡

六、使用webui界面

通过 python app.py 运行webui

模型可以放在 SkyReels-V2/Skywork 文件夹下,这个镜像中的模型是使用 ln 创建的链接

# app.py
import os
import gradio as gr
import subprocess
import time
import glob
import torch.distributed as dist

def get_model_list(base_dir="./Skywork/"):
    """扫描Skywork目录获取可用的模型列表"""
    try:
        # 确保目录存在
        if not os.path.exists(base_dir):
            os.makedirs(base_dir)
            return ["请选择模型"]  # 返回默认列表
  
        # 扫描目录下的所有子目录
        model_dirs = glob.glob(os.path.join(base_dir, "*"))
        model_ids = []
  
        for dir_path in model_dirs:
            if os.path.isdir(dir_path):
                # 将目录路径转换为model_id格式
                model_name = os.path.basename(dir_path)
                model_id = f"{base_dir}/{model_name}"
                model_ids.append(model_id)
  
        # 如果没有找到模型,返回默认列表
        return model_ids if model_ids else ["请选择模型"]
    except Exception as e:
        print(f"扫描模型目录出错: {str(e)}")
        return ["扫描模型目录出错"]  # 发生错误时返回默认列表

def enhance_prompt(prompt):
    """使用提示词增强器处理提示词"""
    try:
        cmd = [
            "python",
            "skyreels_v2_infer/pipelines/prompt_enhancer.py",
            "--prompt", str(prompt)
        ]
  
        # 执行提示词增强
        process = subprocess.Popen(
            cmd,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT,
            text=True,
            bufsize=1,
            universal_newlines=True
        )
  
        output = []
        enhanced_prompt = None
        for line in process.stdout:
            print(line, end='')
            output.append(line)
            if "Enhanced prompt:" in line:
                enhanced_prompt = line.split("Enhanced prompt:")[-1].strip()
  
        process.wait()
        if process.returncode != 0:
            raise RuntimeError("提示词增强失败")
  
        return enhanced_prompt if enhanced_prompt else prompt
    except Exception as e:
        print(f"提示词增强失败: {str(e)}")
        return prompt

def run_video_generation(
    prompt,
    model_id="选择模型",
    resolution="540P",
    ar_step=4,
    base_num_frames=97,
    num_frames=257,
    overlap_history=17,
    addnoise_condition=20,
    use_usp=True,
    offload=True,
    seed=42,
    gpu_count=2,
    image=None,
    inference_steps=50,
    fps=24,
    shift=8.0,
    guidance_scale=6.0,
    causal_block_size=5,
    outdir="./video_out",
    prompt_enhancer=False,  # 添加prompt_enhancer参数
    teacache=False  # 添加teacache参数
):
    """执行视频生成命令"""
    # 记录开始时间
    start_time = time.time()
  
    # 确保输出目录存在并获取绝对路径
    outdir = os.path.abspath(outdir)
    os.makedirs(outdir, exist_ok=True)
  
  
  
    # 根据条件处理提示词增强
    if prompt_enhancer:
        try:
            enhanced = enhance_prompt(prompt)
            if enhanced != prompt:
                print(f"原始提示词: {prompt}")
                print(f"增强后的提示词: {enhanced}")
                prompt = enhanced
        except Exception as e:
            print(f"提示词增强失败,将使用原始提示词: {str(e)}")
            # 自动关闭提示词增强功能
            prompt_enhancer = False
  
    # 构建基础命令参数,确保参数顺序正确
    base_args = [
        "--prompt", str(prompt),
        "--model_id", str(model_id),
        "--resolution", str(resolution),
        "--ar_step", str(ar_step),
        "--base_num_frames", str(base_num_frames),
        "--num_frames", str(num_frames),
        "--overlap_history", str(overlap_history),
        "--addnoise_condition", str(addnoise_condition),
        "--inference_steps", str(inference_steps),
        "--fps", str(fps),
        "--shift", str(shift),
        "--guidance_scale", str(guidance_scale),
        "--causal_block_size", str(causal_block_size),
        "--outdir", str(outdir)  # 确保outdir在最后
    ]
  
    if teacache:
        base_args.append("--teacache")
  
    if image:
        base_args.extend(["--image", str(image)])

    if offload:
        base_args.append("--offload")
  
    if seed != -1:
        base_args.append("--seed")
        base_args.append(str(seed))
  
    if prompt_enhancer:
        base_args.append("--prompt_enhancer")
  
    # 根据是否使用USP构建完整命令
    if use_usp:
        cmd = [
            "torchrun",
            f"--nproc_per_node={gpu_count}",
            f"generate_video_df.py"
        ] + base_args + ["--use_usp"]
    else:
        cmd = ["python", "generate_video_df.py"] + base_args
  
    # 打印执行命令
    print("执行命令:", " ".join(cmd))
  
    # 确保输出目录存在并获取绝对路径
    outdir = os.path.abspath(outdir)
    os.makedirs(outdir, exist_ok=True)
  
    # 执行命令并实时显示输出
    try:
        process = subprocess.Popen(
            cmd,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT,
            text=True,
            bufsize=1,
            universal_newlines=True
        )
  
        output = []
        video_path = None
        # 实时读取并显示输出
        for line in process.stdout:
            print(line, end='')  # 实时显示
            output.append(line)  # 保存输出
            # 检查是否包含视频路径信息并转换为绝对路径
            if "Saved video to" in line:
                video_path = line.split("Saved video to")[-1].strip()
                video_path = os.path.abspath(video_path)  # 确保是绝对路径
                print(f"视频保存路径: {video_path}")
  
        process.wait()
        if process.returncode != 0:
            raise RuntimeError("生成视频失败")
  
        # 计算并添加耗时信息
        end_time = time.time()
        elapsed_time = end_time - start_time
        time_info = f"\n总耗时: {elapsed_time:.2f} 秒"
        output.append(time_info)
  
        return "".join(output), video_path
    except Exception as e:
        raise RuntimeError(f"执行命令失败: {str(e)}")

def get_available_gpus():
    """获取可用的GPU数量和设备ID"""
    try:
        import torch
        gpu_count = torch.cuda.device_count()
        if gpu_count == 0:
            return 0, []
        return gpu_count, list(range(gpu_count))
    except:
        return 0, []

def scan_video_directory(directory="./video_out"):
    """扫描视频目录并返回所有视频文件"""
    if not os.path.exists(directory):
        return []
    video_files = []
    for ext in ['.mp4', '.avi', '.mov', '.mkv']:
        files = glob.glob(os.path.join(directory, f'*{ext}'))
        # 返回(显示名称, 文件路径)的元组
        for f in files:
            basename = os.path.basename(f)
            video_files.append((basename, f))
    # 按修改时间排序
    return sorted(video_files, key=lambda x: os.path.getmtime(x[1]), reverse=True)

# 在Gradio界面中使用时:
video_list = gr.Dropdown(
    label="选择视频播放",
    choices=scan_video_directory(),
    value=None,
    interactive=True
)

def update_video_list():
    """刷新视频列表"""
    return gr.Dropdown(choices=scan_video_directory())

def on_video_select(video_path):
    """当选择视频时"""
    if video_path:  # video_path现在是完整路径
        return video_path
    return None

def on_generate_click(*args):
    """生成视频并更新列表"""
    try:
        # 获取参数
        prompt, model_id, resolution, ar_step, base_num_frames, num_frames, \
        overlap_history, addnoise_condition, use_usp, offload, seed, gpu_count, \
        image, inference_steps, fps, shift, guidance_scale, \
        causal_block_size, outdir, prompt_enhancer, teacache = args  # 添加teacache

        # 如果ar_step为0(同步模式),强制设置causal_block_size为1
        if ar_step == 0:
            causal_block_size = 1

        # 如果同时启用了use_usp和prompt_enhancer,先进行提示词增强
        if use_usp and prompt_enhancer:
            try:
                enhanced = enhance_prompt(prompt)
                if enhanced != prompt:
                    print(f"原始提示词: {prompt}")
                    print(f"增强后的提示词: {enhanced}")
                    prompt = enhanced
            except Exception as e:
                print(f"提示词增强失败,将使用原始提示词: {str(e)}")
            # 禁用prompt_enhancer参数,因为提示词已经增强过了
            prompt_enhancer = False

        # 执行视频生成
        output, video_path = run_video_generation(
            prompt, model_id, resolution, ar_step, base_num_frames, num_frames,
            overlap_history, addnoise_condition, use_usp, offload, seed, gpu_count,
            image, inference_steps, fps, shift, guidance_scale,
            causal_block_size, outdir, prompt_enhancer,teacache
        )
  
        # 更新视频列表
        new_choices = scan_video_directory()
        if video_path and os.path.exists(video_path):
            return output, video_path, gr.Dropdown(choices=new_choices, value=video_path)
        return output, None, gr.Dropdown(choices=new_choices)
    except Exception as e:
        error_msg = f"生成失败: {str(e)}"
        return error_msg, None, gr.Dropdown(choices=scan_video_directory())

# 创建Gradio界面
with gr.Blocks(title="SkyReels-V2 视频生成器") as demo:
    gr.Markdown("# SkyReels-V2 视频生成器")
  
    with gr.Row():
        with gr.Column():
            prompt = gr.Textbox(
                label="提示词 (prompt)",
                lines=3,
                value="A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn"
            )
  
            # 图片输入
            image = gr.Image(
                label="输入图片 (仅用于图像到视频生成)",
                type="filepath",
                visible=True
            )
  
            # In the Gradio interface definition, update the model_id dropdown:
            model_id = gr.Dropdown(
                choices=get_model_list(),
                label="模型ID (model_id)",
                value="选择模型",# Changed to match the available model
                allow_custom_value=True
            )
  
            resolution = gr.Dropdown(
                choices=["540P", "720P"],
                label="分辨率 (resolution)",
                value="540P"
            )
  
            with gr.Row():
                num_frames = gr.Number(
                    label="生成帧数 (num_frames)",
                    value=97,
                    precision=0
                )
                base_num_frames = gr.Number(
                    label="基础帧数 (base_num_frames)",
                    value=97,
                    precision=0
                )
  
            with gr.Row():
                inference_steps = gr.Number(
                    label="推理步骤数 (inference_steps)",
                    value=50,
                    precision=0
                )
                fps = gr.Number(
                    label="输出视频帧率 (fps)",
                    value=24,
                    precision=0
                )
  
            with gr.Row():
                shift = gr.Number(
                    label="流匹配参数 (shift)",
                    value=8.0,
                    info="T2V模型推荐8.0,I2V模型推荐5.0"
                )
                guidance_scale = gr.Number(
                    label="文本匹配强度 (guidance_scale)",
                    value=6.0,
                    info="T2V模型推荐6.0,I2V模型推荐5.0"
                )
  
            with gr.Row():
                ar_step = gr.Number(
                    label="AR步数 (ar_step)",
                    value=4,
                    info="0表示同步模式"
                )
                causal_block_size = gr.Number(
                    label="因果块大小 (causal_block_size)",
                    value=4,
                    info="异步推理时推荐使用(ar_step>0)"
                )
  
            with gr.Row():
                overlap_history = gr.Number(
                    label="重叠历史帧数 (overlap_history)",
                    value=17
                )
                addnoise_condition = gr.Number(
                    label="噪声条件 (addnoise_condition)",
                    value=20
                )
  
            with gr.Row():
                use_usp = gr.Checkbox(
                    label="启用use_usp(使用多GPU并行推理)",
                    value=True
                )
                offload = gr.Checkbox(
                    label="启用offload(使用显存优化)",
                    value=True
                )
                prompt_enhancer = gr.Checkbox(
                    label="启用prompt_enhancer(提示词扩展)",
                    value=True,
                )
                teacache = gr.Checkbox(
                    label="启用teacache(使用缓存加速)",
                    value=False,
                )
  
            with gr.Row():
                seed = gr.Number(
                    label="随机种子 (-1为随机)",
                    value=42
                )
                gpu_count = gr.Number(
                    label="使用GPU数量",
                    value=2,
                    precision=0
                )
  
            outdir = gr.Textbox(
                label="输出目录 (outdir)",
                value="./video_out"
            )
  
            # 添加说明
            gr.Markdown("""
            ### 使用说明
            1. 单GPU模式:取消勾选"启用USP"选项
            2. 多GPU模式:
               - 勾选"启用USP"选项
               - 设置要使用的GPU数量
               - 需要固定的随机种子
               - 多GPU无法使用teacache
            3. 无法使用14B模型,若要使用需要单张显存大于60G
            ### 更多信息
            访问 [GitHub仓库](https://github.com/SkyworkAI/SkyReels-V2) 获取详细文档和更新。
            """)
  
            # 生成按钮和输出信息
            generate_btn = gr.Button("生成视频")
            output_text = gr.Textbox(label="输出信息", visible=True, lines=3)
  
            # 视频预览部分
            gr.Markdown("### 视频预览")
            with gr.Row():
                with gr.Column(scale=4):
                    video_player = gr.Video(
                        label="视频播放",
                        format="mp4",
                        autoplay=False,     # 自动播放选中的视频
                        interactive=True   # 允许用户控制播放
                    )
                with gr.Column(scale=1):
                    video_list = gr.Dropdown(
                        label="选择视频",
                        choices=scan_video_directory(),
                        value=None,
                        interactive=True
                    )
                    refresh_btn = gr.Button("🔄 刷新视频列表")

            # 更新事件绑定
            generate_btn.click(
                on_generate_click,
                inputs=[prompt, model_id, resolution, ar_step, base_num_frames, num_frames,
                       overlap_history, addnoise_condition, use_usp, offload, seed, gpu_count,
                       image, inference_steps, fps, shift, guidance_scale,
                       causal_block_size, outdir, prompt_enhancer, teacache],  # 添加teacache
                outputs=[output_text, video_player, video_list]
            )
  
            video_list.change(
                on_video_select,
                inputs=[video_list],
                outputs=[video_player]
            )

            refresh_btn.click(
                update_video_list,
                outputs=[video_list]
            )

if __name__ == "__main__":
    try:
        # 设置CUDA架构列表
        os.environ["TORCH_CUDA_ARCH_LIST"] = "8.6;8.9"  # 30系和40系的架构
  
        # 设置CUDA内存分配策略
        os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
  
        # 检测GPU
        gpu_count, gpu_ids = get_available_gpus()
        # 设置环境变量以消除tokenizers警告
        os.environ["TOKENIZERS_PARALLELISM"] = "false"
        if gpu_count == 0:
            print("警告:未检测到可用的GPU,系统将使用CPU运行(不推荐)")
        else:
            print(f"检测到{gpu_count}个GPU {gpu_ids}")
            os.environ["CUDA_VISIBLE_DEVICES"] = ",".join(map(str, gpu_ids))
  
        # 启动Gradio界面,移除不支持的参数
        demo.launch(
            server_name="0.0.0.0",
            server_port=8080,
            share=False,
        )
    finally:
        # 确保在程序退出时销毁进程组
        if dist.is_initialized():
            dist.destroy_process_group()

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2373862.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

颠覆性技术革命:CAD DWG图形瓦片化实战指南

摘要 CAD DWG图形瓦片化技术通过金字塔模型构建多分辨率地图体系,实现海量工程图纸的Web高效可视化。本文系统解析栅格瓦片与矢量瓦片的技术原理,详细对比两者在生成效率、样式自由度和客户端性能等维度的差异,并结合工程建设、工业设计和智…

不换设备秒通信,PROFINET转Ethercat网关混合生产线集成配置详解

在汽车制造中,连接Profinet控制的PLC(如西门子S7)与EtherCAT伺服驱动器(如倍福AX5000),实现运动控制同步。 在汽车制造的混合生产线集成中,实现西门子S7 PLC与倍福AX5000 EtherCAT伺服驱动器的…

c++STL-string的使用

这里写自定义目录标题 string的使用string写成类模板的原因string的版本举例构造、析构函数和赋值重载构造函数和析构函数operator Iterators迭代器begin和endrbegin和rendcbegin和cend,crbegin和crend(c11) capacity容量有关函数不同编译器下…

UNet网络 图像分割模型学习

UNet 由Ronneberger等人于2015年提出,专门针对医学图像分割任务,解决了早期卷积网络在小样本数据下的效率问题和细节丢失难题。 一 核心创新 1.1对称编码器-解码器结构 实现上下文信息与高分辨率细节的双向融合 如图所示:编码器进行了4步&…

使用 SHAP 进行特征交互检测:揭示变量之间的复杂依赖关系

我们将探讨如何使用 SHAP(SHapley 加法解释)来检测和可视化机器学习模型中的特征交互。了解特征组合如何影响模型预测对于构建更透明、更准确的模型至关重要。SHAP 有助于揭示这些复杂的依赖关系,并使从业者能够以更有意义的方式解释模型决策…

Python-MCPInspector调试

Python-MCPInspector调试 使用FastMCP开发MCPServer,熟悉【McpServer编码过程】【MCPInspector调试方法】-> 可以这样理解:只编写一个McpServer,然后使用MCPInspector作为McpClient进行McpServer的调试 1-核心知识点 1-熟悉【McpServer编…

Java设计模式-策略模式(行为型)

策略模式详解 一、策略模式概述 1.1 基本概念 策略模式是一种行为型设计模式,它主要用于处理算法的不同变体。其核心思想是将算法的定义与使用分离开来,把一系列具体的算法封装成独立的策略类,这些策略类实现相同的策略接口。客户端可以在…

html body 设置heigth 100%,body内元素设置margin-top出滚动条(margin 重叠问题)

今天在用移动端的时候发现个问题&#xff0c;html,body 设置 height&#xff1a;100% 会出现纵向滚动条 <!DOCTYPE html> <html> <head> <title>html5</title> <style> html, body {height: 100%; } * {margin: 0;padding: 0; } </sty…

C语言模糊不清的知识

1、malloc、calloc、realloc的区别和用法 malloc实在堆上申请一段连续指定大小的内存区域&#xff0c;并以void*进行返回&#xff0c;不会初始化内存。calloc与malloc作用一致&#xff0c;只是calloc会初始化内存&#xff0c;自动将内存清零。realloc用于重新分配之前通过mallo…

如何配置光猫+路由器实现外网IP访问内部网络?

文章目录 前言一、网络拓扑理解二、准备工作三、光猫配置3.1 光猫工作模式3.2 光猫端口转发配置&#xff08;路由模式时&#xff09; 四、路由器配置4.1 路由器WAN口配置4.2 端口转发配置4.3 动态DNS配置&#xff08;可选&#xff09; 五、防火墙设置六、测试配置七、安全注意事…

springboot3+vue3融合项目实战-大事件文章管理系统获取用户详细信息-ThreadLocal优化

一句话本质 为每个线程创建独立的变量副本&#xff0c;实现多线程环境下数据的安全隔离&#xff08;线程操作自己的副本&#xff0c;互不影响&#xff09;。 关键解读&#xff1a; 核心机制 • 同一个 ThreadLocal 对象&#xff08;如示意图中的红色区域 tl&#xff09;被多个线…

【高数上册笔记篇02】:数列与函数极限

【参考资料】 同济大学《高等数学》教材樊顺厚老师B站《高等数学精讲》系列课程 &#xff08;注&#xff1a;本笔记为个人数学复习资料&#xff0c;旨在通过系统化整理替代厚重教材&#xff0c;便于随时查阅与巩固知识要点&#xff09; 仅用于个人数学复习&#xff0c;因为课…

c++STL-string的模拟实现

cSTL-string的模拟实现 string的模拟实现string的模拟线性表的实现构造函数析构函数获取长度&#xff08;size&#xff09;和获取容量&#xff08;capacity&#xff09;访问 [] 和c_str迭代器&#xff08;iterator&#xff09;交换swap拷贝构造函数赋值重载&#xff08;&#x…

YashanDB(崖山数据库)V23.4 LTS 正式发布

2024年回顾 2024年11月我们受邀去深圳参与了2024国产数据库创新生态大会。在大会上崖山官方发布了23.3。这个也是和Oracle一样采用的事编年体命名。 那次大会官方希望我们这些在一直从事在一线的KOL帮助产品提一些改进建议。对于这样的想法&#xff0c;我们都是非常乐于合作…

python 写一个工作 简单 番茄钟

1、图 2、需求 番茄钟&#xff08;Pomodoro Technique&#xff09;是一种时间管理方法&#xff0c;由弗朗西斯科西里洛&#xff08;Francesco Cirillo&#xff09;在 20 世纪 80 年代创立。“Pomodoro”在意大利语中意为“番茄”&#xff0c;这个名字来源于西里洛最初使用的一个…

PyCharm 加载不了 conda 虚拟环境,不存在的

#工作记录 前言 在开发过程中&#xff0c;PyCharm 无法加载 Conda 虚拟环境是常见问题。 在不同情况下&#xff0c;“Conda 可执行文件路径”的指定可能会发生变化&#xff0c;不会一尘不变&#xff0c;需要灵活处置。 以下是一系列解决此问题的经验参考。 检查 Conda 安装…

设计模式学习整理

目录 UML类图 设计模式六大原则 1.单一职责原则 2.里氏替换原则 3.依赖倒置原则 4.接口隔离原则 5.迪米特法则(最少知道原则) 6.开(放封)闭原则 设计模式分类 1.创建型模式 2.结构型模式 4.行为型模式 一、工厂模式(factory——简单工厂模式和抽象工厂模式) 1.1、…

二分查找的理解

#define _CRT_SECURE_NO_WARNINGS #include <stdio.h>int binary_search(int arr[], int k, int sz) {int left 0;int right sz - 1;//这个是下标&#xff0c;减一是因为在0开始的&#xff0c;怕越界&#xff08;访问无效&#xff09;while (left < right){int mid…

【Java】线程实例化 线程状态 线程属性

线程实例化 继承 Thread 类 创建类继承自 Thread 类 . class MyThread extends Thread重写 run() 方法 . Overridepublic void run(){// 线程要执行的任务代码}实例化自定义线程类 . 实现 Runnable 接口 创建类实现 Runnable 接口 . class MyRunnable implements Runnable实…

卫宁健康WiNGPT3.0与WiNEX Copilot 2.2:医疗AI创新的双轮驱动分析

引言:医疗AI的双翼时代 在医疗信息化的浪潮中,人工智能技术的深度融入正在重塑整个医疗行业。卫宁健康作为国内医疗健康和卫生领域数字化解决方案的领军企业,持续探索AI技术在医疗场景中的创新应用。2025年5月10日,在第29届中国医院信息网络大会(CHIMA2025)上,卫宁健康…