From 70ee895ab0fb999c6a5f40d97f5d31e4f7917e75 Mon Sep 17 00:00:00 2001 From: Tiago Martinho Date: Mon, 12 Dec 2022 17:52:06 +0100 Subject: [PATCH] Adds resourceURL instructions for Library Usage in apps --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8e7e60e..c76256d 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,13 @@ 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) let image = try pipeline.generateImages(prompt: prompt, seed: seed).first ``` +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: