Skip to content

_get_checkpoint_shard_files not work when HF_HUB_OFFLINE=1 #11447

Open
@thomascatlee

Description

@thomascatlee

Describe the bug

diffusers 0.33.1

_get_checkpoint_shard_files() has local_files_only param, but it can't work, because _get_checkpoint_shard_files() called model_info(), which connect huggingface.co to get model info. And if you set HF_HUB_OFFLINE=1, you will get error like this

huggingface_hub.errors.OfflineModeIsEnabled: Cannot reach https://huggingface.co/api/models/lllyasviel/FramePackI2V_HY: offline mode is enabled. To disable it, please unset the `HF_HUB_OFFLINE` environment variable.

Reproduction

load 'lllyasviel/FramePackI2V_HY' model from Huggingface successfully, and the disconnected Internet, load again with local_files_only=True or HF_HUB_OFFLINE=1.

Logs

System Info

diffusers 0.33.1
huggingface-hub 0.30.2
Python 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] on linux

Who can help?

No response

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