MCPcopy Create free account

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

Functions398 in github.com/7BEII/Comfyui_PDuse

Methodexecute
执行图像调整 @param image: 输入图像张量 (B, H, W, C) @param width: 目标宽度 @param height: 目标高度 @param interpolation
py/image_resize_v1.py:52
Methodexecute
* 文本输入节点主函数 * @param {str} value - 输入的字符串 * @return {tuple} 输出字符串
py/logic.py:22
Methodextract_image
(self, images, image_index)
py/Image_Extract.py:34
Methodextract_names
(item)
py/PD_ZIP_Archive.py:74
Methodextract_names
(item)
py/zip_page.py:71
Methodextract_white_areas
识别所有白色区域,返回原始图像和反转的白色区域mask
py/remove_white_border.py:90
Methodfill_holes
填充mask图像中的空洞 参数: mask (tensor): 输入mask张量 [B, H, W] fill_method (str): 填充方法 ("scipy" 或 "opencv")
py/Fill_mask.py:42
Methodfilter_png
(self, image, threshold=0.5)
py/PDtools_Filter_WPNG_v1.py:34
Methodfilter_png
(self, image, remove_white=True)
py/PDtools_Filter_GodenPNG_v1.py:56
Methodfilter_png
(self, image, black_threshold=0.02)
py/PDtools_Filter_WPNG_v2.py:38
Methodformat_string
格式化字符串,去除多余空格,按关键词换行 Args: input_string: 输入的原始字符串 line_break_keyword: 用于换行的关键词 remove_empt
py/string_empty_word.py:29
Functionget_config
获取配置值
config.py:62
Methodget_image_ratio
获取图像比例
py/pd_image.py:293
Methodget_internal_name
(ext, default_name)
py/PD_ZIP_Archive.py:99
Methodget_internal_name
(ext, default_name)
py/zip_page.py:91
Methodget_size
(self, image, unique_id=None, extra_pnginfo=None)
py/pd_image.py:162
Methodimage_blend_v1
* 执行图片混合操作的主要函数 * @param {torch.Tensor} background_image - 背景图像张量 (B, H, W, C) * @param {torch.Tensor} layer_image - 图层图像张量 (
py/imageblend_v1.py:136
Methodimage_crop_location
通过给定的 x, y 坐标和裁切的宽度、高度裁剪图像。 参数: image (tensor): 输入图像张量 [B, H, W, C] x (int): 裁剪区域左上角 X 坐标 y (int
py/pd_image.py:33
Methodimage_rotate
(self, images, mode, rotation, sampler)
py/image_rotate_v1.py:77
Methodimage_scale
(self, pixels, aspect_ratio, proportional_width, proportional_height, fit, method, scale_t
py/image_resize_v2.py:38
Methodjoin_strings
(self, string_1, string_2)
py/text_JoinStringMultiLine.py:31
Methodjoinstring
* 字符串连接主函数 * @param {str} string1 - 第一个字符串 * @param {str} string2 - 第二个字符串 * @param {str} delimiter - 分隔符 * @
py/logic.py:53
Methodload_image
加载图片并返回图片数据、遮罩、图片名称和格式 Args: image: 图片文件名 Returns: tuple: (image_tensor, mask_t
py/Load Image.py:26
Methodload_image_with_metadata
(self, image)
py/load_image_with_meta.py:79
Methodload_image_with_metadata
加载图片并返回图片数据、遮罩、元数据信息 Args: image: 图片文件名 Returns: tuple: (image_tensor, mask_ten
py/Load_ImageMetadata.py:196
Methodload_images
(self, directory_path, limit_count)
py/LoadImagesFromDir.py:35
Methodload_images_recursive
递归加载目录及其子目录中的所有图片,按指定方式排序 seed 参数用于触发重新加载
py/Load_Images.py:159
Methodload_images_recursive
递归加载目录及其子目录中的所有图片,按数字顺序排序
py/Load_Images_adv.py:150
Methodload_images_recursive
递归加载目录及其子目录中的所有图片,按数字顺序排序
py/load_image_V1.py:150
Methodload_matched_images
主处理函数 - 真正的List输出模式,保留所有匹配图片 Args: only_first: 是否只读取第一张匹配的图片对(用于测试)
py/image_dual_batch_v1.py:174
Methodload_matched_images
主处理函数 - 真正的List输出模式,保留所有匹配图片 Args: only_first: 是否只读取第一张匹配的图片对(用于测试)
py/load_dual_batch_v1.py:174
Methodload_matched_images
主处理函数 - 真正的List输出模式,保留所有匹配图片
py/PDimage_dual_batch_v1.py:82
Methodload_pd_lora
(self, lora_name, strength_model, strength_clip, model=None, clip=None)
py/loraloader.py:46
Methodload_pd_lora
(self, model, lora_name, strength_model)
py/PD_lora_loader.py:14
Methodload_texts_from_dir
(self, directory_path, limit_count)
py/LoadTextsFromDir.py:35
Methodload_zip_texts
(self, zip_file_upload)
py/LoadTextsFromZip.py:30
Functionmask2image
将遮罩张量转换为PIL图像
py/imageblend_v1.py:30
Methodmask_selection
(self, mask1, image1, mask2, image2)
py/mask_selection.py:23
Methodmatch_images_by_name
主处理函数
py/image_dual_batch_by_list.py:145
Methodmerge_images_with_text
* 合并两张图片并添加文字标注的主要函数 * @param {torch.Tensor} image1 - 第一张图像张量 (B, H, W, C) * @param {torch.Tensor} image2 - 第二张图像张量 (B, H, W,
py/Image Blend Text .py:62
Methodnatural_sort_key
自然排序键:智能处理数字和字母混合的文件名
py/Load_Images.py:87
Methodnatural_sort_key
自然排序键:智能处理数字和字母混合的文件名
py/Load_Images_adv.py:78
Methodnatural_sort_key
自然排序键:智能处理数字和字母混合的文件名
py/load_image_V1.py:78
Methodnotify
(self, text, unique_id=None, extra_pnginfo=None)
py/show.py:22
Methodnumeric_sort_key
数字排序键:专门处理纯数字文件名,如 1.jpg, 2.jpg, 10.jpg, 100.jpg
py/Load_Images.py:71
Methodnumeric_sort_key
数字排序键:专门处理纯数字文件名,如 1.jpg, 2.jpg, 10.jpg, 100.jpg
py/Load_Images_adv.py:62
Methodnumeric_sort_key
数字排序键:专门处理纯数字文件名,如 1.jpg, 2.jpg, 10.jpg, 100.jpg
py/load_image_V1.py:62
Methodorganize_files
整理训练数据文件 将配对的图片和文本文件分类到不同文件夹
py/training_aitookit.py:52
Methodpack_texts
将多个文本和文件名打包成列表 支持:1. 单独输入(text_1-5)2. 列表输入(input_text_list)3. 两者混合
py/text_list_pack.py:85
Methodparse_json
解析Caption JSON字符串,提取caption和lang 支持批处理:输入列表,输出列表
py/caption_json_editor.py:212
Methodparse_json
解析Caption JSON字符串,提取caption和lang 支持批处理:输入列表,输出列表
py/json_text to json_editor.py:212
Functionpil2tensor
(image)
py/pd_image.py:12
Functionpopulate
(text)
web/show.js:4
Methodprocess
(self, image, black_threshold)
py/PD_unmultbackbackground.py:19
Methodprocess
处理输入的图片和提示词,返回提示词文本 Args: image: 输入图片张量,格式为 B H W C prompt: 输入的提示词字符串 Returns:
py/image_to_text_v1.py:32
Methodprocess_dataset
(self, input_path, output_path, operation_mode, find_1, replace_1, ext_1,
py/PD_tensortraining.py:76
Methodprocess_directory
(self, directory_path, words_to_remove, words_to_add)
py/txt.py:21
Methodprocess_files
(self, directory_path, file_format, search_keyword, wordorder)
py/PD_Name_ReplaceWordOrder.py:23
Methodprocess_files
(self, directory_path, file_format, search_keyword, replace_word)
py/PD_Name_ReplaceWord.py:21
Methodprocess_images
处理图片批量重命名和格式转换
py/PD_rename_image.py:59
Methodprocess_images
( self, images: torch.Tensor, max_size: int, aspect_width: int, aspect
py/image_resize_by_ratio.py:142
Methodprocess_item
(item, base_name)
py/PD_ZIP_Archive.py:120
Methodprocess_item
(item, base_name)
py/zip_page.py:112
Methodprocess_json_files
(self, directory_path, color_choice, modify_size, font_size, target_title, output_folder, new_filename)
py/PDJSON_incrementalnumber.py:24
Methodremove_empty_lines
(self, text)
py/txt.py:103
Methodremove_small_objects
移除mask图像中的小对象 参数: mask (tensor): 输入mask张量 [B, H, W] min_size (int): 最小对象尺寸,小于此尺寸的对象将被移除
py/Fill_mask.py:233
Methodrename_files
执行重命名操作
py/rename_batch_v1.py:112
Methodrename_files
重命名文件夹中的文件 Args: folder_path (str): 目标文件夹路径 new_name (str): 新的文件名(如果提供,将完全替换原文件名) prefix
py/name_number.py:32
Methodrename_order_files
重命名文件,将前缀_数字格式改为数字_前缀格式 Args: folder_path (str): 目标文件夹路径 target_prefix (str): 目标前缀词(默认为T)
py/name_star_weizhi.py:26
Methodreplace_time_format
(match)
py/PD_SAVE_PATH2.py:142
Methodresize_and_crop
(self, pixels, crop_mode, target_width, target_height, horizontal_align, vertical_align, mask_optional=None)
py/image_resize_v3.py:50
Methodresize_image
(self, image, preset_size, resize_mode, image_location, padding_color)
py/imagesize_by_ratio.py:32
Methodresize_image_by_longer_side
* 根据最长边限制等比例缩放图像 * @param {PIL.Image} img - 待缩放的图像 * @param {int} target_longer_size - 目标最长边尺寸 * @ret
py/Image Blend Text .py:83
Methodresize_longer_side
(self, image: torch.Tensor, size: int, interpolation: str = "bicubic")
py/pd_image.py:222
Methodrun
运行函数:生成随机提示词组合
py/random_prompt_v1.py:39
Methodsave_images
保存图像主方法(覆盖模式) 参数: - images: 图像数组,张量形状为 B H W C - filename: 文件名(可含或不含扩展名,会智能处理) - custom_output_dir:
py/PD_image_coversaver.py:55
Methodsave_images
保存图像主方法 参数: - images: 图像数组 - name: 文件名前缀,空则不加前缀,默认"T_" - output_dir: 自定义输出目录路径 - number_star
py/PD_SAVE_PATH2.py:65
Methodsave_images
保存图像主方法
py/PD_SAVE_PATH.py:61
Methodsave_text_file
保存文本文件到指定路径 Args: text: 要保存的文本内容(字符串或列表) output_folder: 输出文件夹名称 filename: 文件名
py/save_path.py:50
Methodsave_texts
将文本列表按文件名保存到指定目录 参数说明: - text_list: 文本内容列表,例如 [content1, content2, content3, ...] - filename_text: 多行文件名字符串,
py/save text path and name.py:37
Methodsave_to_zip
(self, data, filename_prefix, custom_names=None)
py/PD_ZIP_Archive.py:60
Methodsave_to_zip
(self, data, filename_prefix, custom_names=None)
py/zip_page.py:57
Methodsearch_images
图片搜索主函数
py/PD_imagesearch_v1.py:38
Methodselect
( self, front1, mask1, back1, aspect_ratio, int1=768,
py/PD_selector_sum_T3.py:35
Methodselect_extreme
(self, image, mode)
py/mask_edge_selector.py:27
Methodselect_image
(self, aspect_ratio, **images)
py/PD_ratio_image_selector.py:20
Methodselect_output_folder
选择输出文件夹
py/rename_batch_v1.py:83
Methodselect_region
(self, image, mask, select="mask1", sort_by="left_to_right", min_area=100, padding=10, o
py/Mask_selector.py:57
Methodselect_region
(self, image, mask, select="mask1", padding=10)
py/Mask_selector_by_area_left.py:55
Methodselect_source_folder
选择源文件夹
py/rename_batch_v1.py:75
Methodselect_value
(self, aspect_ratio, **values)
py/PD_string_selector.py:18
Functionset_config
设置配置值
config.py:66
Methodsort_images
Sort the image tensor batch based on the specified method and order. Args: images: Image tensor batch in format
py/image_list_sort.py:87
Methodsort_images_with_metadata
Sort images with optional filename metadata.
py/image_list_sort.py:185
Methodsort_text_list
根据文件名排序规则,同步排序文本列表和文件名列表
py/text_list_sort.py:80
Methodsplit_image
(self, image, columns, rows)
py/crop_Image Grid.py:21
Methodsplit_objects
Split one ComfyUI image/mask pair into multiple cropped image/mask pairs. Output order is stable: top-to-bottom, then left-to-right.
py/Maskfenkai.py:27
Methodunpack_text
从文本列表中提取指定索引的文本和文件名
py/text_list_unpack.py:37
← previous301–398 of 398, ranked by callers