MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / enqueueImageVariationTask

Function enqueueImageVariationTask

ui/media/js/main.js:912–934  ·  view source on GitHub ↗
(req, img, reqDiff)

Source from the content-addressed store, hash-verified

910})
911
912function enqueueImageVariationTask(req, img, reqDiff) {
913 const imageSeed = img.getAttribute("data-seed")
914
915 const newRequestBody = {
916 num_outputs: 1, // this can be user-configurable in the future
917 seed: imageSeed,
918 }
919
920 // If the user is editing pictures, stop modifyCurrentRequest from importing
921 // new values by setting the missing properties to undefined
922 if (!("init_image" in req) && !("init_image" in reqDiff)) {
923 newRequestBody.init_image = undefined
924 newRequestBody.mask = undefined
925 } else if (!("mask" in req) && !("mask" in reqDiff)) {
926 newRequestBody.mask = undefined
927 }
928
929 const newTaskRequest = modifyCurrentRequest(req, reqDiff, newRequestBody)
930 newTaskRequest.numOutputsTotal = 1 // this can be user-configurable in the future
931 newTaskRequest.batchCount = 1
932
933 createTask(newTaskRequest)
934}
935
936function applyInlineFilter(filterName, path, filterParams, img, statusText, tools) {
937 const filterReq = {

Callers 1

onContinueDrawingClickFunction · 0.85

Calls 2

modifyCurrentRequestFunction · 0.85
createTaskFunction · 0.85

Tested by

no test coverage detected