forked from pinks/eris
feat: img2img seed
This commit is contained in:
parent
f678324889
commit
57918dc713
|
@ -83,14 +83,24 @@ async function img2img(
|
||||||
state.params.height = biggestPhoto.height;
|
state.params.height = biggestPhoto.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
state.params = parsePngInfo(match, state.params, true);
|
||||||
|
}
|
||||||
|
|
||||||
const repliedToText = repliedToMsg?.text || repliedToMsg?.caption;
|
const repliedToText = repliedToMsg?.text || repliedToMsg?.caption;
|
||||||
if (includeRepliedTo && repliedToText) {
|
const isReply = includeRepliedTo && repliedToText;
|
||||||
|
|
||||||
|
if (isReply) {
|
||||||
// TODO: remove bot command from replied to text
|
// TODO: remove bot command from replied to text
|
||||||
state.params = parsePngInfo(repliedToText, state.params);
|
state.params = parsePngInfo(repliedToText, state.params);
|
||||||
}
|
}
|
||||||
|
if (isReply) {
|
||||||
if (match) {
|
const parsedInfo = parsePngInfo(repliedToText, undefined);
|
||||||
state.params = parsePngInfo(match, state.params);
|
if (parsedInfo.prompt !== state?.params?.prompt) {
|
||||||
|
if (state?.params) {
|
||||||
|
state.params.seed = parsedInfo.seed ?? -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.fileId) {
|
if (!state.fileId) {
|
||||||
|
|
Loading…
Reference in New Issue