How should `ModularPipeline` handle a component that failed to load?
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 15/100
Piste de recherche
Start in ModularPipeline.load_components, where each component load sits inside a try/except that logs a warning and leaves None. The example reproduces through Qwen2VLProcessor raising an ImportError for missing torchvision, so trace how that error reaches the modular path. Done means maintainers have agreed on whether a failed load should raise, be marked as deferred, or stay a warning, and that decision is recorded in the thread before any code is written.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What happens today
ModularPipeline.load_components wraps every component load in try/except. When one fails, it logs a warning and carries on with the others, leaving None for the component that failed.
My motivation for this was that loading is a time-consuming process, and one failure should not force the user to load everything again. If the component is optional (e.g. a safety checker that needs an external dependency that is not installed), they can simply skip it. If it is required and failed for a legitimate reason (e.g. a missing dependency), it is better that they load it separately and pass it with update_components than reload everything.
The other side of this is that a warning is not loud enough. If you do not notice it, the failure comes back at run time as an AttributeError or TypeError on None inside a block, far from the warning that explained the cause. In diffusers we prefer things to be explicit, and silently carrying on with a None component is not.
Example
Qwen2VLProcessor bundles a video processor that only has a torchvision implementation, and torchvision is not installed by diffusers or transformers. In an environment without it:
from diffusers import ModularPipeline
pipe = ModularPipeline.from_pretrained("Qwen/Qwen-Image-Edit")
pipe.load_components(names=["tokenizer", "processor"])
# logs: Failed to create component processor: ... you can safely ignore this message ...
# ImportError: Qwen2VLVideoProcessor requires the Torchvision library but it was not found in your environment.
print(pipe.processor) # None
Running the pipeline afterwards fails in the text encoder block when it calls the None processor. Loading the same processor directly, or through DiffusionPipeline.from_pretrained, raises the ImportError right away, so this only happens on the modular path.
Feedback and suggestions welcome.
Opened by Claude on behalf of @yiyixuxu
- Langage dominant
- Python
- Étoiles
- 35k
- Forks
- 7.5k
- Merge moyen
- 2 j 22 h
- PR mergées (30 j)
- 58
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de huggingface/diffusers
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
huggingface/diffusers#15436 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
huggingface/diffusers#15433 ·
Les mainteneurs répondent en général sous 1 jour
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Peut-être pris @hparik11 l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
huggingface/diffusers#15423 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Docs: 13 docstrings document parameters their functions don't havePeut-être pris @M-Colley l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
huggingface/diffusers#15363 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorPeut-être pris @chessing234 l’a pris il y a 11 jours. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
huggingface/diffusers#15337 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de huggingface/diffusers
Issues similaires
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount duePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 79/100
developmentseed/titiler-covjson#164 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
awslabs/visual-asset-management-system#2164 ·
Les mainteneurs répondent en général sous 1 jour
-
needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
MakazhanAlpamys/Soup#3589 ·
Les mainteneurs répondent en général sous 1 jour
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour