Open SourStrips opened 1 year ago
The arith.constant
issue should be resolved as of 690. Can you try 693 and with --clear_all if possible?
Still getting this issue on 693, Windows Vega 64, with low vram ticked:
torch\fx\node.py:251: 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.")
No vmfb found. Compiling and saving to C:\Users\johny\workspace\stable_diff\vae_1_64_384_384_fp16_stable-diffusion-v1-4_vulkan.vmfb
Using target triple -iree-vulkan-target-triple=rdna2-unknown-windows from command line args
Traceback (most recent call last):
File "gradio\routes.py", line 401, in run_predict
File "gradio\blocks.py", line 1302, in process_api
File "gradio\blocks.py", line 1039, 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 491, in async_iteration
File "ui\txt2img_ui.py", line 173, in txt2img_inf
File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_txt2img.py", line 133, in generate_images
File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_utils.py", line 120, in load_vae
File "apps\stable_diffusion\src\models\model_wrappers.py", line 658, in vae
File "apps\stable_diffusion\src\models\model_wrappers.py", line 650, in vae
File "apps\stable_diffusion\src\models\model_wrappers.py", line 274, in get_vae
File "apps\stable_diffusion\src\utils\utils.py", line 157, in compile_through_fx
File "apps\stable_diffusion\src\utils\utils.py", line 66, in _compile_module
File "shark\shark_inference.py", line 188, in save_module
File "shark\iree_utils\compile_utils.py", line 346, in export_iree_module_to_vmfb
File "shark\iree_utils\compile_utils.py", line 274, in compile_module_to_flatbuffer
File "iree\compiler\tools\core.py", line 280, in compile_str
File "iree\compiler\tools\binaries.py", line 196, in invoke_immediate
SystemExit: Error invoking IREE compiler tool iree-compile.exe
Diagnostics:
<eval_with_key>.16:41:20: error: failed to legalize operation 'arith.constant'
<eval_with_key>.16:41:20: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"vulkan", "vulkan-spirv-fb", {spirv.target_env = #spirv.target_env<#spirv.vce<v1.6, [Shader, Float64, Float16, Int64, Int16, Int8, StorageBuffer16BitAccess, StorageUniform16, StoragePushConstant16, StorageBuffer8BitAccess, UniformAndStorageBuffer8BitAccess, StoragePushConstant8, GroupNonUniform, GroupNonUniformVote, GroupNonUniformArithmetic, GroupNonUniformBallot, GroupNonUniformShuffle, GroupNonUniformShuffleRelative, GroupNonUniformClustered, GroupNonUniformQuad, VariablePointers, VariablePointersStorageBuffer], [SPV_KHR_16bit_storage, SPV_KHR_8bit_storage, SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers]>, api=Vulkan, AMD:DiscreteGPU, #spirv.resource_limits<max_compute_shared_memory_size = 65536, max_compute_workgroup_invocations = 1024, max_compute_workgroup_size = [1024, 1024, 1024], subgroup_size = 64, min_subgroup_size = 32, max_subgroup_size = 64, cooperative_matrix_properties_nv = []>>}>
<eval_with_key>.16:41:20: error: failed to serialize executables
<eval_with_key>.16:72:12: error: failed to legalize operation 'arith.constant'
<eval_with_key>.16:72:12: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"vulkan", "vulkan-spirv-fb", {spirv.target_env = #spirv.target_env<#spirv.vce<v1.6, [Shader, Float64, Float16, Int64, Int16, Int8, StorageBuffer16BitAccess, StorageUniform16, StoragePushConstant16, StorageBuffer8BitAccess, UniformAndStorageBuffer8BitAccess, StoragePushConstant8, GroupNonUniform, GroupNonUniformVote, GroupNonUniformArithmetic, GroupNonUniformBallot, GroupNonUniformShuffle, GroupNonUniformShuffleRelative, GroupNonUniformClustered, GroupNonUniformQuad, VariablePointers, VariablePointersStorageBuffer], [SPV_KHR_16bit_storage, SPV_KHR_8bit_storage, SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers]>, api=Vulkan, AMD:DiscreteGPU, #spirv.resource_limits<max_compute_shared_memory_size = 65536, max_compute_workgroup_invocations = 1024, max_compute_workgroup_size = [1024, 1024, 1024], subgroup_size = 64, min_subgroup_size = 32, max_subgroup_size = 64, cooperative_matrix_properties_nv = []>>}>
<eval_with_key>.16:72:12: error: failed to serialize executables
<eval_with_key>.16:407:21: error: failed to legalize operation 'arith.constant'
<eval_with_key>.16:407:21: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"vulkan", "vulkan-spirv-fb", {spirv.target_env = #spirv.target_env<#spirv.vce<v1.6, [Shader, Float64, Float16, Int64, Int16, Int8, StorageBuffer16BitAccess, StorageUniform16, StoragePushConstant16, StorageBuffer8BitAccess, UniformAndStorageBuffer8BitAccess, StoragePushConstant8, GroupNonUniform, GroupNonUniformVote, GroupNonUniformArithmetic, GroupNonUniformBallot, GroupNonUniformShuffle, GroupNonUniformShuffleRelative, GroupNonUniformClustered, GroupNonUniformQuad, VariablePointers, VariablePointersStorageBuffer], [SPV_KHR_16bit_storage, SPV_KHR_8bit_storage, SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers]>, api=Vulkan, AMD:DiscreteGPU, #spirv.resource_limits<max_compute_shared_memory_size = 65536, max_compute_workgroup_invocations = 1024, max_compute_workgroup_size = [1024, 1024, 1024], subgroup_size = 64, min_subgroup_size = 32, max_subgroup_size = 64, cooperative_matrix_properties_nv = []>>}>
<eval_with_key>.16:407:21: error: failed to serialize executables
<eval_with_key>.16:468:13: error: failed to legalize operation 'arith.constant'
<eval_with_key>.16:468:13: error: failed to run translation of source executable to target executable for backend #hal.executable.target<"vulkan", "vulkan-spirv-fb", {spirv.target_env = #spirv.target_env<#spirv.vce<v1.6, [Shader, Float64, Float16, Int64, Int16, Int8, StorageBuffer16BitAccess, StorageUniform16, StoragePushConstant16, StorageBuffer8BitAccess, UniformAndStorageBuffer8BitAccess, StoragePushConstant8, GroupNonUniform, GroupNonUniformVote, GroupNonUniformArithmetic, GroupNonUniformBallot, GroupNonUniformShuffle, GroupNonUniformShuffleRelative, GroupNonUniformClustered, GroupNonUniformQuad, VariablePointers, VariablePointersStorageBuffer], [SPV_KHR_16bit_storage, SPV_KHR_8bit_storage, SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers]>, api=Vulkan, AMD:DiscreteGPU, #spirv.resource_limits<max_compute_shared_memory_size = 65536, max_compute_workgroup_invocations = 1024, max_compute_workgroup_size = [1024, 1024, 1024], subgroup_size = 64, min_subgroup_size = 32, max_subgroup_size = 64, cooperative_matrix_properties_nv = []>>}>
<eval_with_key>.16:468:13: error: failed to serialize executables
Invoked with:
iree-compile.exe C:\Users\johny\AppData\Local\Temp\_MEI39682\iree\compiler\tools\..\_mlir_libs\iree-compile.exe - --iree-input-type=tm_tensor --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=vulkan --iree-llvmcpu-embedded-linker-path=C:\Users\johny\AppData\Local\Temp\_MEI39682\iree\compiler\tools\..\_mlir_libs\iree-lld.exe --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --iree-llvmcpu-target-cpu-features=host --iree-vulkan-target-env=#vk.target_env<v1.3, r(120), [VK_KHR_16bit_storage, VK_KHR_8bit_storage, VK_KHR_shader_float16_int8, VK_KHR_spirv_1_4, VK_KHR_storage_buffer_storage_class, VK_KHR_variable_pointers, VK_EXT_subgroup_size_control], AMD:DiscreteGPU, #vk.caps< maxComputeSharedMemorySize = 65536, maxComputeWorkGroupInvocations = 1024, maxComputeWorkGroupSize = dense<[1024, 1024, 1024]>: vector<3xi32>, subgroupSize = 64, subgroupFeatures = 255: i32, minSubgroupSize = 32, maxSubgroupSize = 64, shaderFloat16 = unit, shaderFloat64 = unit, shaderInt8 = unit, shaderInt16 = unit, shaderInt64 = unit, storageBuffer16BitAccess = unit, storagePushConstant16 = unit, uniformAndStorageBuffer16BitAccess = unit, storageBuffer8BitAccess = unit, storagePushConstant8 = unit, uniformAndStorageBuffer8BitAccess = unit, variablePointers = unit, variablePointersStorageBuffer = unit >> --iree-stream-resource-index-bits=64 --iree-vm-target-index-bits=64 --iree-vm-bytecode-module-strip-source-map=true --iree-util-zero-fill-elided-attrs -iree-vulkan-target-triple=rdna2-unknown-windows --iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-flow-detach-elementwise-from-named-ops,iree-preprocessing-pad-linalg-ops{pad-size=32}))
Need more information? Set IREE_SAVE_TEMPS=/some/dir in your environment to save all artifacts and reproducers.
^ ran with clear_all, though 693 was the first version I used so I didn't anticipate there was anything to clear
Can you post the entire output? I'd like to see which model, dimensions used, tuning configs applied, etc.
I can recreate this on my w7900. Looks like a VAE compile failure.
I should be at my computer in a couple hours and can post the entire output if needed still
I think the VAE compilation is broken in SHARK and needs builtin.module(func.func(iree-flow-detach-elementwise-from-named-ops,iree-preprocessing-convert-conv2d-to-img2col,iree-flow-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-pad-linalg-ops{pad-size=32},iree-linalg-ext-convert-conv2d-to-winograd))
Using target triple -iree-vulkan-target-triple=rdna2-unknown-windows from command line args Traceback (most recent call last): File "gradio\routes.py", line 401, in run_predict File "gradio\blocks.py", line 1302, in process_api File "gradio\blocks.py", line 1025, 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 "ui\img2img_ui.py", line 227, in img2img_inf File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_img2img.py", line 166, in generate_images File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_img2img.py", line 101, in prepare_image_latents File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_img2img.py", line 112, in encode_image File "apps\stable_diffusion\src\pipelines\pipeline_shark_stable_diffusion_img2img.py", line 55, in load_vae_encode File "apps\stable_diffusion\src\models\model_wrappers.py", line 587, in vae_encode File "apps\stable_diffusion\src\models\model_wrappers.py", line 580, in vae_encode File "apps\stable_diffusion\src\models\model_wrappers.py", line 216, in get_vae_encode File "apps\stable_diffusion\src\utils\utils.py", line 157, in compile_through_fx File "apps\stable_diffusion\src\utils\utils.py", line 66, in _compile_module File "shark\shark_inference.py", line 188, in save_module File "shark\iree_utils\compile_utils.py", line 346, in export_iree_module_to_vmfb File "shark\iree_utils\compile_utils.py", line 274, in compile_module_to_flatbuffer File "iree\compiler\tools\core.py", line 280, in compile_str File "iree\compiler\tools\binaries.py", line 196, in invoke_immediate SystemExit: Error invoking IREE compiler tool iree-compile.exe Diagnostics: