Fork自 inscode / VueJS
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 => { }); } }