How should `ModularPipeline` handle a component that failed to load?
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 15/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 35k
- Forks
- 7.5k
- Merge médio
- 2d 22h
- PRs com merge (30d)
- 58
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de huggingface/diffusers
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
huggingface/diffusers#15436 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
huggingface/diffusers#15433 ·
Mantenedores costumam responder em até 1 dia
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Talvez já em andamento @hparik11 assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
huggingface/diffusers#15423 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Docs: 13 docstrings document parameters their functions don't haveTalvez já em andamento @M-Colley assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
huggingface/diffusers#15363 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorTalvez já em andamento @chessing234 assumiu há 11 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
huggingface/diffusers#15337 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de huggingface/diffusers
Issues semelhantes
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 79/100
developmentseed/titiler-covjson#164 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
awslabs/visual-asset-management-system#2164 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
MakazhanAlpamys/Soup#3589 ·
Mantenedores costumam responder em até 1 dia
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
Mantenedores costumam responder em até 1 dia