dsh-mo-image 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +283 -50
- package/lib/adapter-kit.js +150 -253
- package/lib/adapters/async.js +264 -277
- package/lib/adapters/cn.js +133 -81
- package/lib/adapters/openai.js +188 -157
- package/lib/adapters.js +3087 -944
- package/lib/client.js +6444 -858
- package/lib/comfy-workflow.js +96 -10
- package/lib/config-store.js +1072 -136
- package/lib/field-templates.js +385 -0
- package/lib/image-execution.js +40 -817
- package/lib/image-jobs.js +23 -12
- package/lib/image-request.js +830 -0
- package/lib/image-service.js +96 -133
- package/lib/image-worker.js +84 -71
- package/lib/index.js +833 -327
- package/lib/localized-error.js +4 -0
- package/lib/model-rules.js +1034 -0
- package/lib/net.js +60 -25
- package/lib/output-profiles.js +1225 -0
- package/lib/png-scale.js +53 -46
- package/lib/prompt-profiles.js +83 -38
- package/lib/provider-operations.js +291 -0
- package/lib/proxy-dispatcher.js +11 -5
- package/lib/proxy.js +10 -8
- package/lib/request-auth.js +86 -31
- package/lib/settings-memory.js +112 -28
- package/lib/status.js +6 -3
- package/locale/messages.csv +396 -226
- package/package.json +1 -1
- package/scripts/release.mjs +79 -64
- package/skills/mo-image-editing/SKILL.md +7 -13
- package/skills/mo-image-generation/SKILL.md +7 -6
package/lib/status.js
CHANGED
|
@@ -26,12 +26,15 @@ export function canEditModel(provider, model, adapter) {
|
|
|
26
26
|
if (!adapter) return false;
|
|
27
27
|
if (adapter.id === 'comfyui') {
|
|
28
28
|
const entry = provider && provider.modelOptions ? provider.modelOptions[model] : null;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const workflow = String(entry?.workflow || '');
|
|
30
|
+
if (!workflow) return true;
|
|
31
31
|
const hasSlot = /\{\{\s*image\s*\}\}/.test(workflow);
|
|
32
32
|
const mapped = Boolean(entry.mapping && entry.mapping.image);
|
|
33
33
|
return hasSlot || mapped;
|
|
34
34
|
}
|
|
35
|
+
const edit = adapter.operations?.edit;
|
|
36
|
+
if (edit?.fields?.image === null || edit?.fields?.image === false
|
|
37
|
+
|| (edit?.input === 'explicit' && !edit.fields?.image)) return false;
|
|
35
38
|
if (adapter.async && typeof adapter.async === 'object') return Boolean(adapter.async.edit);
|
|
36
39
|
return adapterSupportsKind(adapter, 'edit');
|
|
37
40
|
}
|
|
@@ -180,7 +183,7 @@ export function buildImageStatus(input) {
|
|
|
180
183
|
preset: String(defaults.preset || '')
|
|
181
184
|
}
|
|
182
185
|
: {},
|
|
183
|
-
adapter ? { control: sizeSpecFor(
|
|
186
|
+
adapter ? { control: sizeSpecFor(provider, model, adapter).control } : {}
|
|
184
187
|
)
|
|
185
188
|
}
|
|
186
189
|
};
|