1 Star 0 Fork 15

雪狐/ComfyUI_Lam_1

forked from yanlang0123/ComfyUI_Lam 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
AutioPath.py 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
马噥 提交于 2年前 . 完善缺少的包
from PIL import Image
import numpy as np
import torch
import folder_paths
import os
class AutioPath:
def __init__(self):
self.input_autio_dir = os.path.join(folder_paths.get_input_directory(), 'autio')
if not os.path.exists(self.input_autio_dir):
os .makedirs(self.input_autio_dir)
@classmethod
def INPUT_TYPES(cls):
input_autio_dir = os.path.join(folder_paths.get_input_directory(), 'autio')
if not os.path.exists(input_autio_dir):
os .makedirs(input_autio_dir)
autiofiles = [f for f in os.listdir(input_autio_dir) if os.path.isfile(os.path.join(input_autio_dir, f))]
return {
"required": {
"autio": (sorted(autiofiles), ),
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("音频地址",)
FUNCTION = "get_autio_path"
CATEGORY = "lam"
def get_autio_path(self,autio):
autio_path = folder_paths.get_annotated_filepath(autio,self.input_autio_dir)
return (autio_path, )
NODE_CLASS_MAPPINGS = {
"AutioPath": AutioPath
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"AutioPath": "获取音频地址"
}
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

搜索帮助