Repository: stable-diffusion-webui
Issue: [Bug]: Alias recognition issue in stable-diffusion-webui
Labels: bug-report

### Checklist

- [X] The issue exists after disabling all extensions
- [x] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [X] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet

### What happened?

**Description:**
The instructions on the [wiki](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Change-model-folder-location) indicate that models can be stored externally and aliases can be created for them. This used to work correctly but no longer does. Despite completely deleting files and reinstalling, the issue persists. The system fails to recognize aliases properly and treats them as incorrect files.

### Steps to reproduce the problem

**Steps to Reproduce:**

Follow the instructions on the wiki to store models externally and create aliases.
Attempt to use the alias in the stable-diffusion-webui.
Observe the errors in the terminal.

**Expected Behavior:**
The system should correctly recognize the alias and load the model without errors.

**Actual Behavior:**
The system fails to recognize the alias and produces the following errors:

```
Running on local URL:  http://0.0.0.0:8777

To create a public link, set `share=True` in `launch()`.
Startup time: 0.4s (load scripts: 0.1s, create ui: 0.1s, gradio launch: 0.1s).
Checkpoint 06Cuteyukimixadorable_v10.safetensors [f944617859] not found; loading fallback 06Cuteyukimixadorable_v10.safetensors
Checkpoint 06Cuteyukimixadorable_v10.safetensors [f944617859] not found; loading fallback 06Cuteyukimixadorable_v10.safetensors
  0%|                                                    | 0/20 [00:00<?, ?it/s]
*** Error completing request
*** Arguments: ('task(shidvi47vvgc19f)', <gradio.routes.Request object at 0x3234199c0>, 'one girl', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 988, in process_images_inner
        samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 1346, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 230, in sample
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_common.py", line 272, in launch_sampling
        return func()
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 230, in <lambda>
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 594, in sample_dpmpp_2m
        denoised = model(x, sigmas[i] * s_in, **extra_args)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_cfg_denoiser.py", line 249, in forward
        x_out = self.inner_model(x_in, sigma_in, cond=make_condition_dict(cond_in, image_cond_in))
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/external.py", line 112, in forward
        eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/external.py", line 138, in get_eps
        return self.inner_model.apply_model(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 34, in __call__
        return self.__sub_func(self.__orig_func, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_unet.py", line 50, in apply_model
        result = orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet), cond, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 34, in __call__
        return self.__sub_func(self.__orig_func, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_unet.py", line 50, in apply_model
        result = orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet), cond, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 858, in apply_model
        x_recon = self.model(x_noisy, t, **cond)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1335, in forward
        out = self.diffusion_model(x, t, context=cc)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_unet.py", line 91, in UNetModel_forward
        return original_forward(self, x, timesteps, context, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/openaimodel.py", line 789, in forward
        emb = self.time_embed(t_emb)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/container.py", line 217, in forward
        input = module(input)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/devices.py", line 169, in forward_wrapper
        result = self.org_forward(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 584, in network_Linear_forward
        return originals.Linear_forward(self, input)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 116, in forward
        return F.linear(input, self.weight, self.bias)
    RuntimeError: Placeholder storage has not been allocated on MPS device!
```

### What should have happened?

The system should correctly recognize the alias and load the model without errors.

### What browsers do you use to access the UI ?

Apple Safari

### Sysinfo

[sysinfo-2024-07-28-18-46.json](https://github.com/user-attachments/files/16404890/sysinfo-2024-07-28-18-46.json)


### Console logs

```Shell
on local URL:  http://0.0.0.0:8777

To create a public link, set `share=True` in `launch()`.
Startup time: 0.4s (load scripts: 0.1s, create ui: 0.1s, gradio launch: 0.1s).
Checkpoint 06Cuteyukimixadorable_v10.safetensors [f944617859] not found; loading fallback 06Cuteyukimixadorable_v10.safetensors
Checkpoint 06Cuteyukimixadorable_v10.safetensors [f944617859] not found; loading fallback 06Cuteyukimixadorable_v10.safetensors
  0%|                                                    | 0/20 [00:00<?, ?it/s]
*** Error completing request
*** Arguments: ('task(shidvi47vvgc19f)', <gradio.routes.Request object at 0x3234199c0>, 'one girl', '', [], 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 20, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 988, in process_images_inner
        samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
      File "/Users/user/stable-diffusion-webui/modules/processing.py", line 1346, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 230, in sample
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_common.py", line 272, in launch_sampling
        return func()
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 230, in <lambda>
        samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 594, in sample_dpmpp_2m
        denoised = model(x, sigmas[i] * s_in, **extra_args)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_samplers_cfg_denoiser.py", line 249, in forward
        x_out = self.inner_model(x_in, sigma_in, cond=make_condition_dict(cond_in, image_cond_in))
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/external.py", line 112, in forward
        eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/external.py", line 138, in get_eps
        return self.inner_model.apply_model(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 34, in __call__
        return self.__sub_func(self.__orig_func, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_unet.py", line 50, in apply_model
        result = orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet), cond, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 22, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_utils.py", line 34, in __call__
        return self.__sub_func(self.__orig_func, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_hijack_unet.py", line 50, in apply_model
        result = orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet), cond, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 858, in apply_model
        x_recon = self.model(x_noisy, t, **cond)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1335, in forward
        out = self.diffusion_model(x, t, context=cc)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/sd_unet.py", line 91, in UNetModel_forward
        return original_forward(self, x, timesteps, context, *args, **kwargs)
      File "/Users/user/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/openaimodel.py", line 789, in forward
        emb = self.time_embed(t_emb)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
        return forward_call(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/container.py", line 217, in forward
        input = module(input)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/modules/devices.py", line 169, in forward_wrapper
        result = self.org_forward(*args, **kwargs)
      File "/Users/user/stable-diffusion-webui/extensions-builtin/Lora/networks.py", line 584, in network_Linear_forward
        return originals.Linear_forward(self, input)
      File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 116, in forward
        return F.linear(input, self.weight, self.bias)
    RuntimeError: Placeholder storage has not been allocated on MPS device!
```


### Additional information

_No response_