Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Code Optimization and Issues Fixes in ComfyUI server (#8196)

编程界的小学生57893c843f44
diff --git a/server.py b/server.py
index cb1c6a8fd..16cd88d91 100644
--- a/server.py
+++ b/server.py
@@ -226,7 +226,7 @@ class PromptServer():
return response
@routes.get("/embeddings")
- def get_embeddings(self):
+ def get_embeddings(request):
embeddings = folder_paths.get_filename_list("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())
b.update(image.file.read())
image.file.seek(0)
- f.close()
return a.hexdigest() == b.hexdigest()
return False