Skip to content

fix: gracefully handle processor load failures for multimodal models (#82)#364

Open
umran666 wants to merge 2 commits into
p-e-w:masterfrom
umran666:fix/multimodal-processor-load
Open

fix: gracefully handle processor load failures for multimodal models (#82)#364
umran666 wants to merge 2 commits into
p-e-w:masterfrom
umran666:fix/multimodal-processor-load

Conversation

@umran666
Copy link
Copy Markdown
Contributor

@umran666 umran666 commented Jun 8, 2026

Catches configuration/dependency load failures when initializing a multimodal model's processor, logging a warning rather than crashing the model initialization loop. This allows multimodal models to be abliterated on text-only pipelines even if optional vision dependencies (such as torchvision) are missing.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request wraps the initialization of the multimodal processor in a try-except block to handle loading failures gracefully with a warning. The reviewer recommended catching specific exceptions rather than a broad Exception to prevent masking other programming errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/heretic/model.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant