This report presents the forensic synthetic code analysis of bmaltais/kohya_ss, a Python project with 12,467 GitHub stars. SynthScan v2.0 examined 60,629 lines of code across 302 source files, recording 775 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 17.5 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 775 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/extract_lora_from_models-new.py | 50 | def _local_create_network_placeholders(text_encoders: list, unet: torch.nn.Module, lora_conv_dim_init: int): | CODE |
| LOW | tools/extract_lora_from_models-new.py | 172 | def _build_local_sai_metadata(title, creation_time, is_v2_flag, is_v_param_flag, is_sdxl_flag): | CODE |
| LOW | tools/extract_lora_from_models-new.py | 192 | def _load_sd_model_components(model_path, is_v2_flag, target_device_override, load_dtype_torch): | CODE |
| LOW | tools/extract_lora_from_models-new.py | 205 | def _load_sdxl_model_components(model_path, target_device_override, load_dtype_torch): | CODE |
| LOW | tools/extract_lora_from_models-new.py | 220 | def _calculate_module_diffs_and_check(module_loras_o, module_loras_t, diff_calc_device, min_diff_thresh, module_type_str | CODE |
| LOW | tools/extract_lora_from_models-new.py | 260 | def _construct_lora_weights_from_svd_components(U_full, S_all_values, Vh_full, rank, | CODE |
| LOW⚡ | tools/crop_images_to_n_buckets.py | 33 | def sort_images_by_aspect_ratio(path): | CODE |
| LOW⚡ | tools/crop_images_to_n_buckets.py | 177 | def save_resized_cropped_images(group, folder_name, group_number, avg_aspect_ratio, use_original_name=False): | CODE |
| LOW | tools/lcm_convert.py | 14 | def parse_command_line_arguments(): | CODE |
| LOW | tools/lcm_convert.py | 29 | def convert_and_save_diffusion_model(diffusion_pipeline, command_line_args): | CODE |
| LOW | tools/extract_model_difference.py | 7 | def extract_model_differences(base_model_path, finetuned_model_path, output_delta_path=None, save_dtype_str="float32"): | CODE |
| LOW⚡ | tools/extract_loha_from_model.py | 413 | def cleanup_intermediate_files(final_intended_path: str, for_resume_management: bool = False, keep_n: int = 0): | CODE |
| LOW | tools/extract_loha_from_model.py | 56 | def log_layer_optimization_event(log_type: LogType, layer_name: str, **kwargs): | CODE |
| LOW | tools/extract_loha_from_model.py | 127 | def _get_closest_ema_value_before_iter(target_iter: int, ema_history: list[tuple[int, float]]) -> tuple[int | None, floa | CODE |
| LOW | tools/extract_loha_from_model.py | 137 | def initialize_loha_parameters( | CODE |
| LOW | tools/extract_loha_from_model.py | 181 | def check_insufficient_progress( | CODE |
| LOW | tools/extract_loha_from_model.py | 296 | def get_module_shape_info_from_weight(weight_tensor: torch.Tensor): | CODE |
| LOW | tools/extract_loha_from_model.py | 301 | def generate_intermediate_filename(base_save_path: str, num_total_completed_layers: int) -> str: | CODE |
| LOW | tools/extract_loha_from_model.py | 467 | def handle_resume_or_continue_loha( | CODE |
| LOW | tools/extract_loha_from_model.py | 578 | def setup_and_print_configuration(current_args: argparse.Namespace): | CODE |
| LOW | tools/prepare_presets.py | 6 | def remove_items_with_keywords(json_file_path): | CODE |
| LOW | test/test_allowed_paths.py | 38 | def test_allowed_paths_forwarded_to_launch(self): | STRING |
| LOW | kohya_gui/lora_gui.py | 831 | def get_effective_lr_messages( | CODE |
| LOW | kohya_gui/lora_gui.py | 909 | def resolve_network_train_flags( | CODE |
| LOW | kohya_gui/lora_gui.py | 926 | def format_network_train_mode_message( | CODE |
| LOW | kohya_gui/lora_gui.py | 941 | def append_loraplus_network_args( | CODE |
| LOW | kohya_gui/lora_gui.py | 1065 | def regularizer_controls_visible(lora_type: str) -> dict[str, bool]: | CODE |
| LOW | kohya_gui/lora_gui.py | 1078 | def append_rank_module_dropout_network_args( | CODE |
| LOW | kohya_gui/lora_gui.py | 1096 | def build_native_loha_lokr_network_args( | CODE |
| LOW | kohya_gui/lora_gui.py | 3989 | def _make_open_configuration_entry( | CODE |
| LOW | kohya_gui/lora_gui.py | 4019 | def _save_configuration_entry(data: dict): | CODE |
| LOW | kohya_gui/git_caption_gui.py | 87 | def gradio_git_caption_gui_tab( | CODE |
| LOW | kohya_gui/class_folders.py | 45 | def create_directory_if_not_exists(self, directory: str) -> None: | CODE |
| LOW | kohya_gui/offline_assets.py | 91 | def sanitize_readme_for_about(content: str) -> str: | CODE |
| LOW | kohya_gui/offline_assets.py | 133 | def install_offline_template_patches() -> None: | CODE |
| LOW | kohya_gui/offline_assets.py | 148 | def offline_template_response(*args, **kwargs): | CODE |
| LOW | kohya_gui/class_advanced_training.py | 605 | def list_log_tracker_config_files(path): | CODE |
| LOW | kohya_gui/basic_caption_gui.py | 124 | def gradio_basic_caption_gui_tab(headless=False, default_images_dir=None): | CODE |
| LOW | kohya_gui/wd14_caption_gui.py | 91 | def check_keras_backend_ready() -> str | None: | CODE |
| LOW | kohya_gui/extract_lycoris_locon_gui.py | 170 | def gradio_extract_lycoris_locon_tab(headless=False): | CODE |
| LOW | kohya_gui/dataset_balancing_gui.py | 111 | def gradio_dataset_balancing_tab(headless=False): | CODE |
| LOW | kohya_gui/extract_lora_gui.py | 342 | def change_modeltype_model_tuned(path): | CODE |
| LOW | kohya_gui/flux_extract_lora_gui.py | 98 | def gradio_flux_extract_lora_tab(headless=False): | CODE |
| LOW | kohya_gui/class_basic_training.py | 131 | def init_precision_and_resources_controls(self) -> None: | CODE |
| LOW | kohya_gui/class_basic_training.py | 156 | def init_lr_and_optimizer_controls(self) -> None: | CODE |
| LOW | kohya_gui/class_basic_training.py | 228 | def init_grad_and_lr_controls(self) -> None: | CODE |
| LOW | kohya_gui/class_basic_training.py | 252 | def init_learning_rate_controls(self) -> None: | CODE |
| LOW | kohya_gui/class_basic_training.py | 374 | def init_resolution_and_bucket_controls(self) -> None: | CODE |
| LOW | kohya_gui/class_basic_training.py | 417 | def setup_sdxl_checkbox_behavior(self) -> None: | CODE |
| LOW | kohya_gui/svd_merge_lora_gui.py | 109 | def gradio_svd_merge_lora_tab(headless=False): | CODE |
| LOW | kohya_gui/finetune_gui.py | 2018 | def _config_kwargs_from_registry(data: dict) -> dict: | CODE |
| LOW | kohya_gui/finetune_gui.py | 2022 | def _make_open_configuration_entry( | CODE |
| LOW | kohya_gui/finetune_gui.py | 2048 | def _save_configuration_entry(data: dict): | CODE |
| LOW | kohya_gui/textual_inversion_gui.py | 1332 | def _config_kwargs_from_registry(data: dict) -> dict: | CODE |
| LOW | kohya_gui/textual_inversion_gui.py | 1336 | def _make_open_configuration_entry(ask_for_file_comp): | CODE |
| LOW | kohya_gui/textual_inversion_gui.py | 1358 | def _save_configuration_entry(data: dict): | CODE |
| LOW⚡ | kohya_gui/common_gui.py | 1521 | def check_duplicate_filenames( | CODE |
| LOW | kohya_gui/common_gui.py | 104 | def calculate_max_train_steps( | CODE |
| LOW | kohya_gui/common_gui.py | 122 | def should_recommend_headless( | CODE |
| LOW | kohya_gui/common_gui.py | 1028 | def set_pretrained_model_name_or_path_input( | CODE |
| 383 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | local_train.py | 81 | except Exception as e: | CODE |
| MEDIUM | local_train.py | 82 | print(f"Error launching Kohya GUI: {e}") | CODE |
| LOW | tools/convert_html_to_md.py | 55 | except Exception as e: | CODE |
| LOW | tools/cleanup_captions.py | 35 | except Exception as e: | CODE |
| LOW | tools/convert_images_to_webp.py | 66 | except Exception as e: | CODE |
| MEDIUM | tools/convert_images_to_webp.py | 67 | print(f"Error processing {file}: {e}") | CODE |
| LOW | tools/extract_lora_from_models-new.py | 438 | except Exception as e: | CODE |
| LOW⚡ | tools/crop_images_to_n_buckets.py | 29 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 30 | print(f"Error: {e}") | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 83 | print("Error: The group is empty") | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 92 | print("Error: Check the structure of the input group elements. They should be tuples of (image_path, aspect_rati | CODE |
| LOW⚡ | tools/crop_images_to_n_buckets.py | 94 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 95 | print(f"Error: {e}") | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 175 | print(f"Error: {e}") # Handle errors from os.listdir() | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 231 | print(f"Error: Input directory does not exist: {args.input_dir}") | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 238 | print(f"Error: Failed to create output directory: {args.output_dir}") | CODE |
| MEDIUM⚡ | tools/crop_images_to_n_buckets.py | 246 | print("Error: Batch size must be greater than 0") | CODE |
| LOW | tools/crop_images_to_n_buckets.py | 270 | except Exception as e: | CODE |
| MEDIUM | tools/crop_images_to_n_buckets.py | 271 | print(f"Error: Failed to save images in group {i+1}: {e}") | CODE |
| LOW | tools/lcm_convert.py | 72 | except Exception as error: | CODE |
| LOW | tools/dummy_loha.py | 185 | except Exception as e: | CODE |
| LOW⚡ | tools/extract_model_difference.py | 28 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/extract_model_difference.py | 29 | print(f"Error loading base model: {e}") | CODE |
| LOW⚡ | tools/extract_model_difference.py | 36 | except Exception as e: | CODE |
| MEDIUM⚡ | tools/extract_model_difference.py | 37 | print(f"Error loading fine-tuned model: {e}") | CODE |
| LOW | tools/extract_model_difference.py | 76 | except Exception as e: | CODE |
| MEDIUM | tools/extract_model_difference.py | 77 | print(f"Error calculating difference for key '{key}': {e}") | CODE |
| LOW | tools/extract_model_difference.py | 121 | except Exception as e: | CODE |
| MEDIUM | tools/extract_model_difference.py | 122 | print(f"Error saving delta weights: {e}") | CODE |
| MEDIUM | tools/extract_model_difference.py | 145 | print(f"Error: Base model file not found at {args.base_model_path}") | CODE |
| MEDIUM | tools/extract_model_difference.py | 148 | print(f"Error: Fine-tuned model file not found at {args.finetuned_model_path}") | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 404 | print(f"Error saving to {output_path_to_save}: {e}"); traceback.print_exc() | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 607 | print(f"Error loading base model: {e}"); traceback.print_exc(); sys.exit(1) | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 613 | print(f"Error loading fine-tuned model: {e}"); traceback.print_exc(); sys.exit(1) | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 1015 | print(f"Error: Base model not found: {parsed_args.base_model_path}"); sys.exit(1) | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 1017 | print(f"Error: FT model not found: {parsed_args.ft_model_path}"); sys.exit(1) | CODE |
| MEDIUM⚡ | tools/extract_loha_from_model.py | 1023 | print(f"Error creating directory {save_dir}: {e}"); sys.exit(1) | CODE |
| MEDIUM | tools/extract_loha_from_model.py | 367 | print("Error: Global args not set for saving metadata.") | CODE |
| LOW⚡ | tools/extract_loha_from_model.py | 403 | except Exception as e: | CODE |
| LOW⚡ | tools/extract_loha_from_model.py | 606 | except Exception as e: | CODE |
| LOW⚡ | tools/extract_loha_from_model.py | 612 | except Exception as e: | CODE |
| LOW | tools/extract_loha_from_model.py | 159 | except Exception as e: | CODE |
| LOW | tools/extract_loha_from_model.py | 461 | except Exception as e: | CODE |
| LOW | tools/extract_loha_from_model.py | 497 | except Exception as e: | CODE |
| LOW | tools/extract_loha_from_model.py | 530 | except Exception as e: | CODE |
| LOW | tools/extract_loha_from_model.py | 928 | except Exception as e_c: tqdm.write(f" Warn: Pre-opt loss check failed for {loha_key_prefix}: {e_ | CODE |
| LOW | tools/analyse_loha.py | 69 | except Exception as e: | CODE |
| LOW | tools/analyse_loha.py | 91 | except Exception as e: | CODE |
| LOW | tools/analyse_loha.py | 112 | except Exception as e: | CODE |
| LOW | tools/analyse_loha.py | 115 | except Exception as e: | CODE |
| LOW | tools/analyse_loha.py | 139 | except Exception as e: | CODE |
| LOW | kohya_gui/wd14_caption_gui.py | 114 | except Exception as exc: # import can fail for many ABI reasons | CODE |
| LOW | kohya_gui/class_tensorboard.py | 15 | except Exception: | CODE |
| LOW | kohya_gui/class_tensorboard.py | 88 | except Exception as e: | CODE |
| LOW | kohya_gui/class_tensorboard.py | 109 | except Exception as e: | CODE |
| MEDIUM | kohya_gui/class_tensorboard.py | 9 | def check_avx_support(): | CODE |
| MEDIUM⚡ | kohya_gui/common_gui.py | 1516 | print(f"Error: Could not write to file - {e}") | CODE |
| MEDIUM⚡ | kohya_gui/common_gui.py | 1518 | print(f"Error: Could not create 'logs' directory - {e}") | CODE |
| LOW⚡ | kohya_gui/common_gui.py | 857 | except Exception as e: | CODE |
| LOW⚡ | kohya_gui/common_gui.py | 955 | except Exception as e: | CODE |
| 26 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.sh | 59 | # Check if RUNPOD variable should be set | COMMENT |
| LOW | setup.sh | 182 | # Check if the symlink exists | COMMENT |
| LOW | setup.sh | 184 | # Check if the linked file exists and points to the expected file | COMMENT |
| LOW | setup.sh | 208 | if [ "$PYTHON_CMD" == "python" ]; then # Check if get_python_command returned the fallback | CODE |
| LOW | setup.sh | 217 | # Check if conda environment is already activated | COMMENT |
| LOW | setup.sh | 485 | # Check if root or sudo | COMMENT |
| LOW⚡ | gui.sh | 16 | # Check if the directory exists | COMMENT |
| LOW⚡ | gui.sh | 18 | # Check if LD_LIBRARY_PATH is already set | COMMENT |
| LOW | gui.sh | 45 | # Check if conda environment is already activated | COMMENT |
| LOW | gui.sh | 58 | # Check if LD_LIBRARY_PATH environment variable exists | COMMENT |
| LOW | setup-runpod.sh | 14 | # Check if the venv folder doesn't exist | COMMENT |
| LOW | gui-uv.sh | 28 | # Check if --quiet is in the arguments | COMMENT |
| LOW⚡ | tools/convert_images_to_webp.py | 41 | # Iterate over the list of files | COMMENT |
| LOW⚡ | tools/convert_images_to_webp.py | 51 | # Check if the output file already exists | COMMENT |
| LOW | tools/create_txt_from_images.py | 12 | # Check if the file is an image file (webp, jpg, png) | COMMENT |
| LOW⚡ | tools/convert_images_to_hq_jpg.py | 28 | # Iterate over the list of files | COMMENT |
| LOW⚡ | tools/convert_images_to_hq_jpg.py | 36 | # Check if the output file already exists | COMMENT |
| LOW | tools/crop_images_to_n_buckets.py | 114 | # Check if the input image is a valid numpy array with at least two dimensions | COMMENT |
| LOW⚡ | tools/crop_images_to_n_buckets.py | 168 | # Check if the file has the same base name as the input image | COMMENT |
| LOW | tools/caption.py | 20 | # Check if a text file with the same name as the current file exists in the folder | COMMENT |
| LOW | tools/caption_from_filename.py | 45 | # Check if the file is an image | COMMENT |
| LOW | tools/rename_depth_mask.py | 16 | # Check if the file has the expected format | COMMENT |
| LOW | tools/analyse_loha.py | 64 | # Check if value is float and format if it is | COMMENT |
| LOW | kohya_gui/lora_gui.py | 781 | # Check if the file exists before opening it | COMMENT |
| LOW | kohya_gui/basic_caption_gui.py | 48 | # Check if images_dir and caption_ext are provided | COMMENT |
| LOW | kohya_gui/basic_caption_gui.py | 93 | # Check if overwrite option is enabled | COMMENT |
| LOW | kohya_gui/extract_lycoris_locon_gui.py | 55 | # Check if source model exist | COMMENT |
| LOW | kohya_gui/convert_model_gui.py | 34 | # Check if source model exist | COMMENT |
| LOW | kohya_gui/convert_model_gui.py | 43 | # Check if source model exist | COMMENT |
| LOW | kohya_gui/convert_model_gui.py | 60 | # Check if v1 models | COMMENT |
| LOW | kohya_gui/dataset_balancing_gui.py | 27 | # Check if folder exist | COMMENT |
| LOW | kohya_gui/dataset_balancing_gui.py | 56 | # Check if the subdirectory name starts with a number inside braces, | COMMENT |
| LOW | kohya_gui/dataset_balancing_gui.py | 75 | # Check if the subdirectory name already has a number at the beginning | COMMENT |
| LOW | kohya_gui/dataset_balancing_gui.py | 86 | # Check if the new folder name already exists | COMMENT |
| LOW | kohya_gui/extract_lora_gui.py | 53 | # Check if source model exist | COMMENT |
| LOW | kohya_gui/flux_extract_lora_gui.py | 44 | # Check if source models exist | COMMENT |
| LOW | kohya_gui/class_basic_training.py | 361 | step=1, # Increment value by 1 | CODE |
| LOW | kohya_gui/svd_merge_lora_gui.py | 41 | # Check if the output file already exists | COMMENT |
| LOW | kohya_gui/svd_merge_lora_gui.py | 46 | # Check if the ratio total is equal to one. If not normalise to 1 | COMMENT |
| LOW | kohya_gui/finetune_gui.py | 573 | # Check if we are "applying" a preset or a config | COMMENT |
| LOW⚡ | kohya_gui/common_gui.py | 842 | # Iterate over the list of image files | COMMENT |
| LOW⚡ | kohya_gui/common_gui.py | 849 | # Check if the caption file does not exist | COMMENT |
| LOW⚡ | kohya_gui/common_gui.py | 937 | # Check if the caption file extension is one of the supported extensions | COMMENT |
| LOW⚡ | kohya_gui/common_gui.py | 945 | # Check if the folder path exists | COMMENT |
| LOW⚡ | kohya_gui/common_gui.py | 959 | # Iterate over the list of caption files | COMMENT |
| LOW | kohya_gui/common_gui.py | 564 | # Open the file dialog and capture the selected file path | COMMENT |
| LOW | kohya_gui/common_gui.py | 624 | # Open the file dialog and capture the selected file path | COMMENT |
| LOW | kohya_gui/common_gui.py | 690 | # Check if the current environment is not macOS and if the environment variables do not match the exclusion list | COMMENT |
| LOW | kohya_gui/common_gui.py | 765 | # Check if the current environment is not macOS and if the environment variables do not match the exclusion list | COMMENT |
| LOW | kohya_gui/common_gui.py | 778 | # Open the file dialog and capture the selected file path | COMMENT |
| LOW | kohya_gui/common_gui.py | 1047 | # Check if the given pretrained_model_name_or_path is in the list of SDXL models | COMMENT |
| LOW | kohya_gui/common_gui.py | 1070 | # Check if the given pretrained_model_name_or_path is in the list of V2 base models | COMMENT |
| LOW | kohya_gui/common_gui.py | 1093 | # Check if the given pretrained_model_name_or_path is in the list of V parameterization models | COMMENT |
| LOW | kohya_gui/common_gui.py | 1118 | # Check if the given pretrained_model_name_or_path is in the list of V1 models | COMMENT |
| LOW | kohya_gui/common_gui.py | 1141 | # Check if the model_list is set to 'custom' | COMMENT |
| LOW | kohya_gui/common_gui.py | 1309 | # Check if the retrieved value is already a string. | COMMENT |
| LOW | kohya_gui/common_gui.py | 1455 | # Check if the folder path for the file_path is valid | COMMENT |
| LOW | kohya_gui/common_gui.py | 1459 | # Check if the folder exists | COMMENT |
| LOW | kohya_gui/common_gui.py | 1555 | # Check if the extension is in the list of image extensions | COMMENT |
| LOW | kohya_gui/common_gui.py | 1560 | # Check if the filename is already in the dictionary | COMMENT |
| 19 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | gui.sh | 13 | # Define the directory path for WSL2 | COMMENT |
| MEDIUM | kohya_gui.py | 74 | # Create the main Gradio Blocks interface (no analytics) | COMMENT |
| MEDIUM | tools/convert_html_to_md.py | 23 | # Create a session object | COMMENT |
| MEDIUM | tools/convert_html_to_md.py | 29 | # Create a BeautifulSoup object and specify the parser | COMMENT |
| MEDIUM | tools/convert_images_to_webp.py | 18 | # Define the command-line arguments | COMMENT |
| MEDIUM⚡ | tools/convert_images_to_webp.py | 35 | # Create the file pattern string using the input file extension | COMMENT |
| MEDIUM⚡ | tools/convert_images_to_webp.py | 47 | # Create a new file path with the output file extension | COMMENT |
| MEDIUM⚡ | tools/convert_images_to_hq_jpg.py | 22 | # Create the file pattern string using the input file extension | COMMENT |
| MEDIUM⚡ | tools/convert_images_to_hq_jpg.py | 33 | # Create a new file path with the output file extension | COMMENT |
| MEDIUM | tools/convert_images_to_hq_jpg.py | 51 | # Define the command-line arguments | COMMENT |
| MEDIUM | tools/crop_images_to_n_buckets.py | 157 | # Create the output directory if it does not exist | COMMENT |
| MEDIUM | tools/caption.py | 48 | # Create a mutually exclusive group for the caption_text and caption_file arguments | COMMENT |
| MEDIUM | tools/caption.py | 56 | # Create the caption files | COMMENT |
| MEDIUM | tools/caption_from_filename.py | 47 | # Create a text file with the same name as the image file and increment the counter if successful | COMMENT |
| MEDIUM | tools/caption_from_filename.py | 83 | # Create an argument parser | COMMENT |
| MEDIUM | tools/rename_depth_mask.py | 4 | # Define the command line arguments | COMMENT |
| MEDIUM | kohya_gui/lora_gui.py | 433 | # Create the destination directory if it doesn't exist | COMMENT |
| MEDIUM | kohya_gui/lora_gui.py | 2591 | # Define a dictionary of parameters | COMMENT |
| MEDIUM | kohya_gui/class_folders.py | 42 | # Create the GUI for folder selection | COMMENT |
| MEDIUM | kohya_gui/class_advanced_training.py | 55 | # Define the behavior for changing noise offset type. | COMMENT |
| MEDIUM | kohya_gui/extract_lycoris_locon_gui.py | 155 | # Create a list of possible mode values | COMMENT |
| MEDIUM | kohya_gui/class_sample_images.py | 75 | # # Create the prompt file and get its path | COMMENT |
| MEDIUM | kohya_gui/class_sd3.py | 50 | # Define the behavior for changing noise offset type. | COMMENT |
| MEDIUM | kohya_gui/class_basic_training.py | 86 | # Create a row for the training controls | COMMENT |
| MEDIUM | kohya_gui/finetune_gui.py | 331 | # Create the destination directory if it doesn't exist | COMMENT |
| MEDIUM | kohya_gui/finetune_gui.py | 920 | # Define the command components | COMMENT |
| MEDIUM | kohya_gui/textual_inversion_gui.py | 231 | # Create the destination directory if it doesn't exist | COMMENT |
| MEDIUM⚡ | kohya_gui/common_gui.py | 851 | # Create a new caption file with the specified prefix and/or postfix | COMMENT |
| MEDIUM | kohya_gui/common_gui.py | 260 | # Define the refresh function that will be triggered upon clicking the refresh button. | COMMENT |
| MEDIUM | kohya_gui/common_gui.py | 279 | # Create a refresh button with the specified label (via refresh_symbol), ID, and classes. | COMMENT |
| MEDIUM | kohya_gui/common_gui.py | 826 | # Define the image file extensions to filter | COMMENT |
| MEDIUM | kohya_gui/dreambooth_gui.py | 280 | # Create the destination directory if it doesn't exist | COMMENT |
| MEDIUM | kohya_gui/class_flux1.py | 24 | # Define the behavior for changing noise offset type. | COMMENT |
| MEDIUM | kohya_gui/class_source_model.py | 107 | # Define the input elements | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/convert_html_to_md.py | 22 | CODE | |
| LOW | tools/cleanup_captions.py | 17 | CODE | |
| LOW | tools/extract_lora_from_models-new.py | 50 | CODE | |
| LOW | tools/extract_lora_from_models-new.py | 245 | CODE | |
| LOW | tools/extract_lora_from_models-new.py | 340 | CODE | |
| LOW | tools/group_images.py | 27 | CODE | |
| LOW | tools/group_images_recommended_size.py | 18 | CODE | |
| LOW | tools/lycoris_utils.py | 22 | CODE | |
| LOW | tools/lycoris_utils.py | 67 | CODE | |
| LOW | tools/lycoris_utils.py | 111 | CODE | |
| LOW | tools/lycoris_utils.py | 312 | CODE | |
| LOW | tools/lycoris_utils.py | 368 | CODE | |
| LOW | tools/lycoris_utils.py | 428 | CODE | |
| LOW | tools/lycoris_utils.py | 138 | CODE | |
| LOW | tools/lycoris_utils.py | 451 | CODE | |
| LOW | tools/resize_lora.py | 184 | CODE | |
| LOW | tools/extract_model_difference.py | 7 | CODE | |
| LOW | tools/extract_loha_from_model.py | 56 | CODE | |
| LOW | tools/extract_loha_from_model.py | 137 | CODE | |
| LOW | tools/extract_loha_from_model.py | 206 | CODE | |
| LOW | tools/extract_loha_from_model.py | 438 | CODE | |
| LOW | tools/extract_loha_from_model.py | 467 | CODE | |
| LOW | tools/extract_loha_from_model.py | 540 | CODE | |
| LOW | tools/extract_loha_from_model.py | 616 | CODE | |
| LOW | tools/extract_loha_from_model.py | 845 | CODE | |
| LOW | tools/analyse_loha.py | 25 | CODE | |
| LOW | kohya_gui/lora_gui.py | 1132 | CODE | |
| LOW | kohya_gui/lora_gui.py | 2630 | CODE | |
| LOW | kohya_gui/extract_lycoris_locon_gui.py | 26 | CODE | |
| LOW | kohya_gui/dataset_balancing_gui.py | 18 | CODE | |
| LOW | kohya_gui/finetune_gui.py | 610 | CODE | |
| LOW | kohya_gui/finetune_gui.py | 1501 | CODE | |
| LOW | kohya_gui/textual_inversion_gui.py | 968 | CODE | |
| LOW | kohya_gui/common_gui.py | 170 | CODE | |
| LOW | kohya_gui/common_gui.py | 379 | CODE | |
| LOW | kohya_gui/common_gui.py | 804 | CODE | |
| LOW | kohya_gui/common_gui.py | 1521 | CODE | |
| LOW | kohya_gui/anima_lllite_gui.py | 777 | CODE | |
| LOW | kohya_gui/dreambooth_folder_creation_gui.py | 84 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 165 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 215 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 383 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 452 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 524 | CODE | |
| LOW | kohya_gui/blip2_caption_gui.py | 255 | CODE | |
| LOW | kohya_gui/class_command_executor.py | 40 | CODE | |
| LOW | kohya_gui/dreambooth_gui.py | 1219 | CODE | |
| LOW | kohya_gui/class_flux1.py | 10 | CODE | |
| LOW | kohya_gui/sd_modeltype.py | 18 | CODE | |
| LOW | kohya_gui/manual_caption_gui.py | 116 | CODE | |
| LOW | kohya_gui/manual_caption_gui.py | 184 | CODE | |
| LOW | kohya_gui/manual_caption_gui.py | 239 | CODE | |
| LOW | kohya_gui/class_source_model.py | 34 | CODE | |
| LOW | kohya_gui/class_accelerate_launch.py | 13 | CODE | |
| LOW | kohya_gui/leco_gui.py | 574 | CODE | |
| LOW | setup/validate_requirements.py | 69 | CODE | |
| LOW | setup/setup_windows.py | 18 | CODE | |
| LOW | setup/setup_windows.py | 188 | CODE | |
| LOW | setup/setup_common.py | 193 | CODE | |
| LOW | setup/setup_common.py | 632 | CODE | |
| 7 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/extract_lora_from_models-new.py | 7 | CODE | |
| LOW | tools/caption_from_filename.py | 2 | CODE | |
| LOW | tools/caption_from_filename.py | 59 | CODE | |
| LOW | tools/lycoris_utils.py | 1 | CODE | |
| LOW | tools/lycoris_utils.py | 7 | CODE | |
| LOW | kohya_gui/lora_gui.py | 6 | CODE | |
| LOW | kohya_gui/class_huggingface.py | 2 | CODE | |
| LOW | kohya_gui/offline_assets.py | 7 | CODE | |
| LOW | kohya_gui/wd14_caption_gui.py | 113 | CODE | |
| LOW | kohya_gui/class_sample_images.py | 3 | CODE | |
| LOW | kohya_gui/class_sd3.py | 3 | CODE | |
| LOW | kohya_gui/class_sd3.py | 3 | CODE | |
| LOW | kohya_gui/class_sd3.py | 3 | CODE | |
| LOW | kohya_gui/class_sd3.py | 3 | CODE | |
| LOW | kohya_gui/finetune_gui.py | 8 | CODE | |
| LOW | kohya_gui/textual_inversion_gui.py | 5 | CODE | |
| LOW | kohya_gui/anima_lllite_gui.py | 12 | CODE | |
| LOW | kohya_gui/kontext_manual_caption_gui.py | 7 | CODE | |
| LOW | kohya_gui/dreambooth_gui.py | 6 | CODE | |
| LOW | kohya_gui/dreambooth_gui.py | 7 | CODE | |
| LOW | kohya_gui/manual_caption_gui.py | 2 | CODE | |
| LOW | kohya_gui/manual_caption_gui.py | 6 | CODE | |
| LOW | kohya_gui/leco_gui.py | 5 | CODE | |
| LOW | kohya_gui/class_gui_config.py | 2 | CODE | |
| LOW | setup/docker_setup.py | 1 | CODE | |
| LOW | setup/setup_common.py | 820 | CODE | |
| LOW | setup/setup_common.py | 825 | CODE | |
| LOW | tests/test_security_dependency_pins.py | 12 | CODE | |
| LOW | tests/test_info_tooltip_gradio6.py | 9 | CODE | |
| LOW | tests/test_wd14_caption_gui.py | 12 | CODE | |
| LOW | tests/test_resize_lora_model.py | 10 | CODE | |
| LOW | tests/test_resize_lora_gui.py | 8 | CODE | |
| LOW | tests/test_xpu_requirements.py | 8 | CODE | |
| LOW | tests/test_gradio_pin_policy.py | 9 | CODE | |
| LOW | tests/test_tkinter_preflight.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tools/cleanup_captions.py | 0 | check if a path is a valid directory and that it can be written to. | STRING |
| HIGH | tools/convert_images_to_webp.py | 0 | check if a path is a valid directory and that it can be written to. | STRING |
| HIGH | tools/convert_images_to_hq_jpg.py | 0 | check if a path is a valid directory and that it can be written to. | STRING |
| HIGH | tools/caption.py | 0 | check if a path is a valid directory and that it can be written to. | STRING |
| HIGH | tests/test_dreambooth_gui.py | 0 | gh #3543 m3: train/save/load buttons resolve args by component identity. | STRING |
| HIGH | tests/test_finetune_gui.py | 0 | gh #3543 m3: train/save/load buttons resolve args by component identity. | STRING |
| HIGH | tests/test_textual_inversion_gui.py | 0 | gh #3543 m3: train/save/load buttons resolve args by component identity. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tools/crop_images_to_n_buckets.py | 46 | Create groups of images from a sorted list of images. This function takes a sorted list of images and a group | STRING |
| HIGH | tools/crop_images_to_n_buckets.py | 99 | Crop the input image to the target aspect ratio. The function calculates the crop region for the input image based | STRING |
| HIGH | kohya_gui/common_gui.py | 520 | Opens a file dialog to select a file, allowing the user to navigate and choose a file with a specific extension. | STRING |
| HIGH | kohya_gui/common_gui.py | 583 | Opens a file dialog to select any file, allowing the user to navigate and choose a file. If no file is selected | STRING |
| HIGH | kohya_gui/common_gui.py | 645 | Opens a folder dialog to select a folder, allowing the user to navigate and choose a folder. If no folder is se | STRING |
| HIGH | kohya_gui/common_gui.py | 742 | Opens a file dialog to select a file name for saving, allowing the user to specify a file name and location. If | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.sh | 561 | # create_symlinks "$libnvinfer_plugin_symlink" "$libnvinfer_plugin_target" | COMMENT |
| LOW | requirements_linux_ipex.txt | 1 | # Legacy filename kept for older docs/scripts that pass this path explicitly. | COMMENT |
| LOW | local_train.py | 61 | # 4. Clone kohya_ss | COMMENT |
| LOW | gui-uv.sh | 61 | # Ensure you have the necessary build tools (like CUDA toolkit for cuda11x). | COMMENT |
| LOW | gui-uv.sh | 81 | # # Assuming uv environment is active or will be activated by the main command: | COMMENT |
| LOW | tools/dummy_loha.py | 101 | COMMENT | |
| LOW | tools/dummy_loha.py | 201 | # for the layers defined in EXAMPLE_LAYERS_CONFIG. | COMMENT |
| LOW | kohya_gui/extract_lycoris_locon_gui.py | 141 | ### | COMMENT |
| LOW | kohya_gui/class_sample_images.py | 41 | COMMENT | |
| LOW | kohya_gui/class_sample_images.py | 61 | # str: The command string for sampling images. | COMMENT |
| LOW | kohya_gui/class_sample_images.py | 81 | # # Append the sampler with proper quoting for safety against special characters | COMMENT |
| LOW | setup/tkinter_preflight.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | assets/js/info_tooltip.js | 1 | // Positions revealed `info=` hint text as a viewport-fixed tooltip anchored | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/extract_lora_from_models-new.py | 340 | CODE | |
| LOW | tools/extract_loha_from_model.py | 616 | CODE | |
| LOW | kohya_gui/blip2_caption_gui.py | 112 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/extract_lora_from_models-new.py | 30 | logger = logging.getLogger(__name__) # Get logger for this module | CODE |
| LOW | tools/lcm_convert.py | 11 | logger = logging.getLogger(__name__) | CODE |