mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-25 09:44:25 +01:00
Fix integration issues after the refactor
This commit is contained in:
parent
dbac2655f5
commit
f1de0be679
@ -393,7 +393,7 @@ call python --version
|
||||
|
||||
@if NOT DEFINED SD_UI_BIND_PORT set SD_UI_BIND_PORT=9000
|
||||
@if NOT DEFINED SD_UI_BIND_IP set SD_UI_BIND_IP=0.0.0.0
|
||||
@uvicorn server:app --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP%
|
||||
@uvicorn server:server_api --app-dir "%SD_UI_PATH%" --port %SD_UI_BIND_PORT% --host %SD_UI_BIND_IP%
|
||||
|
||||
|
||||
@pause
|
||||
|
@ -322,6 +322,6 @@ cd ..
|
||||
export SD_UI_PATH=`pwd`/ui
|
||||
cd stable-diffusion
|
||||
|
||||
uvicorn server:app --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0}
|
||||
uvicorn server:server_api --app-dir "$SD_UI_PATH" --port ${SD_UI_BIND_PORT:-9000} --host ${SD_UI_BIND_IP:-0.0.0.0}
|
||||
|
||||
read -p "Press any key to continue"
|
||||
|
@ -101,7 +101,7 @@ def device_init(context, device):
|
||||
context.device = device
|
||||
|
||||
# Force full precision on 1660 and 1650 NVIDIA cards to avoid creating green images
|
||||
if needs_to_force_full_precision(context.device_name):
|
||||
if needs_to_force_full_precision(context):
|
||||
print(f'forcing full precision on this GPU, to avoid green images. GPU detected: {context.device_name}')
|
||||
# Apply force_full_precision now before models are loaded.
|
||||
context.precision = 'full'
|
||||
|
@ -83,7 +83,12 @@ def _make_images_internal(req: Request, data_queue: queue.Queue, task_temp_image
|
||||
|
||||
save_images(req, images)
|
||||
|
||||
return Response(req, images=construct_response(req, images))
|
||||
res = Response(req, images=construct_response(req, images))
|
||||
res = res.json()
|
||||
data_queue.put(json.dumps(res))
|
||||
print('Task completed')
|
||||
|
||||
return res
|
||||
|
||||
def generate_images(req: Request, data_queue: queue.Queue, task_temp_images: list, step_callback):
|
||||
thread_data.temp_images.clear()
|
||||
@ -91,7 +96,7 @@ def generate_images(req: Request, data_queue: queue.Queue, task_temp_images: lis
|
||||
image_generator.on_image_step = make_step_callback(req, data_queue, task_temp_images, step_callback)
|
||||
|
||||
try:
|
||||
images = image_generator.make_image(context=thread_data, args=get_mk_img_args(req))
|
||||
images = image_generator.make_images(context=thread_data, args=get_mk_img_args(req))
|
||||
user_stopped = False
|
||||
except UserInitiatedStop:
|
||||
images = []
|
||||
|
Loading…
Reference in New Issue
Block a user