sd-playtime/patches/stable-diffusion-api+0.0.7....

23 lines
1.3 KiB
Diff

diff --git a/node_modules/stable-diffusion-api/dist/lib/StableDiffusionApi.js b/node_modules/stable-diffusion-api/dist/lib/StableDiffusionApi.js
index efb62a9..6b03349 100644
--- a/node_modules/stable-diffusion-api/dist/lib/StableDiffusionApi.js
+++ b/node_modules/stable-diffusion-api/dist/lib/StableDiffusionApi.js
@@ -21,7 +21,7 @@ const base64_1 = require("../utils/base64");
const createScriptsWithCnUnits = (initScripts, controlNetUnit) => __awaiter(void 0, void 0, void 0, function* () {
const promises = controlNetUnit.map((unit) => __awaiter(void 0, void 0, void 0, function* () { return yield unit.toJson(); }));
const args = yield Promise.all(promises);
- const ControlNet = { args };
+ const ControlNet = args.length ? { args } : undefined;
const scripts = Object.assign(Object.assign({}, initScripts), { ControlNet });
return scripts;
});
@@ -457,7 +457,7 @@ class StableDiffusionApi {
setModel(name, findClosest = true) {
return __awaiter(this, void 0, void 0, function* () {
const models = yield this.getSdModels();
- const modelNames = models.map((model) => model.name);
+ const modelNames = models.map((model) => model.model_name);
let foundModel = null;
if (modelNames.includes(name)) {
foundModel = name;