Skip to content

Commit

Permalink
Revert "added optional startup delay before making Auto1111 API calls"
Browse files Browse the repository at this point in the history
This reverts commit 8918c36.
  • Loading branch information
rbbrdckybk committed Dec 19, 2023
1 parent 588818f commit 16449a6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
7 changes: 0 additions & 7 deletions config-default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ SD_PORT = 7861
# allowing them all to init simultaneously may cause issues depending on system resources.
GPU_INIT_STAGGER = 1

# Optional Auto1111 startup delay, in seconds
# You may add a delay here if you receive errors during startup initialization.
# Usually these will be some sort of "invalid response" from Auto1111; the API may be up and
# running but not quite ready to process requests. This delay will wait the specified time to
# make the initial requests to Auto1111 after the API indicates it's available.
STARTUP_DELAY = 0

# Directory containing your prompt files.
# Locations are relative to Dream Factory's installation directory unless specified.
PROMPTS_LOCATION = prompts
Expand Down
11 changes: 1 addition & 10 deletions dream-factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1843,8 +1843,7 @@ def init_config(self):

'sd_location' : "",
'sd_port' : 7861,
'gpu_init_stagger' : 1,
'startup_delay' : 0
'gpu_init_stagger' : 1
}

file = utils.TextFile(self.config_file)
Expand Down Expand Up @@ -1897,14 +1896,6 @@ def init_config(self):
else:
self.config.update({'gpu_init_stagger' : int(value)})

elif command == 'startup_delay':
try:
int(value)
except:
print("*** WARNING: specified 'STARTUP_DELAY' is not a valid number; it will be ignored!")
else:
self.config.update({'startup_delay' : int(value)})

elif command == 'webserver_use':
if value == 'yes' or value == 'no':
if value == 'yes':
Expand Down
5 changes: 0 additions & 5 deletions scripts/sdi.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,6 @@ def run(self):
def alive_check_callback(self, response_code):
#self.sdi_ref.log(str(response_code))
if response_code == 200:
# TODO BK add wait here
if self.sdi_ref.control_ref.config['startup_delay'] > 0:
self.sdi_ref.log("Auto1111 API is available, waiting for " + str(self.sdi_ref.control_ref.config['startup_delay']) + " seconds...")
time.sleep(self.sdi_ref.control_ref.config['startup_delay'])

self.sdi_ref.ready = True
self.sdi_ref.log("SD instance finished initialization; ready for work!")
else:
Expand Down

0 comments on commit 16449a6

Please sign in to comment.