mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-03 10:02:09 +08:00
Code Optimization and Issues Fixes in ComfyUI server (#8196)
* Update server.py * Update server.py
This commit is contained in:
parent
65da29aaa9
commit
57893c843f
@ -226,7 +226,7 @@ class PromptServer():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
@routes.get("/embeddings")
|
@routes.get("/embeddings")
|
||||||
def get_embeddings(self):
|
def get_embeddings(request):
|
||||||
embeddings = folder_paths.get_filename_list("embeddings")
|
embeddings = folder_paths.get_filename_list("embeddings")
|
||||||
return web.json_response(list(map(lambda a: os.path.splitext(a)[0], embeddings)))
|
return web.json_response(list(map(lambda a: os.path.splitext(a)[0], embeddings)))
|
||||||
|
|
||||||
@ -282,7 +282,6 @@ class PromptServer():
|
|||||||
a.update(f.read())
|
a.update(f.read())
|
||||||
b.update(image.file.read())
|
b.update(image.file.read())
|
||||||
image.file.seek(0)
|
image.file.seek(0)
|
||||||
f.close()
|
|
||||||
return a.hexdigest() == b.hexdigest()
|
return a.hexdigest() == b.hexdigest()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user