nod-ai / SHARK

SHARK - High Performance Machine Learning Distribution
Apache License 2.0
1.41k stars 168 forks source link

Issues to make it work with RX 5700 XT #1134

Open Domcaofficial opened 1 year ago

Domcaofficial commented 1 year ago

Hello i´m having issues to even start.

_> shark_tank local cache is located at C:\Users\Administrator.local/shark_tank/ . You may change this by setting the --local_tank_cache= flag

vulkan devices are available. cuda devices are not available. Running on local URL: http://0.0.0.0:8080

To create a public link, set share=True in launch(). Found device AMD Radeon RX 5700 XT. Using target triple rdna2-unknown-windows. Using tuned models for stabilityai/stable-diffusion-2-1/fp16/vulkan://00000000-1200-0000-0000-000000000000. torch\jit_check.py:172: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in __init__. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in torch.jit.Attribute. warnings.warn("The TorchScript type system doesn't support " loading existing vmfb from: C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\euler_scale_model_input_1_512_512fp16.vmfbWARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files. loading existing vmfb from: C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\euler_step_1_512_512fp16.vmfb WARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files. Inferring base model configuration. safetensors\torch.py:98: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() torch_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() return self.fget.get(instance, owner)() torch\storage.py:899: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() storage = cls(wrap_storage=untyped_storage) Loading Winograd config file from C:\Users\Administrator.local/shark_tank/configs\unet_winograd_vulkan.json 100%|█████████████████████████████████████████████████████████████████████████████████| 107/107 [00:00<00:00, 10.7kB/s] 100%|█████████████████████████████████████████████████████████████████████████████████| 107/107 [00:00<00:00, 10.7kB/s] Loading lowering config file from C:\Users\Administrator.local/shark_tank/configs\unet_v2_1base_fp16_vulkan_rdna2.json100%|██████████████████████████████████████████████████████████████████████████████| 24.2k/24.2k [00:00<00:00, 194kB/s] 100%|█████████████████████████████████████████████████████████████████████████████| 24.2k/24.2k [00:00<00:00, 2.25MB/s] Applying tuned configs on unet1_64_512_512_fp16_tuned_stable-diffusion-2-1-base_vulkan-00000000-1200-0000-0000-000000000000 No vmfb found. Compiling and saving to C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\unet1_64_512_512_fp16_tuned_stable-diffusion-2-1-base_vulkan-00000000-1200-0000-0000-000000000000.vmfb Using target triple -iree-vulkan-target-triple=rdna2-unknown-windows from command line args Saved vmfb in C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\unet1_64_512_512_fp16_tuned_stable-diffusion-2-1-base_vulkan-00000000-1200-0000-0000-000000000000.vmfb. WARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files. torch\fx\node.py:250: UserWarning: Trying to prepend a node to itself. This behavior has no effect on the graph. warnings.warn("Trying to prepend a node to itself. This behavior has no effect on the graph.") Loading Winograd config file from C:\Users\Administrator.local/shark_tank/configs\vae_winograd_vulkan.json 100%|█████████████████████████████████████████████████████████████████████████████████| 33.0/33.0 [00:00<00:00, 250B/s] 100%|███████████████████████████████████████████████████████████████████████████████| 33.0/33.0 [00:00<00:00, 2.75kB/s] No vmfb found. Compiling and saving to C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\vae1_64_512_512_fp16_tuned_stable-diffusion-2-1-base_vulkan-00000000-1200-0000-0000-000000000000.vmfb Using target triple -iree-vulkan-target-triple=rdna2-unknown-windows from command line args Saved vmfb in C:\Users\Administrator\Desktop\AI IMAGE GENERATOR\vae1_64_512_512_fp16_tuned_stable-diffusion-2-1-base_vulkan-00000000-1200-0000-0000-000000000000.vmfb. WARNING: [Loader Message] Code 0 : windows_read_data_files_in_registry: Registry lookup failed to get layer manifest files. Retrying with a different base model configuration Retrying with a different base model configuration Retrying with a different base model configuration Retrying with a different base model configuration Traceback (most recent call last): File "gradio\routes.py", line 384, in run_predict File "gradio\blocks.py", line 1024, in process_api File "gradio\blocks.py", line 850, in call_function File "anyio\to_thread.py", line 31, in run_sync File "anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread File "anyio_backends_asyncio.py", line 867, in run File "gradio\utils.py", line 445, in async_iteration File "apps\stable_diffusion\scripts\txt2img.py", line 117, in txt2img_inf File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_utils.py", line 355, in from_pretrained File "apps\stable_diffusion\src\models\modelwrappers.py", line 541, in call SystemExit: Cannot compile the model. Please create an issue with the detailed log at https://github.com/nod-ai/SHARK/issues

Thank you.

Domcaofficial commented 1 year ago

I have tried every version from 573 to 577 and none of those worked

yzhang93 commented 1 year ago

@Domcaofficial Looks like the models are already compiled which is good. Is this your first attempt of SHARK? Can you try append the flag --clear_all?

Domcaofficial commented 1 year ago

Yes its my first attempt of Shark,

Domcaofficial commented 1 year ago

Tried again, at one point gpu tried to generate something, but result was error

  1. C:\Users\Administrator\Desktop\AI IMAGE GENERATOR>shark_sd_20230301_573.exe --no-use_tuned
yzhang93 commented 1 year ago

Shark package 573-577 was broken, can you try our new release 578 and let us know if it works.

RoyalflushLiu commented 1 year ago

I think this happens due to memory exhaustion

Try to append the args: --vulkan_large_heap_block_size=0 --use_base_vae