Skip to content

Commit

Permalink
add a few extra metadata recognizers
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 16, 2023
1 parent 5724d0f commit 948ccbc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/wwwroot/js/genpage/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ function remapMetadataKeys(metadata, keymap) {
return metadata;
}

const imageMetadataKeys = ['prompt', 'Prompt', 'parameters', 'Parameters', 'userComment', 'UserComment'];
const imageMetadataKeys = ['prompt', 'Prompt', 'parameters', 'Parameters', 'userComment', 'UserComment', 'model', 'Model'];

function imageInputHandler() {
let imageArea = getRequiredElementById('current_image');
Expand Down Expand Up @@ -1159,6 +1159,12 @@ function imageInputHandler() {
else if (parsed.userComment) {
metadata = parsed.userComment;
}
else if (parsed.model) {
metadata = parsed.model;
}
else if (parsed.Model) {
metadata = parsed.Model;
}
}
if (metadata instanceof Uint8Array) {
let prefix = metadata.slice(0, 8);
Expand Down

0 comments on commit 948ccbc

Please sign in to comment.