AI Slop Code RIsk Monitor

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.

7.7 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for invoke-ai/InvokeAI, a TypeScript project with 28,538 GitHub stars. SynthScan examined 1,890,740 lines of code across 6889 source files, recording 12379 pattern matches distributed across 25 syntactic categories. The legacy adjusted pattern signal is 7.7 (Moderate 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.

7.7
Adjusted Signal
7.7
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
28.5K
Stars
TypeScript
Language
1.9M
Lines of Code
6.9K
Files
12.4K
Pattern Hits
2026-10-12
Scan Date
0.05
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 23.5/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 4.7/100 · LOW

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

Agent Over-Engineering Ratio 26.4/100 · MEDIUM

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

PR Review Velocity Impact 33.1/100 · MEDIUM

Which changes need focused human review? 12379 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 101HIGH 231MEDIUM 370LOW 11677

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 12379 distinct pattern matches across 25 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 Identifiers9296 hits · 8883 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py363def _identify_video_upload_user(scope: Scope) -> tuple[bool, str | None]:CODE
LOWinvokeai/app/api_app.py388async def _identify_video_upload_user_async(scope: Scope) -> tuple[bool, str | None]:CODE
LOWinvokeai/app/util/misc.py16def get_datetime_from_iso_timestamp(iso_timestamp: str) -> datetime.datetime:CODE
LOWinvokeai/app/util/torch_cuda_allocator.py51def apply_rocm_windows_allocator_default(logger: logging.Logger) -> None:CODE
LOWinvokeai/app/util/torch_cuda_allocator.py82def configure_torch_cuda_allocator(pytorch_cuda_alloc_conf: str, logger: logging.Logger):CODE
LOWinvokeai/app/util/video_thumbnails.py147def _start_worker_memory_monitor(CODE
LOWinvokeai/app/util/video_thumbnails.py223def _iter_video_frames_unbounded(CODE
LOWinvokeai/app/util/video_thumbnails.py530def thumbnail_frame_candidates(duration: Optional[float], fps: Optional[float]) -> list[int]:CODE
LOWinvokeai/app/util/video_thumbnails.py560def extract_representative_video_frame(CODE
LOWinvokeai/app/util/ti_utils.py11def extract_ti_triggers_from_prompt(prompt: str) -> List[str]:CODE
LOWinvokeai/app/util/rocm_aotriton.py49def resolve_aotriton_experimental(CODE
LOWinvokeai/app/util/rocm_aotriton.py88def apply_rocm_aotriton_setting(CODE
LOWinvokeai/app/util/rocm_integrated_gpu.py106def discrete_device_visibility(flags: list[bool]) -> Optional[str]:CODE
LOWinvokeai/app/util/rocm_integrated_gpu.py122def hide_integrated_gpus_on_rocm_windows(logger: logging.Logger) -> None:CODE
LOWinvokeai/app/util/custom_openapi.py61def remove_unreferenced_internal_execution_schemas(openapi_schema: dict[str, Any]) -> None:CODE
LOWinvokeai/app/util/ssrf.py286 def merge_environment_settings(CODE
LOWinvokeai/app/util/startup_utils.py40def nvidia_driver_cuda_version() -> int | None:CODE
LOWinvokeai/app/util/startup_utils.py55def check_cuda_build_compatibility(logger: logging.Logger) -> None:CODE
LOW⚡invokeai/app/util/user_management.py66def _cleanup_deleted_user_fonts(fonts: Any | None, user_id: str, storage_paths: tuple[str, ...], logger: Any) -> None:CODE
LOWinvokeai/app/util/user_management.py47def _prepare_deleted_user_fonts(config: Any, db: Any, user_id: str, logger: Any) -> tuple[Any | None, tuple[str, ...]]: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/video_frame_extract_range.py51def _validate_even_dimensions(width: int, height: int, video_name: str) -> None:CODE
LOWinvokeai/app/invocations/blend_latents.py85 def replace_tensor_from_masked_tensor(CODE
LOWinvokeai/app/invocations/call_saved_workflow.py14def is_call_saved_workflow_dynamic_input(field_name: str) -> bool:CODE
LOWinvokeai/app/invocations/call_saved_workflow.py18def parse_call_saved_workflow_dynamic_input(field_name: str) -> tuple[str, str]:CODE
LOWinvokeai/app/invocations/call_saved_workflow.py55 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.py72def _services_with_invocation_cache_bypassed(services: "InvocationServices") -> "InvocationServices":CODE
LOWinvokeai/app/invocations/baseinvocation.py297 def invoke_internal_with_effects(CODE
LOWinvokeai/app/invocations/baseinvocation.py407 def get_invocation_typeadapter(cls) -> TypeAdapter[Any]:CODE
LOWinvokeai/app/invocations/baseinvocation.py421 def invalidate_invocation_typeadapter(cls) -> None:CODE
LOWinvokeai/app/invocations/baseinvocation.py524 def invalidate_output_typeadapter(cls) -> None:CODE
LOWinvokeai/app/invocations/model.py30def is_self_contained_sdnq_pipeline(config: AnyModelConfig) -> bool: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/video_concat.py277 def _estimate_transition_memory(self, width: int, height: int) -> int:CODE
LOWinvokeai/app/invocations/video_concat.py299 def _validate_transition_memory(self, width: int, height: int) -> None:CODE
LOWinvokeai/app/invocations/facetools.py542 def validate_comma_separated_ints(cls, v) -> str:CODE
LOWinvokeai/app/invocations/math.py188 def no_unrepresentable_results(cls, v: int, info: ValidationInfo):CODE
LOWinvokeai/app/invocations/math.py262 def no_unrepresentable_results(cls, v: float, info: ValidationInfo):CODE
LOWinvokeai/app/invocations/sd/t2i_adapter.py33 def validate_ip_adapter_weight(cls, v):CODE
LOWinvokeai/app/invocations/sd/t2i_adapter.py38 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/sd/t2i_adapter.py83 def validate_ip_adapter_weight(cls, v):CODE
LOWinvokeai/app/invocations/sd/t2i_adapter.py88 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/sd/controlnet.py53 def validate_begin_end_step_percent(self):CODE
LOWinvokeai/app/invocations/sd/controlnet.py97 def validate_begin_end_step_percent(self) -> "ControlNetInvocation":CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py253 def _get_text_embeddings_and_masks(CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py274 def _preprocess_regional_prompt_mask(CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py300 def _concat_regional_text_embeddings(CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py523 def _get_hidiffusion_name_or_path(unet_config: AnyModelConfig) -> Optional[str]:CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py624 def prep_ip_adapter_image_prompts(CODE
LOWinvokeai/app/invocations/sd/denoise_latents.py848 def prepare_noise_and_latents(CODE
LOWinvokeai/app/invocations/sd/ip_adapter.py49 def validate_ip_adapter_weight(cls, v: float) -> float:CODE
LOWinvokeai/app/invocations/sd/ip_adapter.py54 def validate_begin_end_step_percent(self) -> Self:CODE
9236 more matches not shown…
Hallucination Indicators101 hits · 1100 pts
SeverityFileLineSnippetContext
CRITICAL⚡invokeai/app/api/routers/model_manager.py389 return ApiDependencies.invoker.services.configuration.models_path.resolve().as_posix()CODE
CRITICAL⚡invokeai/app/api/routers/model_manager.py405 configs = ApiDependencies.invoker.services.model_manager.store.search_by_attr(CODE
CRITICAL⚡invokeai/app/api/routers/model_manager.py586 installed_models = ApiDependencies.invoker.services.model_manager.store.search_by_attr()CODE
CRITICALinvokeai/app/api/routers/model_manager.py425 configs = ApiDependencies.invoker.services.model_manager.store.search_by_hash(hash)CODE
CRITICALinvokeai/app/api/routers/model_manager.py450 config = ApiDependencies.invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py485 config = ApiDependencies.invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py515 with ApiDependencies.invoker.services.model_manager.load.record_edit(config.key) as edit:CODE
CRITICALinvokeai/app/api/routers/model_manager.py516 updated = ApiDependencies.invoker.services.model_manager.store.replace_model(config.key, result.config)CODE
CRITICALinvokeai/app/api/routers/model_manager.py653 with _claim_model_key(key), ApiDependencies.invoker.services.model_manager.load.record_edit(key) as edit:CODE
CRITICALinvokeai/app/api/routers/model_manager.py781 ApiDependencies.invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/api/routers/model_manager.py1395 ApiDependencies.invoker.services.model_manager.install.prune_jobs()CODE
CRITICALinvokeai/app/api/routers/model_manager.py1592 installed_models = ApiDependencies.invoker.services.model_manager.store.search_by_attr()CODE
CRITICALinvokeai/app/api/routers/model_manager.py1631 for cache in ApiDependencies.invoker.services.model_manager.load.ram_caches.values():CODE
CRITICALinvokeai/app/api/routers/model_manager.py1679 for cache in ApiDependencies.invoker.services.model_manager.load.ram_caches.values():CODE
CRITICALinvokeai/app/api/routers/model_manager.py1227 jobs: List[ModelInstallJob] = ApiDependencies.invoker.services.model_manager.install.list_jobs()STRING
CRITICALinvokeai/app/api/routers/model_manager.py1247 result: ModelInstallJob = ApiDependencies.invoker.services.model_manager.install.get_job_by_id(id)STRING
CRITICALinvokeai/app/api/routers/recall_parameters.py147 models = ApiDependencies.invoker.services.model_manager.store.search_by_attr(CODE
CRITICALinvokeai/app/services/shared/invocation_context.py306 graph_ = self._data.queue_item.session.graph.model_dump_json()CODE
CRITICALinvokeai/app/services/shared/invocation_context.py470 graph_ = self._data.queue_item.session.graph.model_dump_json()CODE
CRITICALinvokeai/app/services/shared/invocation_context.py652 return self._services.model_manager.load.ram_cache.offload_model_from_vram(key)CODE
CRITICALinvokeai/app/services/shared/invocation_context.py672 return self._services.model_manager.load.ram_cache.make_room_in_vram(vram_bytes_needed)CODE
CRITICAL…ces/gallery_maintenance/gallery_maintenance_default.py558 output_root = self._services.image_files.image_root.parent.resolve()CODE
CRITICAL…ces/gallery_maintenance/gallery_maintenance_default.py569 output_root = self._services.image_files.image_root.parent.resolve()CODE
CRITICALinvokeai/app/services/model_load/model_load_default.py209 return self._invoker.services.model_manager.store.get_model(key)CODE
CRITICALinvokeai/app/services/model_load/model_load_default.py241 current = self._invoker.services.model_manager.store.get_model(config.key)CODE
CRITICAL⚡…ai/app/services/session_queue/session_queue_default.py411 cache = self.__invoker.services.model_manager.load.ram_caches.get(device)CODE
CRITICAL⚡…vokeai/app/services/image_index/image_index_default.py1803 self._invoker.services.model_manager.store.search_by_attr(model_name=model_name) if model_name else []CODE
CRITICAL…vokeai/app/services/image_index/image_index_default.py985 for cache in set(invoker.services.model_manager.load.ram_caches.values()):CODE
CRITICAL…vokeai/app/services/image_index/image_index_default.py1945 loaded = self._invoker.services.model_manager.load.load_model(self._model_config)CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts775 expect(harness.progressImage.set.mock.calls.map(([image]) => (image as { dataUrl: string }).dataUrl)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts874 expect(harness.progressImage.set.mock.calls.map(([image]) => (image as { dataUrl: string }).dataUrl)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts899 expect(harness.progressImage.set.mock.calls.map(([image]) => (image as { dataUrl: string }).dataUrl)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1051 expect(harness.nodeExecution.started.mock.calls.map(([event]) => event.invocation_source_id)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1172 expect(harness.activeProgressTarget.set.mock.calls.map(([activeTarget]) => activeTarget)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1178 harness.progressImage.set.mock.calls.map(([image, imageTarget]) => ({ image, target: imageTarget }))CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1220 expect(harness.progressImage.set.mock.calls.map(([image, target]) => ({ image, target }))).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1280 expect(harness.progressImage.set.mock.calls.map(([image]) => (image as { dataUrl: string }).dataUrl)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1598 expect(harness.progressImage.set.mock.calls.map(([, target]) => target)).toEqual([CODE
CRITICAL…d/webv2/src/features/queue/runtime/coordinator.test.ts1602 expect(harness.progressImage.set.mock.calls.map(([image]) => (image as { dataUrl: string }).dataUrl)).toEqual([CODE
CRITICAL…ai/frontend/webv2/src/workbench/workbenchState.test.ts1580 instanceIds: preset.snapshot.widgetRegions.bottom.instanceIds.filter(CODE
CRITICAL…ontend/webv2/src/workbench/layoutPresetRouting.test.ts17 instanceIds: compose.snapshot.widgetRegions.bottom.instanceIds.filter(CODE
CRITICAL…nch/canvas-engine/document-model/documentModel.test.ts1396 expect(after.canvas.document.stacks.control.map((node) => node.id)).toEqual(['E', 'c1']);CODE
CRITICAL…nch/widgets/preview/PreviewNavigation.browser.test.tsx1910 const selected = mocks.commands.gallery.selectItem.mock.calls.map(([item, , page]) => [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
41 more matches not shown…
Decorative Section Separators256 hits · 926 pts
SeverityFileLineSnippetContext
MEDIUM⚡invokeai/app/util/user_management.py76# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡invokeai/app/util/user_management.py78# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py212# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py214# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py342# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py344# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/util/user_management.py444# ---------------------------------------------------------------------------STRING
MEDIUMinvokeai/app/util/user_management.py446# ---------------------------------------------------------------------------STRING
MEDIUMinvokeai/app/api/routers/auth.py404# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py406# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py449# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/app/api/routers/auth.py451# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py1843 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py1845 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py2330 # ------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py2332 # ------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py2454 # ------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡…ai/app/services/model_install/model_install_default.py2456 # ------------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1546 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM…ai/app/services/model_install/model_install_default.py1548 # --------------------------------------------------------------------------------------------COMMENT
MEDIUM…d/webv2/src/workbench/widgets/canvas/canvasSettings.ts59 // ── Behavior ──────────────────────────────────────────────────────────────COMMENT
MEDIUM…d/webv2/src/workbench/widgets/canvas/canvasSettings.ts78 // ── Display ───────────────────────────────────────────────────────────────COMMENT
MEDIUM…d/webv2/src/workbench/widgets/canvas/canvasSettings.ts109 // ── Grid ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMinvokeai/backend/ideogram4/quantized_loading.py138# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/ideogram4/quantized_loading.py146# ---------------------------------------------------------------------------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
MEDIUM⚡invokeai/backend/anima/anima_transformer.py33# ============================================================================COMMENT
MEDIUM⚡invokeai/backend/anima/anima_transformer.py37# ============================================================================COMMENT
MEDIUM⚡invokeai/backend/anima/anima_transformer.py200# ============================================================================COMMENT
MEDIUM⚡invokeai/backend/anima/anima_transformer.py204# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py772# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py776# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py998# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/anima_transformer.py1002# ============================================================================COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py60# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py62# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py124# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py126# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py222# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py224# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py350# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/anima/control_net_lllite.py352# ----------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py49# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py51# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py402# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py404# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py534# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/decode.py536# ---------------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pixeldit_model.py169 # ---------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pixeldit_model.py171 # ---------------------------------------------------------------------COMMENT
MEDIUM⚡invokeai/backend/pid/_src/models/pixeldit_model.py207 # ---------------------------------------------------------------------COMMENT
MEDIUM⚡invokeai/backend/pid/_src/models/pixeldit_model.py209 # ---------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pixeldit_model.py241 # ---------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pixeldit_model.py244 # ---------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pid_distill_model.py46 # ---------------------------------------------------------------------COMMENT
MEDIUMinvokeai/backend/pid/_src/models/pid_distill_model.py48 # ---------------------------------------------------------------------COMMENT
196 more matches not shown…
Empty Error Handlers122 hits · 610 pts
SeverityFileLineSnippetContext
HIGHinvokeai/app/api_app.py235except Exception:CODE
HIGHinvokeai/app/util/video_thumbnails.py112except (OSError, subprocess.TimeoutExpired):CODE
HIGHinvokeai/app/util/video_thumbnails.py142except psutil.Error:CODE
HIGHinvokeai/app/util/video_thumbnails.py121except psutil.Error:CODE
HIGHinvokeai/app/util/video_thumbnails.py127except OSError:CODE
HIGHinvokeai/app/util/ti_utils.py39except UnknownModelException:CODE
HIGHinvokeai/app/util/mp4_metadata.py136except UnicodeDecodeError:CODE
HIGHinvokeai/app/util/rocm_integrated_gpu.py102except subprocess.TimeoutExpired:CODE
HIGHinvokeai/app/util/video_decode_worker.py65except (OSError, ValueError):CODE
HIGHinvokeai/app/util/video_decode_worker.py104except Exception:CODE
HIGHinvokeai/app/util/video_decode_worker.py148except Exception:CODE
HIGHinvokeai/app/util/video_decode_worker.py190except (TypeError, ValueError, OverflowError):CODE
HIGHinvokeai/app/util/ssrf.py141except ValueError:CODE
HIGHinvokeai/app/invocations/video_frame_extract_range.py286except Exception:CODE
HIGHinvokeai/app/invocations/video_concat.py274except Exception:CODE
HIGHinvokeai/app/invocations/krea2/krea2_denoise.py350except (OSError, ValueError):CODE
HIGHinvokeai/app/invocations/wan/wan_denoise.py245except Exception:CODE
HIGH…eai/app/invocations/vae/minimax_h3_latents_to_video.py213except Exception:CODE
HIGH…eai/app/invocations/vae/minimax_h3_latents_to_video.py218except Exception:CODE
HIGHinvokeai/app/invocations/vae/wan_latents_to_video.py259except Exception:CODE
HIGHinvokeai/app/api/routers/style_presets.py183except StylePresetImageFileNotFoundException:CODE
HIGHinvokeai/app/api/routers/style_presets.py152except StylePresetImageFileNotFoundException:CODE
HIGHinvokeai/app/api/routers/model_manager.py1520except ModelImageFileNotFoundException:CODE
HIGHinvokeai/app/api/routers/images.py673except HTTPException:CODE
HIGHinvokeai/app/api/routers/video_recall.py270except UnknownModelException:CODE
HIGHinvokeai/app/api/routers/workflows.py167except WorkflowThumbnailFileNotFoundException:CODE
HIGHinvokeai/app/api/routers/workflows.py217except WorkflowNotFoundError:CODE
HIGHinvokeai/app/api/routers/videos.py566except Exception:CODE
HIGHinvokeai/app/api/routers/videos.py570except Exception:CODE
HIGH…eai/app/services/model_install/model_install_common.py84except FileNotFoundError:CODE
HIGH…ai/app/services/model_install/model_install_default.py213except FileNotFoundError:CODE
HIGH…ai/app/services/model_install/model_install_default.py1510except ValueError:CODE
HIGH…ai/app/services/model_install/model_install_default.py1803except UnknownModelException:CODE
HIGH…ai/app/services/model_install/model_install_default.py1920except DuplicateModelException:CODE
HIGH…ai/app/services/model_install/model_install_default.py823except PermissionError:CODE
HIGH…ai/app/services/model_install/model_install_default.py2175except Exception:CODE
HIGH…ai/app/services/model_install/model_install_default.py2182except Exception:CODE
HIGH…ervices/session_processor/session_processor_default.py377except CanceledException:CODE
HIGH…ervices/session_processor/session_processor_default.py549except SessionQueueItemNotFoundError:CODE
HIGHinvokeai/app/services/video_files/video_files_disk.py278except FileNotFoundError:CODE
HIGHinvokeai/app/services/video_files/video_files_disk.py93except Exception:CODE
HIGHinvokeai/app/services/shared/graph_validation.py305except TypeError:CODE
HIGHinvokeai/app/services/shared/graph_validation.py743except NodeNotFoundError:CODE
HIGHinvokeai/app/services/shared/graph_validation.py916except ValueError:CODE
HIGH…ces/gallery_maintenance/gallery_maintenance_default.py950except OSError:CODE
HIGH…ces/gallery_maintenance/gallery_maintenance_default.py941except OSError:CODE
HIGH…ces/gallery_maintenance/gallery_maintenance_default.py909except OSError:CODE
HIGH…ces/gallery_maintenance/gallery_maintenance_default.py899except OSError:CODE
HIGHinvokeai/app/services/model_load/model_load_default.py258except IndexError:CODE
HIGHinvokeai/app/services/model_load/model_load_default.py310except IndexError:CODE
HIGHinvokeai/app/services/download/download_default.py952except OSError:CODE
HIGHinvokeai/app/services/download/download_default.py962except OSError:CODE
HIGHinvokeai/app/services/image_files/image_files_disk.py320except FileNotFoundError:CODE
HIGHinvokeai/app/services/image_files/image_files_disk.py625except FileNotFoundError:CODE
HIGHinvokeai/app/services/image_files/image_files_disk.py359except OSError:CODE
HIGHinvokeai/app/services/image_files/image_files_disk.py306except OSError:CODE
HIGHinvokeai/app/services/image_files/image_files_disk.py357except OSError:CODE
HIGHinvokeai/app/services/fonts/fonts_default.py830except OSError:CODE
HIGH…services/external_generation/providers/alibabacloud.py415except ValueError:CODE
HIGH…services/external_generation/providers/alibabacloud.py311except ValueError:CODE
62 more matches not shown…
Excessive Try-Catch Wrapping609 hits · 607 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py235 except Exception:CODE
LOWinvokeai/app/util/torch_cuda_allocator.py46 except Exception:CODE
LOWinvokeai/app/util/video_thumbnails.py180 except Exception:CODE
LOWinvokeai/app/util/video_thumbnails.py191 except Exception:CODE
LOWinvokeai/app/util/video_thumbnails.py398 except Exception:CODE
LOWinvokeai/app/util/ti_utils.py45 except Exception:CODE
LOWinvokeai/app/util/rocm_aotriton.py113 except Exception as e:CODE
LOWinvokeai/app/util/video_decode_worker.py85 except Exception as error:CODE
LOWinvokeai/app/util/video_decode_worker.py104 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py125 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py148 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py182 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py205 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py233 except Exception:CODE
LOWinvokeai/app/util/video_decode_worker.py281 except Exception as e:CODE
LOWinvokeai/app/util/database_copy.py110 except Exception as e:CODE
LOWinvokeai/app/util/database_copy.py140 except Exception as e:CODE
LOWinvokeai/app/util/database_copy.py180 except Exception as e:CODE
LOWinvokeai/app/util/database_copy.py229 except Exception as e:CODE
LOWinvokeai/app/util/database_copy.py272 except Exception as e:CODE
LOWinvokeai/app/util/startup_utils.py146 except Exception:CODE
MEDIUM⚡invokeai/app/util/user_management.py93 print("Error: Email is required")CODE
MEDIUM⚡invokeai/app/util/user_management.py103 print("Error: Passwords do not match. Please try again.\n")CODE
MEDIUM⚡invokeai/app/util/user_management.py108 print(f"Error: {error_msg}\n")CODE
MEDIUMinvokeai/app/util/user_management.py227 print("Error: Email is required")CODE
MEDIUMinvokeai/app/util/user_management.py381 print(f"Error listing users: {e}")CODE
MEDIUMinvokeai/app/util/user_management.py461 print("Error: Email is required")CODE
MEDIUMinvokeai/app/util/user_management.py499 print("Error: Passwords do not match. Please try again.\n")CODE
MEDIUMinvokeai/app/util/user_management.py504 print(f"Error: {error_msg}\n")CODE
LOW⚡invokeai/app/util/user_management.py61 except Exception:CODE
LOW⚡invokeai/app/util/user_management.py72 except Exception:CODE
LOWinvokeai/app/util/user_management.py135 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py175 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py263 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py311 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py380 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py412 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py537 except Exception as e:CODE
LOWinvokeai/app/util/user_management.py594 except Exception as e:CODE
LOWinvokeai/app/invocations/video_frame_extract_range.py286 except Exception:CODE
LOWinvokeai/app/invocations/call_saved_workflow.py103 except Exception as e:CODE
LOWinvokeai/app/invocations/baseinvocation.py704 except Exception as e:CODE
LOWinvokeai/app/invocations/baseinvocation.py851 except Exception:CODE
LOWinvokeai/app/invocations/video_concat.py274 except Exception:CODE
LOWinvokeai/app/invocations/load_custom_nodes.py72 except Exception:CODE
LOWinvokeai/app/invocations/ideogram4/ideogram4_denoise.py169 except Exception:CODE
LOWinvokeai/app/invocations/anima/anima_denoise.py963 except Exception as e:CODE
LOW…pp/invocations/text_encoder/qwen_image_text_encoder.py488 except Exception as cache_exc:CODE
LOW…okeai/app/invocations/minimax_h3/minimax_h3_denoise.py231 except Exception as e:CODE
LOW…okeai/app/invocations/minimax_h3/minimax_h3_denoise.py451 except Exception:CODE
LOW…okeai/app/invocations/minimax_h3/minimax_h3_denoise.py499 except Exception as e:CODE
LOW…okeai/app/invocations/minimax_h3/minimax_h3_denoise.py519 except Exception:CODE
LOWinvokeai/app/invocations/wan/wan_denoise.py245 except Exception:CODE
LOW…eai/app/invocations/ernie_image/ernie_image_denoise.py241 except Exception as e:CODE
LOWinvokeai/app/invocations/vae/anima_latents_to_image.py219 except Exception:CODE
LOW…eai/app/invocations/vae/minimax_h3_latents_to_video.py213 except Exception:CODE
LOW…eai/app/invocations/vae/minimax_h3_latents_to_video.py218 except Exception:CODE
LOW…eai/app/invocations/vae/minimax_h3_latents_to_video.py267 except Exception:CODE
LOWinvokeai/app/invocations/vae/ltx2_latents_to_video.py272 except Exception:CODE
LOWinvokeai/app/invocations/vae/ltx2_latents_to_video.py318 except Exception:CODE
549 more matches not shown…
Unused Imports733 hits · 580 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/util/dynamicprompts.py1CODE
LOWinvokeai/app/util/ssrf.py31CODE
LOWinvokeai/app/util/startup_utils.py206CODE
LOWinvokeai/app/invocations/external_image_generation.py24CODE
LOWinvokeai/app/invocations/baseinvocation.py1CODE
LOWinvokeai/app/invocations/baseinvocation.py51CODE
LOWinvokeai/app/api/auth_dependencies.py14CODE
LOWinvokeai/app/api/routers/fonts.py3CODE
LOWinvokeai/app/services/invocation_services.py1CODE
LOWinvokeai/app/services/invocation_services.py5CODE
LOWinvokeai/app/services/invocation_services.py6CODE
LOWinvokeai/app/services/invocation_services.py7CODE
LOWinvokeai/app/services/invocation_services.py8CODE
LOWinvokeai/app/services/invocation_services.py9CODE
LOWinvokeai/app/services/invocation_services.py12CODE
LOWinvokeai/app/services/invocation_services.py14CODE
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.py34CODE
LOWinvokeai/app/services/invocation_services.py35CODE
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.py44CODE
LOWinvokeai/app/services/invocation_services.py45CODE
LOWinvokeai/app/services/invocation_services.py46CODE
LOWinvokeai/app/services/invocation_services.py47CODE
LOWinvokeai/app/services/invocation_services.py48CODE
LOWinvokeai/app/services/invocation_services.py49CODE
LOWinvokeai/app/services/invocation_services.py50CODE
LOWinvokeai/app/services/invocation_services.py51CODE
LOWinvokeai/app/services/invocation_services.py52CODE
LOWinvokeai/app/services/invocation_services.py53CODE
LOWinvokeai/app/services/invocation_services.py54CODE
LOWinvokeai/app/services/invocation_services.py55CODE
LOWinvokeai/app/services/invocation_services.py56CODE
LOWinvokeai/app/services/invocation_services.py57CODE
LOWinvokeai/app/services/invocation_services.py58CODE
LOWinvokeai/app/services/app_settings/__init__.py3CODE
LOWinvokeai/app/services/config/config_common.py9CODE
LOWinvokeai/app/services/config/config_default.py4CODE
673 more matches not shown…
Cross-File Repetition64 hits · 320 pts
SeverityFileLineSnippetContext
HIGH…eai/app/invocations/text_encoder/anima_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.STRING
HIGH…i/app/invocations/text_encoder/z_image_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.STRING
HIGH…p/invocations/text_encoder/flux2_klein_text_encoder.py0iterate over lora models to apply to the qwen3 text encoder.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
HIGH…rvices/board_video_records/board_video_records_base.py0gets all board images for a board, as a list of the image names. when ``user_id`` is provided, results are restricted toSTRING
HIGHinvokeai/app/services/board_images/board_images_base.py0gets all board images for a board, as a list of the image names. when ``user_id`` is provided, results are restricted toSTRING
HIGH…rvices/board_image_records/board_image_records_base.py0gets all board images for a board, as a list of the image names. when ``user_id`` is provided, results are restricted toSTRING
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…/app/services/shared/database/queries/style_presets.py0sets these fields of the video; one statement per set of fields, of which there are few.STRING
HIGHinvokeai/app/services/shared/database/queries/images.py0sets these fields of the video; one statement per set of fields, of which there are few.STRING
HIGH…keai/app/services/shared/database/queries/wildcards.py0sets these fields of the video; one statement per set of fields, of which there are few.STRING
HIGHinvokeai/app/services/shared/database/queries/videos.py0sets these fields of the video; one statement per set of fields, of which there are few.STRING
HIGHinvokeai/app/services/shared/database/queries/images.py0which filters a listing has: never their values, which are bound, so that the shapes are few.STRING
HIGH…vokeai/app/services/shared/database/queries/gallery.py0which filters a listing has: never their values, which are bound, so that the shapes are few.STRING
HIGHinvokeai/app/services/shared/database/queries/videos.py0which filters a listing has: never their values, which are bound, so that the shapes are few.STRING
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…/patches/lora_conversions/wan_lora_conversion_utils.py0group state-dict keys by their layer path (everything before the lora-suffix tail).STRING
HIGH…s/lora_conversions/minimax_h3_lora_conversion_utils.py0group state-dict keys by their layer path (everything before the lora-suffix tail).STRING
HIGH…patches/lora_conversions/ltx2_lora_conversion_utils.py0group state-dict keys by their layer path (everything before the lora-suffix tail).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
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_session_queue_workflow_call.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
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_processor/test_for_loop_processor_sqlite.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…services/session_processor/test_if_processor_sqlite.py0--sql insert into session_queue ( queue_id, session, session_id, batch_id, field_values, priority, workflow, origin, desSTRING
HIGH…/services/session_queue/test_for_loop_session_queue.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…ession_queue/test_session_queue_dequeue_concurrency.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_multigpu_cancel.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_workflow_call_retry.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…session_queue/test_session_queue_bulk_cancel_events.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…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
4 more matches not shown…
Deep Nesting360 hits · 306 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py162CODE
LOWinvokeai/app/util/dynamicprompts.py19CODE
LOWinvokeai/app/util/video_thumbnails.py223CODE
LOWinvokeai/app/util/video_thumbnails.py341CODE
LOWinvokeai/app/util/video_thumbnails.py560CODE
LOWinvokeai/app/util/mp4_metadata.py197CODE
LOWinvokeai/app/util/video_audio.py106CODE
LOWinvokeai/app/util/video_decode_worker.py258CODE
LOWinvokeai/app/util/user_management.py449CODE
LOWinvokeai/app/invocations/metadata_linked.py999CODE
LOWinvokeai/app/invocations/metadata_linked.py1076CODE
LOWinvokeai/app/invocations/upscale.py45CODE
LOWinvokeai/app/invocations/logic.py68CODE
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.py573CODE
LOWinvokeai/app/invocations/baseinvocation.py241CODE
LOWinvokeai/app/invocations/video_concat.py423CODE
LOWinvokeai/app/invocations/facetools.py356CODE
LOWinvokeai/app/invocations/spandrel_image_to_image.py209CODE
LOWinvokeai/app/invocations/math.py197CODE
LOWinvokeai/app/invocations/math.py271CODE
LOWinvokeai/app/invocations/strings.py31CODE
LOWinvokeai/app/invocations/sd/ip_adapter.py123CODE
LOWinvokeai/app/invocations/sd/create_gradient_mask.py80CODE
LOWinvokeai/app/invocations/krea2/krea2_denoise.py354CODE
LOWinvokeai/app/invocations/flux/flux_denoise.py734CODE
LOWinvokeai/app/invocations/flux2/flux2_denoise.py176CODE
LOWinvokeai/app/invocations/anima/anima_denoise.py592CODE
LOWinvokeai/app/invocations/text_encoder/compel.py460CODE
LOW…okeai/app/invocations/minimax_h3/minimax_h3_denoise.py663CODE
LOW…eai/app/invocations/minimax_h3/minimax_h3_reference.py348CODE
LOWinvokeai/app/invocations/wan/wan_model_loader.py125CODE
LOWinvokeai/app/invocations/wan/wan_video_denoise.py156CODE
LOWinvokeai/app/invocations/wan/wan_denoise.py423CODE
LOWinvokeai/app/invocations/z_image/z_image_denoise.py375CODE
LOW…vokeai/app/invocations/vae/z_image_latents_to_image.py53CODE
LOWinvokeai/app/invocations/vae/anima_latents_to_image.py81CODE
LOW…eai/app/invocations/vae/minimax_h3_latents_to_video.py51CODE
LOWinvokeai/app/invocations/vae/wan_latents_to_video.py98CODE
LOWinvokeai/app/api/sockets.py255CODE
LOWinvokeai/app/api/sockets.py953CODE
LOWinvokeai/app/api/routers/board_images.py150CODE
LOWinvokeai/app/api/routers/board_images.py204CODE
LOWinvokeai/app/api/routers/board_images.py302CODE
LOWinvokeai/app/api/routers/model_manager.py536CODE
LOWinvokeai/app/api/routers/model_manager.py1540CODE
LOWinvokeai/app/api/routers/model_manager.py1591CODE
LOWinvokeai/app/api/routers/app_info.py254CODE
LOWinvokeai/app/api/routers/images.py569CODE
LOWinvokeai/app/api/routers/video_recall.py295CODE
LOWinvokeai/app/api/routers/video_recall.py374CODE
LOWinvokeai/app/api/routers/image_map.py758CODE
LOWinvokeai/app/api/routers/recall_parameters.py214CODE
LOWinvokeai/app/api/routers/recall_parameters.py270CODE
300 more matches not shown…
Over-Commented Block271 hits · 244 pts
SeverityFileLineSnippetContext
LOWpyproject.toml61 # reject torch>=2.12 on Windows/Linux CUDA, CPU and ARM64, where 2.12 has no known problem.COMMENT
LOWpyproject.toml161# ROCm 10 for Linux x86_64 and Windows, from AMD's index (PyTorch publishes no ROCm wheels for Windows, and noneCOMMENT
LOWpyproject.toml261 "torch==2.7.1; sys_platform == 'darwin' or (sys_platform == 'linux' and platform_machine == 'aarch64')",COMMENT
LOWpyproject.toml321# `==2.13.0` also matches the local builds (+cpu, +cu130, +rocm10.0.0, +xpu).COMMENT
LOWinvokeai/app/run_app.py1import osCOMMENT
LOWinvokeai/app/run_app.py21# every candidate kernel the first time a convolution shape is seen, which on a VAE-shapedCOMMENT
LOWinvokeai/app/api_app.py201 # an unauthenticated route returning 2xx with a stale Bearer headerCOMMENT
LOWinvokeai/app/api_app.py521 # `Transfer-Encoding: chunked` (the chunked framing wins), so trusting the header letCOMMENT
LOWinvokeai/app/util/video_thumbnails.py41# Resident-memory kill threshold for a decode worker *tree* (the worker plus itsCOMMENT
LOWinvokeai/app/util/video_thumbnails.py401 Path(tmp_name).unlink(missing_ok=True)COMMENT
LOWinvokeai/app/util/video_thumbnails.py421MIN_DEEPER_SEEK_GAP_SECONDS = 1.0COMMENT
LOWinvokeai/app/util/video_thumbnails.py441COMMENT
LOWinvokeai/app/util/video_thumbnails.py461# which a frame is a card: titles, a logo or a caption on a solid background. SyntheticCOMMENT
LOWinvokeai/app/invocations/baseinvocation.py621 ui_type = field.json_schema_extra.get("ui_type", None)COMMENT
LOWinvokeai/app/invocations/baseinvocation.py821COMMENT
LOWinvokeai/app/invocations/image.py1361 # which is what the forced 1.0 below works out to. Only the band still needs theCOMMENT
LOWinvokeai/app/invocations/image.py1381 # There are some magic numbers here that are used to create a smooth transition:COMMENT
LOWinvokeai/app/invocations/krea2/krea2_denoise.py581 # An int8_tensorwise or GGUF build stores its linears quantized and materializes the dequantizedCOMMENT
LOWinvokeai/app/invocations/ltx2/ltx2_denoise.py261 estimated = video_rows * int(MiB // 4.5) + audio_rows * (MiB // 10) + 1024**3COMMENT
LOWinvokeai/app/invocations/ltx2/ltx2_denoise.py541COMMENT
LOWinvokeai/app/invocations/flux2/flux2_denoise.py61from invokeai.backend.util.devices import TorchDeviceCOMMENT
LOWinvokeai/app/invocations/flux2/flux2_denoise.py381 # Calculate the timestep schedule using FLUX.2 specific scheduleCOMMENT
LOW…app/invocations/text_encoder/flux2_dev_text_encoder.py181 text = FLUX2_DEV_PROMPT_TEMPLATE.format(system=FLUX2_DEV_SYSTEM_MESSAGE, prompt=self.prompt)COMMENT
LOWinvokeai/app/invocations/wan/wan_ref_image_encoder.py141 # swaps in particular can leave the cache fragmented in ways that look likeCOMMENT
LOWinvokeai/app/invocations/wan/wan_lora_loader.py21#COMMENT
LOWinvokeai/app/invocations/wan/wan_denoise.py221COMMENT
LOWinvokeai/app/invocations/wan/wan_denoise.py601 # time the denoise loop swaps in, producing theCOMMENT
LOW…eai/app/invocations/vae/qwen_image_latents_to_image.py61 tiled = self.tiled or config.force_tiled_decodeCOMMENT
LOW…eai/app/invocations/vae/qwen_image_latents_to_image.py101 context.util.signal_progress("Running VAE")COMMENT
LOW…keai/app/invocations/vae/ideogram4_latents_to_image.py61 latents = context.tensors.load(self.latents.latents_name)COMMENT
LOW…eai/app/invocations/vae/minimax_h3_latents_to_video.py101 # frames are the blended-tile ones — never toggle tiling on the shared cached instance:COMMENT
LOWinvokeai/app/api/sockets.py521COMMENT
LOWinvokeai/app/api/sockets.py981 # Import here to avoid circular dependencyCOMMENT
LOWinvokeai/app/api/sockets.py1061 event=event_name, data=event_data.model_dump(mode="json"), room=[user_room, "admin"]COMMENT
LOWinvokeai/app/api/auth_dependencies.py41 - it is active,COMMENT
LOWinvokeai/app/api/routers/board_images.py221 # Skip — but do not re-raise — auth failures so a foreign name mid-batch doesn'tCOMMENT
LOWinvokeai/app/api/routers/board_images.py341 # 404 here would otherwise be indistinguishable from a storage failure below.COMMENT
LOWinvokeai/app/api/routers/images.py61COMMENT
LOWinvokeai/app/api/routers/images.py581COMMENT
LOWinvokeai/app/api/routers/images.py621 # stale while the name is reported gone.COMMENT
LOWinvokeai/app/api/routers/image_map.py181 _refresh_claims[user_id] = nowCOMMENT
LOWinvokeai/app/api/routers/image_map.py221 _cluster_cache[user_id] = (key, labels, resolved_eps)COMMENT
LOWinvokeai/app/api/routers/image_map.py461 if stale:COMMENT
LOWinvokeai/app/api/routers/image_map.py481 (item in accessible and item.kind in kinds for item in record.items),COMMENT
LOWinvokeai/app/api/routers/image_map.py521 # proceed, so this is "the label array is bounded by the cap" —COMMENT
LOWinvokeai/app/api/routers/image_map.py1001 # diagnostics /points reports cover this call too: same points, sameCOMMENT
LOWinvokeai/app/api/routers/image_map.py1101 # matrix raises out of the matmul below. Both are this one item's dataCOMMENT
LOWinvokeai/app/api/routers/session_queue.py161 return read_for_retry(item_id)COMMENT
LOW…ai/app/services/model_install/model_install_default.py2241 remote_files: List[RemoteModelFile],COMMENT
LOW…ervices/session_processor/session_processor_default.py201 # Revalidate the owner before the node: an account deactivated mid-sessionCOMMENT
LOW…ervices/session_processor/session_processor_default.py881 queue_items: list[SessionQueueItem] = []COMMENT
LOW…ervices/session_processor/session_processor_default.py901 # Handlers are dispatched as independent tasks, so a deactivate immediatelyCOMMENT
LOW…ervices/session_processor/session_processor_default.py1201COMMENT
LOWinvokeai/app/services/shared/database/database.py141 # On the connection rather than the engine, so it also covers the migrator's raw cursors.COMMENT
LOW…ervices/shared/sqlite_migrator/sqlite_migrator_impl.py141 cursor = conn.cursor()COMMENT
LOW…vokeai/app/services/model_records/model_records_sql.py141 # 1. Convert the existing record to a dictCOMMENT
LOW…eai/app/services/session_queue/session_queue_common.py661 # The batch prep logic injects field values into the same fields for each generated session.COMMENT
LOW…eai/app/services/session_queue/session_queue_common.py681 # previous mutation. We only need to serialize the graph once, and then we can mutate it in place for each session.COMMENT
LOW…vokeai/app/services/image_index/image_index_default.py261 # outcome exactly once however many times it is re-armed by a failed batch on the wayCOMMENT
LOW…vokeai/app/services/image_index/image_index_default.py301 self._stopped = FalseCOMMENT
211 more matches not shown…
Self-Referential Comments67 hits · 203 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/app/api_app.py106# Create the appCOMMENT
MEDIUMinvokeai/app/util/profiler.py13 # Create a profilerSTRING
MEDIUM⚡invokeai/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/image.py213 # Create a temporary image to paste the image with transparencyCOMMENT
MEDIUMinvokeai/app/invocations/image.py1269 # Create a mask based on the threshold and the distance calculated aboveCOMMENT
MEDIUMinvokeai/app/invocations/image.py1355 # Create a distance transform of the thresholded mask. Distances are measured to theCOMMENT
MEDIUMinvokeai/app/invocations/image.py1514 # Create a noisy version of the input imageCOMMENT
MEDIUMinvokeai/app/invocations/sd/create_gradient_mask.py102 # Create a circular distance kernel that fades from center outwardCOMMENT
MEDIUMinvokeai/app/invocations/sd/create_gradient_mask.py112 # Create a Gaussian kernelCOMMENT
MEDIUM…nvocations/sd/tiled_multi_diffusion_denoise_latents.py43 # Create a shallow copy of the control_data object.COMMENT
MEDIUMinvokeai/app/services/config/config_default.py797 # Create the example config file, with some extra example values providedCOMMENT
MEDIUMinvokeai/backend/llava_onevision_pipeline.py49 # 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
MEDIUMinvokeai/backend/pid/_src/utils/context_parallel.py79 # Create a list to store tensors from all ranksCOMMENT
MEDIUMinvokeai/backend/pid/_src/utils/context_parallel.py116 # Create a list to store tensors from all ranksCOMMENT
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.py333 # Create a dummy mask and range for text conditioning that doesn't have region masks.COMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py430 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py526 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py775 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py898 # Create an empty model with the default Z-Image configCOMMENT
MEDIUM…ai/backend/model_manager/load/model_loaders/z_image.py1091 # 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.py32 # Create a mock image with valid metadataCOMMENT
MEDIUMtests/app/routers/test_auth.py81 # Create a test userCOMMENT
MEDIUMtests/app/routers/test_session_queue_sanitization.py32# Define a minimal test invocation for the testCOMMENT
MEDIUMtests/app/routers/test_client_state_multiuser.py79 # Create a regular userCOMMENT
MEDIUM⚡tests/app/routers/test_multiuser_authorization.py1123 # Create a shared board and add the image to itCOMMENT
MEDIUM⚡tests/app/routers/test_multiuser_authorization.py1450 # Create a board owned by user1 and add the image to itCOMMENT
MEDIUM⚡tests/app/routers/test_multiuser_authorization.py2736 # Create a token for a user_id that was never created in the user serviceCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py2715 # Create the user in the database so the active-user check passesCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py2755 # Create a real user, then deactivate themCOMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py3473 # Create a fake installed pack directoryCOMMENT
MEDIUMtests/app/routers/test_custom_nodes.py418 # Create a mock invocation classCOMMENT
MEDIUM⚡tests/app/api/test_sliding_window_token.py193 # Create a remember-me token with only 1 hour remaining (less than 24h)COMMENT
MEDIUM⚡tests/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
MEDIUMtests/app/services/auth/test_security.py286 # Create a token that expires quicklyCOMMENT
MEDIUM⚡tests/app/services/auth/test_password_utils.py52 # Create a password longer than 72 bytesCOMMENT
MEDIUMtests/app/services/auth/test_performance.py136 # Create a userCOMMENT
MEDIUM⚡tests/app/services/bulk_download/test_bulk_download.py70 # Create a directory at tmp_path/bulk_downloadsCOMMENT
MEDIUM⚡tests/app/services/bulk_download/test_bulk_download.py74 # Create a file at tmp_path/bulk_downloads/test.zipCOMMENT
7 more matches not shown…
Docstring Block Structure32 hits · 160 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.py139Combines any number of items or lists into a single list, ensuring consistency in type. Args: item_cls:STRING
HIGHinvokeai/app/api/auth_dependencies.py108Get current authenticated user from Bearer token. Note: This function accesses ApiDependencies.invoker.services.useSTRING
HIGHinvokeai/app/api/auth_dependencies.py156Get current authenticated user from Bearer token, or return a default system user if not authenticated. This dependSTRING
HIGHinvokeai/app/api/auth_dependencies.py220Require admin role for the current user. Stays `async def`, unlike the dependencies it builds on: this only reads aSTRING
HIGHinvokeai/app/api/auth_dependencies.py244Require admin role for the current user, or return default system admin in single-user mode. `async def` for the saSTRING
HIGHinvokeai/app/api/routers/auth.py199Authenticate user and return access token. Args: request: Login credentials (email and password) ReturSTRING
HIGHinvokeai/app/api/routers/auth.py332Get current authenticated user's information. Args: current_user: The authenticated user's token data STRING
HIGHinvokeai/app/api/routers/auth.py356Set up initial administrator account. This endpoint can only be called once, when no admin user exists. It creates STRING
HIGHinvokeai/app/api/routers/auth.py496Create a new user. Requires admin privileges. Args: request: New user details Returns: The creSTRING
HIGHinvokeai/app/api/routers/auth.py526Get a user by ID. Requires admin privileges. Args: user_id: The user ID Returns: The user STRING
HIGHinvokeai/app/api/routers/auth.py552Update a user. Requires admin privileges. Resetting a password revokes the target's existing sessions. An admin resSTRING
HIGHinvokeai/app/api/routers/auth.py727Update the current user's own profile. To change the password, both ``current_password`` and ``new_password`` must STRING
HIGHinvokeai/app/api/routers/recall_parameters.py397 Update recallable parameters that can be recalled on the frontend. This endpoint allows updating parameters suSTRING
HIGHinvokeai/app/services/users/users_common.py13Validate email address, allowing special-use domains like .local for testing. This validator first tries standard eSTRING
HIGHinvokeai/app/services/users/users_base.py14Create a new user. Args: user_data: User creation data strict_password_checking: If TruSTRING
HIGHinvokeai/app/services/users/users_base.py67Update user. Args: user_id: The user ID changes: Fields to update strict_paSTRING
HIGHinvokeai/app/services/users/users_base.py123Create an admin user (for initial setup). Args: user_data: User creation data strict_paSTRING
HIGH…i/app/services/project_records/project_records_base.py35Create a project for the user, with a board. Args: user_id: The owning user. name: The STRING
HIGH…es/style_preset_records/style_preset_records_common.py95Parses 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/hidiffusion/hidiffusion.py193 Function invoked when calling the pipeline for generation. Args: prompt (`str`STRING
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
HIGHinvokeai/backend/util/state_dict_loading.py108Load ``state_dict`` into ``model``, ignoring keys the model has nowhere to put. A drop-in replacement for ``model.lSTRING
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
HIGHinvokeai/backend/pid/_src/utils/context_parallel.py28 Split input tensor along the sequence dimension for context parallelism. This function divides the input tensoSTRING
HIGHinvokeai/backend/pid/_src/utils/context_parallel.py59 Concatenate outputs from different ranks in the checkpoint parallelism group. This function gathers tensors frSTRING
HIGHinvokeai/backend/pid/_src/utils/context_parallel.py93 Concatenate outputs from different ranks in the context parallelism group. This function gathers tensors from STRING
HIGH…okeai/backend/pid/_ext/imaginaire/utils/distributed.py359 Modify based on DDP source code Synchronizes the parameters and buffers of a model across different processes iSTRING
HIGH…/backend/model_manager/configs/identification_utils.py47Load 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.py81Load the diffusers/transformers model config file and return the class name. Args: config_path: The path toSTRING
HIGHinvokeai/backend/model_manager/configs/factory.py852Classify a model on disk and return the best matching model config. Args: mod: The model on disk toSTRING
Modern Structural Boilerplate144 hits · 142 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/util/ssrf.py50logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/api/auth_dependencies.py16logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/api/routers/auth.py132def _set_media_cookie(request: Request, response: Response, token: str, max_age_seconds: int) -> None:CODE
LOWinvokeai/app/api/routers/gallery_maintenance.py20logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/api/routers/utilities.py41logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/api/routers/fonts.py352__all__ = [CODE
LOWinvokeai/app/services/app_settings/__init__.py5__all__ = ["AppSettingsService"]CODE
LOWinvokeai/app/services/config/config_default.py56logger = logging.getLogger(__name__)CODE
LOWinvokeai/app/services/config/config_default.py386 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.py33def set_jwt_secret(secret: str) -> None:CODE
LOWinvokeai/app/services/model_install/__init__.py16__all__ = [CODE
LOW…eai/app/services/model_install/model_install_common.py291 def set_error(self, e: Exception) -> None:CODE
LOW…ai/app/services/model_install/model_install_default.py1829 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.py122 def set_session_queue(self, session_queue) -> None:CODE
LOW⚡invokeai/app/services/shared/graph.py3008 def _update_pending_lifecycle_execution(self, exec_node_id: str, effects: Iterable[Any]) -> None:CODE
LOW⚡invokeai/app/services/shared/graph.py3149 def _set_prepared_exec_state(self, exec_node_id: str, state: PreparedExecState) -> None:CODE
LOW⚡invokeai/app/services/shared/graph.py4007 def set_waiting_workflow_call_child_item_ids(self, child_item_ids: list[int]) -> None:CODE
LOWinvokeai/app/services/shared/graph.py3189 def _update_prepared_for_index(self, prepared_for_id: str) -> None:CODE
LOWinvokeai/app/services/shared/graph.py3326 def set_ready_order(self, order: Iterable[Type[BaseInvocation] | str]) -> None:CODE
LOWinvokeai/app/services/shared/graph.py4129 def update_node(self, node_id: str, new_node: BaseInvocation) -> None:CODE
LOWinvokeai/app/services/shared/graph_validation.py1224 def update_node(self, node_id: str, new_node: BaseInvocation) -> None:CODE
LOWinvokeai/app/services/shared/graph_scheduler.py669 def set_ready_order(self, ready_order: Iterable[str]) -> None:CODE
LOWinvokeai/app/services/shared/graph_runtime_records.py82 def _set_mapping(self, mapping: dict[Any, Any], key: Any, value: Any) -> None:CODE
LOWinvokeai/app/services/shared/graph_runtime_records.py94 def _set_attr(self, obj: Any, name: str, value: Any) -> None:CODE
LOWinvokeai/app/services/shared/graph_runtime_records.py148 def set_state(self, exec_node_id: str, state: PreparedExecState) -> None:CODE
LOWinvokeai/app/services/shared/graph_runtime_records.py160 def set_iteration_path(self, exec_node_id: str, iteration_path: tuple[int, ...]) -> None:CODE
LOWinvokeai/app/services/shared/database/session_lock.py49 def set_idle_timeout(self, seconds: int) -> None:CODE
LOWinvokeai/app/services/shared/database/engines.py87 def set_collation(dbapi_connection: Any, connection_record: object) -> None:CODE
LOWinvokeai/app/services/shared/database/engines.py109def _set_mysql_collation(dbapi_connection: Any, expects_mariadb: bool) -> None:CODE
LOW…ai/app/services/shared/database/queries/image_moves.py250 def set_job_state(self, conn: Connection, job_id: int, state: str) -> None:CODE
LOW…ai/app/services/shared/database/queries/image_moves.py254 def set_job_error_message(self, conn: Connection, job_id: int, message: str) -> None:CODE
LOWinvokeai/app/services/shared/database/queries/images.py498 def set_file_size(self, conn: Connection, image_name: str, file_size_bytes: Optional[int]) -> None:CODE
LOW…keai/app/services/shared/database/queries/workflows.py399 def set_public(self, conn: Connection, workflow_id: str, workflow: str, is_public: bool) -> None:CODE
LOWinvokeai/app/services/shared/database/queries/videos.py437 def set_file_size(self, conn: Connection, video_name: str, file_size_bytes: Optional[int]) -> None:CODE
LOW…vokeai/app/services/shared/database/schema/__init__.py33__all__ = ["metadata"]CODE
LOW…okeai/app/services/shared/execution_engine/__init__.py33__all__ = [CODE
LOW…keai/app/services/shared/execution_engine/scheduler.py392 def set_ready_order(self, ready_order: Iterable[str]) -> None:CODE
LOW…keai/app/services/shared/execution_engine/scheduler.py482__all__ = ["ActivationDependency", "ExecutionPlan", "ExecutionScheduler", "PlanNode", "ReadyPredicate"]CODE
LOWinvokeai/app/services/gallery_maintenance/__init__.py5__all__ = ["GalleryMaintenanceService"]CODE
LOWinvokeai/app/services/model_records/__init__.py13__all__ = [CODE
LOWinvokeai/app/services/model_load/__init__.py6__all__ = ["ModelLoadServiceBase", "ModelLoadService"]CODE
LOW⚡…okeai/app/services/video_records/video_records_base.py113 def set_file_size_bytes(self, video_name: str, file_size_bytes: Optional[int]) -> None:CODE
LOW⚡…okeai/app/services/video_records/video_records_base.py118 def set_file_sizes_bytes(self, sizes: dict[str, int]) -> None:CODE
LOW⚡…ai/app/services/video_records/video_records_default.py51 def set_file_size_bytes(self, video_name: str, file_size_bytes: Optional[int]) -> None:CODE
LOW⚡…ai/app/services/video_records/video_records_default.py54 def set_file_sizes_bytes(self, sizes: dict[str, int]) -> None:CODE
LOW…ai/app/services/session_queue/session_queue_default.py112 def _set_in_progress_to_canceled(self) -> None:CODE
LOW…/services/workflow_records/workflow_records_default.py266 def update_opened_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:CODE
LOW…/services/workflow_records/workflow_records_default.py269 def update_last_run_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:CODE
LOW…app/services/workflow_records/workflow_records_base.py100 def update_opened_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:CODE
LOW…app/services/workflow_records/workflow_records_base.py105 def update_last_run_at(self, workflow_id: str, user_id: Optional[str] = None) -> None:CODE
LOWinvokeai/app/services/download/__init__.py12__all__ = [CODE
LOW…i/app/services/image_index/image_index_records_base.py118 def set_custom_vocab_terms(self, terms: list[str]) -> None:CODE
LOW…pp/services/image_index/image_index_records_default.py91 def set_custom_vocab_terms(self, terms: list[str]) -> None:CODE
LOWinvokeai/app/services/fonts/fonts_default.py876__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__.py7__all__ = ["AlibabaCloudProvider", "AtlasCloudProvider", "GeminiProvider", "OpenAIProvider", "SeedreamProvider"]CODE
LOWinvokeai/app/services/orphaned_models/__init__.py9__all__ = ["OrphanedModelsService", "OrphanedModelInfo", "CONVERSION_SCRATCH_DIRNAME"]CODE
84 more matches not shown…
AI Structural Patterns115 hits · 106 pts
SeverityFileLineSnippetContext
LOWinvokeai/app/api_app.py360CODE
LOWinvokeai/app/invocations/fields.py909CODE
LOWinvokeai/app/invocations/fields.py1116CODE
LOWinvokeai/app/invocations/baseinvocation.py722CODE
LOWinvokeai/app/invocations/facetools.py516CODE
LOWinvokeai/app/invocations/facetools.py620CODE
LOWinvokeai/app/api/routers/images.py107CODE
LOWinvokeai/app/api/routers/images.py514CODE
LOWinvokeai/app/api/routers/images.py954CODE
LOWinvokeai/app/api/routers/workflows.py245CODE
LOWinvokeai/app/api/routers/gallery.py28CODE
LOWinvokeai/app/api/routers/gallery.py85CODE
LOWinvokeai/app/api/routers/gallery.py141CODE
LOWinvokeai/app/api/routers/gallery.py205CODE
LOWinvokeai/app/api/routers/videos.py984CODE
LOWinvokeai/app/services/images/images_default.py65CODE
LOWinvokeai/app/services/images/images_default.py456CODE
LOWinvokeai/app/services/images/images_default.py622CODE
LOWinvokeai/app/services/images/images_base.py47CODE
LOWinvokeai/app/services/images/images_base.py135CODE
LOWinvokeai/app/services/images/images_base.py198CODE
LOWinvokeai/app/services/gallery/gallery_base.py21CODE
LOWinvokeai/app/services/gallery/gallery_base.py42CODE
LOWinvokeai/app/services/gallery/gallery_base.py62CODE
LOWinvokeai/app/services/gallery/gallery_base.py86CODE
LOWinvokeai/app/services/gallery/gallery_default.py34CODE
LOWinvokeai/app/services/gallery/gallery_default.py73CODE
LOWinvokeai/app/services/gallery/gallery_default.py120CODE
LOWinvokeai/app/services/gallery/gallery_default.py153CODE
LOWinvokeai/app/services/video_files/video_files_disk.py65CODE
LOWinvokeai/app/services/video_files/video_files_base.py17CODE
LOWinvokeai/app/services/shared/execution_engine/child.py311CODE
LOWinvokeai/app/services/model_load/model_load_default.py281CODE
LOW…okeai/app/services/video_records/video_records_base.py46CODE
LOW…okeai/app/services/video_records/video_records_base.py90CODE
LOW…okeai/app/services/video_records/video_records_base.py133CODE
LOW…ai/app/services/video_records/video_records_default.py76CODE
LOW…ai/app/services/video_records/video_records_default.py111CODE
LOW…ai/app/services/video_records/video_records_default.py157CODE
LOWinvokeai/app/services/videos/videos_base.py46CODE
LOWinvokeai/app/services/videos/videos_base.py129CODE
LOWinvokeai/app/services/videos/videos_base.py189CODE
LOWinvokeai/app/services/videos/videos_default.py51CODE
LOWinvokeai/app/services/videos/videos_default.py327CODE
LOWinvokeai/app/services/videos/videos_default.py459CODE
LOW…ai/app/services/image_records/image_records_default.py64CODE
LOW…ai/app/services/image_records/image_records_default.py140CODE
LOW…ai/app/services/image_records/image_records_default.py185CODE
LOW…okeai/app/services/image_records/image_records_base.py54CODE
LOW…okeai/app/services/image_records/image_records_base.py115CODE
LOW…okeai/app/services/image_records/image_records_base.py156CODE
LOWinvokeai/backend/hidiffusion/hidiffusion.py152CODE
LOWinvokeai/backend/hidiffusion/hidiffusion.py917CODE
LOWinvokeai/backend/ltx2/denoise.py278CODE
LOWinvokeai/backend/image_util/lineart.py98CODE
LOWinvokeai/backend/image_util/lineart.py231CODE
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
55 more matches not shown…
Fake / Example Data75 hits · 84 pts
SeverityFileLineSnippetContext
LOW…ntend/webv2/src/features/identity/capabilities.test.ts51 email: 'user@example.com',CODE
LOW…i/frontend/webv2/src/features/identity/session.test.ts190 admin_email: 'admin@example.com',CODE
LOW…tend/webv2/src/features/identity/ui/UserFormDialog.tsx196 placeholder="user@example.com"CODE
LOW…rontend/webv2/src/features/identity/ui/SetupScreen.tsx75 placeholder="admin@example.com"CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts2517 ).toEqual(['placeholder', 'placeholder']);CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts2548 expect(slots.map((slot) => slot.kind)).toEqual(['candidate', 'placeholder']);CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts2653 ).toEqual(['placeholder', 'candidate']);CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts2691 ).toEqual(['placeholder']);CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts7876 expect(selectedSlot).toMatchObject({ itemIndex: 2, kind: 'placeholder' });CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts7904 expect(selectedSlot).toMatchObject({ itemIndex: 2, kind: 'placeholder' });CODE
LOW…ai/frontend/webv2/src/workbench/workbenchState.test.ts8022 ).toEqual(['candidate', 'placeholder', 'placeholder']);CODE
LOW…keai/frontend/webv2/src/workbench/canvasStagingView.ts10 kind: 'placeholder';CODE
LOW…keai/frontend/webv2/src/workbench/canvasStagingView.ts111 kind: 'placeholder',CODE
LOW…keai/frontend/webv2/src/workbench/canvasStagingView.ts258): number => getCanvasStagingSlots(canvas, queueItems).findIndex((slot) => slot.kind === 'placeholder');CODE
LOW…keai/frontend/webv2/src/workbench/canvasStagingView.ts265 slot?.kind === 'placeholder' ? slot.queueItemId : null;CODE
LOW⚡…frontend/webv2/src/workbench/canvasStagingView.test.ts135 { height: 384, id: 'q-pending:0', itemIndex: 1, kind: 'placeholder', queueItemId: 'q-pending', width: 640 },CODE
LOW⚡…frontend/webv2/src/workbench/canvasStagingView.test.ts136 { height: 384, id: 'q-pending:1', itemIndex: 2, kind: 'placeholder', queueItemId: 'q-pending', width: 640 },CODE
LOW⚡…frontend/webv2/src/workbench/canvasStagingView.test.ts137 { height: 256, id: 'q-running:2', itemIndex: 3, kind: 'placeholder', queueItemId: 'q-running', width: 512 },CODE
LOW…frontend/webv2/src/workbench/canvasStagingView.test.ts177 { height: 320, id: 'q-pending:0', itemIndex: 1, kind: 'placeholder', queueItemId: 'q-pending', width: 640 },CODE
LOW…frontend/webv2/src/workbench/canvasStagingView.test.ts239 kind: 'placeholder',CODE
LOW…tend/webv2/src/workbench/widgets/canvas/StagingBar.tsx565 slot: Extract<CanvasStagingSlot, { kind: 'placeholder' }>;CODE
LOW…ebv2/src/workbench/widgets/canvas/CanvasWidgetView.tsx186 const selectedPlaceholder = selectedSlot?.kind === 'placeholder' ? selectedSlot : null;CODE
LOW…c/workbench/widgets/canvas/StagingBar.browser.test.tsx57 kind: 'placeholder',CODE
LOWinvokeai/frontend/webv1/public/locales/ru.json3232 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/ru.json3276 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/zh-CN.json3551 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/zh-CN.json3595 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/en.json36 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/en.json82 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/es.json1129 "emailPlaceholder": "admin@example.com",CODE
LOWinvokeai/frontend/webv1/public/locales/es.json1173 "emailPlaceholder": "user@example.com",CODE
LOWinvokeai/frontend/webv1/src/app/store/store.test.ts43 email: 'user@example.com',CODE
LOW…rc/features/auth/store/refreshedTokenConsumers.test.ts18 email: 'user@example.com',CODE
LOW…frontend/webv1/src/services/api/endpoints/auth.test.ts239 new Response(JSON.stringify({ user_id: 'user-1', email: 'user@example.com', is_admin: false }), {CODE
LOW…rontend/webv1/src/services/events/useSocketIO.test.tsx67 email: 'user@example.com',CODE
LOW⚡tests/app/routers/test_auth.py272 "email": "admin@example.com",CODE
LOW⚡tests/app/routers/test_auth.py281 assert json_response["user"]["email"] == "admin@example.com"CODE
LOWtests/app/routers/test_auth.py64def setup_test_admin(mock_invoker: Invoker, email: str = "admin@example.com", password: str = "AdminPass123") -> str:CODE
LOW⚡tests/app/routers/test_gallery_maintenance.py114 lambda _: TokenData(user_id="admin-1", email="admin@example.com", is_admin=True),CODE
LOW⚡tests/app/routers/test_gallery_maintenance.py121 user_id="admin-1", email="admin@example.com", is_admin=True, is_active=True, token_epoch=0CODE
LOW⚡tests/app/routers/test_gallery_maintenance.py345 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOW⚡tests/app/routers/test_gallery_maintenance.py351 return_value=Mock(user_id="user-1", email="user@example.com", is_admin=False, is_active=True, token_epoch=0)CODE
LOW⚡tests/app/routers/test_app_info.py93 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=not is_admin),CODE
LOW⚡tests/app/routers/test_app_info.py100 user_id="user-1", email="user@example.com", is_admin=is_admin, is_active=True, token_epoch=0CODE
LOWtests/app/routers/test_app_info.py44 return Mock(user_id="user-1", email="user@example.com", is_admin=False, is_active=True, token_epoch=0)CODE
LOWtests/app/routers/test_app_info.py70 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/routers/test_app_info.py551 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/routers/test_app_info.py573 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOWtests/app/routers/test_app_info.py595 lambda _: TokenData(user_id="user-1", email="user@example.com", is_admin=False),CODE
LOW⚡tests/app/api/test_sliding_window_token.py352 SimpleNamespace(user_id="test-user", email="test@test.com", is_admin=False, is_active=True, token_epoch=0),CODE
LOW⚡tests/app/api/test_sliding_window_token.py357 TokenData(user_id="test-user", email="test@test.com", is_admin=True, remember_me=False)CODE
LOW⚡tests/app/api/test_sliding_window_token.py374 SimpleNamespace(user_id="test-user", email="test@test.com", is_admin=True, is_active=True, token_epoch=0),CODE
LOW⚡tests/app/api/test_sliding_window_token.py379 TokenData(user_id="test-user", email="test@test.com", is_admin=False, remember_me=False)CODE
LOW⚡tests/app/api/test_sliding_window_token.py394 SimpleNamespace(user_id="test-user", email="test@test.com", is_admin=False, is_active=False, token_epoch=0),CODE
LOWtests/app/api/test_sliding_window_token.py21 email="test@test.com",CODE
LOWtests/app/api/test_sliding_window_token.py106 email="test@test.com",CODE
LOWtests/app/api/test_sliding_window_token.py425 SimpleNamespace(user_id="test-user", email="test@test.com", is_admin=False, is_active=True, token_epoch=0),CODE
LOWtests/app/api/test_video_upload_limits.py462 token_data = TokenData(user_id="user", email="user@example.com", is_admin=False)CODE
LOWtests/app/api/test_video_upload_limits.py481 token = create_access_token(TokenData(user_id="user", email="user@example.com", is_admin=False))CODE
LOWtests/app/api/test_video_upload_limits.py617 current_user=TokenData(user_id="user", email="user@example.com", is_admin=False),CODE
15 more matches not shown…
Redundant / Tautological Comments44 hits · 67 pts
SeverityFileLineSnippetContext
LOW⚡invokeai/app/invocations/facetools.py192 # Check if the input image has four channels (RGBA).COMMENT
LOW⚡invokeai/app/invocations/facetools.py207 # Check if any face is detected.COMMENT
LOW…keai/app/invocations/flux2/flux2_klein_model_loader.py138 # Check if main model is a pipeline-shaped config we can extract submodels from.COMMENT
LOWinvokeai/app/api/sockets.py809 # Check if we have user info for this socket. In multiuser mode _handle_connectCOMMENT
LOWinvokeai/app/api/sockets.py829 # Add socket to the queue roomCOMMENT
LOWinvokeai/app/api/routers/auth.py213 # Check if multiuser is enabledCOMMENT
LOWinvokeai/app/api/routers/auth.py373 # Check if multiuser is enabledCOMMENT
LOWinvokeai/app/api/routers/auth.py382 # Check if any admin existsCOMMENT
LOWinvokeai/app/api/routers/custom_nodes.py480 # Check if this looks like a workflow (must have nodes and edges)COMMENT
LOW⚡invokeai/app/api/routers/model_manager.py589 # Check if the model is installed by comparing paths.COMMENT
LOWinvokeai/app/api/routers/model_manager.py1546 # Check if source matches exactlyCOMMENT
LOWinvokeai/app/api/routers/model_manager.py1549 # Check if name (or previous names), base and type matchCOMMENT
LOWinvokeai/app/services/shared/graph_validation.py239 # Check if any of the types in the Union is a ListCOMMENT
LOWinvokeai/app/services/users/users_common.py38 # Check if the error is specifically about special-use/reserved domains or localhostCOMMENT
LOWinvokeai/app/services/users/users_default.py54 # Check if email already existsCOMMENT
LOWinvokeai/app/services/users/users_default.py102 # Check if user existsCOMMENT
LOW…pp/services/orphaned_models/orphaned_models_service.py97 # Check if disk_file is under model_dirCOMMENT
LOWinvokeai/backend/hidiffusion/hidiffusion.py2065 # Check if the pipeline is a ControlNet pipeline. InvokeAI's modularCOMMENT
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.py111 # Check if scheduler supports sigmas parameter using inspect.signatureCOMMENT
LOWinvokeai/backend/quantization/sdnq/loaders.py114 # Check if scale's out_features matches weight's out_featuresCOMMENT
LOWinvokeai/backend/quantization/sdnq/loaders.py154 # Check if shape is stored in configCOMMENT
LOWinvokeai/backend/quantization/sdnq/loaders.py261 # Check if this is a base weight tensorCOMMENT
LOWinvokeai/backend/quantization/sdnq/loaders.py271 # Check if this is a quantized tensor (has scale)COMMENT
LOW…end/z_image/extensions/regional_prompting_extension.py89 # Check if any regional masks existCOMMENT
LOWinvokeai/backend/model_manager/util/select_hf_files.py186 # Check if at least one of the files has the explicit fp16 variant.COMMENT
LOWinvokeai/backend/model_manager/load/load_default.py329 # Check if this is a text encoder submodel of a main model with cpu_only settingCOMMENT
LOWinvokeai/backend/model_manager/load/load_default.py336 # 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.py796 # Check if there are any unlocked models that can be clearedCOMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py251 # Check if submodel folder has SDNQ quantization - if so, use SDNQ loaderCOMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py425 # Check if conversion is needed (original format vs diffusers format)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py513 # Check if the state dict is in original format (not diffusers format)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py893 # Check if conversion is needed (original format vs diffusers format)COMMENT
LOW…ai/backend/model_manager/load/model_loaders/z_image.py977 # 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.py1628 # Check if lm_head.weight is still a meta tensor (wasn't in GGUF state dict)COMMENT
LOW…vokeai/backend/model_manager/load/model_loaders/vae.py267 # Check if this is an SDNQ-quantized VAE folderCOMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py1120 # Check if this is a Klein model without guidance (guidance_embeds=False in config)COMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py1203 # Check if keys have ComfyUI-style prefix and strip if needed. This runs before anythingCOMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py1748 # Check if keys have ComfyUI-style prefix and strip if neededCOMMENT
AI Slop Vocabulary32 hits · 66 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/app/util/video_thumbnails.py467# 0.68 (a portrait on white seamless, a pillarboxed clip) and ordinary content sits belowCOMMENT
MEDIUMinvokeai/app/invocations/baseinvocation.py635 # 2. ui_type was set in conjunction with any of the new ui_model_[base|type|variant|format] fields, whichCOMMENT
LOWinvokeai/app/invocations/baseinvocation.py806 # You'd be tempted to just add the type field and rebuild the model, like this:COMMENT
MEDIUMinvokeai/app/invocations/model.py778 """Applies the seamless transformation to the Model UNet and VAE."""STRING
LOWinvokeai/app/invocations/image.py1345 # If the fade size is 0, just return the mask as-is.COMMENT
MEDIUMinvokeai/app/invocations/sd/denoise_latents.py977 ### seamlessCOMMENT
MEDIUMinvokeai/app/invocations/sd/denoise_latents.py1042 # ext: freeu, seamless, ip adapter, lora, hidiffusionCOMMENT
LOW…okeai/app/invocations/qwen_image/qwen_image_denoise.py493 # For txt2img models: just use noisy patchesCOMMENT
LOWinvokeai/app/services/config/config_default.py787 # 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.py379 # to do any handling here, and no error should be set - just pass and the cancellation will be handledCOMMENT
MEDIUM…dvancedSettingsAccordion/AdvancedSettingsAccordion.tsx101 // Ideogram 4 and Krea-2 hide the VAE / clip skip / CFG rescale / seamless controls (they don'tCOMMENT
MEDIUM…rc/features/nodes/util/graph/generation/addSeamless.ts26 // Always write seamless metadata to ensure recalling all parameters will reset the seamless settingsCOMMENT
MEDIUM…1/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.ts187 // We might get the VAE from the main model, custom VAE, or seamless node.COMMENT
MEDIUM…/features/nodes/util/graph/generation/buildSD1Graph.ts173 // 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.py785# this needed to make work seamless patchSTRING
LOWinvokeai/backend/flux/extensions/kontext_extension.py216 # First image - just set canvas dimensionsCOMMENT
LOWinvokeai/backend/quantization/bnb_llm_int8.py82 # 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.py58 # if the subfolder is a single file, then bypass the selection and just return itCOMMENT
LOW…okeai/backend/model_manager/load/model_loaders/flux.py2241 # Any remaining keys that weren't converted - just pass throughCOMMENT
MEDIUMtests/app/routers/test_privilege_revocation.py278 # the test harness.COMMENT
MEDIUMtests/app/routers/test_multiuser_authorization.py3532 # the test harness.COMMENT
MEDIUM⚡tests/app/util/test_video_thumbnails.py810 """Fireworks on a night sky, a pillarboxed phone video, a portrait on white seamless:STRING
MEDIUMtests/app/invocations/test_z_image_tiled_decode.py318 # `seamless_axes=[]` rather than a MagicMock: the node patches seamless for every VAE it acceptsCOMMENT
LOWscripts/build_wheel.sh17 # we can't just call 'deactivate' because this function is not exportedCOMMENT
LOW.github/workflows/python-checks.yml47 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/typegen-checks.yml46 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/openapi-checks.yml46 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
LOW.github/workflows/uv-lock-checks.yml49 # uv requires a venv by default - but for this, we can simply use the system pythonCOMMENT
Cross-Language Confusion11 hits · 60 pts
SeverityFileLineSnippetContext
HIGHinvokeai/app/api/routers/model_manager.py269 records locally: look up `(base, variant)`, fall back to `(base, null)`.STRING
HIGH…/app/services/shared/database/queries/intermediates.py36 null,CODE
HIGH…vokeai/app/services/shared/database/queries/gallery.py28 null,CODE
HIGHtests/app/routers/test_images.py838 # Optional fields are wrapped in anyOf: [{array}, {null}].COMMENT
HIGHtests/app/invocations/test_text_llm_with_preset.py236 # default null, which the editors turn into 0 and the field's own lower bound then rejected --COMMENT
HIGH⚡tests/app/services/video_files/test_video_files_disk.py329 '{"invokeai_metadata": null, "invokeai_workflow": "{\\"name\\": \\"old\\"}", "invokeai_graph": null}'CODE
HIGHtests/app/services/image_files/test_image_files_disk.py1271 '"meta": {"category": "user", "version": "3.0.0"}, "nodes": [], "edges": [], "form": null}'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
Verbosity Indicators16 hits · 32 pts
SeverityFileLineSnippetContext
LOW⚡invokeai/app/invocations/image.py1616 # Step 1: Load all imagesCOMMENT
LOW⚡invokeai/app/invocations/image.py1622 # Step 2: Determine target resolution for the first imageCOMMENT
LOWinvokeai/app/invocations/image.py1649 # Step 3: Process and resize all images with consistent heightCOMMENT
LOWinvokeai/app/invocations/image.py1673 # 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
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py79 # Step 1: Rearrange to put spatial dims together for proper patchingCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py83 # Step 2: Split H and W into tokens and patch sizesCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py87 # Step 3: Rearrange to group patches and featuresCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py91 # Step 4: For F > 1, we'd need to handle F similarly, but for F=1 this is simplerCOMMENT
LOW⚡scripts/check_classifiers.py9# Step 1: Get pyproject.toml path from argsCOMMENT
LOW⚡scripts/check_classifiers.py19# Step 1: Download the official Trove classifier listCOMMENT
LOW⚡scripts/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
LOW⚡invokeai/app/invocations/image.py1616 # Step 1: Load all imagesCOMMENT
LOW⚡invokeai/app/invocations/image.py1622 # Step 2: Determine target resolution for the first imageCOMMENT
LOWinvokeai/app/invocations/image.py1649 # Step 3: Process and resize all images with consistent heightCOMMENT
LOWinvokeai/app/invocations/image.py1673 # 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
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py79 # Step 1: Rearrange to put spatial dims together for proper patchingCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py83 # Step 2: Split H and W into tokens and patch sizesCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py87 # Step 3: Rearrange to group patches and featuresCOMMENT
LOW⚡invokeai/backend/z_image/z_image_patchify_utils.py91 # Step 4: For F > 1, we'd need to handle F similarly, but for F=1 this is simplerCOMMENT
LOW⚡scripts/check_classifiers.py9# Step 1: Get pyproject.toml path from argsCOMMENT
LOW⚡scripts/check_classifiers.py19# Step 1: Download the official Trove classifier listCOMMENT
LOW⚡scripts/check_classifiers.py24# Step 2: Extract classifiers from pyproject.tomlCOMMENT
LOWscripts/check_classifiers.py36# Step 3: Check for invalid classifiersCOMMENT
Modern AI Meta-Vocabulary7 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUM…eai/app/services/shared/database/schema/image_index.py17 # The embedding model's content hash, not its install key.COMMENT
MEDIUM…eai/app/services/shared/database/schema/image_index.py32 # The embedding model's content hash, not its install key.COMMENT
MEDIUM⚡…vokeai/app/services/image_index/image_index_default.py1702 # an event-driven client would hang. Log rather than unwind intoCOMMENT
MEDIUM…vokeai/app/services/image_index/image_index_default.py216# Minimum gap between re-resolutions of the configured embedding model. The map'sCOMMENT
MEDIUMinvokeai/backend/text_llm_pipeline.py174 # chain of thought, so prompt expansion returns the prompt rather than the model'sCOMMENT
MEDIUMinvokeai/backend/model_manager/starter_models/common.py44# stronger zero-shot weights (Data Filtering Networks, 39B samples seen). TheCOMMENT
MEDIUMtests/conftest.py93 # embedding model. Tests that exercise the index enable it themselves.COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHinvokeai/app/services/image_index/cluster_labels.py18# Photo-heavy with a few non-photo templates so AI-generated drawings andCOMMENT
Cross-Language Confusion (JS/TS)1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…ontend/webv1/src/features/ui/layouts/navigation-api.ts185 * @return True if the switch was successful, false otherwiseCOMMENT
Dead Code3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMinvokeai/backend/image_util/imwatermark/vendor.py258CODE
MEDIUMtests/app/util/test_video_thumbnails.py102CODE
MEDIUMtests/app/util/test_video_thumbnails.py652CODE
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippetContext
LOW⚡tests/app/routers/test_no_blocking_async_routes.py97 "async def handler():\n async def helper():\n await something()\n return blocking_service_call()\n"CODE
Slop Phrases2 hits · 0 pts
SeverityFileLineSnippetContext
LOWinvokeai/backend/hidiffusion/hidiffusion.py1873 # make sure to the functional Conv2D function as otherwise torch.compile's graph will breakSTRING
LOWinvokeai/backend/hidiffusion/hidiffusion.py1950 # make sure to the functional Conv2D function as otherwise torch.compile's graph will breakSTRING