1 Star 0 Fork 15

雪狐/ComfyUI_Lam_1

forked from yanlang0123/ComfyUI_Lam 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
VideoPath.py 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
马噥 提交于 2023-07-21 13:05 +08:00 . 完善缺少的包
from PIL import Image
import numpy as np
import torch
import os
import folder_paths
class VideoPath:
def __init__(self):
self.input_video_dir = os.path.join(folder_paths.get_input_directory(), 'video')
if not os.path.exists(self.input_video_dir):
os .makedirs(self.input_video_dir)
@classmethod
def INPUT_TYPES(cls):
input_video_dir = os.path.join(folder_paths.get_input_directory(), 'video')
if not os.path.exists(input_video_dir):
os .makedirs(input_video_dir)
files = [f for f in os.listdir(input_video_dir) if os.path.isfile(os.path.join(input_video_dir, f))]
return {
"required": {
"video": (sorted(files), ),
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("视频地址",)
FUNCTION = "get_video_path"
CATEGORY = "lam"
def get_video_path(self,video):
video_path = folder_paths.get_annotated_filepath(video,self.input_video_dir)
return (video_path, )
NODE_CLASS_MAPPINGS = {
"VideoPath": VideoPath
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"VideoPath": "获取视频地址"
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/assassindesign/ComfyUI_Lam_1.git
git@gitee.com:assassindesign/ComfyUI_Lam_1.git
assassindesign
ComfyUI_Lam_1
ComfyUI_Lam_1
cu121

搜索帮助