Linaqruf / vladmandic-webui-colab

10 stars 1 forks source link

Having problem with using custom Lora #4

Open Kirika-chan opened 1 year ago

Kirika-chan commented 1 year ago

Error popup when I try using custom Lora I downloaded in Custom Download Corner, the error as follow :

16:03:42-375105 ERROR gradio call: RuntimeError
╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /content/vladmandic-webui/modules/call_queue.py:59 in f │ │ │ │ 58 │ │ │ │ pr.enable() │ │ ❱ 59 │ │ │ res = list(func(*args, *kwargs)) │ │ 60 │ │ │ if shared.cmd_opts.profile: │ │ │ │ /content/vladmandic-webui/modules/call_queue.py:38 in f │ │ │ │ 37 │ │ │ try: │ │ ❱ 38 │ │ │ │ res = func(args, **kwargs) │ │ 39 │ │ │ │ progress.record_results(id_task, res) │ │ │ │ ... 26 frames hidden ... │ │ │ │ /content/vladmandic-webui/extensions-builtin/a1111-sd-webui-lycoris/lycoris. │ │ py:734 in lyco_Linear_forward │ │ │ │ 733 │ │ │ ❱ 734 │ return torch.nn.Linear_forward_before_lyco(self, input) │ │ 735 │ │ │ │ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/linear.py:114 in │ │ forward │ │ │ │ 113 │ def forward(self, input: Tensor) -> Tensor: │ │ ❱ 114 │ │ return F.linear(input, self.weight, self.bias) │ │ 115 │ ╰──────────────────────────────────────────────────────────────────────────────╯ RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)

this is the first time for me trying to use Lora, so I dont understand what's happening. But using the already installed embeddings are no issue

Linaqruf commented 1 year ago

Hi, probably you're using SDv1.x LoRA in SDv2 Model, or vice versa

Kirika-chan commented 1 year ago

Unfortunately, no, I'm trying to use koji (https://civitai.com/models/41916/koji) and add detail Lora (https://civitai.com/models/58390/detail-tweaker-lora-lora), both are based on SD 1.5

I looked up and found similar issue on auto1111 page (https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2373), there's also one at huggingface (https://discuss.huggingface.co/t/runtimeerror-expected-all-tensors-to-be-on-the-same-device-but-found-at-least-two-devices-cpu-and-cuda-0-when-checking-arugment-for-argument-index-in-method-wrapper-index-select/9255)

maybe you can looked it up? I don't understand anything about programming