AI Slop Code Risk Monitor

kohya-ss/sd-scripts

SlopCodeMonitor badge for kohya-ss/sd-scripts Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).
21.2 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for kohya-ss/sd-scripts, a Python project with 7,255 GitHub stars. SynthScan examined 129,723 lines of code across 297 source files, recording 1976 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 21.2 (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.

21.2
Adjusted Signal
21.2
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
7.3K
Stars
Python
Language
129.7K
Lines of Code
297
Files
2.0K
Pattern Hits
2026-10-31
Scan Date
0.25
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 37.6/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 12.7/100 · LOW

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

Agent Over-Engineering Ratio 52.7/100 · HIGH

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

PR Review Velocity Impact 65.4/100 · HIGH

Which changes need focused human review? 1976 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 73MEDIUM 206LOW 1697

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 1976 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 Identifiers692 hits · 702 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.py162 def get_latents_caching_strategy(self, args):CODE
LOWsd3_train_network.py168 def get_text_encoding_strategy(self, args):CODE
LOW⚡sd3_train_network.py186 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡sd3_train_network.py195 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡sd3_train_network.py198 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOWsd3_train_network.py212 def cache_text_encoder_outputs_if_needed(CODE
LOWsd3_train_network.py323 def get_noise_pred_and_target(CODE
LOWsd3_train_network.py418 def is_text_encoder_not_needed_for_training(self, args):CODE
LOWsd3_train_network.py421 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOWsd3_train_network.py476 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.py103 def get_latents_caching_strategy(self, args):CODE
LOW⚡lumina_train_network.py106 def get_text_encoding_strategy(self, args):CODE
LOW⚡lumina_train_network.py109 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡lumina_train_network.py112 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOWlumina_train_network.py124 def cache_text_encoder_outputs_if_needed(CODE
LOWlumina_train_network.py247 def get_noise_pred_and_target(CODE
LOW⚡lumina_train_network.py349 def is_text_encoder_not_needed_for_training(self, args):CODE
LOW⚡lumina_train_network.py352 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOW⚡lumina_train_network.py360 def prepare_unet_with_accelerator(CODE
LOWfine_tune.py157 def set_diffusers_xformers_flag(model, valid):CODE
LOW⚡hunyuan_image_train_network.py428 def get_latents_caching_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py431 def get_text_encoding_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py437 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡hunyuan_image_train_network.py443 def get_text_encoders_train_flags(self, args, text_encoders):CODE
LOW⚡hunyuan_image_train_network.py447 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡hunyuan_image_train_network.py455 def cache_text_encoder_outputs_if_needed(CODE
LOWhunyuan_image_train_network.py531 def get_noise_pred_and_target(CODE
LOWhunyuan_image_train_network.py603 def is_text_encoder_not_needed_for_training(self, args):CODE
LOWhunyuan_image_train_network.py606 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOWhunyuan_image_train_network.py628 def prepare_unet_with_accelerator(CODE
LOW⚡anima_train_network.py170 def get_latents_caching_strategy(self, args):CODE
LOW⚡anima_train_network.py173 def get_text_encoding_strategy(self, args):CODE
LOW⚡anima_train_network.py179 def get_models_for_text_encoding(self, args, accelerator, text_encoders):CODE
LOW⚡anima_train_network.py184 def get_text_encoder_outputs_caching_strategy(self, args):CODE
LOW⚡anima_train_network.py191 def cache_text_encoder_outputs_if_needed(CODE
LOWanima_train_network.py275 def get_noise_pred_and_target(CODE
LOW⚡anima_train_network.py423 def is_text_encoder_not_needed_for_training(self, args):CODE
LOW⚡anima_train_network.py426 def prepare_text_encoder_grad_ckpt_workaround(self, index, text_encoder):CODE
LOW⚡anima_train_network.py431 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
632 more matches not shown…
Decorative Section Separators172 hits · 616 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
112 more matches not shown…
Unused Imports386 hits · 335 pts
SeverityFileLineSnippetContext
LOWsd3_train_network.py2CODE
LOWsd3_train_network.py4CODE
LOWsd3_train_network.py9CODE
LOWsd3_train_network.py16CODE
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.py24CODE
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
326 more matches not shown…
Deep Nesting260 hits · 252 pts
SeverityFileLineSnippetContext
LOWtrain_textual_inversion.py193CODE
LOWsd3_train_network.py212CODE
LOWtrain_db.py60CODE
LOWsdxl_train.py59CODE
LOWsdxl_train.py87CODE
LOWsdxl_train.py106CODE
LOWanima_train_control_net_lllite.py282CODE
LOWflux_train_control_net.py69CODE
LOWlumina_train_network.py124CODE
LOWsdxl_train_control_net_lllite.py86CODE
LOWfine_tune.py54CODE
LOWanima_train.py51CODE
LOWhunyuan_image_train_network.py47CODE
LOWhunyuan_image_train_network.py150CODE
LOWhunyuan_image_train_network.py210CODE
LOWhunyuan_image_train_network.py455CODE
LOWtrain_control_net.py71CODE
LOWanima_train_network.py191CODE
LOWflux_minimal_inference.py201CODE
LOWflux_minimal_inference.py282CODE
LOWflux_train.py63CODE
LOWanima_minimal_inference_control_net_lllite.py242CODE
LOWtrain_network.py72CODE
LOWtrain_network.py371CODE
LOWtrain_network.py499CODE
LOWtrain_network.py900CODE
LOWtrain_network.py1563CODE
LOWlumina_train.py64CODE
LOWsdxl_train_leco.py103CODE
LOWflux_train_network.py238CODE
LOWsdxl_train_control_net.py76CODE
LOWtrain_leco.py101CODE
LOWhunyuan_image_minimal_inference.py170CODE
LOWhunyuan_image_minimal_inference.py656CODE
LOWhunyuan_image_minimal_inference.py943CODE
LOWhunyuan_image_minimal_inference.py1087CODE
LOWhunyuan_image_minimal_inference.py1171CODE
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
LOWmoss_image_minimal_inference.py115CODE
LOWmoss_image_minimal_inference.py442CODE
LOWgen_img.py964CODE
LOWgen_img.py1053CODE
LOWgen_img.py1104CODE
LOWgen_img.py1129CODE
LOWgen_img.py1196CODE
LOWgen_img.py1374CODE
LOWgen_img.py1614CODE
LOWgen_img.py409CODE
200 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 Boilerplate159 hits · 158 pts
SeverityFileLineSnippetContext
LOWtrain_textual_inversion.py50logger = logging.getLogger(__name__)CODE
LOWsd3_train_network.py26logger = 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.py57logger = logging.getLogger(__name__)CODE
LOWsdxl_train_network.py20logger = logging.getLogger(__name__)CODE
LOWlumina_train_network.py33logger = 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.py40logger = logging.getLogger(__name__)CODE
LOWhunyuan_image_train_network.py40logger = logging.getLogger(__name__)CODE
LOWtrain_control_net.py54logger = logging.getLogger(__name__)CODE
LOWanima_train_network.py35logger = logging.getLogger(__name__)CODE
LOW⚡inpainting_minimal_inference.py53logger = logging.getLogger(__name__)CODE
LOWflux_minimal_inference.py31logger = logging.getLogger(__name__)CODE
LOWflux_train.py51logger = 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.py33logger = 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.py39logger = 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
LOWmoss_image_minimal_inference.py30logger = logging.getLogger(__name__)CODE
LOWgen_img.py75logger = logging.getLogger(__name__)CODE
LOWmoss_image_train_network.py37logger = logging.getLogger(__name__)CODE
LOWsd3_train.py45logger = 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.py41logger = logging.getLogger(__name__)CODE
LOWtools/canny.py11logger = logging.getLogger(__name__)CODE
LOWtools/show_metadata.py7logger = logging.getLogger(__name__)CODE
LOWtools/cache_latents.py39logger = logging.getLogger(__name__)CODE
LOWtools/cache_latents.py42def set_tokenize_strategy(is_sd: bool, is_sdxl: bool, is_flux: bool, args: argparse.Namespace, is_moss_image: bool = FalCODE
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.py47logger = 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
99 more matches not shown…
Self-Referential Comments31 hits · 104 pts
SeverityFileLineSnippetContext
MEDIUMflux_train_network.py175 # This method is called before `assert_extra_args`, so we cannot use `self.is_schnell` here.COMMENT
MEDIUMhunyuan_image_minimal_inference.py513 # 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.py189 # Create a temporary directory for cachingCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py197 # Create a smaller dummy image for testingCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py200 # Create the caching strategyCOMMENT
MEDIUM⚡tests/library/test_strategy_lumina.py203 # 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.py498 # Create the dataclassCOMMENT
Empty Error Handlers19 hits · 95 pts
SeverityFileLineSnippetContext
HIGHhunyuan_image_train_network.py98except 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.py519except Exception:CODE
HIGHlibrary/dataset.py84except:CODE
HIGHlibrary/dataset.py93except:CODE
HIGHlibrary/dataset.py102except:CODE
HIGHlibrary/sampling.py354except Exception:CODE
HIGHlibrary/moss_image_train_utils.py352except 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 Patterns71 hits · 69 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.py956CODE
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/moss_image_models.py309CODE
LOWlibrary/moss_image_utils.py244CODE
LOWlibrary/sd3_models.py250CODE
LOWlibrary/sd3_models.py574CODE
LOWlibrary/sd3_models.py748CODE
LOWlibrary/sd3_models.py1335CODE
LOWlibrary/model_io.py284CODE
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/lora_utils.py253CODE
LOWlibrary/sai_model_spec.py396CODE
LOWlibrary/sai_model_spec.py519CODE
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
11 more matches not shown…
Excessive Try-Catch Wrapping63 hits · 68 pts
SeverityFileLineSnippetContext
LOWanima_train_control_net_lllite.py846 except Exception as e:CODE
LOWhunyuan_image_train_network.py98 except Exception:CODE
LOWhunyuan_image_minimal_inference.py1042 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.py526 except Exception as e:CODE
LOWlibrary/strategy_sdxl.py251 except Exception as e:STRING
LOWlibrary/hunyuan_image_text_encoder.py659 except Exception as e:STRING
LOW⚡library/convrot_int8_kernels.py63 except Exception:CODE
LOWlibrary/strategy_moss_image.py178 except Exception as e:CODE
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.py519 except Exception:CODE
LOWlibrary/dataset.py1075 except Exception as e:STRING
LOWlibrary/caching.py62 except Exception as e:CODE
LOWlibrary/sampling.py354 except Exception:CODE
LOWlibrary/moss_image_train_utils.py352 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.py699 except Exception:CODE
LOWlibrary/config_util.py707 except Exception:CODE
LOWlibrary/strategy_lumina.py199 except Exception as e:CODE
LOW⚡library/sai_model_spec.py490 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
3 more matches not shown…
Over-Commented Block46 hits · 46 pts
SeverityFileLineSnippetContext
LOWsd3_train_network.py281 else: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 lr_descriptions = NoneCOMMENT
LOWlumina_train.py321 # if args.blocks_to_swap is None:COMMENT
LOWhunyuan_image_minimal_inference.py341 target_device = deviceCOMMENT
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.py1041 help="learning rate for text encoder 3 (T5-XXL) / text encoder 3 (T5-XXL)の学習率",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.py541COMMENT
LOWlibrary/anima_models.py1541# dit_config = {}COMMENT
LOWlibrary/anima_models.py1561# dit_config["use_adaln_lora"] = TrueCOMMENT
LOWlibrary/anima_models.py1581# dit_config["rope_w_extrapolation_ratio"] = 3.0COMMENT
LOWlibrary/convrot_int8_kernels.py1# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.COMMENT
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.py741 # with ThreadPoolExecutor(max_workers) as executor: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 help='additional arguments for optimizer (like "weight_decay=0.01 betas=0.9,0.999 ...") / オプティマイザの追加引数(例: "weighCOMMENT
LOWlibrary/args.py901 # # Listを使って数えてもいいけど並べてしまえCOMMENT
LOWlibrary/lumina_models.py1# Copyright Alpha VLLM/Lumina Image 2.0 and contributorsCOMMENT
LOWlibrary/hunyuan_image_modules.py501COMMENT
LOWnetworks/lora_generic.py1# Generic LoRA network module built on `networks.network_base` (ArchConfig + AdditionalNetwork).COMMENT
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.py1175 # 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.py318 # Read file and encode as base64COMMENT
LOW⚡library/sai_model_spec.py482 # 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.py102 # 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.py358 # 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