Open mrnetlex opened 4 months ago
I do not own an AMD GPU, and do not have adequate funding to resolve that issue. So testing is not possible.
Are you running NixOS? If so, show me your configuration for your AMD driver.
Yes, I'm running NixOS (unstable with use of flakes).
Relevant part of configuration.nix
:
services.xserver.videoDrivers = [ "amdgpu" ];
hardware.opengl.extraPackages = [ pkgs.amdvlk ];
I also use:
environment.variables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
AMD_VULKAN_ICD = "RADV";
};
to use mesa by default instead of amdvlk and HSA_OVERRIDE_GFX_VERSION = "10.3.0";
used to help with running stable diffusion.
HSA_OVERRIDE_GFX_VERSION is already set by the wrapper here https://github.com/nixified-ai/flake/blob/63339e4c8727578a0fe0f2c63865f60b6e800079/projects/invokeai/package.nix#L100, all I can say is that AMD GPU is difficult, and I am not sure I can help until I have the ability to test it on real hardware.
It's understandable. Thanks for trying to help.
nix run github:nixified-ai/flake#invokeai-amd
2024-03-17 21:27:29.275792898 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1827 CreateInferencePybindStateModule] Init provider bridge failed.
[2024-03-17 21:27:31,260]::[InvokeAI]::INFO --> Patchmatch initialized
/nix/store/knqd0zgkmj3pajqcmh785qc6m8hjf0hc-python3.11-torchvision-0.15.2/lib/python3.11/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
An exception has occurred: /home/christian/invokeai/models/core/convert/CLIP-ViT-bigG-14-laion2B-39B-b160k is missing
== STARTUP ABORTED ==
** One or more necessary files is missing from your InvokeAI root directory **
** Please rerun the configuration script to fix this problem. **
** From the launcher, selection option [7]. **
** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" **
** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not installing these core models will prevent the loading of some or all .safetensors and .ckpt files. However, you can always come back and install these core models in the future.)
Press any key to continue..
Fedora
AMD RX 6700XT
32GB RAM
build-users-group = nixbld
experimental-features = nix-command flakes repl-flake configurable-impure-env auto-allocate-uids
auto-optimise-store = true
bash-prompt-prefix = (nix:$name)\040
max-jobs = auto
extra-nix-path = nixpkgs=flake:nixpkgs
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
# Define trusted substituters
trusted-substituters = https://ai.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=
# Optionally, define other substituters if needed
substituters = https://cache.nixos.org https://ai.cachix.org
Related Problem:
nix run github:nixified-ai/flake#invokeai-amd 2024-03-17 21:27:29.275792898 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1827 CreateInferencePybindStateModule] Init provider bridge failed. [2024-03-17 21:27:31,260]::[InvokeAI]::INFO --> Patchmatch initialized /nix/store/knqd0zgkmj3pajqcmh785qc6m8hjf0hc-python3.11-torchvision-0.15.2/lib/python3.11/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional. warnings.warn( An exception has occurred: /home/christian/invokeai/models/core/convert/CLIP-ViT-bigG-14-laion2B-39B-b160k is missing == STARTUP ABORTED == ** One or more necessary files is missing from your InvokeAI root directory ** ** Please rerun the configuration script to fix this problem. ** ** From the launcher, selection option [7]. ** ** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" ** ** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not installing these core models will prevent the loading of some or all .safetensors and .ckpt files. However, you can always come back and install these core models in the future.) Press any key to continue..
I have this exact same error (the missing file is the same one as well). Running NixOS on AMD 7900XTX GPU, Ryzen 9 3900 CPU, 32GB RAM.
I have this same issue, except with an additional deprecation notice for torchvision.transforms.functional_tensor
.
Here's the result of running it for the first time:
$ nix run github:nixified-ai/flake#invokeai-amd
State directory does not exist, running invokeai-configure
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
0it [00:00, ?it/s]
2024-06-26 03:21:20.365665602 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1827 CreateInferencePybindStateModule] Init provider bridge failed.
[2024-06-26 03:21:21,065]::[InvokeAI]::INFO --> Initializing InvokeAI runtime directory
[2024-06-26 03:21:21,248]::[InvokeAI]::WARNING --> The file /home/username/invokeai/configs/models.yaml was not found. Initializing a new file
[2024-06-26 03:21:21,250]::[InvokeAI]::INFO --> Scanning /home/username/invokeai/models for new models
[2024-06-26 03:21:21,287]::[InvokeAI]::INFO --> Scanned 9 files and directories, imported 0 models
Traceback (most recent call last):
File "/nix/store/10b4kyq33crhfcpw3iiqvc4025bm6129-python3.11-InvokeAI-3.3.0post3/bin/.invokeai-configure-wrapped", line 9, in <module>
sys.exit(invokeai_configure())
^^^^^^^^^^^^^^^^^^^^
File "/nix/store/10b4kyq33crhfcpw3iiqvc4025bm6129-python3.11-InvokeAI-3.3.0post3/lib/python3.11/site-packages/invokeai/backend/install/invokeai_configure.py", line 930, in main
init_options, models_to_download = run_console_ui(opt, new_init_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/10b4kyq33crhfcpw3iiqvc4025bm6129-python3.11-InvokeAI-3.3.0post3/lib/python3.11/site-packages/invokeai/backend/install/invokeai_configure.py", line 749, in run_console_ui
torch.multiprocessing.set_start_method("spawn")
File "/nix/store/qp5zys77biz7imbk6yy85q5pdv7qk84j-python3-3.11.6/lib/python3.11/multiprocessing/context.py", line 247, in set_start_method
raise RuntimeError('context has already been set')
RuntimeError: context has already been set
And the second time:
$ nix run github:nixified-ai/flake#invokeai-amd
2024-06-26 03:24:56.048227459 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1827 CreateInferencePybindStateModule] Init provider bridge failed.
/nix/store/knqd0zgkmj3pajqcmh785qc6m8hjf0hc-python3.11-torchvision-0.15.2/lib/python3.11/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
warnings.warn(
[2024-06-26 03:25:01,095]::[InvokeAI]::INFO --> Patchmatch initialized
An exception has occurred: /home/username/invokeai/models/core/convert/CLIP-ViT-bigG-14-laion2B-39B-b160k is missing
== STARTUP ABORTED ==
** One or more necessary files is missing from your InvokeAI root directory **
** Please rerun the configuration script to fix this problem. **
** From the launcher, selection option [7]. **
** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" **
** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not installing these core models will prevent the loading of some or all .safetensors and .ckpt files. However, you can always come back and install these core models in the future.)
Press any key to continue...
No selection menu ever appears, and I don't really know what more to do about that.
OS: NixOS 24.11 (Vicuna) x86_64 Kernel: Linux 6.6.35 CPU: AMD Ryzen 7 5700G (16) @ 3.80 GHz GPU: AMD Radeon RX 6800
I tried installing InvokeAI according to README with
nix run github:nixified-ai/flake#invokeai-amd
. During installation (after InvokeAI configuration screen) I got error:If I try to run
nix run github:nixified-ai/flake#invokeai-amd
once more, webui will launch but when trying to generate image it spits out error message in terminal:Launching with
HIP_LAUNCH_BLOCKING=1
doesn't change the error message.System information: