liasece / sd-webui-train-tools

The stable diffusion webui training aid extension helps you quickly and visually train models such as Lora.
Other
393 stars 48 forks source link

Creation of dataset stops #59

Open Bocchi-Chan2023 opened 3 months ago

Bocchi-Chan2023 commented 3 months ago

Preprocessing [Image 0/36]: 0%| | 0/36 [00:00<?, ?it/s]Unable to load face detection model for auto crop selection. Falling back to lower quality haar method. download_and_cache_models() takes 0 positional arguments but 1 was given Preprocessing [Image 1/36]: 3%|█▌ | 1/36 [00:01<00:38, 1.11s/it]Unable to load face detection model for auto crop selection. Falling back to lower quality haar method. download_and_cache_models() takes 0 positional arguments but 1 was given Preprocessing [Image 1/36]: 3%|█▌ | 1/36 [00:01<00:55, 1.59s/it] Train Tools: dataset update error The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Traceback (most recent call last): File "C:\stable-diffusion-webui-forge\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\dateset_ui.py", line 107, in on_ui_update_dataset_click preprocess.preprocess(None, origin_preload_data_path, processed_output_path, File "C:\stable-diffusion-webui-forge\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\tools\preprocess.py", line 22, in preprocess preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold) File "C:\stable-diffusion-webui-forge\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\tools\preprocess.py", line 216, in preprocess_work for focal in autocrop.crop_image(img, autocrop_settings): File "C:\stable-diffusion-webui-forge\modules\textual_inversion\autocrop.py", line 33, in crop_image focus = focal_point(im_debug, settings) File "C:\stable-diffusion-webui-forge\modules\textual_inversion\autocrop.py", line 77, in focal_point face_points = image_face_points(im, settings) if settings.face_points_weight > 0 else [] File "C:\stable-diffusion-webui-forge\modules\textual_inversion\autocrop.py", line 193, in image_face_points if faces: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Bocchi-Chan2023 commented 3 months ago

All are png files, but I get the same error

liasece commented 3 months ago

What is your "Preprocess images" setting in Train Tools? What version of python are you currently using?