lshqqytiger / stable-diffusion-webui-amdgpu

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

[Bug]: GFPGan & Codeformers INTERNAL ASSERT FAILEDDMLTensor.cpp #423

Closed mr-september closed 8 months ago

mr-september commented 8 months ago

Checklist

What happened?

Extras tab, GFPGan and Codeformers have stopped working. I have been using them fine for months, until recently.

The output is the same as the input. There is an error message in the console, which doesn't seem to fully halt SD.

Steps to reproduce the problem

Use either/both of GFPGan and Codeformers in the Extras tab.

What should have happened?

Output with clear HD faces

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

{
    "Platform": "Windows-10-10.0.22621-SP0",
    "Python": "3.10.11",
    "Version": "v1.8.0-347-g25a3b6cb",
    "Commit": "25a3b6cbeea8a07afd5e4594afc2f1c79f41ac1a",
    "Script path": "E:\\stable-diffusion-webui-directml",
    "Data path": "E:\\stable-diffusion-webui-directml",
    "Extensions dir": "E:\\stable-diffusion-webui-directml\\extensions",
    "Checksum": "a9ff286259b3557708b0ea47d64c506bbbf7ddc017ada2b63cbb6d4a36450c0c",
    "Commandline": [
        "launch.py",
        "--use-directml",
        "--opt-sub-quad-attention",
        "--medvram",
        "--no-half-vae",
        "--disable-nan-check",
        "--autolaunch",
        "--api",
        "--cors-allow-origins=http://127.0.0.1:3456",
        "--no-half",
        "--sub-quad-kv-chunk-size",
        "512",
        "--sub-quad-q-chunk-size",
        "512",
        "--sub-quad-chunk-threshold",
        "80",
        "--use-cpu",
        "interrogate",
        "gfpgan"
    ],
    "Torch env info": {
        "torch_version": "2.0.0+cpu",
        "is_debug_build": "False",
        "cuda_compiled_version": null,
        "gcc_version": null,
        "clang_version": null,
        "cmake_version": null,
        "os": "Microsoft Windows 11 Education",
        "libc_version": "N/A",
        "python_version": "3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] (64-bit runtime)",
        "python_platform": "Windows-10-10.0.22621-SP0",
        "is_cuda_available": "False",
        "cuda_runtime_version": null,
        "cuda_module_loading": "N/A",
        "nvidia_driver_version": null,
        "nvidia_gpu_models": null,
        "cudnn_version": null,
        "pip_version": "pip3",
        "pip_packages": [
            "numpy==1.26.2",
            "open-clip-torch==2.20.0",
            "pytorch-lightning==1.9.4",
            "torch==2.0.0",
            "torch-directml==0.2.0.dev230426",
            "torchdiffeq==0.2.3",
            "torchmetrics==1.3.2",
            "torchsde==0.2.6",
            "torchvision==0.15.1"
        ],
        "conda_packages": null,
        "hip_compiled_version": "N/A",
        "hip_runtime_version": "N/A",
        "miopen_runtime_version": "N/A",
        "caching_allocator_config": "",
        "is_xnnpack_available": "True",
        "cpu_info": [
            "Architecture=9",
            "CurrentClockSpeed=3401",
            "DeviceID=CPU0",
            "Family=107",
            "L2CacheSize=4096",
            "L2CacheSpeed=",
            "Manufacturer=AuthenticAMD",
            "MaxClockSpeed=3401",
            "Name=AMD Ryzen 7 5700X 8-Core Processor             ",
            "ProcessorType=3",
            "Revision=8450"
        ]
    },
    "Exceptions": [
        {
            "exception": "tensor.device().type() == at::DeviceType::PrivateUse1 INTERNAL ASSERT FAILED at \"D:\\\\a\\\\_work\\\\1\\\\s\\\\pytorch-directml-plugin\\\\torch_directml\\\\csrc\\\\dml\\\\DMLTensor.cpp\":31, please report a bug to PyTorch. unbox expects Dml at::Tensor as inputs",
            "traceback": [
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\face_restoration_utils.py, line 86, restore_with_face_helper",
                    "cropped_face_t = restore_face(cropped_face_t)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\gfpgan_model.py, line 51, restore_face",
                    "return self.net(cropped_face_t, return_rgb=False)[0]"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\spandrel\\architectures\\GFPGAN\\arch\\gfpganv1_clean_arch.py, line 319, forward",
                    "feat = F.leaky_relu_(self.conv_body_first(x), negative_slope=0.2)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\extensions-builtin\\Lora\\networks.py, line 515, network_Conv2d_forward",
                    "return originals.Conv2d_forward(self, input)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 463, forward",
                    "return self._conv_forward(input, self.weight, self.bias)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 459, _conv_forward",
                    "return F.conv2d(input, weight, bias, self.stride,"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 43, <lambda>",
                    "setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: forward(op, args, kwargs))"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 15, forward",
                    "return op(*args, **kwargs)"
                ]
            ]
        },
        {
            "exception": "tensor.device().type() == at::DeviceType::PrivateUse1 INTERNAL ASSERT FAILED at \"D:\\\\a\\\\_work\\\\1\\\\s\\\\pytorch-directml-plugin\\\\torch_directml\\\\csrc\\\\dml\\\\DMLTensor.cpp\":31, please report a bug to PyTorch. unbox expects Dml at::Tensor as inputs",
            "traceback": [
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\face_restoration_utils.py, line 86, restore_with_face_helper",
                    "cropped_face_t = restore_face(cropped_face_t)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\gfpgan_model.py, line 51, restore_face",
                    "return self.net(cropped_face_t, return_rgb=False)[0]"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\spandrel\\architectures\\GFPGAN\\arch\\gfpganv1_clean_arch.py, line 319, forward",
                    "feat = F.leaky_relu_(self.conv_body_first(x), negative_slope=0.2)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\extensions-builtin\\Lora\\networks.py, line 515, network_Conv2d_forward",
                    "return originals.Conv2d_forward(self, input)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 463, forward",
                    "return self._conv_forward(input, self.weight, self.bias)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 459, _conv_forward",
                    "return F.conv2d(input, weight, bias, self.stride,"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 43, <lambda>",
                    "setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: forward(op, args, kwargs))"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 15, forward",
                    "return op(*args, **kwargs)"
                ]
            ]
        },
        {
            "exception": "tensor.device().type() == at::DeviceType::PrivateUse1 INTERNAL ASSERT FAILED at \"D:\\\\a\\\\_work\\\\1\\\\s\\\\pytorch-directml-plugin\\\\torch_directml\\\\csrc\\\\dml\\\\DMLTensor.cpp\":31, please report a bug to PyTorch. unbox expects Dml at::Tensor as inputs",
            "traceback": [
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\face_restoration_utils.py, line 86, restore_with_face_helper",
                    "cropped_face_t = restore_face(cropped_face_t)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\gfpgan_model.py, line 51, restore_face",
                    "return self.net(cropped_face_t, return_rgb=False)[0]"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\spandrel\\architectures\\GFPGAN\\arch\\gfpganv1_clean_arch.py, line 319, forward",
                    "feat = F.leaky_relu_(self.conv_body_first(x), negative_slope=0.2)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\extensions-builtin\\Lora\\networks.py, line 515, network_Conv2d_forward",
                    "return originals.Conv2d_forward(self, input)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 463, forward",
                    "return self._conv_forward(input, self.weight, self.bias)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 459, _conv_forward",
                    "return F.conv2d(input, weight, bias, self.stride,"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 43, <lambda>",
                    "setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: forward(op, args, kwargs))"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 15, forward",
                    "return op(*args, **kwargs)"
                ]
            ]
        },
        {
            "exception": "tensor.device().type() == at::DeviceType::PrivateUse1 INTERNAL ASSERT FAILED at \"D:\\\\a\\\\_work\\\\1\\\\s\\\\pytorch-directml-plugin\\\\torch_directml\\\\csrc\\\\dml\\\\DMLTensor.cpp\":31, please report a bug to PyTorch. unbox expects Dml at::Tensor as inputs",
            "traceback": [
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\face_restoration_utils.py, line 86, restore_with_face_helper",
                    "cropped_face_t = restore_face(cropped_face_t)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\gfpgan_model.py, line 51, restore_face",
                    "return self.net(cropped_face_t, return_rgb=False)[0]"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\spandrel\\architectures\\GFPGAN\\arch\\gfpganv1_clean_arch.py, line 319, forward",
                    "feat = F.leaky_relu_(self.conv_body_first(x), negative_slope=0.2)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\module.py, line 1501, _call_impl",
                    "return forward_call(*args, **kwargs)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\extensions-builtin\\Lora\\networks.py, line 515, network_Conv2d_forward",
                    "return originals.Conv2d_forward(self, input)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 463, forward",
                    "return self._conv_forward(input, self.weight, self.bias)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py, line 459, _conv_forward",
                    "return F.conv2d(input, weight, bias, self.stride,"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 43, <lambda>",
                    "setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: forward(op, args, kwargs))"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\dml\\amp\\autocast_mode.py, line 15, forward",
                    "return op(*args, **kwargs)"
                ]
            ]
        },
        {
            "exception": "No module named 'basicsr'",
            "traceback": [
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\scripts.py, line 527, load_scripts",
                    "script_module = script_loading.load_module(scriptfile.path)"
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\modules\\script_loading.py, line 10, load_module",
                    "module_spec.loader.exec_module(module)"
                ],
                [
                    "<frozen importlib._bootstrap_external>, line 883, exec_module",
                    ""
                ],
                [
                    "<frozen importlib._bootstrap>, line 241, _call_with_frames_removed",
                    ""
                ],
                [
                    "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-depth-lib\\scripts\\main.py, line 10, <module>",
                    "from basicsr.utils.download_util import load_file_from_url"
                ]
            ]
        }
    ],
    "CPU": {
        "model": "AMD64 Family 25 Model 33 Stepping 2, AuthenticAMD",
        "count logical": 16,
        "count physical": 8
    },
    "RAM": {
        "total": "32GB",
        "used": "22GB",
        "free": "10GB"
    },
    "GPU": {
        "model": "AMD Radeon RX 5700 XT 50th Anniversary",
        "total_memory": 320897024
    },
    "Extensions": [
        {
            "name": "DWPose",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\DWPose",
            "version": "3dca5db7",
            "branch": "onnx",
            "remote": "https://github.com/IDEA-Research/DWPose"
        },
        {
            "name": "Stable-Diffusion-Webui-Civitai-Helper",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\Stable-Diffusion-Webui-Civitai-Helper",
            "version": "7585fb1f",
            "branch": "main",
            "remote": "https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper.git"
        },
        {
            "name": "adetailer",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\adetailer",
            "version": "0a070455",
            "branch": "main",
            "remote": "https://github.com/Bing-su/adetailer.git"
        },
        {
            "name": "facechain",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\facechain",
            "version": "1cd8a204",
            "branch": "main",
            "remote": "https://github.com/modelscope/facechain.git"
        },
        {
            "name": "multidiffusion-upscaler-for-automatic1111",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\multidiffusion-upscaler-for-automatic1111",
            "version": "76cde3c2",
            "branch": "main",
            "remote": "https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git"
        },
        {
            "name": "sd-webui-3d-open-pose-editor",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-3d-open-pose-editor",
            "version": "f2d5aac5",
            "branch": "main",
            "remote": "https://github.com/nonnonstop/sd-webui-3d-open-pose-editor.git"
        },
        {
            "name": "sd-webui-controlnet",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-controlnet",
            "version": "2091b6fb",
            "branch": "main",
            "remote": "https://github.com/Mikubill/sd-webui-controlnet.git"
        },
        {
            "name": "sd-webui-depth-lib",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-depth-lib",
            "version": "efa9f616",
            "branch": "main",
            "remote": "https://github.com/jexom/sd-webui-depth-lib.git"
        },
        {
            "name": "sd-webui-inpaint-anything",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-inpaint-anything",
            "version": "ab57640d",
            "branch": "main",
            "remote": "https://github.com/Uminosachi/sd-webui-inpaint-anything.git"
        },
        {
            "name": "sd-webui-reactor",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-reactor",
            "version": "ae571499",
            "branch": "main",
            "remote": "https://github.com/Gourieff/sd-webui-reactor.git"
        },
        {
            "name": "sd-webui-segment-anything",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\sd-webui-segment-anything",
            "version": "982138cf",
            "branch": "master",
            "remote": "https://github.com/continue-revolution/sd-webui-segment-anything.git"
        },
        {
            "name": "stable-diffusion-webui-state",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\stable-diffusion-webui-state",
            "version": "f2bb3809",
            "branch": "main",
            "remote": "https://github.com/ilian6806/stable-diffusion-webui-state.git"
        },
        {
            "name": "ultimate-upscale-for-automatic1111",
            "path": "E:\\stable-diffusion-webui-directml\\extensions\\ultimate-upscale-for-automatic1111",
            "version": "2322caa4",
            "branch": "master",
            "remote": "https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git"
        }
    ],
    "Inactive extensions": [],
    "Environment": {
        "COMMANDLINE_ARGS": "--use-directml --opt-sub-quad-attention --medvram --no-half-vae --disable-nan-check --autolaunch --api --cors-allow-origins=http://127.0.0.1:3456 --no-half --sub-quad-kv-chunk-size 512 --sub-quad-q-chunk-size 512 --sub-quad-chunk-threshold 80 --use-cpu interrogate gfpgan",
        "GRADIO_ANALYTICS_ENABLED": "False"
    },
    "Config": {
        "samples_save": true,
        "samples_format": "png",
        "samples_filename_pattern": "",
        "save_images_add_number": true,
        "grid_save": false,
        "grid_format": "png",
        "grid_extended_filename": false,
        "grid_only_if_multiple": true,
        "grid_prevent_empty_spots": false,
        "n_rows": -1,
        "enable_pnginfo": true,
        "save_txt": false,
        "save_images_before_face_restoration": false,
        "save_images_before_highres_fix": false,
        "save_images_before_color_correction": false,
        "save_mask": false,
        "save_mask_composite": false,
        "jpeg_quality": 80,
        "webp_lossless": false,
        "export_for_4chan": false,
        "img_downscale_threshold": 4.0,
        "target_side_length": 4000,
        "img_max_size_mp": 200,
        "use_original_name_batch": true,
        "use_upscaler_name_as_suffix": false,
        "save_selected_only": true,
        "do_not_add_watermark": false,
        "temp_dir": "",
        "clean_temp_dir_at_start": false,
        "outdir_samples": "",
        "outdir_txt2img_samples": "outputs/txt2img-images",
        "outdir_img2img_samples": "outputs/img2img-images",
        "outdir_extras_samples": "outputs/extras-images",
        "outdir_grids": "",
        "outdir_txt2img_grids": "outputs/txt2img-grids",
        "outdir_img2img_grids": "outputs/img2img-grids",
        "outdir_save": "log/images",
        "save_to_dirs": true,
        "grid_save_to_dirs": true,
        "use_save_to_dirs_for_ui": false,
        "directories_filename_pattern": "[date]",
        "directories_max_prompt_words": 8,
        "ESRGAN_tile": 192,
        "ESRGAN_tile_overlap": 8,
        "realesrgan_enabled_models": [
            "R-ESRGAN 4x+",
            "R-ESRGAN 4x+ Anime6B"
        ],
        "upscaler_for_img2img": null,
        "face_restoration_model": "CodeFormer",
        "code_former_weight": 0.5,
        "face_restoration_unload": false,
        "show_warnings": false,
        "memmon_poll_rate": 8,
        "samples_log_stdout": false,
        "multiple_tqdm": true,
        "print_hypernet_extra": false,
        "unload_models_when_training": false,
        "pin_memory": false,
        "save_optimizer_state": false,
        "save_training_settings_to_txt": true,
        "dataset_filename_word_regex": "",
        "dataset_filename_join_string": " ",
        "training_image_repeats_per_epoch": 1,
        "training_write_csv_every": 500,
        "training_xattention_optimizations": false,
        "training_enable_tensorboard": false,
        "training_tensorboard_save_images": false,
        "training_tensorboard_flush_every": 120,
        "sd_model_checkpoint": "picxReal_10Inpaint.safetensors [859d329490]",
        "sd_checkpoint_cache": 0,
        "sd_vae_checkpoint_cache": 0,
        "sd_vae": "vae-ft-mse-840000-ema-pruned.ckpt",
        "sd_vae_as_default": true,
        "inpainting_mask_weight": 1.0,
        "initial_noise_multiplier": 1.0,
        "img2img_color_correction": false,
        "img2img_fix_steps": false,
        "img2img_background_color": "#ffffff",
        "enable_quantization": true,
        "enable_emphasis": true,
        "enable_batch_seeds": true,
        "comma_padding_backtrack": 20,
        "CLIP_stop_at_last_layers": 2,
        "upcast_attn": false,
        "use_old_emphasis_implementation": false,
        "use_old_karras_scheduler_sigmas": false,
        "no_dpmpp_sde_batch_determinism": false,
        "use_old_hires_fix_width_height": false,
        "interrogate_keep_models_in_memory": false,
        "interrogate_return_ranks": false,
        "interrogate_clip_num_beams": 1,
        "interrogate_clip_min_length": 24,
        "interrogate_clip_max_length": 48,
        "interrogate_clip_dict_limit": 1500,
        "interrogate_clip_skip_categories": [],
        "interrogate_deepbooru_score_threshold": 0.5,
        "deepbooru_sort_alpha": true,
        "deepbooru_use_spaces": false,
        "deepbooru_escape": true,
        "deepbooru_filter_tags": "",
        "extra_networks_default_view": "thumbs",
        "extra_networks_default_multiplier": 1.0,
        "extra_networks_card_width": 0,
        "extra_networks_card_height": 0,
        "extra_networks_add_text_separator": " ",
        "sd_hypernetwork": "None",
        "return_grid": true,
        "return_mask": false,
        "return_mask_composite": false,
        "do_not_show_images": false,
        "add_model_hash_to_info": true,
        "add_model_name_to_info": true,
        "disable_weights_auto_swap": true,
        "send_seed": true,
        "send_size": true,
        "font": "",
        "js_modal_lightbox": true,
        "js_modal_lightbox_initially_zoomed": true,
        "show_progress_in_title": true,
        "samplers_in_dropdown": true,
        "dimensions_and_batch_together": true,
        "keyedit_precision_attention": 0.1,
        "keyedit_precision_extra": 0.05,
        "quicksettings": "sd_model_checkpoint",
        "hidden_tabs": [],
        "ui_reorder": "inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts",
        "ui_extra_networks_tab_reorder": "",
        "localization": "None",
        "show_progressbar": true,
        "live_previews_enable": true,
        "show_progress_grid": true,
        "show_progress_every_n_steps": 10,
        "show_progress_type": "Approx cheap",
        "live_preview_content": "Prompt",
        "live_preview_refresh_period": 1000,
        "hide_samplers": [
            "Euler a",
            "Euler",
            "LMS",
            "Heun",
            "DPM2",
            "DPM2 a",
            "DPM++ 2S a",
            "DPM++ 2M",
            "DPM++ SDE",
            "DPM fast",
            "DPM adaptive",
            "LMS Karras",
            "DPM2 Karras",
            "DPM2 a Karras",
            "DPM++ 2S a Karras"
        ],
        "eta_ddim": 0.0,
        "eta_ancestral": 1.0,
        "ddim_discretize": "uniform",
        "s_churn": 0.0,
        "s_tmin": 0.0,
        "s_noise": 1.0,
        "eta_noise_seed_delta": 0,
        "always_discard_next_to_last_sigma": false,
        "uni_pc_variant": "bh1",
        "uni_pc_skip_type": "time_uniform",
        "uni_pc_order": 3,
        "uni_pc_lower_order_final": true,
        "postprocessing_enable_in_main_ui": [],
        "postprocessing_operation_order": [],
        "upscaling_max_images_in_cache": 5,
        "disabled_extensions": [],
        "disable_all_extensions": "none",
        "sd_checkpoint_hash": "859d329490a5c80bb0c3e23b060dad2609fac18beb4125a5c64ec4e75a061d8d",
        "ldsr_steps": 100,
        "ldsr_cached": false,
        "SWIN_tile": 192,
        "SWIN_tile_overlap": 8,
        "sd_lora": "None",
        "aesthetic_scorer_enabled": false,
        "aesthetic_scorer_clip_model": "ViT-L/14",
        "control_net_model_config": "models\\cldm_v15.yaml",
        "control_net_model_adapter_config": "models\\sketch_adapter_v14.yaml",
        "control_net_detectedmap_dir": "detected_maps",
        "control_net_models_path": "",
        "control_net_max_models_num": 3,
        "control_net_model_cache_size": 1,
        "control_net_control_transfer": false,
        "control_net_no_detectmap": false,
        "control_net_detectmap_autosaving": false,
        "control_net_only_midctrl_hires": true,
        "control_net_allow_script_control": false,
        "control_net_skip_img2img_processing": false,
        "control_net_monocular_depth_optim": false,
        "control_net_only_mid_control": false,
        "control_net_cfg_based_guidance": false,
        "control_net_sync_field_args": false,
        "dp_ignore_whitespace": false,
        "dp_write_raw_template": false,
        "dp_write_prompts_to_file": false,
        "dp_parser_variant_start": "{",
        "dp_parser_variant_end": "}",
        "dp_parser_wildcard_wrap": "__",
        "dp_limit_jinja_prompts": false,
        "dp_magicprompt_default_model": "Gustavosta/MagicPrompt-Stable-Diffusion",
        "dp_magicprompt_batch_size": 1,
        "state": [
            "tabs"
        ],
        "state_txt2img": [
            "prompt",
            "negative_prompt",
            "extra_networks",
            "styles",
            "sampling",
            "sampling_steps",
            "height",
            "width",
            "batch_count",
            "batch_size",
            "hires_resize_y",
            "hires_resize_x",
            "hires_scale",
            "hires_steps",
            "hires_fix",
            "tiling",
            "restore_faces",
            "seed",
            "cfg_scale",
            "hires_denoising_strength",
            "hires_upscaler"
        ],
        "state_img2img": [
            "prompt",
            "batch_count",
            "negative_prompt",
            "extra_networks",
            "batch_size",
            "height",
            "cfg_scale",
            "styles",
            "sampling",
            "denoising_strength",
            "seed",
            "resize_mode",
            "sampling_steps",
            "restore_faces",
            "tiling",
            "width"
        ],
        "state_extensions": [
            "control-net"
        ],
        "infzoom_outpath": "",
        "infzoom_outSUBpath": "infinite-zooms",
        "infzoom_outsizeW": 512,
        "infzoom_outsizeH": 512,
        "infzoom_ffprobepath": "",
        "openpose3d_use_online_version": false,
        "dp_auto_purge_cache": false,
        "quicksettings_list": [
            "sd_model_checkpoint",
            "CLIP_stop_at_last_layers"
        ],
        "restore_config_state_file": "",
        "save_init_img": false,
        "outdir_init_images": "outputs/init-images",
        "SCUNET_tile": 256,
        "SCUNET_tile_overlap": 8,
        "randn_source": "GPU",
        "dont_fix_second_order_samplers_schedule": false,
        "lora_functional": false,
        "lora_preferred_name": "Alias from file",
        "js_modal_lightbox_gamepad": true,
        "js_modal_lightbox_gamepad_repeat": 250.0,
        "keyedit_delimiters": ".,\\/!?%^*;:{}=`~()",
        "gradio_theme": "Default",
        "add_version_to_infotext": true,
        "s_min_uncond": 0,
        "infzoom_defPrompt": "{\n\t\"prePrompt\": \"Huge spectacular Waterfall in \",\n\t\"prompts\": {\n\t\t\"data\": [\n\t\t\t[0, \"a dense tropical forest\"],\n\t\t\t[2, \"a Lush jungle\"],\n\t\t\t[3, \"a Thick rainforest\"],\n\t\t\t[5, \"a Verdant canopy\"]\n\t\t]\n\t},\n\t\"postPrompt\": \"epic perspective,(vegetation overgrowth:1.3)(intricate, ornamentation:1.1),(baroque:1.1), fantasy, (realistic:1) digital painting , (magical,mystical:1.2) , (wide angle shot:1.4), (landscape composed:1.2)(medieval:1.1),(tropical forest:1.4),(river:1.3) volumetric lighting ,epic, style by Alex Horley Wenjun Lin greg rutkowski Ruan Jia (Wayne Barlowe:1.2)\",\n\t\"negPrompt\": \"frames, border, edges, borderline, text, character, duplicate, error, out of frame, watermark, low quality, ugly, deformed, blur, bad-artist\"\n}",
        "infzoom_collectAllResources": false,
        "control_net_modules_path": "",
        "controlnet_show_batch_images_in_ui": false,
        "controlnet_increment_seed_during_batch": false,
        "list_hidden_files": true,
        "cross_attention_optimization": "sub-quadratic",
        "token_merging_ratio": 0,
        "token_merging_ratio_img2img": 0,
        "token_merging_ratio_hr": 0,
        "extra_networks_show_hidden_directories": true,
        "extra_networks_hidden_models": "When searched",
        "lora_add_hashes_to_infotext": true,
        "img2img_editor_height": 720,
        "ui_tab_order": [],
        "hires_fix_show_sampler": false,
        "hires_fix_show_prompts": false,
        "live_previews_image_format": "png",
        "controlnet_disable_control_type": false,
        "controlnet_disable_openpose_edit": false,
        "inpaint_anything_save_folder": "inpaint-anything",
        "inpaint_anything_offline_inpainting": false,
        "inpaint_anything_padding_fill": 127,
        "sam_use_local_groundingdino": true,
        "ui_reorder_list": [
            "inpaint",
            "sampler",
            "checkboxes",
            "hires_fix",
            "dimensions",
            "cfg",
            "seed",
            "batch",
            "override_settings",
            "scripts"
        ],
        "sd_vae_overrides_per_model_preferences": false,
        "grid_zip_filename_pattern": "",
        "grid_text_active_color": "#000000",
        "grid_text_inactive_color": "#999999",
        "grid_background_color": "#ffffff",
        "save_incomplete_images": false,
        "face_restoration": false,
        "auto_launch_browser": "Local",
        "show_gradio_deprecation_warnings": true,
        "disable_mmap_load_safetensors": false,
        "hide_ldm_prints": true,
        "api_enable_requests": true,
        "api_forbid_local_requests": true,
        "api_useragent": "",
        "sd_checkpoints_limit": 1,
        "sd_checkpoints_keep_in_cpu": true,
        "sd_unet": "Automatic",
        "tiling": false,
        "hires_fix_refiner_pass": "second pass",
        "sdxl_crop_top": 0.0,
        "sdxl_crop_left": 0.0,
        "sdxl_refiner_low_aesthetic_score": 2.5,
        "sdxl_refiner_high_aesthetic_score": 6.0,
        "auto_vae_precision": true,
        "sd_vae_encode_method": "Full",
        "sd_vae_decode_method": "Full",
        "img2img_extra_noise": 0,
        "img2img_sketch_default_brush_color": "#ffffff",
        "img2img_inpaint_mask_brush_color": "#ffffff",
        "img2img_inpaint_sketch_default_brush_color": "#ffffff",
        "enable_mem_pattern": true,
        "enable_mem_reuse": true,
        "collect_garbage_for_each_generation": false,
        "offload_state_dict": false,
        "use_just_in_time_optimization": false,
        "cache_optimized_model": false,
        "pad_cond_uncond": false,
        "persistent_cond_cache": true,
        "batch_cond_uncond": true,
        "directml_memory_provider": "Performance Counter",
        "hires_fix_use_firstpass_conds": false,
        "use_old_scheduling": false,
        "extra_networks_card_text_scale": 1,
        "extra_networks_card_show_desc": true,
        "textual_inversion_print_at_load": false,
        "textual_inversion_add_hashes_to_infotext": true,
        "lora_show_all": false,
        "lora_hide_unknown_for_versions": [],
        "lora_in_memory_limit": 0,
        "gradio_themes_cache": true,
        "gallery_height": "",
        "keyedit_move": true,
        "disable_token_counters": false,
        "extra_options_txt2img": [],
        "extra_options_img2img": [],
        "extra_options_cols": 1,
        "extra_options_accordion": false,
        "add_user_name_to_info": false,
        "infotext_styles": "Apply if any",
        "live_preview_allow_lowvram_full": false,
        "live_preview_fast_interrupt": false,
        "s_tmax": 0,
        "k_sched_type": "Automatic",
        "sigma_min": 0.0,
        "sigma_max": 0.0,
        "rho": 0.0,
        "sgm_noise_multiplier": false,
        "canvas_hotkey_zoom": "Alt",
        "canvas_hotkey_adjust": "Ctrl",
        "canvas_hotkey_move": "F",
        "canvas_hotkey_fullscreen": "S",
        "canvas_hotkey_reset": "R",
        "canvas_hotkey_overlap": "O",
        "canvas_show_tooltip": true,
        "canvas_auto_expand": true,
        "canvas_blur_prompt": false,
        "canvas_disabled_functions": [
            "Overlap"
        ],
        "ch_max_size_preview": true,
        "ch_skip_nsfw_preview": false,
        "ch_open_url_with_js": true,
        "ch_proxy": "",
        "ad_max_models": 2,
        "ad_extra_models_dir": "",
        "ad_save_previews": false,
        "ad_save_images_before": false,
        "ad_only_seleted_scripts": true,
        "ad_script_names": "dynamic_prompting,dynamic_thresholding,wildcard_recursive,wildcards,lora_block_weight",
        "ad_bbox_sortby": "None",
        "ad_same_seed_for_each_tap": false,
        "control_net_unit_count": 3,
        "control_net_inpaint_blur_sigma": 7,
        "control_net_no_high_res_fix": false,
        "controlnet_ignore_noninpaint_mask": false,
        "inpaint_anything_sam_oncpu": false,
        "inpain_anything_sam_models_dir": "",
        "animatediff_model_path": "",
        "animatediff_optimize_gif_palette": false,
        "animatediff_optimize_gif_gifsicle": false,
        "animatediff_webp_quality": 80,
        "animatediff_webp_lossless": false,
        "animatediff_save_to_custom": false,
        "animatediff_xformers": "Optimize attention layers with xformers",
        "animatediff_s3_enable": false,
        "animatediff_s3_host": "",
        "animatediff_s3_port": "",
        "animatediff_s3_access_key": "",
        "animatediff_s3_secret_key": "",
        "animatediff_s3_storge_bucket": "",
        "hypertile_enable_unet": false,
        "hypertile_enable_unet_secondpass": false,
        "hypertile_max_depth_unet": 3,
        "hypertile_max_tile_unet": 256,
        "hypertile_swap_size_unet": 3,
        "hypertile_enable_vae": false,
        "hypertile_max_depth_vae": 3,
        "hypertile_max_tile_vae": 128,
        "hypertile_swap_size_vae": 3,
        "ch_civiai_api_key": "",
        "infzoom_txt2img_model": null,
        "infzoom_inpainting_model": null,
        "controlnet_disable_photopea_edit": false,
        "controlnet_photopea_warning": true,
        "controlnet_clip_detector_on_cpu": false,
        "SWIN_torch_compile": false
    },
    "Startup": {
        "total": 89.8106517791748,
        "records": {
            "initial startup": 0.019026994705200195,
            "prepare environment/checks": 0.011036872863769531,
            "prepare environment/git version info": 0.10087466239929199,
            "prepare environment/clone repositores": 0.20000386238098145,
            "prepare environment/install requirements": 30.760165214538574,
            "prepare environment/run extensions installers/adetailer": 0.20896029472351074,
            "prepare environment/run extensions installers/DWPose": 0.0,
            "prepare environment/run extensions installers/facechain": 8.799062967300415,
            "prepare environment/run extensions installers/multidiffusion-upscaler-for-automatic1111": 0.0009992122650146484,
            "prepare environment/run extensions installers/sd-webui-3d-open-pose-editor": 0.23689484596252441,
            "prepare environment/run extensions installers/sd-webui-controlnet": 0.5195209980010986,
            "prepare environment/run extensions installers/sd-webui-depth-lib": 0.0,
            "prepare environment/run extensions installers/sd-webui-inpaint-anything": 0.18516945838928223,
            "prepare environment/run extensions installers/sd-webui-reactor": 29.741358280181885,
            "prepare environment/run extensions installers/sd-webui-segment-anything": 0.1817455291748047,
            "prepare environment/run extensions installers/Stable-Diffusion-Webui-Civitai-Helper": 0.0,
            "prepare environment/run extensions installers/stable-diffusion-webui-state": 0.0,
            "prepare environment/run extensions installers/ultimate-upscale-for-automatic1111": 0.0,
            "prepare environment/run extensions installers": 39.873711585998535,
            "prepare environment": 80.59442353248596,
            "launcher": 0.0019998550415039062,
            "import torch": 0.0,
            "import gradio": 0.0005028247833251953,
            "setup paths": 0.0,
            "import ldm": 0.003007173538208008,
            "import sgm": 0.0,
            "initialize shared": 3.7142865657806396,
            "other imports": 0.10219287872314453,
            "opts onchange": 0.004050016403198242,
            "setup SD model": 0.0,
            "setup codeformer": 0.0020020008087158203,
            "setup gfpgan": 0.10756635665893555,
            "set samplers": 0.0,
            "list extensions": 0.003998279571533203,
            "restore config state file": 0.0,
            "list SD models": 0.020619869232177734,
            "list localizations": 0.0010020732879638672,
            "load scripts/custom_code.py": 0.016832590103149414,
            "load scripts/img2imgalt.py": 0.0,
            "load scripts/loopback.py": 0.0010001659393310547,
            "load scripts/outpainting_mk_2.py": 0.0,
            "load scripts/poor_mans_outpainting.py": 0.0,
            "load scripts/postprocessing_caption.py": 0.0009996891021728516,
            "load scripts/postprocessing_codeformer.py": 0.0,
            "load scripts/postprocessing_create_flipped_copies.py": 0.0,
            "load scripts/postprocessing_focal_crop.py": 0.0010013580322265625,
            "load scripts/postprocessing_gfpgan.py": 0.0,
            "load scripts/postprocessing_split_oversized.py": 0.0015058517456054688,
            "load scripts/postprocessing_upscale.py": 0.0,
            "load scripts/processing_autosized_crop.py": 0.0,
            "load scripts/prompt_matrix.py": 0.0010066032409667969,
            "load scripts/prompts_from_file.py": 0.0010018348693847656,
            "load scripts/sd_upscale.py": 0.0,
            "load scripts/xyz_grid.py": 0.0020062923431396484,
            "load scripts/ldsr_model.py": 1.3958699703216553,
            "load scripts/lora_script.py": 0.12235069274902344,
            "load scripts/scunet_model.py": 0.019015789031982422,
            "load scripts/swinir_model.py": 0.016510486602783203,
            "load scripts/hotkey_config.py": 0.0,
            "load scripts/extra_options_section.py": 0.0015037059783935547,
            "load scripts/hypertile_script.py": 0.038538217544555664,
            "load scripts/hypertile_xyz.py": 0.0015048980712890625,
            "load scripts/soft_inpainting.py": 0.0,
            "load scripts/civitai_helper.py": 0.044622182846069336,
            "load scripts/!adetailer.py": 2.3127686977386475,
            "load scripts/facechain_sdwebui.py": 0.01857447624206543,
            "load scripts/tilediffusion.py": 0.007018566131591797,
            "load scripts/tileglobal.py": 0.0009984970092773438,
            "load scripts/tilevae.py": 0.0,
            "load scripts/openpose_editor.py": 0.038153648376464844,
            "load scripts/adapter.py": 0.0005068778991699219,
            "load scripts/api.py": 0.768618106842041,
            "load scripts/batch_hijack.py": 0.0,
            "load scripts/cldm.py": 0.0,
            "load scripts/controlmodel_ipadapter.py": 0.0009996891021728516,
            "load scripts/controlnet.py": 0.11603808403015137,
            "load scripts/controlnet_diffusers.py": 0.0010008811950683594,
            "load scripts/controlnet_lllite.py": 0.0,
            "load scripts/controlnet_lora.py": 0.0,
            "load scripts/controlnet_model_guess.py": 0.001001119613647461,
            "load scripts/controlnet_sparsectrl.py": 0.0,
            "load scripts/controlnet_version.py": 0.0,
            "load scripts/enums.py": 0.0009992122650146484,
            "load scripts/external_code.py": 0.0,
            "load scripts/global_state.py": 0.0009987354278564453,
            "load scripts/hook.py": 0.0010030269622802734,
            "load scripts/infotext.py": 0.0,
            "load scripts/logging.py": 0.0,
            "load scripts/lvminthin.py": 0.0009968280792236328,
            "load scripts/movie2movie.py": 0.0,
            "load scripts/processor.py": 0.0011217594146728516,
            "load scripts/utils.py": 0.00099945068359375,
            "load scripts/xyz_grid_support.py": 0.0,
            "load scripts/main.py": 0.0029964447021484375,
            "load scripts/inpaint_anything.py": 0.8924961090087891,
            "load scripts/console_log_patch.py": 1.2083611488342285,
            "load scripts/reactor_api.py": 0.09120321273803711,
            "load scripts/reactor_faceswap.py": 0.004071712493896484,
            "load scripts/reactor_globals.py": 0.0010058879852294922,
            "load scripts/reactor_helpers.py": 0.0,
            "load scripts/reactor_logger.py": 0.0,
            "load scripts/reactor_swapper.py": 0.0019989013671875,
            "load scripts/reactor_version.py": 0.0,
            "load scripts/reactor_xyz.py": 0.0,
            "load scripts/auto.py": 0.0015056133270263672,
            "load scripts/dino.py": 0.0,
            "load scripts/process_params.py": 0.0010061264038085938,
            "load scripts/sam.py": 0.0350494384765625,
            "load scripts/state_api.py": 0.020560026168823242,
            "load scripts/state_settings.py": 0.021535158157348633,
            "load scripts/ultimate-upscale.py": 0.000997781753540039,
            "load scripts/comments.py": 0.021895408630371094,
            "load scripts/refiner.py": 0.0,
            "load scripts/seed.py": 0.0009992122650146484,
            "load scripts": 7.24275016784668,
            "load upscalers": 0.004513263702392578,
            "refresh VAE": 0.0035049915313720703,
            "refresh textual inversion templates": 0.0,
            "scripts list_optimizers": 0.0020055770874023438,
            "scripts list_unets": 0.0,
            "reload hypernetworks": 0.0030007362365722656,
            "initialize extra networks": 0.011043071746826172,
            "scripts before_ui_callback": 0.001999378204345703,
            "create ui": 6.600145578384399,
            "gradio launch": 0.41465020179748535,
            "add APIs": 0.5904827117919922,
            "app_started_callback/lora_script.py": 0.0,
            "app_started_callback/!adetailer.py": 0.0009996891021728516,
            "app_started_callback/api.py": 0.007509946823120117,
            "app_started_callback/reactor_api.py": 0.001999378204345703,
            "app_started_callback/state_api.py": 0.0,
            "app_started_callback": 0.010509014129638672
        }
    },
    "Packages": [
        "-==otobuf",
        "-otobuf==3.20.3",
        "-rotobuf==3.20.3",
        "absl-py==2.1.0",
        "accelerate==0.21.0",
        "addict==2.4.0",
        "aenum==3.1.15",
        "aiofiles==23.2.1",
        "aiohttp==3.9.3",
        "aiosignal==1.3.1",
        "albumentations==1.4.2",
        "alembic==1.13.1",
        "aliyun-python-sdk-core==2.15.0",
        "aliyun-python-sdk-kms==2.16.2",
        "altair==5.2.0",
        "annotated-types==0.6.0",
        "antlr4-python3-runtime==4.9.3",
        "anyio==3.7.1",
        "async-timeout==4.0.3",
        "attrs==23.2.0",
        "bidict==0.23.1",
        "blendmodes==2022",
        "certifi==2024.2.2",
        "cffi==1.16.0",
        "chardet==5.2.0",
        "charset-normalizer==3.3.2",
        "clean-fid==0.1.35",
        "click==8.1.7",
        "clip==1.0",
        "colorama==0.4.6",
        "colorclass==2.2.2",
        "coloredlogs==15.0.1",
        "colorlog==6.8.2",
        "contourpy==1.2.0",
        "controlnet-aux==0.0.3",
        "crcmod==1.7",
        "cryptography==42.0.5",
        "cssselect2==0.7.0",
        "cycler==0.12.1",
        "cython==3.0.9",
        "datasets==2.18.0",
        "defusedxml==0.7.1",
        "deprecation==2.1.0",
        "depth-anything==2024.1.22.0",
        "diffusers==0.23.1",
        "dill==0.3.7",
        "docopt==0.6.2",
        "easydict==1.13",
        "edge-tts==6.1.10",
        "einops==0.4.1",
        "embreex==2.17.7.post4",
        "exceptiongroup==1.2.0",
        "facexlib==0.3.0",
        "fastapi==0.94.0",
        "ffmpy==0.3.2",
        "filelock==3.13.1",
        "filterpy==1.4.5",
        "flask-cors==4.0.0",
        "flask-socketio==5.3.6",
        "flask==2.2.3",
        "flaskwebgui==0.3.5",
        "flatbuffers==24.3.7",
        "fonttools==4.50.0",
        "frozenlist==1.4.1",
        "fsspec==2023.9.2",
        "ftfy==6.2.0",
        "fvcore==0.1.5.post20221221",
        "gast==0.5.4",
        "gitdb==4.0.11",
        "gitpython==3.1.32",
        "gradio-client==0.5.0",
        "gradio==3.41.2",
        "greenlet==3.0.3",
        "h11==0.12.0",
        "handrefinerportable==2024.2.12.0",
        "httpcore==0.15.0",
        "httpx==0.24.1",
        "huggingface-hub==0.21.4",
        "humanfriendly==10.0",
        "idna==3.6",
        "imageio==2.34.0",
        "importlib-metadata==7.1.0",
        "importlib-resources==6.4.0",
        "inflection==0.5.1",
        "insightface==0.7.3",
        "iopath==0.1.9",
        "itsdangerous==2.1.2",
        "jax==0.4.25",
        "jinja2==3.1.3",
        "jmespath==0.10.0",
        "joblib==1.3.2",
        "jsonmerge==1.8.0",
        "jsonschema-specifications==2023.12.1",
        "jsonschema==4.21.1",
        "kiwisolver==1.4.5",
        "kornia==0.6.7",
        "lama-cleaner==1.2.5",
        "lark==1.1.2",
        "lazy-loader==0.3",
        "lightning-utilities==0.11.0",
        "llvmlite==0.42.0",
        "loguru==0.7.2",
        "lxml==5.1.0",
        "mako==1.3.2",
        "mapbox-earcut==1.0.1",
        "markdown-it-py==3.0.0",
        "markupsafe==2.1.5",
        "matplotlib==3.8.3",
        "mdurl==0.1.2",
        "mediapipe==0.10.11",
        "ml-dtypes==0.3.2",
        "mmcv-full==1.7.0",
        "mmdet==2.26.0",
        "modelscope==1.13.2",
        "mpmath==1.3.0",
        "multidict==6.0.5",
        "multiprocess==0.70.15",
        "networkx==3.2.1",
        "numba==0.59.1",
        "numpy==1.26.2",
        "olive-ai==0.5.0",
        "omegaconf==2.2.3",
        "onnx==1.15.0",
        "onnxruntime-directml==1.17.1",
        "onnxruntime==1.17.1",
        "open-clip-torch==2.20.0",
        "opencv-contrib-python==4.9.0.80",
        "opencv-python-headless==4.9.0.80",
        "opencv-python==4.9.0.80",
        "opt-einsum==3.3.0",
        "optimum==1.17.1",
        "optuna==3.6.0",
        "orjson==3.9.15",
        "oss2==2.18.4",
        "packaging==24.0",
        "pandas==2.2.1",
        "piexif==1.1.3",
        "pillow==9.5.0",
        "pip-upgrader==1.4.15",
        "pip==24.0",
        "platformdirs==4.2.0",
        "portalocker==2.8.2",
        "prettytable==3.10.0",
        "protobuf==3.20.3",
        "psutil==5.9.5",
        "py-cpuinfo==9.0.0",
        "pyarrow-hotfix==0.6",
        "pyarrow==15.0.2",
        "pycocotools==2.0.7",
        "pycollada==0.8",
        "pycparser==2.21",
        "pycryptodome==3.20.0",
        "pydantic-core==2.16.3",
        "pydantic==1.10.14",
        "pydub==0.25.1",
        "pygments==2.17.2",
        "pyparsing==3.1.2",
        "pyreadline3==3.4.1",
        "python-dateutil==2.9.0.post0",
        "python-engineio==4.9.0",
        "python-multipart==0.0.9",
        "python-slugify==8.0.1",
        "python-socketio==5.11.2",
        "pytorch-lightning==1.9.4",
        "pytz==2024.1",
        "pywavelets==1.5.0",
        "pywin32==306",
        "pyyaml==6.0.1",
        "referencing==0.34.0",
        "regex==2023.12.25",
        "reportlab==4.1.0",
        "requests==2.31.0",
        "resize-right==0.0.2",
        "rich==13.7.1",
        "rpds-py==0.18.0",
        "rtree==1.2.0",
        "ruff==0.3.4",
        "safetensors==0.4.2",
        "scikit-image==0.21.0",
        "scikit-learn==1.4.1.post1",
        "scipy==1.12.0",
        "seaborn==0.13.2",
        "segment-anything==1.0",
        "semantic-version==2.10.0",
        "sentencepiece==0.2.0",
        "setuptools==65.5.0",
        "shapely==2.0.3",
        "shellingham==1.5.4",
        "simple-websocket==1.0.0",
        "simplejson==3.19.2",
        "six==1.16.0",
        "slugify==0.0.1",
        "smmap==5.0.1",
        "sniffio==1.3.1",
        "sortedcontainers==2.4.0",
        "sounddevice==0.4.6",
        "spandrel==0.1.6",
        "sqlalchemy==2.0.29",
        "starlette==0.26.1",
        "supervision==0.19.0",
        "svg.path==6.3",
        "svglib==1.5.1",
        "sympy==1.12",
        "tabulate==0.9.0",
        "termcolor==2.4.0",
        "terminaltables==3.1.10",
        "text-unidecode==1.3",
        "thop==0.1.1.post2209072238",
        "threadpoolctl==3.4.0",
        "tifffile==2024.2.12",
        "timm==0.9.16",
        "tinycss2==1.2.1",
        "tokenizers==0.13.3",
        "tomesd==0.1.3",
        "tomli==2.0.1",
        "tomlkit==0.12.0",
        "toolz==0.12.1",
        "torch-directml==0.2.0.dev230426",
        "torch==2.0.0",
        "torchdiffeq==0.2.3",
        "torchmetrics==1.3.2",
        "torchsde==0.2.6",
        "torchvision==0.15.1",
        "tqdm==4.66.2",
        "trampoline==0.1.2",
        "transformers==4.30.2",
        "trimesh==4.2.0",
        "typer==0.10.0",
        "typing-extensions==4.10.0",
        "tzdata==2024.1",
        "ultralytics==8.1.34",
        "urllib3==2.2.1",
        "uvicorn==0.29.0",
        "vhacdx==0.0.6",
        "wcwidth==0.2.13",
        "webencodings==0.5.1",
        "websockets==11.0.3",
        "werkzeug==2.2.2",
        "whichcraft==0.6.1",
        "win32-setctime==1.1.0",
        "wsproto==1.2.0",
        "xatlas==0.0.9",
        "xxhash==3.4.1",
        "yacs==0.1.8",
        "yapf==0.40.2",
        "yarl==1.9.4",
        "zipp==3.18.1"
    ]
}

