mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-22 21:32:03 +01:00
Remove the test_sd2 flag, the code now works with SD 2.0
This commit is contained in:
parent
25639cc3f8
commit
aa8b50280b
@ -164,14 +164,6 @@ var PARAMETERS = [
|
||||
return `<input id="${parameter.id}" name="${parameter.id}" size="6" value="9000" onkeypress="preventNonNumericalInput(event)">`
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "test_sd2",
|
||||
type: ParameterType.checkbox,
|
||||
label: "Test SD 2.0",
|
||||
note: "Experimental! High memory usage! GPU-only! Not the final version! Please restart the program after changing this.",
|
||||
icon: "fa-fire",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "use_beta_channel",
|
||||
type: ParameterType.checkbox,
|
||||
@ -235,7 +227,6 @@ let saveToDiskField = document.querySelector('#save_to_disk')
|
||||
let diskPathField = document.querySelector('#diskPath')
|
||||
let listenToNetworkField = document.querySelector("#listen_to_network")
|
||||
let listenPortField = document.querySelector("#listen_port")
|
||||
let testSD2Field = document.querySelector("#test_sd2")
|
||||
let useBetaChannelField = document.querySelector("#use_beta_channel")
|
||||
let uiOpenBrowserOnStartField = document.querySelector("#ui_open_browser_on_start")
|
||||
let confirmDangerousActionsField = document.querySelector("#confirm_dangerous_actions")
|
||||
@ -272,12 +263,6 @@ async function getAppConfig() {
|
||||
if (config.ui && config.ui.open_browser_on_start === false) {
|
||||
uiOpenBrowserOnStartField.checked = false
|
||||
}
|
||||
if ('test_sd2' in config) {
|
||||
testSD2Field.checked = config['test_sd2']
|
||||
}
|
||||
|
||||
let testSD2SettingEntry = getParameterSettingsEntry('test_sd2')
|
||||
testSD2SettingEntry.style.display = (config.update_branch === 'beta' ? '' : 'none')
|
||||
if (config.net && config.net.listen_to_network === false) {
|
||||
listenToNetworkField.checked = false
|
||||
}
|
||||
@ -442,8 +427,7 @@ saveSettingsBtn.addEventListener('click', function() {
|
||||
'update_branch': updateBranch,
|
||||
'ui_open_browser_on_start': uiOpenBrowserOnStartField.checked,
|
||||
'listen_to_network': listenToNetworkField.checked,
|
||||
'listen_port': listenPortField.value,
|
||||
'test_sd2': testSD2Field.checked
|
||||
'listen_port': listenPortField.value
|
||||
})
|
||||
saveSettingsBtn.classList.add('active')
|
||||
asyncDelay(300).then(() => saveSettingsBtn.classList.remove('active'))
|
||||
|
@ -83,8 +83,6 @@ def setConfig(config):
|
||||
bind_ip = '0.0.0.0' if config['net']['listen_to_network'] else '127.0.0.1'
|
||||
config_bat.append(f"@set SD_UI_BIND_IP={bind_ip}")
|
||||
|
||||
config_bat.append(f"@set test_sd2={'Y' if config.get('test_sd2', False) else 'N'}")
|
||||
|
||||
if len(config_bat) > 0:
|
||||
with open(config_bat_path, 'w', encoding='utf-8') as f:
|
||||
f.write('\r\n'.join(config_bat))
|
||||
@ -102,8 +100,6 @@ def setConfig(config):
|
||||
bind_ip = '0.0.0.0' if config['net']['listen_to_network'] else '127.0.0.1'
|
||||
config_sh.append(f"export SD_UI_BIND_IP={bind_ip}")
|
||||
|
||||
config_sh.append(f"export test_sd2=\"{'Y' if config.get('test_sd2', False) else 'N'}\"")
|
||||
|
||||
if len(config_sh) > 1:
|
||||
with open(config_sh_path, 'w', encoding='utf-8') as f:
|
||||
f.write('\n'.join(config_sh))
|
||||
|
@ -65,11 +65,6 @@ def resolve_model_to_use(model_name:str=None, model_type:str=None):
|
||||
model_name = config['model'][model_type]
|
||||
|
||||
if model_name:
|
||||
is_sd2 = config.get('test_sd2', False)
|
||||
if model_name.startswith('sd2_') and not is_sd2: # temp hack, until SD2 is unified with 1.4
|
||||
log.error('ERROR: Cannot use SD 2.0 models with SD 1.0 code. Using the sd-v1-4 model instead!')
|
||||
model_name = 'sd-v1-4'
|
||||
|
||||
# Check models directory
|
||||
models_dir_path = os.path.join(app.MODELS_DIR, model_type, model_name)
|
||||
for model_extension in model_extensions:
|
||||
|
@ -41,7 +41,6 @@ class SetAppConfigRequest(BaseModel):
|
||||
ui_open_browser_on_start: bool = None
|
||||
listen_to_network: bool = None
|
||||
listen_port: int = None
|
||||
test_sd2: bool = None
|
||||
|
||||
server_api.mount('/media', NoCacheStaticFiles(directory=os.path.join(app.SD_UI_DIR, 'media')), name="media")
|
||||
|
||||
@ -67,8 +66,6 @@ async def setAppConfig(req : SetAppConfigRequest):
|
||||
if 'net' not in config:
|
||||
config['net'] = {}
|
||||
config['net']['listen_port'] = int(req.listen_port)
|
||||
if req.test_sd2 is not None:
|
||||
config['test_sd2'] = req.test_sd2
|
||||
try:
|
||||
app.setConfig(config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user