pull/63/merge
Tiago Martinho 1 year ago committed by GitHub
commit ff2603910b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -199,12 +199,15 @@ Please use the `--help` flag to learn about batched generation and more.
```swift
import StableDiffusion
...
let resourceURL = Bundle.main.resourceURL?.appending(path: "RESOURCES_FOLDER")
let pipeline = try StableDiffusionPipeline(resourcesAt: resourceURL)
pipeline.loadResources()
let image = try pipeline.generateImages(prompt: prompt, seed: seed).first
```
On iOS, the `reduceMemory` option should be set to `true` when constructing `StableDiffusionPipeline`
RESOURCES_FOLDER is a folder added to your app target that contains the Core ML models (.mlmodelc) and tokenization resources (.txt).
### Swift Package Details
This Swift package contains two products:

Loading…
Cancel
Save