removed download/no more dream tool softlocks
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
249e83ed07
commit
c35742b68f
1 changed files with 26 additions and 10 deletions
|
@ -146,9 +146,19 @@ const _generate = async (endpoint, request, bb) => {
|
||||||
console.info(`[dream] Generating images for prompt '${request.prompt}'`);
|
console.info(`[dream] Generating images for prompt '${request.prompt}'`);
|
||||||
console.debug(request);
|
console.debug(request);
|
||||||
|
|
||||||
let stopProgress = _monitorProgress(bb);
|
let stopProgress = null;
|
||||||
images.push(...(await _dream(endpoint, requestCopy)));
|
try {
|
||||||
stopProgress();
|
stopProgress = _monitorProgress(bb);
|
||||||
|
images.push(...(await _dream(endpoint, requestCopy)));
|
||||||
|
} catch (e) {
|
||||||
|
alert(
|
||||||
|
`Error generating images. Please try again or see consolde for more details`
|
||||||
|
);
|
||||||
|
console.warn(`[dream] Error generating images:`);
|
||||||
|
console.warn(e);
|
||||||
|
} finally {
|
||||||
|
stopProgress();
|
||||||
|
}
|
||||||
|
|
||||||
// Image navigation
|
// Image navigation
|
||||||
const prevImg = () => {
|
const prevImg = () => {
|
||||||
|
@ -184,11 +194,19 @@ const _generate = async (endpoint, request, bb) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const makeMore = async () => {
|
const makeMore = async () => {
|
||||||
let stopProgress = _monitorProgress(bb);
|
try {
|
||||||
images.push(...(await _dream(endpoint, requestCopy)));
|
stopProgress = _monitorProgress(bb);
|
||||||
stopProgress();
|
images.push(...(await _dream(endpoint, requestCopy)));
|
||||||
|
imageindextxt.textContent = `${at + 1}/${images.length}`;
|
||||||
imageindextxt.textContent = `${at + 1}/${images.length}`;
|
} catch (e) {
|
||||||
|
alert(
|
||||||
|
`Error generating images. Please try again or see consolde for more details`
|
||||||
|
);
|
||||||
|
console.warn(`[dream] Error generating images:`);
|
||||||
|
console.warn(e);
|
||||||
|
} finally {
|
||||||
|
stopProgress();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const discardImg = async () => {
|
const discardImg = async () => {
|
||||||
|
@ -429,9 +447,7 @@ const dream_generate_callback = async (evn, state) => {
|
||||||
auxCtx.globalCompositeOperation = "destination-atop";
|
auxCtx.globalCompositeOperation = "destination-atop";
|
||||||
auxCtx.fillStyle = "#FFFF";
|
auxCtx.fillStyle = "#FFFF";
|
||||||
auxCtx.fillRect(0, 0, request.width, request.height);
|
auxCtx.fillRect(0, 0, request.width, request.height);
|
||||||
downloadCanvas({canvas: auxCanvas, filename: null});
|
|
||||||
applyOvermask(auxCanvas, auxCtx, state.overMaskPx);
|
applyOvermask(auxCanvas, auxCtx, state.overMaskPx);
|
||||||
downloadCanvas({canvas: auxCanvas, filename: null});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auxCtx.globalCompositeOperation = "destination-out"; // ???
|
auxCtx.globalCompositeOperation = "destination-out"; // ???
|
||||||
|
|
Loading…
Reference in a new issue