Skip to main content

Module modality_hints

Module modality_hints 

Source
Expand description

Modality/capability hints derived from a Hugging Face model’s config.json: a first guess (architecture list, a vision block, or a few speech config keys) at what a downloaded model can do, before full identification. A diffusers model_index.json is hinted through the pipeline-family registry (from_model_index).

Structs§

Hint
A best-effort guess at a model’s shape from its config metadata.

Functions§

audio_hint
A speech-to-text (transcription) model.
embedding_hint
An embedding model.
from_config
The hint for a parsed config.json value: a vision-language model (a vision_config block plus a matching architecture), else the first architecture that matches an [architecture_hint] rule, else a speech model recognized by its config keys, else None.
from_config_json
The hint for a Hugging Face config.json file, or None if it is unreadable, unparseable, or matches no rule.
from_model_index
The hint for a diffusers model_index.json: its pipeline family’s modality and capabilities as a job. An unknown or absent _class_name yields an empty job hint (still a job — a diffusers bundle is never a streaming model).
gguf_hint
The default hint for a bare GGUF weight (text chat/completion).
speech_hint
A text-to-speech model.
text_hint
A text chat/completion model.
vision_chat_hint
A vision-capable chat model.
whisper_bin_hint
The default hint for a whisper .bin (transcription).