Console logs

---
*** Failed face-restoration inference
    Traceback (most recent call last):
      File "E:\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 86, in restore_with_face_helper
        cropped_face_t = restore_face(cropped_face_t)
      File "E:\stable-diffusion-webui-directml\modules\gfpgan_model.py", line 51, in restore_face
        return self.net(cropped_face_t, return_rgb=False)[0]
      File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel\architectures\GFPGAN\arch\gfpganv1_clean_arch.py", line 319, in forward
        feat = F.leaky_relu_(self.conv_body_first(x), negative_slope=0.2)
      File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "E:\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 515, in network_Conv2d_forward
        return originals.Conv2d_forward(self, input)
      File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
        return self._conv_forward(input, self.weight, self.bias)
      File "E:\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
        return F.conv2d(input, weight, bias, self.stride,
      File "E:\stable-diffusion-webui-directml\modules\dml\amp\autocast_mode.py", line 43, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: forward(op, args, kwargs))
      File "E:\stable-diffusion-webui-directml\modules\dml\amp\autocast_mode.py", line 15, in forward
        return op(*args, **kwargs)
    RuntimeError: tensor.device().type() == at::DeviceType::PrivateUse1 INTERNAL ASSERT FAILED at "D:\\a\\_work\\1\\s\\pytorch-directml-plugin\\torch_directml\\csrc\\dml\\DMLTensor.cpp":31, please report a bug to PyTorch. unbox expects Dml at::Tensor as inputs

