mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-04-13 05:58:48 +02:00
modifyCurrentRequest with rest parameters
This commit is contained in:
parent
816cf8f702
commit
1696a5c8e1
@ -421,10 +421,10 @@ function onDownloadImageClick(req, img) {
|
|||||||
imgDownload.click()
|
imgDownload.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyCurrentRequest(req, reqDiff) {
|
function modifyCurrentRequest(req, ...reqDiff) {
|
||||||
const newTaskRequest = getCurrentUserRequest()
|
const newTaskRequest = getCurrentUserRequest()
|
||||||
|
|
||||||
newTaskRequest.reqBody = Object.assign({}, req, reqDiff, {
|
newTaskRequest.reqBody = Object.assign({}, req, ...reqDiff, {
|
||||||
use_cpu: useCPUField.checked
|
use_cpu: useCPUField.checked
|
||||||
})
|
})
|
||||||
newTaskRequest.seed = newTaskRequest.reqBody.seed
|
newTaskRequest.seed = newTaskRequest.reqBody.seed
|
||||||
@ -453,13 +453,11 @@ function onMakeSimilarClick(req, img) {
|
|||||||
function enqueueImageVariationTask(req, img, reqDiff) {
|
function enqueueImageVariationTask(req, img, reqDiff) {
|
||||||
const imageSeed = img.getAttribute('data-seed')
|
const imageSeed = img.getAttribute('data-seed')
|
||||||
|
|
||||||
reqDiff = Object.assign({}, reqDiff, {
|
const newTaskRequest = modifyCurrentRequest(req, reqDiff, {
|
||||||
num_outputs: 1, // this can be user-configurable in the future
|
num_outputs: 1, // this can be user-configurable in the future
|
||||||
seed: imageSeed
|
seed: imageSeed
|
||||||
})
|
})
|
||||||
|
|
||||||
const newTaskRequest = modifyCurrentRequest(req, reqDiff)
|
|
||||||
|
|
||||||
newTaskRequest.numOutputsTotal = 1 // this can be user-configurable in the future
|
newTaskRequest.numOutputsTotal = 1 // this can be user-configurable in the future
|
||||||
newTaskRequest.batchCount = 1
|
newTaskRequest.batchCount = 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user