Compare commits

...

1 Commits

Author SHA1 Message Date
nameless 57918dc713 feat: img2img seed 2023-11-10 02:42:54 +00:00
1 changed files with 14 additions and 4 deletions

View File

@ -83,14 +83,24 @@ async function img2img(
state.params.height = biggestPhoto.height;
}
if (match) {
state.params = parsePngInfo(match, state.params, true);
}
const repliedToText = repliedToMsg?.text || repliedToMsg?.caption;
if (includeRepliedTo && repliedToText) {
const isReply = includeRepliedTo && repliedToText;
if (isReply) {
// TODO: remove bot command from replied to text
state.params = parsePngInfo(repliedToText, state.params);
}
if (match) {
state.params = parsePngInfo(match, state.params);
if (isReply) {
const parsedInfo = parsePngInfo(repliedToText, undefined);
if (parsedInfo.prompt !== state?.params?.prompt) {
if (state?.params) {
state.params.seed = parsedInfo.seed ?? -1;
}
}
}
if (!state.fileId) {