Repository Analysis

invoke-ai/InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.

5.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of invoke-ai/InvokeAI, a Python project with 27,616 GitHub stars. SynthScan v2.0 examined 922,437 lines of code across 2899 source files, recording 3812 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 5.5 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

5.5
Adjusted Score
5.5
Raw Score
100%
Time Factor
2026-07-13
Last Push
27.6K
Stars
Python
Language
922.4K
Lines of Code
2.9K
Files
3.8K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 53HIGH 79MEDIUM 224LOW 3456

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3812 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers2317 hits · 2288 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/util/misc.py16def get_datetime_from_iso_timestamp(iso_timestamp: str) -> datetime.datetime:CODE
LOWinvokeai/app/util/torch_cuda_allocator.py6def configure_torch_cuda_allocator(pytorch_cuda_alloc_conf: str, logger: logging.Logger):CODE
LOWinvokeai/app/util/ti_utils.py11def extract_ti_triggers_from_prompt(prompt: str) -> List[str]:CODE
LOWinvokeai/app/util/step_callback.py183def sample_to_lowres_estimated_image(CODE
LOWinvokeai/app/invocations/latent_noise.py11def validate_noise_dimensions(noise_type: LatentNoiseType, width: int, height: int) -> None:CODE
LOWinvokeai/app/invocations/latent_noise.py46def validate_noise_tensor_shape(noise: torch.Tensor, noise_type: LatentNoiseType, width: int, height: int) -> None:CODE
LOWinvokeai/app/invocations/t2i_adapter.py33 def validate_ip_adapter_weight(cls, v):CODE
LOWinvokeai/app/invocations/t2i_adapter.py38 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/t2i_adapter.py83 def validate_ip_adapter_weight(cls, v):CODE
LOWinvokeai/app/invocations/t2i_adapter.py88 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/compel.py425def get_tokens_for_prompt_object(CODE
LOWinvokeai/app/invocations/compel.py447def log_tokenization_for_conjunction(CODE
LOWinvokeai/app/invocations/compel.py460def log_tokenization_for_prompt_object(CODE
LOWinvokeai/app/invocations/compel.py502def log_tokenization_for_text(CODE
LOWinvokeai/app/invocations/blend_latents.py85 def replace_tensor_from_masked_tensor(CODE
LOWinvokeai/app/invocations/controlnet.py53 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/controlnet.py97 def validate_begin_end_step_percent(self) -> "ControlNetInvocation":CODE
LOWinvokeai/app/invocations/cogview4_denoise.py175 def _convert_timesteps_to_sigmas(self, image_seq_len: int, timesteps: torch.Tensor) -> list[float]:CODE
LOWinvokeai/app/invocations/flux_ip_adapter.py56 def validate_ip_adapter_weight(cls, v: float) -> float:CODE
LOWinvokeai/app/invocations/flux_ip_adapter.py61 def validate_begin_end_step_percent(self) -> Self:CODE
LOWinvokeai/app/invocations/denoise_latents.py220 def _get_text_embeddings_and_masks(CODE
LOWinvokeai/app/invocations/denoise_latents.py241 def _preprocess_regional_prompt_mask(CODE
LOWinvokeai/app/invocations/denoise_latents.py267 def _concat_regional_text_embeddings(CODE
LOWinvokeai/app/invocations/denoise_latents.py553 def prep_ip_adapter_image_prompts(CODE
LOWinvokeai/app/invocations/denoise_latents.py781 def prepare_noise_and_latents(CODE
LOWinvokeai/app/invocations/anima_denoise.py101def inverse_loglinear_timestep_shift(alpha: float, sigma: float) -> float:CODE
LOWinvokeai/app/invocations/anima_denoise.py153 def merge_intermediate_latents_with_init_latents(CODE
LOWinvokeai/app/invocations/anima_denoise.py270 def _normalize_control_lllite(CODE
LOWinvokeai/app/invocations/anima_denoise.py462 def _run_llm_adapter_for_regions(CODE
LOWinvokeai/app/invocations/anima_denoise.py899 def _estimate_preview_latents(self, latents: torch.Tensor, sigma: float, noise_pred: torch.Tensor) -> torch.Tensor:CODE
LOWinvokeai/app/invocations/flux2_klein_model_loader.py173 def _validate_diffusers_format(CODE
LOWinvokeai/app/invocations/z_image_model_loader.py126 def _validate_diffusers_format(CODE
LOWinvokeai/app/invocations/call_saved_workflow.py12def is_call_saved_workflow_dynamic_input(field_name: str) -> bool:CODE
LOWinvokeai/app/invocations/call_saved_workflow.py16def parse_call_saved_workflow_dynamic_input(field_name: str) -> tuple[str, str]:CODE
LOWinvokeai/app/invocations/call_saved_workflow.py51 def validate_selected_workflow(self, context: InvocationContext):CODE
LOWinvokeai/app/invocations/external_image_generation.py179 def _build_output_provider_metadata(self) -> dict[str, Any]:CODE
LOWinvokeai/app/invocations/external_image_generation.py231 def _build_output_provider_metadata(self) -> dict[str, Any]:CODE
LOWinvokeai/app/invocations/external_image_generation.py282 def _build_output_provider_metadata(self) -> dict[str, Any]:CODE
LOWinvokeai/app/invocations/external_image_generation.py326 def _build_output_provider_metadata(self) -> dict[str, Any]:CODE
LOWinvokeai/app/invocations/composition-nodes.py430 def scale_and_pad_or_crop_to_base(self, image_upper: Image.Image, image_base: Image.Image):CODE
LOWinvokeai/app/invocations/composition-nodes.py515 def prepare_tensors_from_images(CODE
LOWinvokeai/app/invocations/baseinvocation.py323 def get_invocation_typeadapter(cls) -> TypeAdapter[Any]:CODE
LOWinvokeai/app/invocations/baseinvocation.py337 def invalidate_invocation_typeadapter(cls) -> None:CODE
LOWinvokeai/app/invocations/baseinvocation.py440 def invalidate_output_typeadapter(cls) -> None:CODE
LOWinvokeai/app/invocations/qwen_image_denoise.py225 def _maybe_clamp_ref_latent_size(cls, ref_latents: torch.Tensor) -> torch.Tensor:CODE
LOWinvokeai/app/invocations/segment_anything.py84 def validate_points_and_boxes_len(self):CODE
LOWinvokeai/app/invocations/segment_anything.py170 def _apply_polygon_refinement(self, masks: list[torch.Tensor]) -> list[torch.Tensor]:CODE
LOWinvokeai/app/invocations/ip_adapter.py49 def validate_ip_adapter_weight(cls, v: float) -> float:CODE
LOWinvokeai/app/invocations/ip_adapter.py54 def validate_begin_end_step_percent(self) -> Self:CODE
LOWinvokeai/app/invocations/ip_adapter.py114 def validate_ip_adapter_weight(cls, v: float) -> float:CODE
LOWinvokeai/app/invocations/ip_adapter.py119 def validate_begin_end_step_percent(self) -> Self:CODE
LOWinvokeai/app/invocations/flux_denoise.py707 def _prep_controlnet_extensions(CODE
LOWinvokeai/app/invocations/flux_denoise.py806 def _prep_structural_control_img_cond(self, context: InvocationContext) -> torch.Tensor | None:CODE
LOWinvokeai/app/invocations/flux_denoise.py892 def _normalize_ip_adapter_fields(self) -> list[IPAdapterField]:CODE
LOWinvokeai/app/invocations/flux_denoise.py902 def _prep_ip_adapter_image_prompt_clip_embeds(CODE
LOWinvokeai/app/invocations/flux_denoise.py958 def _prep_ip_adapter_extensions(CODE
LOWinvokeai/app/invocations/flux_controlnet.py37 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/flux_controlnet.py85 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/facetools.py542 def validate_comma_separated_ints(cls, v) -> str:CODE
LOWinvokeai/app/invocations/math.py190 def no_unrepresentable_results(cls, v: int, info: ValidationInfo):CODE
2257 more matches not shown…
Hallucination Indicators53 hits · 595 pts
SeverityFileLineSnippetContext
CRITICALinvokeai/app/api/routers/model_manager.py364 installed_models = ApiDependencies.invoker.services.model_manager.store.search_by_attr()CODE
CRITICALinvokeai/app/api/routers/model_manager.py233 configs = ApiDependencies.invoker.services.model_manager.store.search_by_attr(CODE
CRITICALinvokeai/app/api/routers/model_manager.py252 configs = ApiDependencies.invoker.services.model_manager.store.search_by_hash(hash)CODE
CRITICALinvokeai/app/api/routers/model_manager.py276 config = ApiDependencies.invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py300 config = ApiDependencies.invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py322 new_config = ApiDependencies.invoker.services.model_manager.store.replace_model(config.key, result.config)CODE
CRITICALinvokeai/app/api/routers/model_manager.py446 dropped = ApiDependencies.invoker.services.model_manager.load.ram_cache.drop_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py1105 ApiDependencies.invoker.services.model_manager.install.prune_jobs()CODE
CRITICALinvokeai/app/api/routers/model_manager.py1262 installed_models = ApiDependencies.invoker.services.model_manager.store.search_by_attr()CODE
CRITICALinvokeai/app/api/routers/model_manager.py1309 ApiDependencies.invoker.services.model_manager.load.ram_cache.make_room(1000 * 2**30)CODE
CRITICALinvokeai/app/api/routers/model_manager.py957 jobs: List[ModelInstallJob] = ApiDependencies.invoker.services.model_manager.install.list_jobs()STRING
CRITICALinvokeai/app/api/routers/model_manager.py977 result: ModelInstallJob = ApiDependencies.invoker.services.model_manager.install.get_job_by_id(id)STRING
CRITICALinvokeai/app/api/routers/recall_parameters.py146 models = ApiDependencies.invoker.services.model_manager.store.search_by_attr(CODE
CRITICALinvokeai/app/services/shared/invocation_context.py220 graph_ = self._data.queue_item.session.graph.model_dump_json()CODE
CRITICAL…onents/RasterLayer/RasterLayerMenuItemsAdjustments.tsx16 s.canvas.present.rasterLayers.entities.find((e: CanvasRasterLayerState) => e.id === entityIdentifier.id)CODE
CRITICAL…ures/controlLayers/konva/CanvasEntityRendererModule.ts126 this.manager.background.konva.layer.zIndex(zIndex++);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts976 this.manager.stage.konva.stage.on('pointerdown', this.onStagePointerDown);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts977 this.manager.stage.konva.stage.on('pointermove', this.onStagePointerMove);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts978 this.manager.stage.konva.stage.on('pointerup', this.onStagePointerUp);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts981 this.manager.stage.konva.stage.on('pointermove', this.onBboxDragMove);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts982 this.manager.stage.konva.stage.on('pointerup', this.onBboxDragEnd);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts985 this.manager.stage.konva.stage.off('pointerdown', this.onStagePointerDown);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts986 this.manager.stage.konva.stage.off('pointermove', this.onStagePointerMove);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts987 this.manager.stage.konva.stage.off('pointerup', this.onStagePointerUp);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts988 this.manager.stage.konva.stage.off('pointermove', this.onBboxDragMove);CODE
CRITICAL…res/controlLayers/konva/CanvasSegmentAnythingModule.ts989 this.manager.stage.konva.stage.off('pointerup', this.onBboxDragEnd);CODE
CRITICAL…Layers/konva/CanvasTool/CanvasColorPickerToolModule.ts448 this.manager.background.konva.layer.visible(false);CODE
CRITICAL…Layers/konva/CanvasTool/CanvasColorPickerToolModule.ts450 this.manager.background.konva.layer.visible(true);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityAdapterBase.ts404 this.renderer.konva.compositing.group.zIndex(zIndex++);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts583 this.parent.renderer.konva.objectGroup.setAttrs({CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts627 this.parent.renderer.konva.objectGroup.setAttrs({CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts951 this.parent.renderer.konva.objectGroup.setAttrs(attrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts952 this.parent.bufferRenderer.konva.group.setAttrs(attrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts972 this.parent.renderer.konva.objectGroup.setAttrs(groupAttrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts973 this.parent.bufferRenderer.konva.group.setAttrs(groupAttrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts1033 this.parent.renderer.konva.objectGroup.setAttrs(groupAttrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts1034 this.parent.bufferRenderer.konva.group.setAttrs(groupAttrs);CODE
CRITICAL…olLayers/konva/CanvasEntity/CanvasEntityTransformer.ts1066 const rect = this.parent.renderer.konva.objectGroup.getClientRect({ skipTransform: true });CODE
CRITICAL…konva/CanvasEntity/CanvasEntityBufferObjectRenderer.ts92 this.manager.tool.tools.rect.hasSuspendableSession()CODE
CRITICAL…ayers/konva/CanvasEntity/CanvasEntityObjectRenderer.ts335 this.parent.bufferRenderer.konva.group.opacity(opacity);CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts504 this.konva.crop.interaction.rect.setAttrs({ ...this.cropBox });CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts518 this.konva.crop.interaction.guides.left.points([x + verticalThird, y, x + verticalThird, y + height]);CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts519 this.konva.crop.interaction.guides.right.points([x + verticalThird * 2, y, x + verticalThird * 2, y + height]);CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts522 this.konva.crop.interaction.guides.top.points([x, y + horizontalThird, x + width, y + horizontalThird]);CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts523 this.konva.crop.interaction.guides.bottom.points([x, y + horizontalThird * 2, x + width, y + horizontalThird * 2]);CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts638 this.konva.crop.overlay.full.setAttrs({CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts644 this.konva.crop.overlay.clear.setAttrs({ ...this.cropBox });CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts1029 if (this.konva.crop.interaction.rect.isDragging()) {CODE
CRITICAL…vokeai/frontend/web/src/features/cropper/lib/editor.ts1030 this.konva.crop.interaction.rect.stopDrag();CODE
CRITICALinvokeai/backend/onnx/onnx_runtime.py38 self.model.proto.graph.initializer.insert(self.indexes[key], new_node)CODE
CRITICALtests/app/routers/test_utilities.py56 mock_invoker.services.model_manager.store.get_model.assert_not_called()CODE
CRITICALtests/app/routers/test_utilities.py133 mock_invoker.services.model_manager.store.get_model.assert_not_called()CODE
CRITICALtests/app/routers/test_utilities.py153 mock_invoker.services.model_manager.store.get_model.assert_called_once()CODE
Decorative Section Separators122 hits · 446 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/app/util/user_management.py24# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py162# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py164# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py286# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py288# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py392# ---------------------------------------------------------------------------STRING
MEDIUMinvokeai/app/util/user_management.py394# ---------------------------------------------------------------------------STRING
MEDIUMinvokeai/app/api/routers/auth.py275# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py277# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py320# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py322# ---------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py989 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py991 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1360 # ------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1362 # ------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1433 # ------------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1435 # ------------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py811 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py813 # --------------------------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/flux/controlnet/state_dict_utils.py188 # ----------------COMMENT
MEDIUM…ai/backend/flux/controlnet/instantx_controlnet_flux.py51 # -------------------------------------------------------------COMMENT
MEDIUM…ai/backend/flux/controlnet/instantx_controlnet_flux.py91 # -----------------------------------------------------------COMMENT
MEDIUM…ckend/patches/lora_conversions/anima_lora_constants.py12# ---------------------------------------------------------------------------COMMENT
MEDIUM…ckend/patches/lora_conversions/anima_lora_constants.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py30# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py34# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py197# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py201# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py769# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py773# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py974# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py978# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py57# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py59# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py121# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py123# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py219# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py221# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py347# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py349# ----------------------------------------------------------------------------COMMENT
MEDIUM…/backend/model_manager/load/model_cache/model_cache.py669 # ------------------COMMENT
MEDIUM…/backend/model_manager/load/model_cache/model_cache.py677 # ------------------COMMENT
MEDIUM…/backend/model_manager/load/model_cache/model_cache.py689 # ------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py171# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py173# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py186# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py188# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py280# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py282# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py514# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py516# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py633# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_workflows_multiuser.py635# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py106# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py108# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py147# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py149# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py213# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/app/routers/test_boards_multiuser.py215# ---------------------------------------------------------------------------COMMENT
62 more matches not shown…
Unused Imports435 hits · 344 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/util/dynamicprompts.py1CODE
LOWinvokeai/app/util/startup_utils.py66CODE
LOWinvokeai/app/invocations/external_image_generation.py24CODE
LOWinvokeai/app/invocations/baseinvocation.py3CODE
LOWinvokeai/app/invocations/baseinvocation.py50CODE
LOWinvokeai/app/invocations/model.py15CODE
LOWinvokeai/app/services/invocation_services.py2CODE
LOWinvokeai/app/services/invocation_services.py6CODE
LOWinvokeai/app/services/invocation_services.py7CODE
LOWinvokeai/app/services/invocation_services.py8CODE
LOWinvokeai/app/services/invocation_services.py11CODE
LOWinvokeai/app/services/invocation_services.py13CODE
LOWinvokeai/app/services/invocation_services.py15CODE
LOWinvokeai/app/services/invocation_services.py16CODE
LOWinvokeai/app/services/invocation_services.py17CODE
LOWinvokeai/app/services/invocation_services.py18CODE
LOWinvokeai/app/services/invocation_services.py19CODE
LOWinvokeai/app/services/invocation_services.py20CODE
LOWinvokeai/app/services/invocation_services.py21CODE
LOWinvokeai/app/services/invocation_services.py22CODE
LOWinvokeai/app/services/invocation_services.py23CODE
LOWinvokeai/app/services/invocation_services.py24CODE
LOWinvokeai/app/services/invocation_services.py25CODE
LOWinvokeai/app/services/invocation_services.py26CODE
LOWinvokeai/app/services/invocation_services.py27CODE
LOWinvokeai/app/services/invocation_services.py28CODE
LOWinvokeai/app/services/invocation_services.py29CODE
LOWinvokeai/app/services/invocation_services.py30CODE
LOWinvokeai/app/services/invocation_services.py31CODE
LOWinvokeai/app/services/invocation_services.py32CODE
LOWinvokeai/app/services/invocation_services.py33CODE
LOWinvokeai/app/services/invocation_services.py36CODE
LOWinvokeai/app/services/invocation_services.py37CODE
LOWinvokeai/app/services/invocation_services.py38CODE
LOWinvokeai/app/services/invocation_services.py39CODE
LOWinvokeai/app/services/invocation_services.py40CODE
LOWinvokeai/app/services/invocation_services.py41CODE
LOWinvokeai/app/services/invocation_services.py42CODE
LOWinvokeai/app/services/invocation_services.py43CODE
LOWinvokeai/app/services/invocation_services.py44CODE
LOWinvokeai/app/services/app_settings/__init__.py3CODE
LOWinvokeai/app/services/config/config_common.py11CODE
LOWinvokeai/app/services/config/config_default.py4CODE
LOWinvokeai/app/services/config/__init__.py3CODE
LOWinvokeai/app/services/config/__init__.py4CODE
LOWinvokeai/app/services/config/__init__.py4CODE
LOW…okeai/app/services/model_install/model_install_base.py17CODE
LOWinvokeai/app/services/model_install/__init__.py3CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py4CODE
LOWinvokeai/app/services/model_install/__init__.py13CODE
LOW…ai/app/services/model_install/model_install_default.py78CODE
LOWinvokeai/app/services/image_moves/__init__.py1CODE
LOW…pp/services/session_processor/workflow_call_runtime.py1CODE
LOW…/app/services/session_processor/workflow_call_batch.py1CODE
375 more matches not shown…
Excessive Try-Catch Wrapping275 hits · 288 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py123 except Exception:CODE
LOWinvokeai/app/util/ti_utils.py45 except Exception:CODE
MEDIUMinvokeai/app/util/user_management.py42 print("Error: Email is required")CODE
MEDIUMinvokeai/app/util/user_management.py52 print("Error: Passwords do not match. Please try again.\n")CODE
MEDIUMinvokeai/app/util/user_management.py57 print(f"Error: {error_msg}\n")CODE
MEDIUMinvokeai/app/util/user_management.py178 print("Error: Email is required")CODE
MEDIUMinvokeai/app/util/user_management.py327 print(f"Error listing users: {e}")CODE
MEDIUMinvokeai/app/util/user_management.py410 print("Error: Email is required")CODE
MEDIUMinvokeai/app/util/user_management.py448 print("Error: Passwords do not match. Please try again.\n")CODE
MEDIUMinvokeai/app/util/user_management.py453 print(f"Error: {error_msg}\n")CODE
LOWinvokeai/app/util/user_management.py84 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py125 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py210 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py255 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py326 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py360 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py484 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py540 except Exception as e:CODE
LOWinvokeai/app/invocations/anima_denoise.py880 except Exception as e:CODE
LOWinvokeai/app/invocations/baseinvocation.py619 except Exception as e:CODE
LOWinvokeai/app/invocations/baseinvocation.py761 except Exception:CODE
LOWinvokeai/app/invocations/load_custom_nodes.py72 except Exception:CODE
LOWinvokeai/app/invocations/qwen_image_text_encoder.py180 except Exception:CODE
LOWinvokeai/app/api/sockets.py166 except Exception:CODE
LOWinvokeai/app/api/sockets.py214 except Exception:CODE
LOWinvokeai/app/api/sockets.py488 except Exception as e:CODE
LOWinvokeai/app/api/extract_metadata_from_image.py67 except Exception as e:CODE
LOWinvokeai/app/api/extract_metadata_from_image.py90 except Exception:CODE
LOWinvokeai/app/api/extract_metadata_from_image.py128 except Exception as e:CODE
LOWinvokeai/app/api/dependencies.py84 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py243 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py313 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py444 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py460 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py481 except Exception:CODE
LOWinvokeai/app/api/routers/custom_nodes.py498 except Exception:CODE
LOWinvokeai/app/api/routers/style_presets.py132 except Exception:CODE
LOWinvokeai/app/api/routers/style_presets.py221 except Exception:CODE
LOWinvokeai/app/api/routers/style_presets.py287 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py24 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py83 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py119 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py165 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py173 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py214 except Exception:CODE
LOWinvokeai/app/api/routers/board_images.py222 except Exception:CODE
MEDIUMinvokeai/app/api/routers/model_manager.py1320def get_status(cls) -> HFTokenStatus:CODE
LOWinvokeai/app/api/routers/model_manager.py374 except Exception as e:CODE
LOWinvokeai/app/api/routers/model_manager.py509 except Exception:CODE
LOWinvokeai/app/api/routers/model_manager.py536 except Exception:CODE
LOWinvokeai/app/api/routers/model_manager.py641 except Exception as e:CODE
LOWinvokeai/app/api/routers/model_manager.py702 except Exception as e:CODE
LOWinvokeai/app/api/routers/model_manager.py1182 except Exception as e:CODE
LOWinvokeai/app/api/routers/model_manager.py1327 except Exception:CODE
LOWinvokeai/app/api/routers/model_manager.py925 except Exception as e:STRING
LOWinvokeai/app/api/routers/client_state.py24 except Exception as e:CODE
LOWinvokeai/app/api/routers/client_state.py43 except Exception as e:CODE
LOWinvokeai/app/api/routers/client_state.py63 except Exception as e:CODE
LOWinvokeai/app/api/routers/client_state.py81 except Exception as e:CODE
LOWinvokeai/app/api/routers/client_state.py98 except Exception as e:CODE
215 more matches not shown…
Cross-File Repetition48 hits · 240 pts
SeverityFileLineSnippetContext
HIGHinvokeai/app/invocations/anima_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.STRING
HIGHinvokeai/app/invocations/z_image_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.STRING
HIGHinvokeai/app/invocations/flux2_klein_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.STRING
HIGHinvokeai/app/invocations/z_image_denoise.py0iterate over lora models to apply to the transformer.STRING
HIGHinvokeai/app/invocations/anima_denoise.py0iterate over lora models to apply to the transformer.STRING
HIGHinvokeai/app/invocations/qwen_image_denoise.py0iterate over lora models to apply to the transformer.STRING
HIGH…okeai/app/services/model_install/model_install_base.py0pause the indicated job, preserving partial downloads.STRING
HIGH…ai/app/services/model_install/model_install_default.py0pause the indicated job, preserving partial downloads.STRING
HIGHinvokeai/app/services/download/download_default.py0pause the indicated job, preserving partial downloads.STRING
HIGHinvokeai/app/services/model_images/model_images_base.py0low-level service responsible for storing and retrieving image files.STRING
HIGH…rvices/style_preset_images/style_preset_images_base.py0low-level service responsible for storing and retrieving image files.STRING
HIGHinvokeai/app/services/image_files/image_files_base.py0low-level service responsible for storing and retrieving image files.STRING
HIGH…keai/app/services/model_images/model_images_default.py0checks if the required output folders exist and create them if they don'tSTRING
HIGH…rvices/workflow_thumbnails/workflow_thumbnails_disk.py0checks if the required output folders exist and create them if they don'tSTRING
HIGH…rvices/style_preset_images/style_preset_images_disk.py0checks if the required output folders exist and create them if they don'tSTRING
HIGHinvokeai/app/services/image_files/image_files_disk.py0checks if the required output folders exist and create them if they don'tSTRING
HIGH…eai/app/services/session_queue/session_queue_sqlite.py0--sql insert into session_queue (queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, destSTRING
HIGH…p/services/session_queue/test_session_queue_dequeue.py0--sql insert into session_queue (queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, destSTRING
HIGH…app/services/session_queue/test_session_queue_clear.py0--sql insert into session_queue (queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, destSTRING
HIGH…eai/app/services/session_queue/session_queue_sqlite.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGHtests/app/routers/test_session_queue_workflow_call.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…ion_queue/test_session_queue_workflow_call_metadata.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGHinvokeai/backend/image_util/lineart.py0get the url to download the model from the hugging face hub.STRING
HIGHinvokeai/backend/image_util/lineart_anime.py0get the url to download the model from the hugging face hub.STRING
HIGHinvokeai/backend/image_util/hed.py0get the url to download the model from the hugging face hub.STRING
HIGHinvokeai/backend/image_util/pidi/__init__.py0get the url to download the model from the hugging face hub.STRING
HIGHinvokeai/backend/image_util/normal_bae/__init__.py0get the url to download the model from the hugging face hub.STRING
HIGHinvokeai/backend/image_util/mlsd/__init__.py0get the url to download the model from the hugging face hub.STRING
HIGH…d/quantization/scripts/load_flux_model_bnb_llm_int8.py0a script for quantizing a t5 text encoder model using the bitsandbytes llm.int8() quantization method. this script is prSTRING
HIGH…ackend/quantization/scripts/load_flux_model_bnb_nf4.py0a script for quantizing a t5 text encoder model using the bitsandbytes llm.int8() quantization method. this script is prSTRING
HIGH…d/quantization/scripts/quantize_t5_xxl_bnb_llm_int8.py0a script for quantizing a t5 text encoder model using the bitsandbytes llm.int8() quantization method. this script is prSTRING
HIGHinvokeai/backend/model_manager/configs/t2i_adapter.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHinvokeai/backend/model_manager/configs/controlnet.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHinvokeai/backend/model_manager/configs/ip_adapter.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHinvokeai/backend/model_manager/configs/lora.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHinvokeai/backend/model_manager/configs/main.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHinvokeai/backend/model_manager/configs/vae.py0raise `notamatch` if the model base does not match this config class.STRING
HIGHtests/app/routers/test_auth.py0enable multiuser mode for auth tests. auth tests need multiuser mode enabled since the login/setup endpoints return 403 STRING
HIGHtests/app/services/auth/test_security.py0enable multiuser mode for auth tests. auth tests need multiuser mode enabled since the login/setup endpoints return 403 STRING
HIGHtests/app/services/auth/test_data_isolation.py0enable multiuser mode for auth tests. auth tests need multiuser mode enabled since the login/setup endpoints return 403 STRING
HIGHtests/app/routers/test_multiuser_authorization.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…es/session_queue/test_session_queue_status_sequence.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…ion_queue/test_session_queue_status_event_isolation.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…ession_queue/test_session_queue_status_user_scoping.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…ion_queue/test_session_queue_workflow_call_metadata.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…conversions/test_flux_control_lora_conversion_utils.py0test that is_state_dict_likely_in_flux_onetrainer_format() returns false for a state dict that is in the diffusers flux STRING
HIGH…a_conversions/test_flux_kohya_lora_conversion_utils.py0test that is_state_dict_likely_in_flux_onetrainer_format() returns false for a state dict that is in the diffusers flux STRING
HIGH…versions/test_flux_onetrainer_lora_conversion_utils.py0test that is_state_dict_likely_in_flux_onetrainer_format() returns false for a state dict that is in the diffusers flux STRING
Self-Referential Comments72 hits · 211 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/app/api_app.py74# Create the appCOMMENT
MEDIUMinvokeai/app/util/profiler.py13 # Create a profilerSTRING
MEDIUMinvokeai/app/invocations/facetools.py197 # Create a FaceMesh object for face landmark detection and mesh generation.COMMENT
MEDIUMinvokeai/app/invocations/facetools.py597 # Create an RGBA image with transparencyCOMMENT
MEDIUMinvokeai/app/invocations/facetools.py678 # Create an RGBA image with transparencyCOMMENT
MEDIUMinvokeai/app/invocations/create_gradient_mask.py102 # Create a circular distance kernel that fades from center outwardCOMMENT
MEDIUMinvokeai/app/invocations/create_gradient_mask.py112 # Create a Gaussian kernelCOMMENT
MEDIUM…p/invocations/tiled_multi_diffusion_denoise_latents.py42 # Create a shallow copy of the control_data object.COMMENT
MEDIUMinvokeai/app/invocations/image.py215 # Create a temporary image to paste the image with transparencyCOMMENT
MEDIUMinvokeai/app/invocations/image.py1271 # Create a mask based on the threshold and the distance calculated aboveCOMMENT
MEDIUMinvokeai/app/invocations/image.py1357 # Create a mask for the black region (1 where black, 0 otherwise)COMMENT
MEDIUMinvokeai/app/invocations/image.py1363 # Create a distance transform of the inverted maskCOMMENT
MEDIUMinvokeai/app/invocations/image.py1512 # Create a noisy version of the input imageCOMMENT
MEDIUMinvokeai/app/services/config/config_default.py637 # Create the example config file, with some extra example values providedCOMMENT
MEDIUM…vices/shared/sqlite_migrator/sqlite_migrator_common.py54 # Define the migration callback classSTRING
MEDIUM…vices/shared/sqlite_migrator/sqlite_migrator_common.py74 # Define the migration builder function. This function creates an instance of the migration callbackCOMMENT
MEDIUM…ices/board_image_records/board_image_records_sqlite.py110 # Create the correct length of placeholdersSTRING
MEDIUM…ices/board_image_records/board_image_records_sqlite.py158 # Create the correct length of placeholdersSTRING
MEDIUM…ices/board_image_records/board_image_records_sqlite.py177 # Create the correct length of placeholdersSTRING
MEDIUM…eai/app/services/image_records/image_records_sqlite.py183 # Create the correct length of placeholdersSTRING
MEDIUMinvokeai/backend/llava_onevision_pipeline.py21 # Define a chat history and use `apply_chat_template` to get correctly formatted prompt.COMMENT
MEDIUMinvokeai/backend/image_util/controlnet_processor.py133 # Create a minimal context to run the invocationCOMMENT
MEDIUMinvokeai/backend/image_util/imwatermark/vendor.py1# This file is vendored from https://github.com/ShieldMnt/invisible-watermarkCOMMENT
MEDIUMinvokeai/backend/image_util/infill_methods/tile.py108 # Create the pool of tiles that we will use to infillCOMMENT
MEDIUMinvokeai/backend/image_util/infill_methods/tile.py111 # Create an image from the tiles, same size as the originalCOMMENT
MEDIUM…backend/image_util/segment_anything/mask_refinement.py1# This file contains utilities for Grounded-SAM mask refinement based on:COMMENT
MEDIUM…backend/image_util/segment_anything/mask_refinement.py41 # Create an empty mask.COMMENT
MEDIUMinvokeai/backend/flux/custom_block_processor.py24 """This function is a direct copy of DoubleStreamBlock.forward(), but it returns some of the intermediateSTRING
MEDIUMinvokeai/backend/flux/custom_block_processor.py109 """This function is a direct copy of SingleStreamBlock.forward()."""STRING
MEDIUM…nd/flux/ip_adapter/ip_double_stream_block_processor.py1# This file is based on:COMMENT
MEDIUM…s/lora_conversions/flux_xlabs_lora_conversion_utils.py77 # Create the InvokeAI-style layer keyCOMMENT
MEDIUMinvokeai/backend/quantization/bnb_llm_int8.py6# This file contains utils for working with models that use bitsandbytes LLM.int8() quantization.COMMENT
MEDIUMinvokeai/backend/quantization/bnb_nf4.py4# This file contains utils for working with models that use bitsandbytes NF4 quantization.COMMENT
MEDIUMinvokeai/backend/quantization/bnb_nf4.py29 """This method is based on the logic in the bitsandbytes serialization unit tests for `Linear4bit`:STRING
MEDIUM…end/stable_diffusion/diffusion/regional_prompt_data.py92 # Create an empty attention mask with the correct shape.COMMENT
MEDIUM…table_diffusion/diffusion/shared_invokeai_diffusion.py327 # Create a dummy mask and range for text conditioning that doesn't have region masks.COMMENT
MEDIUM…keai/backend/model_manager/load/model_loaders/anima.py103 # Create an empty AnimaTransformer with Anima's default architecture parametersCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py232 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py353 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py502 # Create an empty control adapterCOMMENT
MEDIUMtests/dangerously_run_function_in_subprocess.py30 # Create a script that calls the functionCOMMENT
MEDIUMtests/legacy_tests.sh3# This file contains bunch of compatibility tests that ensuresCOMMENT
MEDIUMtests/app/test_extract_metadata_from_image.py32 # Create a mock image with valid metadataCOMMENT
MEDIUMtests/app/routers/test_auth.py80 # Create a test userCOMMENT
MEDIUMtests/app/routers/test_session_queue_sanitization.py15# Define a minimal test invocation for the testCOMMENT
MEDIUMtests/app/routers/test_client_state_multiuser.py79 # Create a regular userCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py451 # Create a shared board and add the image to itCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py652 # Create a board owned by user1 and add the image to itCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py1731 # Create a token for a user_id that was never created in the user serviceCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py1710 # Create the user in the database so the active-user check passesCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py1750 # Create a real user, then deactivate themCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py2256 # Create a fake installed pack directoryCOMMENT
MEDIUMtests/app/routers/test_custom_nodes.py347 # Create a mock invocation classCOMMENT
MEDIUMtests/app/util/test_step_callback.py18 # Create a small 1x16x4x4 latent tensor (batch=1, channels=16, 4x4 spatial)COMMENT
MEDIUMtests/app/api/test_sliding_window_token.py98 # Create a remember-me token with only 1 hour remaining (less than 24h)COMMENT
MEDIUMtests/app/services/auth/test_security.py252 # Create a regular userCOMMENT
MEDIUMtests/app/services/auth/test_security.py82 # Create a legitimate user firstCOMMENT
MEDIUMtests/app/services/auth/test_security.py115 # Create a legitimate userCOMMENT
MEDIUMtests/app/services/auth/test_security.py142 # Create a test userCOMMENT
MEDIUMtests/app/services/auth/test_security.py191 # Create a regular user and loginCOMMENT
12 more matches not shown…
Deep Nesting168 hits · 155 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py94CODE
LOWinvokeai/app/util/dynamicprompts.py17CODE
LOWinvokeai/app/util/step_callback.py230CODE
LOWinvokeai/app/util/user_management.py397CODE
LOWinvokeai/app/invocations/metadata_linked.py916CODE
LOWinvokeai/app/invocations/metadata_linked.py993CODE
LOWinvokeai/app/invocations/compel.py460CODE
LOWinvokeai/app/invocations/z_image_denoise.py275CODE
LOWinvokeai/app/invocations/z_image_latents_to_image.py45CODE
LOWinvokeai/app/invocations/anima_denoise.py512CODE
LOWinvokeai/app/invocations/flux2_denoise.py147CODE
LOWinvokeai/app/invocations/anima_latents_to_image.py92CODE
LOWinvokeai/app/invocations/composition-nodes.py85CODE
LOWinvokeai/app/invocations/composition-nodes.py449CODE
LOWinvokeai/app/invocations/composition-nodes.py679CODE
LOWinvokeai/app/invocations/composition-nodes.py1312CODE
LOWinvokeai/app/invocations/composition-nodes.py1422CODE
LOWinvokeai/app/invocations/composition-nodes.py1475CODE
LOWinvokeai/app/invocations/composition-nodes.py1507CODE
LOWinvokeai/app/invocations/baseinvocation.py488CODE
LOWinvokeai/app/invocations/baseinvocation.py210CODE
LOWinvokeai/app/invocations/ip_adapter.py123CODE
LOWinvokeai/app/invocations/flux_denoise.py707CODE
LOWinvokeai/app/invocations/anima_image_to_latents.py59CODE
LOWinvokeai/app/invocations/facetools.py356CODE
LOWinvokeai/app/invocations/spandrel_image_to_image.py200CODE
LOWinvokeai/app/invocations/math.py199CODE
LOWinvokeai/app/invocations/math.py273CODE
LOWinvokeai/app/invocations/create_gradient_mask.py80CODE
LOWinvokeai/app/invocations/strings.py31CODE
LOWinvokeai/app/invocations/z_image_image_to_latents.py44CODE
LOWinvokeai/app/api/sockets.py128CODE
LOWinvokeai/app/api/sockets.py292CODE
LOWinvokeai/app/api/routers/board_images.py186CODE
LOWinvokeai/app/api/routers/model_manager.py1212CODE
LOWinvokeai/app/api/routers/model_manager.py1261CODE
LOWinvokeai/app/api/routers/recall_parameters.py213CODE
LOWinvokeai/app/api/routers/recall_parameters.py269CODE
LOWinvokeai/app/api/routers/recall_parameters.py348CODE
LOWinvokeai/app/api/routers/session_queue.py179CODE
LOWinvokeai/app/api/routers/session_queue.py328CODE
LOWinvokeai/app/services/config/config_default.py434CODE
LOW…ai/app/services/model_install/model_install_default.py203CODE
LOW…ai/app/services/model_install/model_install_default.py421CODE
LOW…ai/app/services/model_install/model_install_default.py470CODE
LOW…ai/app/services/model_install/model_install_default.py614CODE
LOW…ai/app/services/model_install/model_install_default.py782CODE
LOW…ai/app/services/model_install/model_install_default.py852CODE
LOW…ai/app/services/model_install/model_install_default.py1207CODE
LOW…ai/app/services/model_install/model_install_default.py1279CODE
LOW…ai/app/services/model_install/model_install_default.py1378CODE
LOW…ai/app/services/model_install/model_install_default.py1412CODE
LOW…vokeai/app/services/image_moves/image_moves_default.py465CODE
LOW…pp/services/session_processor/workflow_call_runtime.py273CODE
LOW…ervices/session_processor/session_processor_default.py437CODE
LOW…/app/services/session_processor/workflow_call_batch.py456CODE
LOWinvokeai/app/services/shared/graph.py1028CODE
LOWinvokeai/app/services/shared/graph.py795CODE
LOW…eai/app/services/shared/workflow_call_compatibility.py147CODE
LOWinvokeai/app/services/shared/workflow_graph_builder.py52CODE
108 more matches not shown…
Docstring Block Structure25 hits · 125 pts
SeverityFileLineSnippetContext
HIGHinvokeai/app/util/controlnet_utils.py378Pre-process images for ControlNets or T2I-Adapters. Args: image (Image): The PIL image to pre-process. STRING
HIGHinvokeai/app/invocations/metadata_linked.py137Combines any number of items or lists into a single list, ensuring consistency in type. Args: item_cls:STRING
HIGHinvokeai/app/api/auth_dependencies.py21Get current authenticated user from Bearer token. Note: This function accesses ApiDependencies.invoker.services.useSTRING
HIGHinvokeai/app/api/auth_dependencies.py70Get current authenticated user from Bearer token, or return a default system user if not authenticated. This dependSTRING
HIGHinvokeai/app/api/auth_dependencies.py122Require admin role for the current user. Args: current_user: The current authenticated user's token data STRING
HIGHinvokeai/app/api/auth_dependencies.py141Require admin role for the current user, or return default system admin in single-user mode. This dependency is useSTRING
HIGHinvokeai/app/api/routers/auth.py124Authenticate user and return access token. Args: request: Login credentials (email and password) ReturSTRING
HIGHinvokeai/app/api/routers/auth.py203Get current authenticated user's information. Args: current_user: The authenticated user's token data STRING
HIGHinvokeai/app/api/routers/auth.py227Set up initial administrator account. This endpoint can only be called once, when no admin user exists. It creates STRING
HIGHinvokeai/app/api/routers/auth.py367Create a new user. Requires admin privileges. Args: request: New user details Returns: The creSTRING
HIGHinvokeai/app/api/routers/auth.py397Get a user by ID. Requires admin privileges. Args: user_id: The user ID Returns: The user STRING
HIGHinvokeai/app/api/routers/auth.py421Update a user. Requires admin privileges. Args: user_id: The user ID request: Fields to update STRING
HIGHinvokeai/app/api/routers/auth.py488Update the current user's own profile. To change the password, both ``current_password`` and ``new_password`` must STRING
HIGHinvokeai/app/api/routers/recall_parameters.py419 Update recallable parameters that can be recalled on the frontend. This endpoint allows updating parameters suSTRING
HIGHinvokeai/app/services/users/users_common.py10Validate email address, allowing special-use domains like .local for testing. This validator first tries standard eSTRING
HIGHinvokeai/app/services/users/users_base.py13Create a new user. Args: user_data: User creation data strict_password_checking: If TruSTRING
HIGHinvokeai/app/services/users/users_base.py54Update user. Args: user_id: The user ID changes: Fields to update strict_paSTRING
HIGHinvokeai/app/services/users/users_base.py106Create an admin user (for initial setup). Args: user_data: User creation data strict_paSTRING
HIGH…es/style_preset_records/style_preset_records_common.py91Parses style presets from a file. The file must be a CSV or JSON file. If CSV, the file must have the following colSTRING
HIGHinvokeai/backend/image_util/util.py164 Apply non-maximum suppression to an image. If both threshold and sigma are provided, the image will blurred beSTRING
HIGH…ules/efficientnet_repo/geffnet/efficientnet_builder.py464 Decode block definition string Gets a list of block arg (dicts) through a string notation of arguments. E.g. iSTRING
HIGH…patches/lora_conversions/sdxl_lora_conversion_utils.py8Convert the keys of an SDXL LoRA state_dict to diffusers format. The input state_dict can be in either Stability AISTRING
HIGH…/backend/model_manager/configs/identification_utils.py24Load the diffusers/transformers model config file and return it as a dictionary. The config file is expected to be iSTRING
HIGH…/backend/model_manager/configs/identification_utils.py58Load the diffusers/transformers model config file and return the class name. Args: config_path: The path toSTRING
HIGHinvokeai/backend/model_manager/configs/factory.py483Classify a model on disk and return the best matching model config. Args: mod: The model on disk toSTRING
Redundant / Tautological Comments42 hits · 64 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/invocations/flux2_klein_model_loader.py117 # Check if main model is Diffusers format (can extract VAE directly)COMMENT
LOWinvokeai/app/invocations/flux2_klein_model_loader.py196 # Check if the config has a variant fieldCOMMENT
LOWinvokeai/app/invocations/flux2_denoise.py402 # Check if we're doing inpainting (have a mask or a clipped schedule)COMMENT
LOWinvokeai/app/invocations/facetools.py192 # Check if the input image has four channels (RGBA).COMMENT
LOWinvokeai/app/invocations/facetools.py207 # Check if any face is detected.COMMENT
LOWinvokeai/app/api/sockets.py229 # Check if we have user info for this socket. In multiuser mode _handle_connectCOMMENT
LOWinvokeai/app/api/sockets.py248 # Add socket to the queue roomCOMMENT
LOWinvokeai/app/api/routers/auth.py138 # Check if multiuser is enabledCOMMENT
LOWinvokeai/app/api/routers/auth.py244 # Check if multiuser is enabledCOMMENT
LOWinvokeai/app/api/routers/auth.py253 # Check if any admin existsCOMMENT
LOWinvokeai/app/api/routers/custom_nodes.py414 # Check if this looks like a workflow (must have nodes and edges)COMMENT
LOWinvokeai/app/api/routers/model_manager.py368 # Check if the model is installed by comparing paths, appending to the scan result.COMMENT
LOWinvokeai/app/api/routers/model_manager.py1218 # Check if source matches exactlyCOMMENT
LOWinvokeai/app/api/routers/model_manager.py1221 # Check if name (or previous names), base and type matchCOMMENT
LOWinvokeai/app/services/shared/graph.py1037 # Check if any of the types in the Union is a ListCOMMENT
LOWinvokeai/app/services/users/users_common.py35 # Check if the error is specifically about special-use/reserved domains or localhostCOMMENT
LOWinvokeai/app/services/users/users_default.py34 # Check if email already existsCOMMENT
LOWinvokeai/app/services/users/users_default.py114 # Check if user existsCOMMENT
LOW…pp/services/orphaned_models/orphaned_models_service.py79 # Check if disk_file is under model_dirCOMMENT
LOWinvokeai/backend/image_util/infill_methods/tile.py26 # Check if the image has an alpha channel and the tile is completely opaqueCOMMENT
LOW…ra_conversions/flux_diffusers_lora_conversion_utils.py29 # Check if keys use transformer prefixCOMMENT
LOW…ra_conversions/flux_diffusers_lora_conversion_utils.py38 # Check if keys use base_model.model prefixCOMMENT
LOW…ra_conversions/flux_diffusers_lora_conversion_utils.py105 # Check if any key starts with "base_model.model." prefixCOMMENT
LOW…s/lora_conversions/qwen_image_lora_conversion_utils.py56 # Check if any key matches the Kohya patternCOMMENT
LOW…ora_conversions/flux_bfl_peft_lora_conversion_utils.py442 # Check if any layer keys are in BFL format (contain double_blocks or single_blocks)COMMENT
LOWinvokeai/backend/flux2/denoise.py98 # Check if scheduler supports sigmas parameter using inspect.signatureCOMMENT
LOW…end/z_image/extensions/regional_prompting_extension.py89 # Check if any regional masks existCOMMENT
LOWinvokeai/backend/model_manager/util/select_hf_files.py171 # Check if at least one of the files has the explicit fp16 variant.COMMENT
LOWinvokeai/backend/model_manager/load/load_default.py112 # Check if this is a text encoder submodel of a main model with cpu_only settingCOMMENT
LOWinvokeai/backend/model_manager/load/load_default.py119 # Check if this is a standalone text encoder config with cpu_only field (T5Encoder, Qwen3Encoder, etc.)COMMENT
LOW…/backend/model_manager/load/model_cache/model_cache.py288 # Check if there are any unlocked models that can be clearedCOMMENT
LOW…/backend/model_manager/load/model_cache/model_cache.py441 # Check if the model's specific compute_device is CPU, not just the cache's default execution_deviceCOMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py224 # Check if the state dict is in original format (not diffusers format)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py398 # Check if this is a standalone text_encoder download (no nested text_encoder folder)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py856 # Check if this is llama.cpp format (blk.X.) or PyTorch format (model.layers.X.)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py973 # Check if lm_head.weight is still a meta tensor (wasn't in GGUF state dict)COMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py577 # Check if this is a Klein model without guidance (guidance_embeds=False in config)COMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py642 # Check if keys have ComfyUI-style prefix and strip if neededCOMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py842 # Check if keys have ComfyUI-style prefix and strip if neededCOMMENT
LOWinvokeai/backend/model_manager/configs/factory.py425 # Check if it has config files at root (diffusers/transformers marker)COMMENT
LOWscripts/remove_orphaned_models.py288 # Check if this file is under any registered model directoryCOMMENT
LOWscripts/remove_orphaned_models.py292 # Check if disk_file is under model_dirCOMMENT
Modern Structural Boilerplate61 hits · 60 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/invocations/__init__.py5__all__ = [f.stem for f in python_files] # type: ignoreCODE
LOWinvokeai/app/api/auth_dependencies.py12logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/api/routers/utilities.py27logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/services/app_settings/__init__.py5__all__ = ["AppSettingsService"]CODE
LOWinvokeai/app/services/config/config_default.py263 def update_config(self, config: dict[str, Any] | InvokeAIAppConfig, clobber: bool = True) -> None:CODE
LOWinvokeai/app/services/config/__init__.py6__all__ = ["InvokeAIAppConfig", "get_config", "PagingArgumentParser"]CODE
LOWinvokeai/app/services/auth/token_service.py27def set_jwt_secret(secret: str) -> None:CODE
LOWinvokeai/app/services/model_install/__init__.py15__all__ = [CODE
LOW…eai/app/services/model_install/model_install_common.py206 def set_error(self, e: Exception) -> None:CODE
LOW…ai/app/services/model_install/model_install_default.py975 def _set_error(self, install_job: ModelInstallJob, excp: Exception) -> None:CODE
LOWinvokeai/app/services/image_moves/__init__.py3__all__ = ["ImageMoveService"]CODE
LOW…vokeai/app/services/image_moves/image_moves_default.py98 def set_session_queue(self, session_queue) -> None:CODE
LOW…vokeai/app/services/image_moves/image_moves_default.py682 def _set_job_state(self, job_id: int, state: MoveJobState) -> None:CODE
LOWinvokeai/app/services/shared/graph.py170 def set_state(self, exec_node_id: str, state: PreparedExecState) -> None:CODE
LOWinvokeai/app/services/shared/graph.py177 def set_iteration_path(self, exec_node_id: str, iteration_path: tuple[int, ...]) -> None:CODE
LOWinvokeai/app/services/shared/graph.py2021 def _set_prepared_exec_state(self, exec_node_id: str, state: PreparedExecState) -> None:CODE
LOWinvokeai/app/services/shared/graph.py2039 def set_ready_order(self, order: Iterable[Type[BaseInvocation] | str]) -> None:CODE
LOWinvokeai/app/services/shared/graph.py2271 def set_waiting_workflow_call_child_item_ids(self, child_item_ids: list[int]) -> None:CODE
LOWinvokeai/app/services/shared/graph.py1554 def update_node(self, node_id: str, new_node: BaseInvocation) -> None:CODE
LOWinvokeai/app/services/shared/graph.py2386 def update_node(self, node_id: str, new_node: BaseInvocation) -> None:CODE
LOWinvokeai/app/services/model_records/__init__.py14__all__ = [CODE
LOWinvokeai/app/services/model_load/__init__.py6__all__ = ["ModelLoadServiceBase", "ModelLoadService"]CODE
LOW…eai/app/services/session_queue/session_queue_sqlite.py129 def _set_in_progress_to_canceled(self) -> None:STRING
LOW…app/services/workflow_records/workflow_records_base.py86 def update_opened_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:CODE
LOW…p/services/workflow_records/workflow_records_sqlite.py424 def update_opened_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:STRING
LOWinvokeai/app/services/download/__init__.py12__all__ = [CODE
LOWinvokeai/app/services/model_manager/__init__.py6__all__ = [CODE
LOWinvokeai/app/services/external_generation/__init__.py14__all__ = [CODE
LOW…app/services/external_generation/providers/__init__.py6__all__ = ["AlibabaCloudProvider", "GeminiProvider", "OpenAIProvider", "SeedreamProvider"]CODE
LOWinvokeai/app/services/orphaned_models/__init__.py5__all__ = ["OrphanedModelsService", "OrphanedModelInfo"]CODE
LOWinvokeai/invocation_api/__init__.py146__all__ = [CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py11__all__ = ['get_bn_args_tf', 'resolve_bn_args', 'resolve_se_args', 'resolve_act_layer', 'make_divisible',CODE
LOW…ae/nets/submodules/efficientnet_repo/geffnet/config.py5__all__ = [CODE
LOW…ts/submodules/efficientnet_repo/geffnet/mobilenetv3.py20__all__ = ['mobilenetv3_rw', 'mobilenetv3_large_075', 'mobilenetv3_large_100', 'mobilenetv3_large_minimal_100',CODE
LOW…bmodules/efficientnet_repo/geffnet/gen_efficientnet.py39__all__ = ['GenEfficientNet', 'mnasnet_050', 'mnasnet_075', 'mnasnet_100', 'mnasnet_b1', 'mnasnet_140',CODE
LOW…fficientnet_repo/geffnet/activations/activations_me.py17__all__ = ['swish_me', 'SwishMe', 'mish_me', 'MishMe',CODE
LOW…ficientnet_repo/geffnet/activations/activations_jit.py17__all__ = ['swish_jit', 'SwishJit', 'mish_jit', 'MishJit',CODE
LOWinvokeai/backend/util/__init__.py8__all__ = [CODE
LOWinvokeai/backend/flux/dype/embed.py48 def set_step_state(self, sigma: float, height: int, width: int) -> None:CODE
LOWinvokeai/backend/flux/dype/__init__.py23__all__ = [CODE
LOWinvokeai/backend/anima/anima_transformer.py27logger = logging.getLogger(__name__)CODE
LOWinvokeai/backend/anima/control_net_lllite.py493 def set_cond_image(self, cond: torch.Tensor | None) -> None:CODE
LOWinvokeai/backend/anima/control_net_lllite.py508 def set_multiplier(self, multiplier: float) -> None:CODE
LOWinvokeai/backend/rectified_flow/er_sde_scheduler.py193 def set_begin_index(self, begin_index: int = 0) -> None:CODE
LOWinvokeai/backend/z_image/__init__.py10__all__ = [CODE
LOW…vokeai/backend/z_image/z_image_controlnet_extension.py20logger = logging.getLogger(__name__)CODE
LOWinvokeai/backend/stable_diffusion/__init__.py11__all__ = [CODE
LOW…vokeai/backend/stable_diffusion/schedulers/__init__.py3__all__ = ["SCHEDULER_MAP"]CODE
LOWinvokeai/backend/model_manager/omi/__init__.py7__all__ = ["flux_dev_1_lora", "stable_diffusion_xl_1_lora", "convert_from_omi"]CODE
LOW…/backend/model_manager/util/lora_metadata_extractor.py14logger = logging.getLogger(__name__)CODE
LOWinvokeai/backend/model_manager/load/__init__.py19__all__ = [CODE
LOWinvokeai/backend/model_manager/configs/factory.py137logger = logging.getLogger(__name__)CODE
LOWinvokeai/backend/model_manager/metadata/__init__.py30__all__ = [CODE
LOW…okeai/backend/model_manager/metadata/fetch/__init__.py16__all__ = ["ModelMetadataFetchBase", "HuggingFaceMetadataFetch"]CODE
LOWtests/app/routers/test_multiuser_authorization.py215def _set_board_visibility(client: TestClient, token: str, board_id: str, visibility: str) -> None:CODE
LOWtests/app/invocations/test_denoise_noise_inputs.py490 def set_timesteps(self, num_inference_steps: int, device: str | torch.device, mu: float | None = None) -> None:CODE
LOWtests/app/services/workflow_call_test_utils.py1116 def set_waiting_workflow_call_child_item_ids(self, child_item_ids: list[int]) -> None:CODE
LOWtests/app/services/workflow_call_test_utils.py1133 def set_node_error(self, node_id: str, error: str) -> None:CODE
LOWtests/backend/flux/test_denoise.py37 def update_step_state(self, embedder: object, sigma: float) -> None:CODE
LOWtests/backend/flux/test_denoise.py47 def set_timesteps(self, sigmas: list[float], device: torch.device) -> None:CODE
1 more matches not shown…
AI Structural Patterns61 hits · 58 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py144CODE
LOWinvokeai/app/invocations/fields.py612CODE
LOWinvokeai/app/invocations/fields.py819CODE
LOWinvokeai/app/invocations/facetools.py516CODE
LOWinvokeai/app/invocations/facetools.py620CODE
LOWinvokeai/app/api/routers/images.py442CODE
LOWinvokeai/app/api/routers/workflows.py168CODE
LOWinvokeai/app/services/images/images_default.py37CODE
LOWinvokeai/app/services/images/images_default.py229CODE
LOWinvokeai/app/services/images/images_default.py345CODE
LOWinvokeai/app/services/images/images_base.py46CODE
LOWinvokeai/app/services/images/images_base.py118CODE
LOWinvokeai/app/services/images/images_base.py156CODE
LOWinvokeai/app/services/model_load/model_load_default.py107CODE
LOW…okeai/app/services/image_records/image_records_base.py43CODE
LOW…okeai/app/services/image_records/image_records_base.py113CODE
LOW…eai/app/services/image_records/image_records_sqlite.py141CODE
LOW…eai/app/services/image_records/image_records_sqlite.py414CODE
LOWinvokeai/backend/llava_onevision_pipeline.py35CODE
LOWinvokeai/backend/text_llm_pipeline.py56CODE
LOWinvokeai/backend/image_util/lineart.py98CODE
LOWinvokeai/backend/image_util/lineart.py228CODE
LOWinvokeai/backend/image_util/lineart_anime.py274CODE
LOWinvokeai/backend/image_util/hed.py217CODE
LOWinvokeai/backend/image_util/basicsr/rrdbnet_arch.py125CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py70CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py350CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py126CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py143CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py175CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py219CODE
LOW…keai/backend/image_util/pbr_maps/architecture/block.py292CODE
LOWinvokeai/backend/image_util/normal_bae/nets/baseline.py78CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py100CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py144CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py193CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py257CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py309CODE
LOW…ules/efficientnet_repo/geffnet/efficientnet_builder.py367CODE
LOW…ts/submodules/efficientnet_repo/geffnet/mobilenetv3.py59CODE
LOW…/submodules/efficientnet_repo/geffnet/conv2d_layers.py287CODE
LOW…bmodules/efficientnet_repo/geffnet/gen_efficientnet.py228CODE
LOWinvokeai/backend/util/hotfixes.py108CODE
LOWinvokeai/backend/util/hotfixes.py569CODE
LOWinvokeai/backend/anima/anima_transformer.py565CODE
LOWinvokeai/backend/rectified_flow/er_sde_scheduler.py114CODE
LOWinvokeai/backend/ip_adapter/resampler.py81CODE
LOWinvokeai/backend/z_image/z_image_control_transformer.py136CODE
LOWinvokeai/backend/z_image/z_image_control_adapter.py84CODE
LOW…i/backend/model_manager/load/model_loaders/cogview4.py59CODE
LOW…/model_manager/load/model_loaders/generic_diffusers.py51CODE
LOW…d/model_manager/load/model_loaders/stable_diffusion.py94CODE
LOW…d/model_manager/load/model_loaders/stable_diffusion.py160CODE
LOW…backend/model_manager/load/model_loaders/qwen_image.py249CODE
LOW…ai/backend/model_manager/load/model_loaders/z_image.py167CODE
LOW…okeai/backend/model_manager/load/model_loaders/flux.py520CODE
LOW…okeai/backend/model_manager/load/model_loaders/flux.py597CODE
LOWinvokeai/backend/model_manager/configs/lora.py90CODE
LOW…ion_queue/test_session_queue_workflow_call_metadata.py34CODE
LOW…external_generation/test_external_provider_adapters.py330CODE
1 more matches not shown…
AI Slop Vocabulary26 hits · 54 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/app/invocations/z_image_latents_to_image.py64 # FLUX VAE doesn't support seamless, so only apply for AutoencoderKLCOMMENT
MEDIUMinvokeai/app/invocations/denoise_latents.py896 ### seamlessCOMMENT
MEDIUMinvokeai/app/invocations/denoise_latents.py948 # ext: freeu, seamless, ip adapter, loraCOMMENT
MEDIUMinvokeai/app/invocations/baseinvocation.py550 # 2. ui_type was set in conjunction with any of the new ui_model_[base|type|variant|format] fields, whichCOMMENT
LOWinvokeai/app/invocations/baseinvocation.py718 # You'd be tempted to just add the type field and rebuild the model, like this:COMMENT
MEDIUMinvokeai/app/invocations/model.py558 """Applies the seamless transformation to the Model UNet and VAE."""STRING
LOWinvokeai/app/invocations/qwen_image_denoise.py484 # For txt2img models: just use noisy patchesCOMMENT
LOWinvokeai/app/invocations/image.py1347 # If the fade size is 0, just return the mask as-is.COMMENT
LOWinvokeai/app/services/config/config_default.py627 # If it is False, we should just return a default config and not set the root, log in to HF, etc.COMMENT
LOW…ervices/session_processor/session_processor_default.py151 # to do any handling here, and no error should be set - just pass and the cancellation will be handledCOMMENT
MEDIUM…rc/features/nodes/util/graph/generation/addSeamless.ts26 // Always write seamless metadata to ensure recalling all parameters will reset the seamless settingsCOMMENT
MEDIUM…b/src/features/nodes/util/graph/generation/addLoRAs.ts40 // Use seamless as UNet input if it exists, otherwise use the model loaderCOMMENT
MEDIUM…features/nodes/util/graph/generation/buildSDXLGraph.ts159 // We might get the VAE from the main model, custom VAE, or seamless node.COMMENT
MEDIUM…/features/nodes/util/graph/generation/buildSD1Graph.ts157 // We might get the VAE from the main model, custom VAE, or seamless node.COMMENT
MEDIUM…c/features/nodes/util/graph/generation/addSDXLLoRAs.ts37 // Use seamless as UNet input if it exists, otherwise use the model loaderCOMMENT
MEDIUM…ents/RasterLayer/RasterLayerCurvesAdjustmentsGraph.tsx137 // Exact fractional coordinates for seamless coverage (no gaps as width grows)COMMENT
MEDIUMinvokeai/backend/util/hotfixes.py784# this needed to make work seamless patchSTRING
LOWinvokeai/backend/flux/extensions/kontext_extension.py189 # First image - just set canvas dimensionsCOMMENT
LOWinvokeai/backend/quantization/bnb_llm_int8.py90 # We could simply call the `super()._load_from_state_dict()` method here, but then we wouldn't be able toCOMMENT
LOWinvokeai/backend/quantization/bnb_nf4.py52 # We could simply call the `super()._load_from_state_dict()` method here, but then we wouldn't be able toCOMMENT
LOWinvokeai/backend/model_manager/util/select_hf_files.py55 # if the subfolder is a single file, then bypass the selection and just return itCOMMENT
LOWscripts/build_wheel.sh17 # we can't just call 'deactivate' because this function is not exportedCOMMENT
LOW.github/workflows/python-checks.yml38 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/typegen-checks.yml37 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/openapi-checks.yml37 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/uv-lock-checks.yml35 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
Over-Commented Block43 hits · 42 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/invocations/denoise_latents.py741 timesteps = timesteps[t_start_idx : t_start_idx + t_end_idx]COMMENT
LOWinvokeai/app/invocations/anima_denoise.py641 )COMMENT
LOWinvokeai/app/invocations/flux2_denoise.py361 # - The transformer operates in BN-normalized spaceCOMMENT
LOWinvokeai/app/invocations/flux2_denoise.py401COMMENT
LOWinvokeai/app/invocations/baseinvocation.py541COMMENT
LOWinvokeai/app/invocations/image.py1361 bg_mask = 1 - black_maskCOMMENT
LOWinvokeai/app/api/extract_metadata_from_image.py101 stringified_graph: str | None = NoneCOMMENT
LOW…eai/app/services/session_queue/session_queue_common.py481 for batch_datum in batch_datum_list:COMMENT
LOW…eai/app/services/session_queue/session_queue_common.py501 # {"node_path": "1", "field_name": "a", "value": 1},COMMENT
LOW…eai/app/services/session_queue/session_queue_common.py521 #COMMENT
LOW…eai/app/services/session_queue/session_queue_sqlite.py41from invokeai.app.services.shared.sqlite.sqlite_database import SqliteDatabaseCOMMENT
LOWinvokeai/frontend/web/src/i18.d.ts1// TODO: Disabled for IDE performance issues with our translation JSONCOMMENT
LOW…b/src/app/store/middleware/devtools/actionsDenylist.ts1/**COMMENT
LOW…nd/web/src/app/store/enhancers/reduxRemember/driver.ts21 return url;COMMENT
LOW…nd/web/src/app/store/enhancers/reduxRemember/driver.ts41// whole slice, even if the final, _serialized_ slice value is unchanged.COMMENT
LOW…features/nodes/util/graph/generation/buildFLUXGraph.ts81 if (isFLUXFill) {COMMENT
LOW…i/frontend/web/src/features/dnd/FullscreenDropzone.tsx21import { z } from 'zod';COMMENT
LOW…rc/features/gallery/components/ImageViewer/context.tsx81 }COMMENT
LOW…eb/src/services/events/workflowExecutionCoordinator.ts81 }COMMENT
LOW…frontend/web/src/services/events/setEventListeners.tsx801 });COMMENT
LOWinvokeai/backend/image_util/composition.py81# 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), andCOMMENT
LOWinvokeai/backend/image_util/composition.py101# PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OFCOMMENT
LOWinvokeai/backend/image_util/composition.py121# to be bound by the terms and conditions of this License Agreement.COMMENT
LOW…/submodules/efficientnet_repo/geffnet/conv2d_layers.py261 out = conv2d_same(COMMENT
LOWinvokeai/backend/util/vae_working_memory.py141 w = latent_scale_factor_for_operation * image_tensor.shape[-1]COMMENT
LOWinvokeai/backend/onnx/onnx_runtime.py121 self.nodes = self._access_helper(self.proto.graph.node) # type: ignoreCOMMENT
LOW…ai/backend/flux/controlnet/instantx_controlnet_flux.py21@dataclassCOMMENT
LOW…ackend/flux/extensions/regional_prompting_extension.py61 #COMMENT
LOW…ackend/flux/extensions/regional_prompting_extension.py81 # # 2. txt attends to corresponding regional imgCOMMENT
LOW…ackend/flux/extensions/regional_prompting_extension.py101 # regional_attention_mask[t5_embedding_range.start : t5_embedding_range.end, txt_seq_len:] = fill_valueCOMMENT
LOWinvokeai/backend/patches/layer_patcher.py101 )COMMENT
LOW…s/lora_conversions/flux_kohya_lora_conversion_utils.py21 r"lora_unet_(\w+_blocks)_(\d+)_(img_attn|img_mlp|img_mod|txt_attn|txt_mlp|txt_mod|linear1|linear2|modulation)_?(.*)"COMMENT
LOW…ckend/patches/lora_conversions/anima_lora_constants.py1# Anima LoRA prefix constantsCOMMENT
LOWinvokeai/backend/tiles/utils.py141 # copy ia2 over ia1 while applying the seam maskCOMMENT
LOWinvokeai/backend/z_image/z_image_transformer_patch.py121COMMENT
LOW…i/backend/stable_diffusion/multi_diffusion_pipeline.py61 # full noise. Investigate the history of why this got commented out.COMMENT
LOWinvokeai/backend/stable_diffusion/denoise_context.py101COMMENT
LOWinvokeai/backend/model_manager/load/load_default.py221 # We use our own hook-based path for every nn.Module — including diffusers ModelMixin —COMMENT
LOW…/backend/model_manager/load/model_cache/model_cache.py641 return int(self._max_ram_cache_size_gb * GB)COMMENT
LOWinvokeai/backend/model_manager/configs/spandrel.py41 @classmethodCOMMENT
LOWinvokeai/backend/model_manager/configs/main.py421COMMENT
LOWdocker/docker-entrypoint.sh1#!/bin/bashCOMMENT
LOWscripts/generate_profile_graphs.sh1#!/bin/bashCOMMENT
Verbosity Indicators16 hits · 32 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/invocations/image.py1614 # Step 1: Load all imagesCOMMENT
LOWinvokeai/app/invocations/image.py1620 # Step 2: Determine target resolution for the first imageCOMMENT
LOWinvokeai/app/invocations/image.py1647 # Step 3: Process and resize all images with consistent heightCOMMENT
LOWinvokeai/app/invocations/image.py1671 # Step 4: Concatenate images horizontallyCOMMENT
LOW…a_conversions/flux_onetrainer_lora_conversion_utils.py146 # Step 1: Convert the Kohya-style keys with underscores to classic keys with periods.COMMENT
LOW…a_conversions/flux_onetrainer_lora_conversion_utils.py163 # Step 2: Convert diffusers module names to the BFL module names.COMMENT
LOW…nversions/flux_onetrainer_bfl_lora_conversion_utils.py101 # Step 1: Strip prefix and group by layer name.COMMENT
LOW…nversions/flux_onetrainer_bfl_lora_conversion_utils.py116 # Step 2: Build LoRA layers, merging split QKV and linear1.COMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py80 # Step 1: Rearrange to put spatial dims together for proper patchingCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py84 # Step 2: Split H and W into tokens and patch sizesCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py88 # Step 3: Rearrange to group patches and featuresCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py92 # Step 4: For F > 1, we'd need to handle F similarly, but for F=1 this is simplerCOMMENT
LOWscripts/check_classifiers.py9# Step 1: Get pyproject.toml path from argsCOMMENT
LOWscripts/check_classifiers.py19# Step 1: Download the official Trove classifier listCOMMENT
LOWscripts/check_classifiers.py24# Step 2: Extract classifiers from pyproject.tomlCOMMENT
LOWscripts/check_classifiers.py36# Step 3: Check for invalid classifiersCOMMENT
Structural Annotation Overuse16 hits · 32 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/invocations/image.py1614 # Step 1: Load all imagesCOMMENT
LOWinvokeai/app/invocations/image.py1620 # Step 2: Determine target resolution for the first imageCOMMENT
LOWinvokeai/app/invocations/image.py1647 # Step 3: Process and resize all images with consistent heightCOMMENT
LOWinvokeai/app/invocations/image.py1671 # Step 4: Concatenate images horizontallyCOMMENT
LOW…a_conversions/flux_onetrainer_lora_conversion_utils.py146 # Step 1: Convert the Kohya-style keys with underscores to classic keys with periods.COMMENT
LOW…a_conversions/flux_onetrainer_lora_conversion_utils.py163 # Step 2: Convert diffusers module names to the BFL module names.COMMENT
LOW…nversions/flux_onetrainer_bfl_lora_conversion_utils.py101 # Step 1: Strip prefix and group by layer name.COMMENT
LOW…nversions/flux_onetrainer_bfl_lora_conversion_utils.py116 # Step 2: Build LoRA layers, merging split QKV and linear1.COMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py80 # Step 1: Rearrange to put spatial dims together for proper patchingCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py84 # Step 2: Split H and W into tokens and patch sizesCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py88 # Step 3: Rearrange to group patches and featuresCOMMENT
LOWinvokeai/backend/z_image/z_image_patchify_utils.py92 # Step 4: For F > 1, we'd need to handle F similarly, but for F=1 this is simplerCOMMENT
LOWscripts/check_classifiers.py9# Step 1: Get pyproject.toml path from argsCOMMENT
LOWscripts/check_classifiers.py19# Step 1: Download the official Trove classifier listCOMMENT
LOWscripts/check_classifiers.py24# Step 2: Extract classifiers from pyproject.tomlCOMMENT
LOWscripts/check_classifiers.py36# Step 3: Check for invalid classifiersCOMMENT
Fake / Example Data25 hits · 30 pts
SeverityFileLineSnippetContext
LOWinvokeai/frontend/web/public/locales/ru.json2036 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/web/public/locales/ru.json2080 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/web/public/locales/en.json35 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/web/public/locales/en.json79 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/web/public/locales/es.json901 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/web/public/locales/es.json945 "emailPlaceholder": "user@example.com",CODE
LOWtests/app/routers/test_auth.py63def setup_test_admin(mock_invoker: Invoker, email: str = "admin@example.com", password: str = "AdminPass123") -> str:CODE
LOWtests/app/routers/test_auth.py268 "email": "admin@example.com",CODE
LOWtests/app/routers/test_auth.py277 assert json_response["user"]["email"] == "admin@example.com"CODE
LOWtests/app/routers/test_app_info.py278 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/routers/test_app_info.py300 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/routers/test_app_info.py322 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/api/test_sliding_window_token.py48 email="test@test.com",CODE
LOWtests/app/services/auth/test_security.py62def setup_test_admin(mock_invoker: Invoker, email: str = "admin@example.com", password: str = "AdminPass123") -> str:CODE
LOWtests/app/services/auth/test_data_isolation.py166 email="admin@example.com", display_name="Admin", password="AdminPass123", is_admin=TrueCODE
LOWtests/app/services/auth/test_data_isolation.py172 email="user@example.com", display_name="User", password="TestPass123", is_admin=FalseCODE
LOWtests/app/services/auth/test_data_isolation.py302 email="admin@example.com", display_name="Admin", password="AdminPass123", is_admin=TrueCODE
LOWtests/app/services/auth/test_token_service.py64 email="admin@example.com",CODE
LOWtests/app/services/auth/test_token_service.py273 email="admin@example.com",CODE
LOWtests/app/services/auth/test_token_service.py187 email="user@example.com",CODE
LOWtests/app/services/auth/test_token_service.py198 email="admin@example.com",CODE
LOWtests/app/services/users/test_user_service.py220 email="admin@example.com",CODE
LOWtests/app/services/users/test_user_service.py233 email="admin@example.com",CODE
LOWtests/app/services/users/test_user_service.py241 assert admin.email == "admin@example.com"CODE
LOWtests/app/services/users/test_user_service.py247 email="admin@example.com",CODE
Cross-Language Confusion5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHinvokeai/frontend/install/import_images.py411VALUES ('{filename}', 'internal', 'general', {width}, {height}, null, null, '{metadata}', 0, '{modified_date_string}', 'CODE
HIGH…kend/model_manager/model_metadata/metadata_examples.py4{"_id":"6564b36f4eb2f55240230f48","id":"stabilityai/sdxl-turbo","modelId":"stabilityai/sdxl-turbo","author":"test_authorCODE
HIGH…kend/model_manager/model_metadata/metadata_examples.py9{"_id":"6564b36f4eb2f55240230f48","id":"stabilityai/sdxl-turbo","modelId":"stabilityai/sdxl-turbo","author":"test_authorCODE
HIGH…kend/model_manager/model_metadata/metadata_examples.py20{"id":242807,"modelId":215485,"name":"v1-128dim","createdAt":"2023-11-29T01:21:22.372Z","updatedAt":"2023-12-16T17:46:14CODE
HIGH…kend/model_manager/model_metadata/metadata_examples.py26{"id":215485,"name":"SDXL Turbo-LoRA-Stable Diffusion XL faster than light","description":"<p>v1: 128 dim</p><p>v1-64dimCODE
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…frontend/web/src/features/ui/layouts/navigation-api.ts185 * @return True if the switch was successful, false otherwiseCOMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/backend/image_util/imwatermark/vendor.py258CODE