MCPcopy Create free account
hub / github.com/easydiffusion/easydiffusion / onMakeSimilarClick

Function onMakeSimilarClick

ui/media/js/main.js:678–694  ·  view source on GitHub ↗
(req, img)

Source from the content-addressed store, hash-verified

676}
677
678function onMakeSimilarClick(req, img) {
679 const newTaskRequest = modifyCurrentRequest(req, {
680 num_outputs: 1,
681 num_inference_steps: 50,
682 guidance_scale: 7.5,
683 prompt_strength: 0.7,
684 init_image: img.src,
685 seed: Math.floor(Math.random() * 10000000),
686 })
687
688 newTaskRequest.numOutputsTotal = 5
689 newTaskRequest.batchCount = 5
690
691 delete newTaskRequest.reqBody.mask
692
693 createTask(newTaskRequest)
694}
695
696// gets a flat list of all models of a certain type, ignoring directories
697function getAllModelNames(type) {

Callers

nothing calls this directly

Calls 2

modifyCurrentRequestFunction · 0.85
createTaskFunction · 0.85

Tested by

no test coverage detected