mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-27 08:39:28 +01:00
Typos from the refactor
This commit is contained in:
parent
6b943f88d1
commit
ac0961d7d4
@ -121,9 +121,9 @@ def resolve_model_paths(task_data: TaskData):
|
|||||||
|
|
||||||
def set_vram_optimizations(context: Context, task_data: TaskData):
|
def set_vram_optimizations(context: Context, task_data: TaskData):
|
||||||
if task_data.turbo:
|
if task_data.turbo:
|
||||||
context.vram_optimizations += {'TURBO'}
|
context.vram_optimizations.add('TURBO')
|
||||||
else:
|
else:
|
||||||
context.vram_optimizations -= {'TURBO'}
|
context.vram_optimizations.remove('TURBO')
|
||||||
|
|
||||||
def make_model_folders():
|
def make_model_folders():
|
||||||
for model_type in KNOWN_MODEL_TYPES:
|
for model_type in KNOWN_MODEL_TYPES:
|
||||||
|
@ -55,7 +55,7 @@ def make_images(req: GenerateImageRequest, task_data: TaskData, data_queue: queu
|
|||||||
raise e
|
raise e
|
||||||
|
|
||||||
def _make_images_internal(req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback):
|
def _make_images_internal(req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback):
|
||||||
images, user_stopped = generate_images(req, data_queue, task_temp_images, step_callback, task_data.stream_image_progress)
|
images, user_stopped = generate_images(req, task_data, data_queue, task_temp_images, step_callback, task_data.stream_image_progress)
|
||||||
filtered_images = apply_filters(task_data, images, user_stopped)
|
filtered_images = apply_filters(task_data, images, user_stopped)
|
||||||
|
|
||||||
if task_data.save_to_disk_path is not None:
|
if task_data.save_to_disk_path is not None:
|
||||||
@ -64,10 +64,10 @@ def _make_images_internal(req: GenerateImageRequest, task_data: TaskData, data_q
|
|||||||
|
|
||||||
return filtered_images if task_data.show_only_filtered_image else images + filtered_images
|
return filtered_images if task_data.show_only_filtered_image else images + filtered_images
|
||||||
|
|
||||||
def generate_images(req: GenerateImageRequest, data_queue: queue.Queue, task_temp_images: list, step_callback, stream_image_progress: bool):
|
def generate_images(req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback, stream_image_progress: bool):
|
||||||
context.temp_images.clear()
|
context.temp_images.clear()
|
||||||
|
|
||||||
image_generator.on_image_step = make_step_callback(req, data_queue, task_temp_images, step_callback, stream_image_progress)
|
image_generator.on_image_step = make_step_callback(req, task_data, data_queue, task_temp_images, step_callback, stream_image_progress)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
images = image_generator.make_images(context=context, req=req)
|
images = image_generator.make_images(context=context, req=req)
|
||||||
|
@ -40,12 +40,12 @@ class ServerStates:
|
|||||||
|
|
||||||
class RenderTask(): # Task with output queue and completion lock.
|
class RenderTask(): # Task with output queue and completion lock.
|
||||||
def __init__(self, req: GenerateImageRequest, task_data: TaskData):
|
def __init__(self, req: GenerateImageRequest, task_data: TaskData):
|
||||||
req.request_id = id(self)
|
task_data.request_id = id(self)
|
||||||
self.render_request: GenerateImageRequest = req # Initial Request
|
self.render_request: GenerateImageRequest = req # Initial Request
|
||||||
self.task_data: TaskData = task_data
|
self.task_data: TaskData = task_data
|
||||||
self.response: Any = None # Copy of the last reponse
|
self.response: Any = None # Copy of the last reponse
|
||||||
self.render_device = None # Select the task affinity. (Not used to change active devices).
|
self.render_device = None # Select the task affinity. (Not used to change active devices).
|
||||||
self.temp_images:list = [None] * req.num_outputs * (1 if req.show_only_filtered_image else 2)
|
self.temp_images:list = [None] * req.num_outputs * (1 if task_data.show_only_filtered_image else 2)
|
||||||
self.error: Exception = None
|
self.error: Exception = None
|
||||||
self.lock: threading.Lock = threading.Lock() # Locks at task start and unlocks when task is completed
|
self.lock: threading.Lock = threading.Lock() # Locks at task start and unlocks when task is completed
|
||||||
self.buffer_queue: queue.Queue = queue.Queue() # Queue of JSON string segments
|
self.buffer_queue: queue.Queue = queue.Queue() # Queue of JSON string segments
|
||||||
@ -235,7 +235,9 @@ def thread_render(device):
|
|||||||
'alive': True
|
'alive': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_state = ServerStates.LoadingModel
|
||||||
model_manager.load_default_models(renderer.context)
|
model_manager.load_default_models(renderer.context)
|
||||||
|
|
||||||
current_state = ServerStates.Online
|
current_state = ServerStates.Online
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user