AI Slop Code RIsk Monitor

kohya-ss/sd-scripts

19.5 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for kohya-ss/sd-scripts, a Python project with 7,244 GitHub stars. SynthScan examined 118,960 lines of code across 273 source files, recording 1704 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 19.5 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.5
Adjusted Signal
19.5
Raw Pattern Score
100%
Time Factor
2026-09-24
Last Push
7.2K
Stars
Python
Language
119.0K
Lines of Code
273
Files
1.7K
Pattern Hits
2026-10-12
Scan Date
0.26
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 35.0/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 925 finding(s).

Hallucinated Dependency & Supply Chain Risk 13.5/100 · LOW

Are imports declared and package/API names verified? 382 finding(s).

Agent Over-Engineering Ratio 47.5/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 973 finding(s).

PR Review Velocity Impact 63.2/100 · HIGH

Which changes need focused human review? 1704 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 72MEDIUM 156LOW 1476

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1704 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers509 hits · 521 pts
SeverityFileLineSnippetContext
LOW⚡train_textual_inversion.py126 def get_latents_caching_strategy(self, args):CODE
LOW⚡train_textual_inversion.py135 def get_text_encoding_strategy(self, args):CODE
LOW⚡train_textual_inversion.py138 def get_models_for_text_encoding(self, args, accelerator, text_encoders) -> List[Any]:CODE
LOWsd3_train_network.py156 def get_latents_caching_strategy(self, args):CODE
LOWsd3_train_network.py162 def get_text_encoding_strategy(self, args):CODE
LOW⚡sd3_train_network.py180 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡sd3_train_network.py189 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡sd3_train_network.py192 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOWsd3_train_network.py206 def cache_text_encoder_outputs_if_needed(CODE
LOWsd3_train_network.py317 def get_noise_pred_and_target(CODE
LOWsd3_train_network.py412 def is_text_encoder_not_needed_for_training(self, args):CODE
LOWsd3_train_network.py415 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOWsd3_train_network.py470 def prepare_unet_with_accelerator(CODE
LOWsdxl_train.py59def get_block_params_to_optimize(unet: SdxlUNet2DConditionModel, block_lrs: List[float]) -> List[dict]:CODE
LOWsdxl_train.py254 def set_diffusers_xformers_flag(model, valid):CODE
LOWanima_train_control_net_lllite.py90def _build_inpaint_cond_image(CODE
LOWanima_train_control_net_lllite.py108def _generate_random_masks_for_batch(CODE
LOWanima_train_control_net_lllite.py122def _make_lllite_sample_hooks(args, lllite, dit_dtype):CODE
LOWanima_train_control_net_lllite.py201def add_anima_lllite_arguments(parser: argparse.ArgumentParser):CODE
LOW⚡sdxl_train_network.py78 def get_latents_caching_strategy(self, args):CODE
LOW⚡sdxl_train_network.py84 def get_text_encoding_strategy(self, args):CODE
LOW⚡sdxl_train_network.py87 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡sdxl_train_network.py90 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡sdxl_train_network.py98 def cache_text_encoder_outputs_if_needed(CODE
LOW⚡lumina_train_network.py96 def get_latents_caching_strategy(self, args):CODE
LOW⚡lumina_train_network.py99 def get_text_encoding_strategy(self, args):CODE
LOW⚡lumina_train_network.py102 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡lumina_train_network.py105 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOWlumina_train_network.py117 def cache_text_encoder_outputs_if_needed(CODE
LOWlumina_train_network.py240 def get_noise_pred_and_target(CODE
LOW⚡lumina_train_network.py342 def is_text_encoder_not_needed_for_training(self, args):CODE
LOW⚡lumina_train_network.py345 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOW⚡lumina_train_network.py353 def prepare_unet_with_accelerator(CODE
LOWfine_tune.py157 def set_diffusers_xformers_flag(model, valid):CODE
LOW⚡hunyuan_image_train_network.py421 def get_latents_caching_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py424 def get_text_encoding_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py430 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡hunyuan_image_train_network.py436 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡hunyuan_image_train_network.py440 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py448 def cache_text_encoder_outputs_if_needed(CODE
LOWhunyuan_image_train_network.py524 def get_noise_pred_and_target(CODE
LOWhunyuan_image_train_network.py596 def is_text_encoder_not_needed_for_training(self, args):CODE
LOWhunyuan_image_train_network.py599 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOWhunyuan_image_train_network.py621 def prepare_unet_with_accelerator(CODE
LOW⚡anima_train_network.py163 def get_latents_caching_strategy(self, args):CODE
LOW⚡anima_train_network.py166 def get_text_encoding_strategy(self, args):CODE
LOW⚡anima_train_network.py172 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡anima_train_network.py177 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡anima_train_network.py184 def cache_text_encoder_outputs_if_needed(CODE
LOWanima_train_network.py268 def get_noise_pred_and_target(CODE
LOW⚡anima_train_network.py416 def is_text_encoder_not_needed_for_training(self, args):CODE
LOW⚡anima_train_network.py419 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOW⚡anima_train_network.py424 def prepare_unet_with_accelerator(CODE
LOWsdxl_train_textual_inversion.py55 def get_latents_caching_strategy(self, args):CODE
LOWsdxl_train_textual_inversion.py61 def get_text_encoding_strategy(self, args):CODE
LOWanima_minimal_inference_control_net_lllite.py92def _build_inpaint_cond_image(CODE
LOW⚡train_network.py191 def get_latents_caching_strategy(self, args):CODE
LOW⚡train_network.py197 def get_text_encoding_strategy(self, args):CODE
LOW⚡train_network.py200 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡train_network.py203 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
449 more matches not shown…
Decorative Section Separators122 hits · 406 pts
SeverityFileLineSnippetContext
MEDIUM⚡inpainting_minimal_inference.py55# -------------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py57# -------------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py67# -------------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py69# -------------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py271 # ------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py273 # ------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py281 # ------------------------------------------------------------------COMMENT
MEDIUM⚡inpainting_minimal_inference.py283 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py136# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py138# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py152# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py154# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py191# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py193# -------------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py225 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py227 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py314 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py316 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py341 # ------------------------------------------------------------------COMMENT
MEDIUMinpainting_minimal_inference.py343 # ------------------------------------------------------------------COMMENT
MEDIUM⚡anima_minimal_inference_control_net_lllite.py55# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡anima_minimal_inference_control_net_lllite.py57# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py107# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py109# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py238# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py240# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py278# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py280# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py370# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py372# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py426# ---------------------------------------------------------------------------COMMENT
MEDIUManima_minimal_inference_control_net_lllite.py428# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py52# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py54# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tools/dev/visualize_masks.py120# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tools/dev/visualize_masks.py122# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py169# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py171# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py274# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/visualize_masks.py276# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/manual_test_anima_lllite_dryrun.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMtools/dev/manual_test_anima_lllite_dryrun.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py29# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py46# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py84# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_mask_generator.py86# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py123# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py125# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py162# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py164# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py188# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_mask_generator.py190# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_expand_unet_to_inpainting.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_expand_unet_to_inpainting.py30# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_expand_unet_to_inpainting.py60# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_expand_unet_to_inpainting.py62# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_expand_unet_to_inpainting.py92# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_expand_unet_to_inpainting.py94# ---------------------------------------------------------------------------COMMENT
62 more matches not shown…
Unused Imports378 hits · 328 pts
SeverityFileLineSnippetContext
LOWsd3_train_network.py2CODE
LOWsd3_train_network.py4CODE
LOWsd3_train_network.py9CODE
LOWsd3_train_network.py15CODE
LOWtrain_db.py39CODE
LOWtrain_db.py39CODE
LOWtrain_db.py39CODE
LOWanima_train_control_net_lllite.py10CODE
LOWanima_train_control_net_lllite.py23CODE
LOWanima_train_control_net_lllite.py53CODE
LOWflux_train_control_net.py17CODE
LOWflux_train_control_net.py18CODE
LOWflux_train_control_net.py20CODE
LOWflux_train_control_net.py20CODE
LOWflux_train_control_net.py20CODE
LOWflux_train_control_net.py20CODE
LOWflux_train_control_net.py24CODE
LOWsdxl_train_network.py10CODE
LOWsdxl_train_control_net_lllite.py5CODE
LOWsdxl_train_control_net_lllite.py9CODE
LOWsdxl_train_control_net_lllite.py11CODE
LOWsdxl_train_control_net_lllite.py24CODE
LOWsdxl_train_control_net_lllite.py25CODE
LOWsdxl_train_control_net_lllite.py26CODE
LOWsdxl_train_control_net_lllite.py38CODE
LOWsdxl_train_control_net_lllite.py54CODE
LOWsdxl_train_control_net_lllite.py54CODE
LOWfine_tune.py44CODE
LOWlumina_minimal_inference.py6CODE
LOWlumina_minimal_inference.py12CODE
LOWlumina_minimal_inference.py13CODE
LOWlumina_minimal_inference.py15CODE
LOWlumina_minimal_inference.py18CODE
LOWanima_train.py4CODE
LOWanima_train.py10CODE
LOWanima_train.py16CODE
LOWanima_train.py23CODE
LOWtrain_control_net.py2CODE
LOWtrain_control_net.py6CODE
LOWtrain_control_net.py37CODE
LOWflux_minimal_inference.py34CODE
LOWsdxl_train_textual_inversion.py5CODE
LOWflux_train.py14CODE
LOWflux_train.py19CODE
LOWflux_train.py20CODE
LOWflux_train.py20CODE
LOWflux_train.py20CODE
LOWflux_train.py20CODE
LOWflux_train.py26CODE
LOWanima_minimal_inference_control_net_lllite.py35CODE
LOWtrain_network.py19CODE
LOWtrain_network.py49CODE
LOWflux_train_network.py3CODE
LOWflux_train_network.py4CODE
LOWsd3_minimal_inference.py7CODE
LOWsd3_minimal_inference.py12CODE
LOWtrain_leco.py20CODE
LOWhunyuan_image_minimal_inference.py13CODE
LOWsdxl_gen_img.py2CODE
LOWsdxl_gen_img.py8CODE
318 more matches not shown…
Deep Nesting248 hits · 242 pts
SeverityFileLineSnippetContext
LOWtrain_textual_inversion.py193CODE
LOWsd3_train_network.py206CODE
LOWtrain_db.py60CODE
LOWsdxl_train.py59CODE
LOWsdxl_train.py87CODE
LOWsdxl_train.py106CODE
LOWanima_train_control_net_lllite.py282CODE
LOWflux_train_control_net.py68CODE
LOWlumina_train_network.py117CODE
LOWsdxl_train_control_net_lllite.py86CODE
LOWfine_tune.py54CODE
LOWanima_train.py50CODE
LOWhunyuan_image_train_network.py46CODE
LOWhunyuan_image_train_network.py149CODE
LOWhunyuan_image_train_network.py209CODE
LOWhunyuan_image_train_network.py448CODE
LOWtrain_control_net.py71CODE
LOWanima_train_network.py184CODE
LOWflux_minimal_inference.py201CODE
LOWflux_minimal_inference.py282CODE
LOWflux_train.py62CODE
LOWanima_minimal_inference_control_net_lllite.py242CODE
LOWtrain_network.py72CODE
LOWtrain_network.py371CODE
LOWtrain_network.py499CODE
LOWtrain_network.py898CODE
LOWtrain_network.py1561CODE
LOWlumina_train.py64CODE
LOWsdxl_train_leco.py103CODE
LOWflux_train_network.py231CODE
LOWsdxl_train_control_net.py76CODE
LOWtrain_leco.py101CODE
LOWhunyuan_image_minimal_inference.py169CODE
LOWhunyuan_image_minimal_inference.py655CODE
LOWhunyuan_image_minimal_inference.py942CODE
LOWhunyuan_image_minimal_inference.py1086CODE
LOWhunyuan_image_minimal_inference.py1170CODE
LOWsdxl_gen_img.py964CODE
LOWsdxl_gen_img.py1053CODE
LOWsdxl_gen_img.py1104CODE
LOWsdxl_gen_img.py1129CODE
LOWsdxl_gen_img.py1346CODE
LOWsdxl_gen_img.py1484CODE
LOWsdxl_gen_img.py398CODE
LOWsdxl_gen_img.py2107CODE
LOWanima_minimal_inference.py150CODE
LOWanima_minimal_inference.py518CODE
LOWanima_minimal_inference.py766CODE
LOWanima_minimal_inference.py894CODE
LOWanima_minimal_inference.py976CODE
LOWgen_img.py964CODE
LOWgen_img.py1053CODE
LOWgen_img.py1104CODE
LOWgen_img.py1129CODE
LOWgen_img.py1196CODE
LOWgen_img.py1374CODE
LOWgen_img.py1614CODE
LOWgen_img.py409CODE
LOWgen_img.py2380CODE
LOWsd3_train.py65CODE
188 more matches not shown…
Cross-File Repetition47 hits · 235 pts
SeverityFileLineSnippetContext
HIGHsdxl_gen_img.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHgen_img.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHlibrary/strategy_base.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHlibrary/lpw_stable_diffusion.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHlibrary/custom_train_functions.py0\\\(| \\\)| \\\[| \\]| \\\\| \\| \(| \[| :([+-]?[.\d]+)\)| \)| ]| [^\\()\[\]:]+| :STRING
HIGHsdxl_gen_img.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHgen_img.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHlibrary/strategy_base.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHlibrary/lpw_stable_diffusion.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHlibrary/custom_train_functions.py0parses a string with attention tokens and returns a list of pairs: text and its associated weight. accepted tokens are: STRING
HIGHsdxl_gen_img.py0tokenize a list of prompts and return its tokens with weights of each token. no padding, starting or ending token is incSTRING
HIGHgen_img.py0tokenize a list of prompts and return its tokens with weights of each token. no padding, starting or ending token is incSTRING
HIGHlibrary/lpw_stable_diffusion.py0tokenize a list of prompts and return its tokens with weights of each token. no padding, starting or ending token is incSTRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0tokenize a list of prompts and return its tokens with weights of each token. no padding, starting or ending token is incSTRING
HIGHlibrary/custom_train_functions.py0tokenize a list of prompts and return its tokens with weights of each token. no padding, starting or ending token is incSTRING
HIGHsdxl_gen_img.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHgen_img.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHlibrary/strategy_base.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHlibrary/lpw_stable_diffusion.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHlibrary/custom_train_functions.py0pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.STRING
HIGHsdxl_gen_img.py0when the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to STRING
HIGHgen_img.py0when the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to STRING
HIGHlibrary/lpw_stable_diffusion.py0when the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to STRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0when the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to STRING
HIGHlibrary/custom_train_functions.py0when the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to STRING
HIGHlibrary/lpw_stable_diffusion.py0prompts can be assigned with local weights using brackets. for example, prompt 'a (very beautiful) masterpiece' highlighSTRING
HIGHlibrary/sdxl_lpw_stable_diffusion.py0prompts can be assigned with local weights using brackets. for example, prompt 'a (very beautiful) masterpiece' highlighSTRING
HIGHlibrary/custom_train_functions.py0prompts can be assigned with local weights using brackets. for example, prompt 'a (very beautiful) masterpiece' highlighSTRING
HIGHfinetune/make_captions_by_git.py0collate function that allows to remove corrupted examples in the dataloader. it expects that the dataloader returns 'nonSTRING
HIGHfinetune/make_captions.py0collate function that allows to remove corrupted examples in the dataloader. it expects that the dataloader returns 'nonSTRING
HIGHfinetune/prepare_buckets_latents.py0collate function that allows to remove corrupted examples in the dataloader. it expects that the dataloader returns 'nonSTRING
HIGHnetworks/dylora.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/oft_flux.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_diffusers.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_flux.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/oft.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_fa.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_lumina.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_anima.py0replaces forward method of the original linear, instead of replacing the original linear module.STRING
HIGHnetworks/lora_flux.py0parse a string of key-value pairs separated by commas.STRING
HIGHnetworks/lora_hunyuan_image.py0parse a string of key-value pairs separated by commas.STRING
HIGHnetworks/network_base.py0parse a string of key-value pairs separated by commas.STRING
HIGHnetworks/lora_anima.py0parse a string of key-value pairs separated by commas.STRING
Modern Structural Boilerplate150 hits · 149 pts
SeverityFileLineSnippetContext
LOWtrain_textual_inversion.py50logger = logging.getLogger(__name__)CODE
LOWsd3_train_network.py25logger = logging.getLogger(__name__)CODE
LOWtrain_db.py55logger = logging.getLogger(__name__)CODE
LOWsdxl_train.py36logger = logging.getLogger(__name__)CODE
LOWanima_train_control_net_lllite.py68logger = logging.getLogger(__name__)CODE
LOWflux_train_control_net.py56logger = logging.getLogger(__name__)CODE
LOWsdxl_train_network.py20logger = logging.getLogger(__name__)CODE
LOWlumina_train_network.py32logger = logging.getLogger(__name__)CODE
LOWsdxl_train_control_net_lllite.py69logger = logging.getLogger(__name__)CODE
LOWfine_tune.py26logger = logging.getLogger(__name__)CODE
LOWlumina_minimal_inference.py36logger = logging.getLogger(__name__)CODE
LOWanima_train.py39logger = logging.getLogger(__name__)CODE
LOWhunyuan_image_train_network.py39logger = logging.getLogger(__name__)CODE
LOWtrain_control_net.py54logger = logging.getLogger(__name__)CODE
LOWanima_train_network.py34logger = logging.getLogger(__name__)CODE
LOW⚡inpainting_minimal_inference.py53logger = logging.getLogger(__name__)CODE
LOWflux_minimal_inference.py31logger = logging.getLogger(__name__)CODE
LOWflux_train.py50logger = logging.getLogger(__name__)CODE
LOW⚡anima_minimal_inference_control_net_lllite.py52logger = logging.getLogger(__name__)CODE
LOWtrain_network.py63logger = logging.getLogger(__name__)CODE
LOWlumina_train.py52logger = logging.getLogger(__name__)CODE
LOWsdxl_train_leco.py40logger = logging.getLogger(__name__)CODE
LOWflux_train_network.py32logger = logging.getLogger(__name__)CODE
LOWsdxl_train_control_net.py59logger = logging.getLogger(__name__)CODE
LOWsd3_minimal_inference.py28logger = logging.getLogger(__name__)CODE
LOWtrain_leco.py39logger = logging.getLogger(__name__)CODE
LOWhunyuan_image_minimal_inference.py38logger = logging.getLogger(__name__)CODE
LOWsdxl_gen_img.py71logger = logging.getLogger(__name__)CODE
LOWanima_minimal_inference.py39logger = logging.getLogger(__name__)CODE
LOWsdxl_minimal_inference.py32logger = logging.getLogger(__name__)CODE
LOWgen_img.py75logger = logging.getLogger(__name__)CODE
LOWsd3_train.py44logger = logging.getLogger(__name__)CODE
LOWtools/latent_upscaler.py24logger = logging.getLogger(__name__)CODE
LOWtools/original_control_net.py14logger = logging.getLogger(__name__)CODE
LOWtools/convert_diffusers20_original_sd.py12logger = logging.getLogger(__name__)CODE
LOWtools/merge_sd3_safetensors.py15logger = logging.getLogger(__name__)CODE
LOWtools/detect_face_rotate.py25logger = logging.getLogger(__name__)CODE
LOWtools/cache_text_encoder_outputs.py38logger = logging.getLogger(__name__)CODE
LOWtools/canny.py11logger = logging.getLogger(__name__)CODE
LOWtools/show_metadata.py7logger = logging.getLogger(__name__)CODE
LOWtools/cache_latents.py28logger = logging.getLogger(__name__)CODE
LOWtools/cache_latents.py31def set_tokenize_strategy(is_sd: bool, is_sdxl: bool, is_flux: bool, args: argparse.Namespace) -> None:CODE
LOWtools/convert_diffusers_to_flux.py39logger = logging.getLogger(__name__)CODE
LOWtools/merge_models.py11logger = logging.getLogger(__name__)CODE
LOWtools/resize_images_to_resolution.py11logger = logging.getLogger(__name__)CODE
LOWlibrary/anima_models.py132logger = logging.getLogger(__name__)CODE
LOWlibrary/hunyuan_image_models.py19logger = logging.getLogger(__name__)CODE
LOWlibrary/sdxl_original_unet.py38logger = logging.getLogger(__name__)CODE
LOW⚡library/sdxl_original_unet.py1050 def set_use_memory_efficient_attention(self, xformers: bool, mem_eff: bool) -> None:STRING
LOW⚡library/sdxl_original_unet.py1058 def set_use_sdpa(self, sdpa: bool) -> None:STRING
LOWlibrary/flux_train_utils.py30logger = logging.getLogger(__name__)CODE
LOWlibrary/strategy_flux.py19logger = logging.getLogger(__name__)CODE
LOWlibrary/compile_utils.py25logger = logging.getLogger(__name__)CODE
LOWlibrary/strategy_base.py18logger = logging.getLogger(__name__)CODE
LOWlibrary/strategy_sdxl.py16logger = logging.getLogger(__name__)CODE
LOWlibrary/fp8_optimization_utils.py18logger = logging.getLogger(__name__)CODE
LOWlibrary/hunyuan_image_text_encoder.py23logger = logging.getLogger(__name__)CODE
LOWlibrary/qwen_image_autoencoder_kl.py38logger = logging.getLogger(__name__)CODE
LOWlibrary/model_util.py23logger = logging.getLogger(__name__)CODE
LOWlibrary/sdxl_original_control_net.py16logger = logging.getLogger(__name__)CODE
90 more matches not shown…
Self-Referential Comments31 hits · 104 pts
SeverityFileLineSnippetContext
MEDIUMflux_train_network.py168 # This method is called before `assert_extra_args`, so we cannot use `self.is_schnell` here.COMMENT
MEDIUMhunyuan_image_minimal_inference.py512 # Define a function to move models to device if neededCOMMENT
MEDIUManima_minimal_inference.py387 # Define a function to move models to device if neededCOMMENT
MEDIUMtests/test_custom_offloading_utils.py73 # Create a simple model with weightsCOMMENT
MEDIUMtests/test_custom_offloading_utils.py194 # Create a fake future and test waitingCOMMENT
MEDIUMtests/test_custom_offloading_utils.py343 # Create a mini model with 4 blocksCOMMENT
MEDIUMtests/library/test_sai_model_spec.py187 # Create a tiny test PNG (1x1 pixel)COMMENT
MEDIUM⚡tests/library/test_sai_model_spec.py225 # Create a test image fileCOMMENT
MEDIUMtests/library/test_strategy_lumina.py25 # Create a mock output object with hidden statesCOMMENT
MEDIUMtests/library/test_strategy_lumina.py77 # Create a mock modelCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py125 # Create a temporary directory for cachingCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py127 # Create a cache file pathCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py130 # Create the caching strategyCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py137 # Create a mock class for ImageInfoCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py143 # Create a sample input infoCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py187 # Create a temporary directory for cachingCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py195 # Create a smaller dummy image for testingCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py198 # Create the caching strategyCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py201 # Create a simple mock VAECOMMENT
MEDIUMtests/library/test_lumina_util.py8 # Create a test tensorCOMMENT
MEDIUMtests/library/test_lumina_util.py23 # Create a test tensorCOMMENT
MEDIUMtests/library/test_lumina_train_util.py113 # Create a mock noise schedulerCOMMENT
MEDIUMtests/library/test_lumina_train_util.py182 # Create a mock schedulerCOMMENT
MEDIUMtests/library/test_lumina_train_util.py196 # Create a mock args and setupCOMMENT
MEDIUMtests/library/test_lumina_models.py179 # Create a small NextDiT model for testingCOMMENT
MEDIUMlibrary/strategy_sdxl.py88 # Create a mask where the EOS tokens areSTRING
MEDIUMlibrary/fp8_optimization_utils.py472 # Create a new forward method with the patched version.COMMENT
MEDIUMlibrary/qwen_image_autoencoder_kl.py533 # Create the componentsSTRING
MEDIUMlibrary/hidden_states.py97 # Create a mask where the EOS tokens areSTRING
MEDIUMlibrary/lumina_train_util.py70 # Create a key based on the parametersCOMMENT
MEDIUM⚡library/sai_model_spec.py480 # Create the dataclassCOMMENT
Empty Error Handlers18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHhunyuan_image_train_network.py97except Exception:CODE
HIGHlibrary/flux_train_utils.py88except Exception:CODE
HIGHlibrary/model_util.py1228except:CODE
HIGHlibrary/lumina_train_util.py192except Exception:CODE
HIGHlibrary/sd3_models.py35except:CODE
HIGHlibrary/sd3_train_utils.py423except Exception:CODE
HIGHlibrary/anima_train_utils.py568except Exception:CODE
HIGHlibrary/dataset.py84except:CODE
HIGHlibrary/dataset.py93except:CODE
HIGHlibrary/dataset.py102except:CODE
HIGHlibrary/sampling.py370except Exception:CODE
HIGHlibrary/device_utils.py12except Exception:CODE
HIGHlibrary/lumina_models.py37except ImportError:CODE
HIGHlibrary/lumina_models.py43except ImportError:CODE
HIGHlibrary/ipex/hijacks.py425except Exception:CODE
HIGHlibrary/ipex/__init__.py54except Exception:CODE
HIGHlibrary/ipex/__init__.py229except Exception: # pylint: disable=broad-exception-caughtCODE
HIGHnetworks/control_net_lllite_anima.py716except ValueError:CODE
AI Structural Patterns67 hits · 65 pts
SeverityFileLineSnippetContext
LOWsdxl_gen_img.py1191CODE
LOWsdxl_gen_img.py398CODE
LOWgen_img.py1196CODE
LOWgen_img.py409CODE
LOWtools/latent_upscaler.py72CODE
LOWtools/dev/manual_test_anima_lllite_dryrun.py98CODE
LOWlibrary/anima_models.py1041CODE
LOWlibrary/sdxl_original_unet.py512CODE
LOWlibrary/sdxl_original_unet.py535CODE
LOWlibrary/sdxl_original_unet.py553CODE
LOWlibrary/sdxl_original_unet.py762CODE
LOWlibrary/fp8_optimization_utils.py239CODE
LOWlibrary/lpw_stable_diffusion.py724CODE
LOWlibrary/lpw_stable_diffusion.py984CODE
LOWlibrary/lpw_stable_diffusion.py1079CODE
LOWlibrary/lpw_stable_diffusion.py1173CODE
LOWlibrary/qwen_image_autoencoder_kl.py574CODE
LOWlibrary/qwen_image_autoencoder_kl.py753CODE
LOWlibrary/qwen_image_autoencoder_kl.py868CODE
LOWlibrary/sdxl_lpw_stable_diffusion.py717CODE
LOWlibrary/sdxl_lpw_stable_diffusion.py1024CODE
LOWlibrary/sdxl_lpw_stable_diffusion.py1119CODE
LOWlibrary/sdxl_lpw_stable_diffusion.py1213CODE
LOWlibrary/attention_processors.py227CODE
LOWlibrary/qwen_image_autoencoder_kl_2d.py230CODE
LOWlibrary/sd3_models.py250CODE
LOWlibrary/sd3_models.py574CODE
LOWlibrary/sd3_models.py748CODE
LOWlibrary/sd3_models.py1331CODE
LOWlibrary/original_unet.py706CODE
LOWlibrary/original_unet.py729CODE
LOWlibrary/original_unet.py747CODE
LOWlibrary/slicing_vae.py178CODE
LOWlibrary/slicing_vae.py361CODE
LOWlibrary/slicing_vae.py563CODE
LOWlibrary/mask_generator.py305CODE
LOWlibrary/lumina_models.py827CODE
LOWlibrary/lumina_models.py1035CODE
LOWlibrary/lumina_models.py1219CODE
LOWlibrary/hunyuan_image_modules.py494CODE
LOWlibrary/sai_model_spec.py378CODE
LOWlibrary/sai_model_spec.py501CODE
LOWlibrary/_cv2_stub/__init__.py295CODE
LOWlibrary/_cv2_stub/__init__.py338CODE
LOWfinetune/blip/med.py393CODE
LOWfinetune/blip/med.py670CODE
LOWfinetune/blip/med.py830CODE
LOWfinetune/blip/vit.py91CODE
LOWfinetune/blip/vit.py118CODE
LOWnetworks/extract_lora_from_models.py35CODE
LOWnetworks/control_net_lllite_anima.py315CODE
LOWnetworks/dylora.py121CODE
LOWnetworks/dylora.py275CODE
LOWnetworks/oft_flux.py130CODE
LOWnetworks/lokr.py82CODE
LOWnetworks/lora_flux.py38CODE
LOWnetworks/lora_flux.py724CODE
LOWnetworks/flux_extract_lora.py36CODE
LOWnetworks/boft.py338CODE
LOWnetworks/oft_v2.py312CODE
7 more matches not shown…
Excessive Try-Catch Wrapping60 hits · 64 pts
SeverityFileLineSnippetContext
LOWanima_train_control_net_lllite.py846 except Exception as e:CODE
LOWhunyuan_image_train_network.py97 except Exception:CODE
LOWhunyuan_image_minimal_inference.py1041 except Exception as e:CODE
LOWanima_minimal_inference.py854 except Exception as e:CODE
LOWtools/merge_sd3_safetensors.py56 except Exception as e:CODE
LOWtools/dev/manual_test_anima_real_training.py102 except Exception as e:CODE
LOWtools/dev/manual_test_anima_real_training.py231 except Exception:CODE
LOWtools/dev/manual_test_anima_cache.py342 except Exception as e:CODE
LOWtools/dev/manual_test_anima_cache.py527 except Exception as e:CODE
LOW⚡tools/dev/manual_test_anima_cache.py573 except Exception as e:CODE
LOW⚡tools/dev/manual_test_anima_cache.py582 except Exception as e:CODE
LOW⚡tools/dev/manual_test_anima_cache.py591 except Exception as e:CODE
LOW⚡tools/dev/visualize_masks.py115 except Exception as e:CODE
LOWtests/download_training_data.py80 except Exception:CODE
MEDIUMtests/download_training_data.py108 print("Error: 'datasets' package not installed. Run: pip install datasets", file=sys.stderr)CODE
LOWtests/local/regression_te.py169 except Exception: # pragma: no coverCODE
LOWtests/local/regression_te.py175 except Exception: # pragma: no coverCODE
LOWtests/local/regression_te.py413 except Exception as e:CODE
LOWlibrary/flux_train_utils.py88 except Exception:CODE
LOWlibrary/strategy_flux.py133 except Exception as e:CODE
LOWlibrary/strategy_base.py484 except Exception as e:STRING
LOWlibrary/strategy_sdxl.py251 except Exception as e:STRING
LOWlibrary/hunyuan_image_text_encoder.py659 except Exception as e:STRING
LOWlibrary/huggingface_util.py38 except Exception as e: # とりあえずRepositoryNotFoundErrorは確認したが他にあると困るのでCODE
LOWlibrary/huggingface_util.py61 except Exception as e: # RuntimeErrorを確認済みだが他にあると困るのでCODE
MEDIUMlibrary/huggingface_util.py45def uploader():CODE
LOWlibrary/lumina_train_util.py192 except Exception:CODE
LOWlibrary/sd3_train_utils.py423 except Exception:CODE
LOWlibrary/strategy_sd3.py308 except Exception as e:CODE
LOWlibrary/anima_train_utils.py568 except Exception:CODE
LOWlibrary/dataset.py920 except Exception as e:STRING
LOWlibrary/caching.py62 except Exception as e:CODE
LOWlibrary/sampling.py370 except Exception:CODE
LOW⚡library/device_utils.py12except Exception:CODE
LOW⚡library/device_utils.py18except Exception:CODE
LOW⚡library/device_utils.py23except Exception:CODE
LOW⚡library/device_utils.py28except Exception:CODE
LOWlibrary/device_utils.py107 except Exception as e:STRING
LOWlibrary/strategy_hunyuan_image.py118 except Exception as e:CODE
LOWlibrary/config_util.py691 except Exception:CODE
LOWlibrary/config_util.py699 except Exception:CODE
LOWlibrary/strategy_lumina.py199 except Exception as e:CODE
LOW⚡library/sai_model_spec.py472 except Exception as e:CODE
LOWlibrary/strategy_anima.py193 except Exception as e:CODE
LOWlibrary/_cv2_stub/__init__.py466 except Exception as e: # noqa: BLE001CODE
LOWlibrary/_cv2_stub/__init__.py516 except Exception as e: # noqa: BLE001CODE
LOWlibrary/ipex/hijacks.py425 except Exception:CODE
LOWlibrary/ipex/__init__.py7except Exception:CODE
LOWlibrary/ipex/__init__.py54 except Exception:CODE
LOWlibrary/ipex/__init__.py229 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWlibrary/ipex/__init__.py232 except Exception as e:CODE
LOWfinetune/make_captions_by_git.py141 except Exception as e:STRING
LOWfinetune/tag_images_by_wd14_tagger.py93 except Exception as e:CODE
LOWfinetune/tag_images_by_wd14_tagger.py187 except Exception:CODE
LOWfinetune/make_captions.py57 except Exception as e:CODE
LOWfinetune/make_captions.py148 except Exception as e:CODE
LOWfinetune/image_loading_dataset.py28 except Exception as e:CODE
LOWfinetune/prepare_buckets_latents.py151 except Exception as e:CODE
LOWnetworks/svd_merge_lora.py232 except Exception:CODE
MEDIUMnetworks/svd_merge_lora.py228def format_lbws(lbws):CODE
Over-Commented Block44 hits · 44 pts
SeverityFileLineSnippetContext
LOWsd3_train_network.py281 # def call_unet(self, args, accelerator, unet, noisy_latents, timesteps, text_conds, batch, weight_dtype):COMMENT
LOWsdxl_train_control_net_lllite.py301COMMENT
LOWrequirements.txt21# drop-in that accelerate uses automatically for --log_with tensorboard; view the logsCOMMENT
LOWrequirements.txt41# tensorflow==2.10.1COMMENT
LOWinpainting_minimal_inference.py1# Minimal inpainting inference script for SD1.5 and SDXL inpainting models.COMMENT
LOWtrain_network.py1161 trainable_params = network.prepare_optimizer_params(text_encoder_lr, args.unet_lr)COMMENT
LOWlumina_train.py321 # if args.blocks_to_swap is None:COMMENT
LOWhunyuan_image_minimal_inference.py341COMMENT
LOWsdxl_gen_img.py741 # # 各ステップに拡大率をどのくらい増やすか:.125がよさそう(たぶん1/8なので)COMMENT
LOWsdxl_gen_img.py761 # every_n_steps = input("every n steps:")COMMENT
LOWsdxl_gen_img.py781COMMENT
LOWsdxl_gen_img.py861 # text_emb_last = text_embeddingsCOMMENT
LOWsdxl_minimal_inference.py121 # checkpointを読み込む。モデル変換についてはそちらの関数を参照COMMENT
LOWsd3_train.py841 # Follow: Section 5 of https://arxiv.org/abs/2206.00364.COMMENT
LOWsd3_train.py1041 # parser.add_argument(COMMENT
LOWtools/detect_face_rotate.py61def rotate_image(image, angle, cx, cy):COMMENT
LOWtools/convert_diffusers_to_flux.py1# This script converts the diffusers of a Flux model to a safetensors file of a Flux.1 model.COMMENT
LOWtests/run_sdxl_inpainting_test.sh1#!/usr/bin/env bashCOMMENT
LOWtests/sd15_inpainting_test_lora.toml1# SD1.5 inpainting smoke-test config — lora mode.COMMENT
LOWtests/sd15_inpainting_test_ft.toml1# SD1.5 inpainting smoke-test config — ft (DreamBooth / full fine-tune) mode.COMMENT
LOWtests/sd15_inpainting_test_ft.toml61#sample_sampler = "euler_a"COMMENT
LOWtests/sdxl_inpainting_test_lora.toml1# SDXL inpainting smoke-test config — lora mode.COMMENT
LOWtests/sdxl_inpainting_test_ft.toml1# SDXL inpainting smoke-test config — ft (full fine-tune) mode.COMMENT
LOWtests/sdxl_inpainting_test_ft.toml61# --- sampling (disabled for smoke test) ---COMMENT
LOWtests/run_sd15_inpainting_test.sh1#!/usr/bin/env bashCOMMENT
LOWtests/local/models.example.toml1# Template for tests/local/models.toml (git-ignored: it holds local paths).COMMENT
LOWlibrary/anima_models.py621COMMENT
LOWlibrary/anima_models.py1621# def get_dit_config(state_dict, key_prefix=""):COMMENT
LOWlibrary/anima_models.py1641# dit_config["max_fps"] = 30COMMENT
LOWlibrary/anima_models.py1661# dit_config["extra_per_block_abs_pos_emb"] = FalseCOMMENT
LOWlibrary/qwen_image_autoencoder_kl.py1# Copied and modified from Diffusers (via Musubi-Tuner). Original copyright notice follows.COMMENT
LOWlibrary/sdxl_train_util.py361 assert not args.v2, "v2 cannot be enabled in SDXL training / SDXL学習ではv2を有効にすることはできません"COMMENT
LOWlibrary/dataset.py621 bucketingを行わない場合も呼び出し必須(ひとつだけbucketを作る)COMMENT
LOWlibrary/slicing_vae.py1# Modified from Diffusers to reduce VRAM usageCOMMENT
LOWlibrary/slicing_vae.py81 if org_dtype == torch.float16:COMMENT
LOWlibrary/args.py101 )COMMENT
LOWlibrary/lumina_models.py1# Copyright Alpha VLLM/Lumina Image 2.0 and contributorsCOMMENT
LOWlibrary/hunyuan_image_modules.py501COMMENT
LOWnetworks/control_net_lllite.py401COMMENT
LOWnetworks/lora_flux.py1061 del state_dict[key]COMMENT
LOWnetworks/lora_lumina.py441 # rank = NoneCOMMENT
LOWnetworks/lora_lumina.py721 # # split qkvCOMMENT
LOWnetworks/lora_lumina.py741 # alpha = state_dict.pop(f"{lora_name}.alpha")COMMENT
LOWnetworks/control_net_lllite_for_train.py441 # logger.info(info)COMMENT
Redundant / Tautological Comments14 hits · 22 pts
SeverityFileLineSnippetContext
LOWhunyuan_image_minimal_inference.py1174 # Check if latents are providedCOMMENT
LOWanima_minimal_inference.py980 # Check if latents are providedCOMMENT
LOWtools/resize_images_to_resolution.py27 # Check if the image is png, jpg or webp etc...COMMENT
LOWtools/resize_images_to_resolution.py48 # Check if the image needs resizingCOMMENT
LOWtools/dev/manual_test_anima_real_training.py85 # Check if it's a known errorCOMMENT
LOWtools/dev/manual_test_anima_cache.py335 # Check if any precision was lostCOMMENT
LOWlibrary/fp8_optimization_utils.py132 # Check if it's a weight key and matches target patternsCOMMENT
LOWlibrary/fp8_optimization_utils.py286 # Check if weight key matches target patterns and does not match exclude patternsCOMMENT
LOWlibrary/fp8_optimization_utils.py462 # Check if this module has a corresponding scale_weightCOMMENT
LOWlibrary/sai_model_spec.py307 # Read file and encode as base64COMMENT
LOW⚡library/sai_model_spec.py464 # Check if it's already a data URL or if it's a file pathCOMMENT
LOWfinetune/tag_images_by_wd14_tagger.py504 # Check if file existsCOMMENT
LOWfinetune/tag_images_by_wd14_tagger.py507 # Read file and remove new linesCOMMENT
LOWnetworks/lora_lumina.py582 # Set dims to type_dimsCOMMENT
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippetContext
HIGHlibrary/hunyuan_image_text_encoder.py284 "image_token_id": null,CODE
HIGHlibrary/hunyuan_image_text_encoder.py334 "sliding_window": null,CODE
HIGHlibrary/hunyuan_image_text_encoder.py338 "video_token_id": null,CODE
HIGHlibrary/original_unet.py94 "num_class_embeds": null,STRING
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHlibrary/safetensors_utils.py142Load a tensor from the file with memory-efficient strategies. **Note:** If device is 'cuda' , the transSTRING
HIGHlibrary/safetensors_utils.py269Convert byte tensor to float8 format if supported. Args: byte_tensor (torch.Tensor): Raw byte tensoSTRING
HIGHlibrary/utils.py117 Convert a string to a torch.dtype Args: s: string representation of the dtype default_dtype: dSTRING
AI Slop Vocabulary6 hits · 9 pts
SeverityFileLineSnippetContext
LOWhunyuan_image_train_network.py101 # If only one device is available, just use the original prompt list. We don't need to care about the distributiCOMMENT
LOWlibrary/flux_train_utils.py92 # If only one device is available, just use the original prompt list. We don't need to care about the distributiCOMMENT
LOWlibrary/lumina_train_util.py198 # If only one device is available, just use the original prompt list. We don't need to care about the distributiCOMMENT
LOWlibrary/sd3_models.py831 # just use a buffer alreadyCOMMENT
LOWlibrary/sd3_train_utils.py427 # If only one device is available, just use the original prompt list. We don't need to care about the distributiCOMMENT
LOWlibrary/sampling.py374 # If only one device is available, just use the original prompt list. We don't need to care about the distributiCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/run_sdxl_inpainting_test.sh14# Usage:COMMENT
LOWtests/run_sd15_inpainting_test.sh14# Usage:COMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsd3_minimal_inference.py283 # make sure to move to the device: some tensors are created in the constructor on the CPUCOMMENT