sd.js 609 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 => {
            
        });
        
    }

}