huggingface / swift-coreml-diffusers

Swift app demonstrating Core ML Stable Diffusion
Apache License 2.0
2.53k stars 214 forks source link

Build failed #70

Open ChrisFasching opened 1 year ago

ChrisFasching commented 1 year ago

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
ghost commented 1 year ago

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 commented 1 year ago

Try again please, 66 has been merged in.

beezbo commented 1 year ago

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
ghost commented 1 year ago

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.

beezbo commented 1 year ago

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.

ghost commented 1 year ago

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