(req, img)
| 676 | } |
| 677 | |
| 678 | function 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 |
| 697 | function getAllModelNames(type) { |
nothing calls this directly
no test coverage detected