Repository: stable-diffusion-webui
Issue: [Bug]: Portable version fails to run with python error
Labels: asking-for-help-with-local-system-issues,bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

I downloaded `sd.webui.zip` from git release. `update.bat` ran without any problems. Then I ran `run.bat` and it installed everything, but running program results in the error. Localhost still runs, but generation is not working.
```
loading stable diffusion model: SafetensorError
Traceback (most recent call last):
  File "threading.py", line 973, in _bootstrap
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 499, in get_sd_model
    load_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 584, in load_model
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 315, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 291, in read_state_dict
    pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\safetensors\torch.py", line 259, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer


Stable diffusion model failed to load
Applying attention optimization: xformers... done.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 78.4s (prepare environment: 68.1s, import torch: 3.6s, import gradio: 1.2s, setup paths: 2.7s, initialize shared: 0.2s, other imports: 0.6s, setup codeformer: 0.1s, load scripts: 1.1s, create ui: 0.6s, gradio launch: 0.2s).
Loading weights [824618d20a] from C:\Users\archi\Downloads\sd.webui\webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
loading stable diffusion model: SafetensorError
Traceback (most recent call last):
  File "threading.py", line 973, in _bootstrap
  File "threading.py", line 1016, in _bootstrap_inner
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 392, in pages_html
    return refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 499, in get_sd_model
    load_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 584, in load_model
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 315, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 291, in read_state_dict
    pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\safetensors\torch.py", line 259, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer


Stable diffusion model failed to load
Loading weights [824618d20a] from C:\Users\archi\Downloads\sd.webui\webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
loading stable diffusion model: SafetensorError
Traceback (most recent call last):
  File "threading.py", line 973, in _bootstrap
  File "threading.py", line 1016, in _bootstrap_inner
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 392, in pages_html
    return refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 499, in get_sd_model
    load_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 584, in load_model
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 315, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 291, in read_state_dict
    pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
Traceback (most recent call last):
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\safetensors\torch.py", line 259, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer


Stable diffusion model failed to load
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
Loading weights [824618d20a] from C:\Users\archi\Downloads\sd.webui\webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 392, in pages_html
    return refresh()
loading stable diffusion model: SafetensorError
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)
AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "threading.py", line 973, in _bootstrap
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "threading.py", line 1016, in _bootstrap_inner
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui.py", line 1298, in <lambda>
    update_image_cfg_scale_visibility = lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit")
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\shared_items.py", line 110, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 499, in get_sd_model
    load_model()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 584, in load_model
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 315, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 392, in pages_html
    return refresh()
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\sd_models.py", line 291, in read_state_dict
    pl_sd = safetensors.torch.load_file(checkpoint_file, device=device)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks.py", line 398, in refresh
    pg.refresh()
  File "C:\Users\archi\Downloads\sd.webui\system\python\lib\site-packages\safetensors\torch.py", line 259, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: MetadataIncompleteBuffer
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\ui_extra_networks_textual_inversion.py", line 13, in refresh
    sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 255, in load_textual_inversion_embeddings
    self.expected_shape = self.get_expected_shape()

  File "C:\Users\archi\Downloads\sd.webui\webui\modules\textual_inversion\textual_inversion.py", line 154, in get_expected_shape
    vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1)

AttributeError: 'NoneType' object has no attribute 'cond_stage_model'
Stable diffusion model failed to load
```

### Steps to reproduce the problem

1. Download `sd.webui.zip` from [here].(https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.0.0-pre)
2. Run 'update.bat'.
3. Run 'run.bat'

### What should have happened?

Program should have started successfully and generation should have worked.

### Sysinfo

None

### What browsers do you use to access the UI ?

Mozilla Firefox

### Console logs

```Shell
None
```


### Additional information

None