diff --git a/src/js/sd.js b/src/js/sd.js new file mode 100644 index 0000000000000000000000000000000000000000..4aad8107f34b1f5a3cc1fcd4d8f66c80521ca31a --- /dev/null +++ b/src/js/sd.js @@ -0,0 +1,25 @@ +export default { + draw (url, config) { + + + const data = { + prompt: config.prompt, + steps: config?.steps??20, + negative_prompt: config?.negative_prompt??'', + width: config?.width??512, + height: config?.height??512, + cfg_scale: config?.cfg_scale??6, + seed : config?.seed??-1, + sampler_name: config?.sampler_name??"DPM++ SDE Karras" + } + const headers = { + 'content-type': 'application/json' + }; + + axios.post(url, data, { headers }).then(response => { + + }); + + } + +} \ No newline at end of file