Skip to content

[SD-XL] Running SD XL via "from_single_file" unnecessarily downloads a 10 GB CLIP model #4021

Closed
@n00mkrad

Description

@n00mkrad

Describe the bug

Running StableDiffusionXLPipeline downloads laion/CLIP-ViT-bigG-14-laion2B-39B-b160k, which is about 10 GB in size.

Is it possible to avoid this big download?

ComfyUI, for example, seems to be able to run SDXL without this huge CLIP model.

Reproduction

Run this code example:

https://github.com/huggingface/diffusers/releases/tag/v0.18.1

The script will load the SD model, then download laion/CLIP-ViT-bigG-14-laion2B-39B-b160k into the default HF cache directory.

Logs

python sdxl.py
global_step key not found in model
Some weights of the model checkpoint at openai/clip-vit-large-patch14 were not used when initializing CLIPTextModel: [...]
- This IS expected if you are initializing CLIPTextModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing CLIPTextModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Downloading (…)olve/main/vocab.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 862k/862k [00:00<00:00, 3.10MB/s]
Downloading (…)olve/main/merges.txt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 1.94MB/s]
Downloading (…)cial_tokens_map.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:00<?, ?B/s]
Downloading (…)okenizer_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 904/904 [00:00<?, ?B/s]
Downloading (…)lve/main/config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.76k/4.76k [00:00<00:00, 4.77MB/s]
Downloading (…)model.bin.index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 120k/120k [00:00<?, ?B/s]
Downloading shards:   0%|                                                                                                                                                                                                                                                                             | 0/2 [00:00<?, ?it/s]
Downloading (…)l-00001-of-00002.bin:  35%|███████████████████████████████████████████████████████████████████████████████████▌                                                                                                                                                         | 3.52G/9.99G [01:33<02:57, 36.5MB/s]
[...]

System Info

Diffusers 0.18.1
Windows 10 64-bit
Python 3.10.7
Pytorch 2.0.1

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions