MCPcopy Create free account

hub / github.com/7BEII/Comfyui_PDuse / functions

Functions398 in github.com/7BEII/Comfyui_PDuse

↓ 44 callersMethodconvert
(part)
py/image_list_sort.py:57
↓ 38 callersMethodrun_command
执行命令并返回结果
gittools.py:51
↓ 7 callersMethodis_git_repo
检查当前目录是否是 Git 仓库
gittools.py:78
↓ 7 callersFunctionlog
日志输出函数
py/imageblend_v1.py:7
↓ 6 callersMethodget_current_branch
获取当前分支名
gittools.py:83
↓ 5 callersMethodget_remote_url
获取远程仓库地址
gittools.py:93
↓ 4 callersMethodconfig_remote
配置远程仓库地址
gittools.py:98
↓ 4 callersFunctiontensor2pil
将张量转换为PIL图像
py/imageblend_v1.py:20
↓ 3 callersMethod_get_unique_filename
获取唯一的文件名,如果文件已存在则添加编号
py/PD_aitookit.py:157
↓ 3 callersMethodhas_changes
检查是否有未提交的更改
gittools.py:88
↓ 3 callersMethodpil_to_tensor
PIL图片转张量 - 确保正确的格式和数据类型
py/image_dual_batch_v1.py:155
↓ 3 callersMethodpil_to_tensor
PIL图片转张量 - 确保正确的格式和数据类型
py/load_dual_batch_v1.py:155
↓ 3 callersMethodpil_to_tensor
PIL图片转张量 - 确保正确的格式和数据类型
py/PDimage_dual_batch_v1.py:63
↓ 2 callersMethod_fill_internal_holes_only
只填充真正的内部空洞,不处理连接到边界的开口区域 参数: binary_mask (numpy.ndarray): 二值mask图像 [H, W] 返回: f
py/Fill_mask.py:132
↓ 2 callersMethod_get_filename_with_extension
智能处理文件名后缀 参数: - filename: 原始文件名 - format: 目标格式(png或jpg) 返回: - 带有正确后缀的文件名
py/PD_image_coversaver.py:101
↓ 2 callersMethod_get_next_counter
获取下一个可用的计数器值
py/save_path.py:165
↓ 2 callersMethod_pad_to
(self, arr, target_h, target_w, is_image=True)
py/Mask_selector.py:46
↓ 2 callersMethod_pad_to
填充到目标尺寸
py/Mask_selector_by_area_left.py:43
↓ 2 callersMethod_parse_tokens
解析文本中的令牌 Args: text (str): 包含令牌的文本 Returns: str: 解析后的文本
py/PD_SAVE_PATH2.py:123
↓ 2 callersMethod_safe_tensor_to_pil
* 安全地将张量转换为PIL图像 * @param {torch.Tensor} tensor - 输入张量 * @return {PIL.Image} PIL图像对象
py/Image Blend Text .py:172
↓ 2 callersMethodcommit_changes
提交本地更改
gittools.py:165
↓ 2 callersMethodconcatenate
(self, image1, image2, direction, match_image_size, first_image_shape=None)
py/imagebach.py:29
↓ 2 callersMethodget_image_files
获取文件夹中所有图片文件
py/image_dual_batch_v1.py:53
↓ 2 callersMethodget_image_files
获取文件夹中所有图片文件
py/load_dual_batch_v1.py:53
↓ 2 callersMethodget_image_files
获取文件夹中所有图片文件
py/PDimage_dual_batch_v1.py:37
↓ 2 callersMethodnatural_sort_key
自然排序的键函数 将文本分割成数字和非数字部分,数字部分转换为整数进行比较 例如: file1.txt, file2.txt, file10.txt 会按正确顺序排序
py/text_list_sort.py:66
↓ 2 callersMethodparse_name_list
解析名称列表字符串,每行一个名称
py/image_dual_batch_by_list.py:56
↓ 2 callersMethodrun
运行GUI程序
py/rename_batch_v1.py:177
↓ 2 callersMethodsanitize_filename
(self, name)
py/PD_ZIP_Archive.py:49
↓ 2 callersMethodsanitize_filename
(self, name)
py/zip_page.py:48
↓ 1 callersMethodVALIDATE_INPUTS
(cls, target_width=None, target_height=None, **_)
py/image_resize_v3.py:41
↓ 1 callersFunction_build_alpha
(rgb, min_area, remove_white)
py/PDtools_Filter_GodenPNG_v1.py:14
↓ 1 callersMethod_build_report
构建操作结果报告 Args: result (dict): 操作结果数据 target_prefix (str): 目标前缀 Returns:
py/name_star_weizhi.py:122
↓ 1 callersMethod_connected_regions
(self, mask_uint8, min_area=100)
py/Mask_selector.py:25
↓ 1 callersMethod_connected_regions
检测所有连通区域
py/Mask_selector_by_area_left.py:22
↓ 1 callersMethod_crop_by_size_and_align
根据目标尺寸和对齐方式裁切图像。 @param image {PIL.Image} 输入图像 @param mask {PIL.Image|None} 输入mask @param target_width {int} 目标宽度
py/image_resize_v3.py:92
↓ 1 callersMethod_crop_resize
裁切模式:保持比例,裁切多余部分
py/imagesize_by_ratio.py:82
↓ 1 callersMethod_gcd
* 计算两个数的最大公约数 * @param {int} a - 第一个数 * @param {int} b - 第二个数 * @return {int} 最大公约数
py/image_ratio_V1.py:87
↓ 1 callersMethod_generate_filename
生成唯一的文件名 Args: name (str): 文件名前缀,空则不加前缀 number_padding (int): 数字填充位数 number_start (bool)
py/PD_SAVE_PATH2.py:155
↓ 1 callersMethod_generate_result_message
生成结果消息
py/PD_aitookit.py:176
↓ 1 callersMethod_get_next_counter
获取下一个可用的计数器值
py/PD_SAVE_PATH.py:197
↓ 1 callersMethod_get_unique_path
(self, path: Path)
py/PD_tensortraining.py:203
↓ 1 callersFunction_image_to_float
(image)
py/PDtools_Filter_WPNG_v2.py:6
↓ 1 callersFunction_image_to_uint8
(image)
py/PDtools_Filter_WPNG_v1.py:6
↓ 1 callersFunction_image_to_uint8
(image)
py/PDtools_Filter_GodenPNG_v1.py:6
↓ 1 callersMethod_is_image_file
检查文件是否为图片格式 Args: file_path (str): 文件路径 Returns: bool: 是否为图片文件
py/name_number.py:160
↓ 1 callersMethod_load_font
* 加载字体,优先从 fonts 目录加载 * @param {int} font_size - 字体大小 * @param {str} font_file - 字体文件名 * @return {ImageFont} 字体对象
py/Image Blend Text .py:202
↓ 1 callersFunction_make_mask
(rgb, threshold)
py/PDtools_Filter_WPNG_v1.py:14
↓ 1 callersMethod_make_report
(self, out_dir, stats)
py/PD_tensortraining.py:214
↓ 1 callersFunction_make_soft_alpha
(rgb, black_threshold, gamma, blur)
py/PDtools_Filter_WPNG_v2.py:10
↓ 1 callersMethod_pad_resize
填充模式:保持比例,添加填充
py/imagesize_by_ratio.py:121
↓ 1 callersMethod_parse_hex_color
将HEX字符串解析为RGB元组
py/image_resize_v2.py:179
↓ 1 callersMethod_pil_mask_to_tensor
(self, mask)
py/image_resize_v2.py:217
↓ 1 callersMethod_pil_mask_to_tensor
将PIL mask转换为张量。 @param mask {PIL.Image} PIL mask对象 @returns {torch.Tensor} mask张量,形状为 (H, W)
py/image_resize_v3.py:228
↓ 1 callersMethod_pil_to_tensor
(self, image)
py/image_resize_v2.py:210
↓ 1 callersMethod_pil_to_tensor
将PIL图像转换为张量。 @param image {PIL.Image} PIL图像对象 @returns {torch.Tensor} 图像张量,形状为 (H, W, C)
py/image_resize_v3.py:215
↓ 1 callersMethod_pil_to_tensor
* 将PIL图像转换为张量 * @param {PIL.Image} image - PIL图像对象 * @return {torch.Tensor} 图像张量 (1, H, W, C)
py/image_ratio_V1.py:120
↓ 1 callersMethod_pil_to_tensor
* 将PIL图像转换为张量 * @param {PIL.Image} image - PIL图像对象 * @return {torch.Tensor} 图像张量 (1, H, W, C)
py/Image Blend Text .py:227
↓ 1 callersMethod_process_image
处理图片:调整尺寸和格式转换 Args: input_path (str): 输入文件路径 output_path (str): 输出文件路径 format_convert (
py/name_number.py:174
↓ 1 callersMethod_resize_image
调整图片尺寸,保持宽高比 Args: img: PIL图片对象 max_size (int): 最长边尺寸 Returns: PIL.
py/name_number.py:219
↓ 1 callersMethod_resolve_save_target
(self, save_path, filename_prefix, format)
py/PD_SAVE_PATH.py:94
↓ 1 callersMethod_safe_filename
(self, filename_prefix)
py/PD_SAVE_PATH.py:111
↓ 1 callersMethod_save_images_to_dir
私有方法:将图像保存到指定目录(覆盖模式) 参数: - images: 图像数组,张量形状为 B H W C - filename: 文件名(可能含或不含扩展名) - output_dir: 输出目录
py/PD_image_coversaver.py:127
↓ 1 callersMethod_save_images_to_dir
私有方法:将图像保存到指定目录 参数: - images: 图像数组 - name: 文件名前缀,空则不加前缀 - output_dir: 输出目录路径 - 其他参数: 各种保存选项
py/PD_SAVE_PATH2.py:255
↓ 1 callersMethod_save_images_to_dir
私有方法:将图像保存到指定目录
py/PD_SAVE_PATH.py:117
↓ 1 callersMethod_stretch_to_size
强制拉伸图像到指定尺寸。 @param image {PIL.Image} 输入图像 @param mask {PIL.Image|None} 输入mask @param target_width {int} 目标宽度
py/image_resize_v3.py:161
↓ 1 callersMethod_tensor_to_pil
(self, tensor)
py/image_resize_v2.py:192
↓ 1 callersMethod_tensor_to_pil
将张量转换为PIL图像。 @param tensor {torch.Tensor} 输入张量,形状为 (H, W, C) @returns {PIL.Image} PIL图像对象
py/image_resize_v3.py:176
↓ 1 callersMethod_tensor_to_pil
* 将张量转换为PIL图像 * @param {torch.Tensor} tensor - 输入张量 * @return {PIL.Image} PIL图像对象
py/image_ratio_V1.py:98
↓ 1 callersMethod_tensor_to_pil_mask
(self, tensor)
py/image_resize_v2.py:200
↓ 1 callersMethod_tensor_to_pil_mask
将mask张量转换为PIL图像。 @param tensor {torch.Tensor} 输入张量,形状为 (H, W) @returns {PIL.Image} PIL图像对象
py/image_resize_v3.py:194
↓ 1 callersFunction_uint8_to_image
(image)
py/PDtools_Filter_WPNG_v1.py:10
↓ 1 callersFunction_uint8_to_image
(image)
py/PDtools_Filter_GodenPNG_v1.py:10
↓ 1 callersFunctionaddZipUploadButton
(node)
web/pd_upload_zip.js:19
↓ 1 callersFunctionbatch_rename_files
批量重命名文件函数 参数: source_dir (str): 源文件夹路径 target_dir (str): 目标文件夹路径 old_keyword (str): 要被替换的关键词 new_keyword
py/rename_keyword.py:28
↓ 1 callersFunctionbuildUploadedFilename
(data)
web/pd_upload_zip.js:11
↓ 1 callersMethodcalculate_target_size
(self, max_size: int, aspect_ratio: Tuple[int, int])
py/image_resize_by_ratio.py:83
↓ 1 callersFunctionchop_image_v2
图像混合函数 Args: image1: 背景图像 (PIL Image) image2: 前景图像 (PIL Image) blend_mode: 混合模式 opacity: 透明度 (0-100) Ret
py/imageblend_v1.py:40
↓ 1 callersMethodcreate_sort_key
Create sorting key based on index and available metadata.
py/image_list_sort.py:65
↓ 1 callersMethodcreate_white_areas_mask
从图像中识别所有白色区域的mask(包括内部白色区域)
py/remove_white_border.py:34
↓ 1 callersMethodcrop_image_border
裁切单张图片的边框
py/crop_border.py:112
↓ 1 callersMethodcrop_tensor
按指定方式裁切图片到目标尺寸 @param {torch.Tensor} img - 输入图片 (B, H, W, C) @param {int} target_h - 目标高度 @param {int} target_w - 目标宽
py/image_concatenate_v1.py:34
↓ 1 callersMethoddetect_border
检测图像边缘连接的边框区域 - 简化版本
py/crop_border.py:54
↓ 1 callersMethoddetect_border
检测图像边缘连接的边框区域 - 简化版本
py/crop_border.py:283
↓ 1 callersMethoddetect_language
检测文本语言 返回语言代码:en(英文), zh(中文), ja(日文) 等
py/string_to_caption_json.py:41
↓ 1 callersMethodexpand_array
(self, arr)
py/mask_edge_selector.py:20
↓ 1 callersMethodextract_date
从文件名中提取日期(支持多种格式)
py/text_list_sort.py:44
↓ 1 callersMethodextract_first_letter
Extract the first alphabetic sequence from text.
py/image_list_sort.py:44
↓ 1 callersMethodextract_first_number
Extract the first number from text with intelligent zero-padding detection. Returns tuple: (number_value, padding_length, original_st
py/image_list_sort.py:26
↓ 1 callersMethodextract_metadata
提取图片的元数据信息 Args: image_path: 图片路径 Returns: tuple: (prompt_text, model_info, lor
py/Load_ImageMetadata.py:33
↓ 1 callersMethodextract_number
从文件名中提取第一个数字
py/text_list_sort.py:37
↓ 1 callersFunctionfetchApiCompat
(path, options)
web/pd_upload_zip.js:4
↓ 1 callersMethodfind_matching_pairs
基于文件名进行匹配(智能匹配:同时支持前缀、后缀和中间位置匹配) Args: folder1_dict: 文件夹1的文件字典 {文件名(无扩展名): 完整文件名} folder2_dict: 文件夹2的文件字典 {文件
py/image_dual_batch_v1.py:69
↓ 1 callersMethodfind_matching_pairs
基于文件名进行匹配(智能匹配:同时支持前缀、后缀和中间位置匹配) Args: folder1_dict: 文件夹1的文件字典 {文件名(无扩展名): 完整文件名} folder2_dict: 文件夹2的文件字典 {文件
py/load_dual_batch_v1.py:69
↓ 1 callersMethodfind_matching_pairs
基于文件名进行精确匹配
py/PDimage_dual_batch_v1.py:53
↓ 1 callersMethodfind_matching_pairs
基于文件名进行匹配逻辑
py/image_dual_batch_by_list.py:68
↓ 1 callersMethodforce_pull
纯粹的远程覆盖本地(不保留本地未推送的修改)
gittools.py:236
↓ 1 callersMethodforce_push
纯粹的本地覆盖远程(不拉取,直接强制推送)
gittools.py:195
↓ 1 callersMethodformat_bytes
(self, size_in_bytes)
py/PD_ZIP_Archive.py:40
↓ 1 callersMethodformat_bytes
(self, size_in_bytes)
py/zip_page.py:39
next →1–100 of 398, ranked by callers