Browse Source

Style.

pull/279/head
comfyanonymous 2 years ago
parent
commit
48efadeccf
  1. 4
      nodes.py
  2. 2
      server.py

4
nodes.py

@ -746,12 +746,12 @@ class SaveImage:
except: except:
digits = 0 digits = 0
return (digits, prefix) return (digits, prefix)
def compute_vars(input): def compute_vars(input):
input = input.replace("%width%", str(images[0].shape[1])) input = input.replace("%width%", str(images[0].shape[1]))
input = input.replace("%height%", str(images[0].shape[0])) input = input.replace("%height%", str(images[0].shape[0]))
return input return input
filename_prefix = compute_vars(filename_prefix) filename_prefix = compute_vars(filename_prefix)
subfolder = os.path.dirname(os.path.normpath(filename_prefix)) subfolder = os.path.dirname(os.path.normpath(filename_prefix))

2
server.py

@ -30,7 +30,7 @@ async def cache_control(request: web.Request, handler):
class PromptServer(): class PromptServer():
def __init__(self, loop): def __init__(self, loop):
PromptServer.instance = self PromptServer.instance = self
mimetypes.init(); mimetypes.init();
mimetypes.types_map['.js'] = 'application/javascript; charset=utf-8' mimetypes.types_map['.js'] = 'application/javascript; charset=utf-8'
self.prompt_queue = None self.prompt_queue = None

Loading…
Cancel
Save