lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.88k stars 192 forks source link

[Bug]: For two GPU --device-id 1 --port 7861 no longer works after update... #273

Closed StudioDUzes closed 9 months ago

StudioDUzes commented 1 year ago

Is there an existing issue for this?

What happened?

For two GPU --device-id 1 --port 7861 no longer works after update... Work before update and work with 1.5.2

Steps to reproduce the problem

txt2img "a girl" 768x768... error + black screen 1s...

What should have happened?

work

Sysinfo

no longer works after update...... {"error":"PDHError","detail":"","body":"","errors":"Something went wrong."}

Windows 11

no extra extensions...

@echo off

set PYTHON= set GIT= set VENV_DIR= set COMMANDLINE_ARGS=--device-id 1 --port 7861 --medvram --always-batch-cond-uncond --upcast-sampling --precision full --no-half-vae --disable-nan-check --use-cpu interrogate codeformer --api --autolaunch

git pull

call webui.bat

What browsers do you use to access the UI ?

Chrome

Console logs

Already up to date.
venv "N:\1.6\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.6.0
Commit hash: e9afd9aed55da48dfc917753e2daa114a515a85b
Launching Web UI with arguments: --device-id 1 --port 7861 --medvram --always-batch-cond-uncond --upcast-sampling --precision full --no-half-vae --disable-nan-check --use-cpu interrogate codeformer --api --autolaunch
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Something went wrong.', memory monitor disabled
Loading weights [31e35c80fc] from N:\1.6\stable-diffusion-webui-directml\models\Stable-diffusion\SDXL\sd_xl_base_1.0.safetensors
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
Startup time: 8.3s (prepare environment: 0.3s, import torch: 2.9s, import gradio: 1.1s, setup paths: 0.6s, initialize shared: 1.2s, other imports: 0.2s, load scripts: 1.0s, create ui: 0.4s, gradio launch: 0.7s, add APIs: 0.1s).
Creating model from config: N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\configs\inference\sd_xl_base.yaml
Applying attention optimization: sdp... done.
Model loaded in 7.7s (load weights from disk: 1.7s, create model: 0.5s, apply weights to model: 2.3s, calculate empty prompt: 3.0s).
  0%|                                                                                           | 0/20 [00:13<?, ?it/s]
*** Error completing request
*** Arguments: ('task(va69o9jlrhvbzhv)', 'a girl', '', [], 20, 'Euler a', 1, 1, 7, 768, 768, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x00000200759FC340>, 0, False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "N:\1.6\stable-diffusion-webui-directml\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\txt2img.py", line 64, in txt2img
        processed = processing.process_images(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 733, in process_images
        res = process_images_inner(p)
      File "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 871, 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 "N:\1.6\stable-diffusion-webui-directml\modules\processing.py", line 1144, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 238, 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 "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_common.py", line 261, in launch_sampling
        return func()
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_kdiffusion.py", line 238, 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 "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\k-diffusion\k_diffusion\sampling.py", line 145, in sample_euler_ancestral
        denoised = model(x, sigmas[i] * s_in, **extra_args)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_samplers_cfg_denoiser.py", line 175, in forward
        x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict(subscript_cond(cond_in, a, b), image_cond_in[a:b]))
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\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 "N:\1.6\stable-diffusion-webui-directml\repositories\k-diffusion\k_diffusion\external.py", line 138, in get_eps
        return self.inner_model.apply_model(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_models_xl.py", line 37, in apply_model
        return self.model(x, t, cond)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1538, in _call_impl
        result = forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_hijack_utils.py", line 17, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_hijack_utils.py", line 26, in __call__
        return self.__sub_func(self.__orig_func, *args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\modules\sd_hijack_unet.py", line 48, in apply_model
        return orig_func(self, x_noisy.to(devices.dtype_unet), t.to(devices.dtype_unet), cond, **kwargs).float()
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\wrappers.py", line 28, in forward
        return self.diffusion_model(
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\openaimodel.py", line 998, in forward
        h = module(h, emb, context)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\openaimodel.py", line 98, in forward
        x = layer(x, emb)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\openaimodel.py", line 317, in forward
        return checkpoint(
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\util.py", line 165, in checkpoint
        return CheckpointFunction.apply(func, len(inputs), *args)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\autograd\function.py", line 506, in apply
        return super().apply(*args, **kwargs)  # type: ignore[misc]
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\util.py", line 182, in forward
        output_tensors = ctx.run_function(*ctx.input_tensors)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\openaimodel.py", line 346, in _forward
        h = self.out_layers(h)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
        input = module(input)
      File "N:\1.6\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "N:\1.6\stable-diffusion-webui-directml\repositories\generative-models\sgm\modules\diffusionmodules\util.py", line 275, in forward
        return super().forward(x.float()).type(x.dtype)
      File "N:\1.6\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 457, in network_GroupNorm_forward
        network_apply_weights(self)
      File "N:\1.6\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 323, in network_apply_weights
        bias_backup = self.bias.to(devices.cpu, copy=True)
    RuntimeError

---

Additional information

2 x GPU Intel Arc a770 16go

2GPU

lshqqytiger commented 1 year ago

Does SD1.5 work?

StudioDUzes commented 1 year ago

Does SD1.5 work?

1.5.2 work very well and 1.6 also before last update