From 8f0300df9ae3d40d8002b3f18c9d0391492716aa Mon Sep 17 00:00:00 2001 From: 622aa39c1f9b166ab1a38c05 <622aa39c1f9b166ab1a38c05@devide> Date: Mon, 3 Jul 2023 10:06:00 +0000 Subject: [PATCH] Mon Jul 3 10:06:00 UTC 2023 inscode --- src/js/sd.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/js/sd.js diff --git a/src/js/sd.js b/src/js/sd.js new file mode 100644 index 0000000..4aad810 --- /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 -- GitLab