---

Additional information

Have tried deleting venv, generating new venv, updating everything in requirements.txt did not work. Tried a fresh parallel install, also did not work.

riccorohl commented 8 months ago

I'm having this issue too. It seems like it stopped working as soon as I added --use-directml to command args. It worked perfectly before, but I couldn't generate anything without directml, so I had to enable it.

lshqqytiger commented 8 months ago

Unless you are using GCN cards (~Radeon VII), ZLUDA is a better option than DirectML. If you are, revert to webui 1.7. #407

riccorohl commented 8 months ago

Ok, I managed to install 1.7 with the git checkout. Now I'm having trouble running it, --direct-ml won't work and I'm not sure what to do. I tried --use-zluda but it didn't work either it gives me: image

lshqqytiger commented 8 months ago

Please copy full error log in the terminal. The error message in webui is less informative. If you tried DirectML before, remove venv folder to make sure that torch is reinstalled and patched with dll files of ZLUDA.

riccorohl commented 8 months ago

If you tried DirectML before, remove venv folder to make sure that torch is reinstalled and patched with dll files of ZLUDA.

is there a special command I have to enter for enabling Zluda?

I deleted the venv folder like you said and ran webui bat again and it installed what it did before and gave me this code:

`Creating venv in directory C:\AI\stable-diffusion-webui-directml\venv using python "C:\Users\rohle\AppData\Local\Programs\Python\Python310\python.exe" venv "C:\AI\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.7.0 Commit hash: 601f7e3704707d09ca88241e663a763a2493b11a Installing torch and torchvision Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121 Collecting torch==2.2.0 Using cached https://download.pytorch.org/whl/cu121/torch-2.2.0%2Bcu121-cp310-cp310-win_amd64.whl (2454.8 MB) Collecting torchvision==0.17.0 Using cached https://download.pytorch.org/whl/cu121/torchvision-0.17.0%2Bcu121-cp310-cp310-win_amd64.whl (5.7 MB) Collecting filelock Using cached filelock-3.13.3-py3-none-any.whl (11 kB) Collecting jinja2 Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB) Collecting typing-extensions>=4.8.0 Using cached typing_extensions-4.10.0-py3-none-any.whl (33 kB) Collecting sympy Using cached https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB) Collecting fsspec Using cached fsspec-2024.3.1-py3-none-any.whl (171 kB) Collecting networkx Using cached https://download.pytorch.org/whl/networkx-3.2.1-py3-none-any.whl (1.6 MB) Collecting pillow!=8.3.*,>=5.3.0 Using cached https://download.pytorch.org/whl/pillow-10.2.0-cp310-cp310-win_amd64.whl (2.6 MB) Collecting numpy Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl (15.8 MB) Collecting requests Using cached requests-2.31.0-py3-none-any.whl (62 kB) Collecting MarkupSafe>=2.0 Using cached MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl (17 kB) Collecting idna<4,>=2.5 Using cached idna-3.6-py3-none-any.whl (61 kB) Collecting urllib3<3,>=1.21.1 Using cached urllib3-2.2.1-py3-none-any.whl (121 kB) Collecting charset-normalizer<4,>=2 Using cached charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB) Collecting certifi>=2017.4.17 Using cached certifi-2024.2.2-py3-none-any.whl (163 kB) Collecting mpmath>=0.19 Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB) Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, fsspec, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision Successfully installed MarkupSafe-2.1.5 certifi-2024.2.2 charset-normalizer-3.3.2 filelock-3.13.3 fsspec-2024.3.1 idna-3.6 jinja2-3.1.3 mpmath-1.3.0 networkx-3.2.1 numpy-1.26.4 pillow-10.2.0 requests-2.31.0 sympy-1.12 torch-2.2.0+cu121 torchvision-0.17.0+cu121 typing-extensions-4.10.0 urllib3-2.2.1

[notice] A new release of pip available: 22.2.1 -> 24.0 [notice] To update, run: C:\AI\stable-diffusion-webui-directml\venv\Scripts\python.exe -m pip install --upgrade pip Installing clip Installing open_clip Installing requirements for CodeFormer Installing requirements no module 'xformers'. Processing without... no module 'xformers'. Processing without... No module 'xformers'. Proceeding without it. C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: pytorch_lightning.utilities.distributed.rank_zero_only has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from pytorch_lightning.utilities instead. rank_zero_deprecation( Launching Web UI with arguments: Style database not found: C:\AI\stable-diffusion-webui-directml\styles.csv ONNX: selected=CUDAExecutionProvider, available=['AzureExecutionProvider', 'CPUExecutionProvider'] Loading weights [fe4efff1e1] from C:\AI\stable-diffusion-webui-directml\models\Stable-diffusion\sd-v1-4.ckpt Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 230.5s (prepare environment: 237.2s, initialize shared: 1.8s, load scripts: 0.5s, create ui: 0.5s, gradio launch: 0.2s). Creating model from config: C:\AI\stable-diffusion-webui-directml\configs\v1-inference.yaml loading stable diffusion model: RuntimeError Traceback (most recent call last): File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap self._bootstrap_inner() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, self._kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\initialize.py", line 147, in load_model shared.sd_model # noqa: B018 File "C:\AI\stable-diffusion-webui-directml\modules\shared_items.py", line 143, in sd_model return modules.sd_models.model_data.get_sd_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 537, in get_sd_model load_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 675, in load_model load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 381, in load_model_weights model.load_state_dict(state_dict, strict=False) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 223, in module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, *kwargs: load_state_dict(module_load_state_dict, args, kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 221, in load_state_dict original(module, state_dict, strict=strict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2139, in load_state_dict load(self, state_dict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) [Previous line repeated 1 more time] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2121, in load module._load_from_state_dict( File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 225, in linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, *kwargs: load_from_state_dict(linear_load_from_state_dict, args, **kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 191, in load_from_state_dict module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch_meta_registrations.py", line 4815, in zeroslike res.fill(0) RuntimeError: CUDA error: operation not supported CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Stable diffusion model failed to load Applying attention optimization: Doggettx... done. Loading weights [fe4efff1e1] from C:\AI\stable-diffusion-webui-directml\models\Stable-diffusion\sd-v1-4.ckpt Exception in thread Thread-26 (load_model): Traceback (most recent call last): File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, self._kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\initialize.py", line 153, in load_model devices.first_time_calculation() File "C:\AI\stable-diffusion-webui-directml\modules\devices.py", line 178, in first_time_calculation linear(x) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 486, in network_Linear_forward return originals.Linear_forward(self, input) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\linear.py", line 116, in forward return F.linear(input, self.weight, self.bias) RuntimeError: CUDA error: CUBLAS_STATUS_NOT_SUPPORTED when calling cublasGemmEx( handle, opa, opb, m, n, k, &falpha, a, CUDA_R_16F, lda, b, CUDA_R_16F, ldb, &fbeta, c, CUDA_R_16F, ldc, CUDA_R_32F, CUBLAS_GEMM_DEFAULT_TENSOR_OP) Creating model from config: C:\AI\stable-diffusion-webui-directml\configs\v1-inference.yaml loading stable diffusion model: RuntimeError Traceback (most recent call last): File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap self._bootstrap_inner() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 419, in pages_html return refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 425, in refresh pg.refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks_textual_inversion.py", line 15, in refresh sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 224, in load_textual_inversion_embeddings self.expected_shape = self.get_expected_shape() File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 156, in get_expected_shape vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1) File "C:\AI\stable-diffusion-webui-directml\modules\shared_items.py", line 143, in sd_model return modules.sd_models.model_data.get_sd_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 537, in get_sd_model load_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 675, in load_model load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 381, in load_model_weights model.load_state_dict(state_dict, strict=False) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 223, in module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, *kwargs: load_state_dict(module_load_state_dict, args, kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 221, in load_state_dict original(module, state_dict, strict=strict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2139, in load_state_dict load(self, state_dict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) [Previous line repeated 1 more time] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2121, in load module._load_from_state_dict( File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 225, in linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda *args, *kwargs: load_from_state_dict(linear_load_from_state_dict, args, **kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 191, in load_from_state_dict module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch_meta_registrations.py", line 4815, in zeroslike res.fill(0) RuntimeError: CUDA error: invalid argument CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Stable diffusion model failed to load Loading weights [fe4efff1e1] from C:\AI\stable-diffusion-webui-directml\models\Stable-diffusion\sd-v1-4.ckpt Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function prediction = await anyio.to_thread.run_sync( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 419, in pages_html return refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 425, in refresh pg.refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks_textual_inversion.py", line 15, in refresh sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 224, in load_textual_inversion_embeddings self.expected_shape = self.get_expected_shape() File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 156, 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' Creating model from config: C:\AI\stable-diffusion-webui-directml\configs\v1-inference.yaml loading stable diffusion model: RuntimeError Traceback (most recent call last): File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap self._bootstrap_inner() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 419, in pages_html return refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 425, in refresh pg.refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks_textual_inversion.py", line 15, in refresh sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 224, in load_textual_inversion_embeddings self.expected_shape = self.get_expected_shape() File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 156, in get_expected_shape vec = shared.sd_model.cond_stage_model.encode_embedding_init_text(",", 1) File "C:\AI\stable-diffusion-webui-directml\modules\shared_items.py", line 143, in sd_model return modules.sd_models.model_data.get_sd_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 537, in get_sd_model load_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 675, in load_model load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 381, in load_model_weights model.load_state_dict(state_dict, strict=False) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 223, in module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, kwargs: load_state_dict(module_load_state_dict, *args, *kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 221, in load_state_dict original(module, state_dict, strict=strict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2139, in load_state_dict load(self, state_dict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) [Previous line repeated 1 more time] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2121, in load module._load_from_state_dict( File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 225, in linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda args, kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 191, in load_from_state_dict module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch_meta_registrations.py", line 4815, in zeroslike res.fill(0) RuntimeError: CUDA error: invalid argument CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Stable diffusion model failed to load Loading weights [fe4efff1e1] from C:\AI\stable-diffusion-webui-directml\models\Stable-diffusion\sd-v1-4.ckpt Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function prediction = await anyio.to_thread.run_sync( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 419, in pages_html return refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks.py", line 425, in refresh pg.refresh() File "C:\AI\stable-diffusion-webui-directml\modules\ui_extra_networks_textual_inversion.py", line 15, in refresh sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True) File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 224, in load_textual_inversion_embeddings self.expected_shape = self.get_expected_shape() File "C:\AI\stable-diffusion-webui-directml\modules\textual_inversion\textual_inversion.py", line 156, 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' Creating model from config: C:\AI\stable-diffusion-webui-directml\configs\v1-inference.yaml loading stable diffusion model: RuntimeError Traceback (most recent call last): File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap self._bootstrap_inner() File "C:\Users\rohle\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\modules\ui.py", line 1816, in visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit" File "C:\AI\stable-diffusion-webui-directml\modules\shared_items.py", line 143, in sd_model return modules.sd_models.model_data.get_sd_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 537, in get_sd_model load_model() File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 675, in load_model load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "C:\AI\stable-diffusion-webui-directml\modules\sd_models.py", line 381, in load_model_weights model.load_state_dict(state_dict, strict=False) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 223, in module_load_state_dict = self.replace(torch.nn.Module, 'load_state_dict', lambda *args, kwargs: load_state_dict(module_load_state_dict, *args, *kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 221, in load_state_dict original(module, state_dict, strict=strict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2139, in load_state_dict load(self, state_dict) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2127, in load load(child, child_state_dict, child_prefix) [Previous line repeated 1 more time] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 2121, in load module._load_from_state_dict( File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 225, in linear_load_from_state_dict = self.replace(torch.nn.Linear, '_load_from_state_dict', lambda args, kwargs: load_from_state_dict(linear_load_from_state_dict, *args, **kwargs)) File "C:\AI\stable-diffusion-webui-directml\modules\sd_disable_initialization.py", line 191, in load_from_state_dict module._parameters[name] = torch.nn.parameter.Parameter(torch.zeros_like(param, device=device, dtype=dtype), requires_grad=param.requires_grad) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch_meta_registrations.py", line 4815, in zeroslike res.fill(0) RuntimeError: CUDA error: invalid argument CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Stable diffusion model failed to load`

