mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-03-29 16:46:38 +01:00
modifyCurrentRequest with rest parameters
This commit is contained in:
parent
816cf8f702
commit
1696a5c8e1
@ -421,10 +421,10 @@ function onDownloadImageClick(req, img) {
|
||||
imgDownload.click()
|
||||
}
|
||||
|
||||
function modifyCurrentRequest(req, reqDiff) {
|
||||
function modifyCurrentRequest(req, ...reqDiff) {
|
||||
const newTaskRequest = getCurrentUserRequest()
|
||||
|
||||
newTaskRequest.reqBody = Object.assign({}, req, reqDiff, {
|
||||
newTaskRequest.reqBody = Object.assign({}, req, ...reqDiff, {
|
||||
use_cpu: useCPUField.checked
|
||||
})
|
||||
newTaskRequest.seed = newTaskRequest.reqBody.seed
|
||||
@ -453,13 +453,11 @@ function onMakeSimilarClick(req, img) {
|
||||
function enqueueImageVariationTask(req, img, reqDiff) {
|
||||
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
|
||||
seed: imageSeed
|
||||
})
|
||||
|
||||
const newTaskRequest = modifyCurrentRequest(req, reqDiff)
|
||||
|
||||
newTaskRequest.numOutputsTotal = 1 // this can be user-configurable in the future
|
||||
newTaskRequest.batchCount = 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user