Skip to content

Commit

Permalink
remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
ltdrdata committed Sep 23, 2024
1 parent 1087f2e commit a43dae3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
2 changes: 1 addition & 1 deletion modules/impact/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import configparser
import os

version_code = [7, 6, 1]
version_code = [7, 6, 2]
version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')

dependency_version = 22
Expand Down
31 changes: 0 additions & 31 deletions modules/impact/impact_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,6 @@
from server import PromptServer


@PromptServer.instance.routes.post("/upload/temp")
async def upload_image(request):
upload_dir = folder_paths.get_temp_directory()

if not os.path.exists(upload_dir):
os.makedirs(upload_dir)

post = await request.post()
image = post.get("image")

if image and image.file:
filename = image.filename
if not filename:
return web.Response(status=400)

split = os.path.splitext(filename)
i = 1
while os.path.exists(os.path.join(upload_dir, filename)):
filename = f"{split[0]} ({i}){split[1]}"
i += 1

filepath = os.path.join(upload_dir, filename)

with open(filepath, "wb") as f:
f.write(image.file.read())

return web.json_response({"name": filename})
else:
return web.Response(status=400)


sam_predictor = None
default_sam_model_name = os.path.join(impact_pack.model_path, "sams", "sam_vit_b_01ec64.pth")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-impact-pack"
description = "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler."
version = "7.6.1"
version = "7.6.2"
license = { file = "LICENSE.txt" }
dependencies = ["segment-anything", "scikit-image", "piexif", "transformers", "opencv-python-headless", "GitPython", "scipy>=1.11.4"]

Expand Down

0 comments on commit a43dae3

Please sign in to comment.