Got an amd card the 7800xt so it should be able to do zluda. I installed it earlier today and added it to path, so i don't think it's giving me errors related to that.

lshqqytiger commented 8 months ago

You should be on the latest commit. Do not checkout older commits if you are trying ZLUDA. Pull the latest commits and try again. There was an issue with ZLUDA installation. If you don't want to remove the whole venv folder,

.\venv\Scripts\activate
pip uninstall torch torchvision -y

then launch webui.

riccorohl commented 8 months ago

Well, I went back to 1.7 because gfpen and codeformer isn't working on 1.8. I don't wanna go back to 1.8 if this Is going to be the case. You think using zluda will fix it?

lshqqytiger commented 8 months ago

The reason that gfpgan and codeformers are broken is because DirectML does not support storage access. ZLUDA supports storage access, so there should not be a problem. However, ZLUDA does not have hiprtc that is required by codeformers. Therefore, gfpgan should work well, and codeformers will use cpu regardless of 1.7 or 1.8. In short, DirectML + webui 1.8: both don't work. DirectML + webui 1.7: both work. ZLUDA: best performance. but codeformers uses cpu.

riccorohl commented 8 months ago

I'm in the middle of installing 1.8 with Zluda. First run takes some time, but I'm hopeful.

riccorohl commented 8 months ago

