Skip to content

disable_progress_bar is ignored for some models (Loading checkpoint shards) #9719

@JonasLoos

Description

@JonasLoos

Describe the bug

When loading some pipelines, diffusers.utils.logging.disable_progress_bar() doesn't disable all progress bars. In particular the "Loading checkpoint shards" progress bar still appears. The "Loading pipeline components..." progress bar, however, is disabled as expected. Models I found, where this occurs, are:

The image generation progress bar also doesn't respect this setting, but can be disabled with pipe.set_progress_bar_config(disable=True). When files are downloaded, the progress bars are also not disabled. These two cases seem like they might be intentional. Are they?

Is there better way to disable progress bars globally for diffusers? Can the "Loading checkpoint shards" progress bar be disabled specifically?

Reproduction

import diffusers
diffusers.utils.logging.disable_progress_bar()
# pipe = diffusers.StableDiffusion3Pipeline.from_pretrained('stabilityai/stable-diffusion-3-medium-diffusers')
pipe = diffusers.FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-schnell')
pipe('test')

Logs

>>> pipe = diffusers.FluxPipeline.from_pretrained('black-forest-labs/FLUX.1-schnell')
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████| 2/2 [00:03<00:00,  1.56s/it]
You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers
>>>

System Info

Google Colab

or locally:

  • 🤗 Diffusers version: 0.30.3
  • Running on Google Colab?: No
  • Python version: 3.12.7
  • PyTorch version (GPU?): 2.5.0+cu124 (True)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Huggingface_hub version: 0.26.0
  • Transformers version: 4.45.2
  • Accelerate version: 1.0.1
  • PEFT version: not installed
  • Bitsandbytes version: not installed
  • Safetensors version: 0.4.5
  • xFormers version: not installed

Who can help?

@sayakpaul @DN6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions