const sdapi = require('../../sdapi') class SdOptions { constructor () { // this.status = false // true if we have a valid copy of sd options, false otherwise this.options //store sd options } async getOptions () { try { // if (this.status) { // return this.options // } else { // this.options = await sdapi.requestGetOptions() // if (this.options) { // this.status = true // } // } this.options = await sdapi.requestGetOptions() return this.options } catch (e) { console.warn(e) } } getCurrentModel(){ const current_model = this.options?.sd_model_checkpoint return current_model } } // const sd_options = new SdOptions() // sd_options.option?.sd_model_checkpoint module.exports = { SdOptions }