Ok, so I got codeformer working! thank you! The only problem I have now is that it says no GFPGAN model found when i select it:

WARNING:modules.face_restoration_utils:Unable to load face-restoration model Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 150, in restore_with_helper self.net = self.load_net() File "C:\AI\stable-diffusion-webui-directml\modules\gfpgan_model.py", line 46, in load_net raise ValueError("No GFPGAN model found") ValueError: No GFPGAN model found

I downloaded the model manually and placed it in models/GFPGAN but then it gave me a different error:

Failed face-restoration inference Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 86, in restore_with_face_helper cropped_face_t = restore_face(cropped_face_t) File "C:\AI\stable-diffusion-webui-directml\modules\gfpgan_model.py", line 51, in restore_face return self.net(cropped_face_t, return_rgb=False)[0] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel\architectures\GFPGAN\arch\gfpganv1_clean_arch.py", line 319, in forward feat = F.leakyrelu(self.conv_body_first(x), negative_slope=0.2) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 515, in network_Conv2d_forward return originals.Conv2d_forward(self, input) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

Any ideas?

mr-september commented 8 months ago

Unless you are using GCN cards (~Radeon VII), ZLUDA is a better option than DirectML. If you are, revert to webui 1.7. #407

According to this page, my GPU (RX 5700) is not supported. Strangely it is a ROCm compatibility list, not a ZLUDA, but it's directly linked from this ZLUDA page.

