swift-coreml-diffusers icon indicating copy to clipboard operation
swift-coreml-diffusers copied to clipboard

Build failed

Open ChrisFasching opened this issue 2 years ago • 6 comments

swift-coreml-diffusers-main/Diffusion/Common/ModelInfo.swift:190:12

Cannot convert value of type '()' to expected condition type 'Bool'

Screenshot 2023-07-30 at 17 05 08

ChrisFasching avatar Jul 30 '23 15:07 ChrisFasching

You can fix this by using Xcode 15 beta. Or a simple fix for this issue is here: https://github.com/huggingface/swift-coreml-diffusers/pull/66

ghost avatar Jul 30 '23 16:07 ghost

Try again please, 66 has been merged in.

ghost avatar Jul 30 '23 20:07 ghost

Do I need to install macOS 14 to be able to compile? I got the error reported above with the update #66 (screenshot for verification of implemented fix)

image

beezbo avatar Jul 31 '23 05:07 beezbo

In the screen shot you do not display an error. There is a new feature which requires macOS 14 which is palletised models/quantisation. If you are not running on macOS 14 it the code will return false and not allow you to run/select quantised models at runtime. If you are still getting compile errors my guess would be new language model code added in the stable diffusion package which require Xcode beta 15 to build, but I don't see that in your report.

ghost avatar Jul 31 '23 08:07 ghost

In the screen shot you do not display an error. There is a new feature which requires macOS 14 which is palletised models/quantisation. If you are not running on macOS 14 it the code will return false and not allow you to run/select quantised models at runtime. If you are still getting compile errors my guess would be new language model code added in the stable diffusion package which require Xcode beta 15 to build, but I don't see that in your report.

Sorry, rephrased my comment to clarify that the screenshot was my check to see if the fix was implemented. It didn't fix the issue for me and I had to install Xcode 15 beta for it to compile. The comment above mine also confirms the issue.

beezbo avatar Jul 31 '23 19:07 beezbo

Can you try explicitly declaring the type? DiffusionApp.swift line 23 let deviceSupportsQuantization: Bool = {

ghost avatar Jul 31 '23 20:07 ghost