So I should roll back to 1.7? Or have people reported unofficial compatibility with 5700?

lshqqytiger commented 8 months ago

ZLUDA depends on ROCm, so we can use torch although we don't have torch built with ROCm on Windows. You have to build required libraries with gfx1010, but there's user-built libraries: https://github.com/brknsoul/ROCmLibs

mr-september commented 8 months ago

So you are recommending I download this zip and try ZLUDA? Are there any further instructions? Where do I put the files in this zip?

riccorohl commented 8 months ago

So you are recommending I download this zip and try ZLUDA? Are there any further instructions? Where do I put the files in this zip?

Follow this video for the zluda guide once you build the libraries. I don't know how to build libraries.

https://youtu.be/n8RhNoAenvM

mr-september commented 8 months ago

Considering my options, in the long term I want to switch to Zluda with SD Next. It is so far impossible for me to install due to caffe2_nvrtc.dll errors.

In the short term, to retain compatibility with this A1111 fork and updated versions, I have just added --use-cpu gfpgan codeformers. There's no real difference in speed anyway.

Kerorowong commented 7 months ago

Ok, so I got codeformer working! thank you! The only problem I have now is that it says no GFPGAN model found when i select it:

WARNING:modules.face_restoration_utils:Unable to load face-restoration model Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 150, in restore_with_helper self.net = self.load_net() File "C:\AI\stable-diffusion-webui-directml\modules\gfpgan_model.py", line 46, in load_net raise ValueError("No GFPGAN model found") ValueError: No GFPGAN model found

I downloaded the model manually and placed it in models/GFPGAN but then it gave me a different error:

Failed face-restoration inference Traceback (most recent call last): File "C:\AI\stable-diffusion-webui-directml\modules\face_restoration_utils.py", line 86, in restore_with_face_helper cropped_face_t = restore_face(cropped_face_t) File "C:\AI\stable-diffusion-webui-directml\modules\gfpgan_model.py", line 51, in restore_face return self.net(cropped_face_t, return_rgb=False)[0] File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\spandrel\architectures\GFPGAN\arch\gfpganv1_clean_arch.py", line 319, in forward feat = F.leakyrelu(self.conv_body_first(x), negative_slope=0.2) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "C:\AI\stable-diffusion-webui-directml\extensions-builtin\Lora\networks.py", line 515, in network_Conv2d_forward return originals.Conv2d_forward(self, input) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "C:\AI\stable-diffusion-webui-directml\venv\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

Any ideas?

Have the same error here with Extra tab > GFPGAN Failed face-restoration inference Traceback (most recent call last): File "F:\sd\sd_zluda\modules\face_restoration_utils.py", line 86, in restore_with_face_helper cropped_face_t = restore_face(cropped_face_t) File "F:\sd\sd_zluda\modules\gfpgan_model.py", line 51, in restore_face return self.net(cropped_face_t, return_rgb=False)[0] File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, kwargs) File "F:\sd\sd_zluda\venv\lib\site-packages\spandrel\architectures\GFPGAN\arch\gfpganv1_clean_arch.py", line 319, in forward feat = F.leakyrelu(self.conv_body_first(x), negative_slope=0.2) File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "F:\sd\sd_zluda\extensions-builtin\Lora\networks.py", line 518, in network_Conv2d_forward return originals.Conv2d_forward(self, input) File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "F:\sd\sd_zluda\venv\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor


Using rx 6600xt Version: v1.9.3-amd-4-g89e60b8e Commit hash: 89e60b8e96d1e2697af3d86e0322ff5ec10db51d ZLUDA