From fa63818b323974f83f127c109701ca2ebee5da67 Mon Sep 17 00:00:00 2001 From: kjqwer <2990346238@qq.com> Date: Sat, 15 Nov 2025 09:14:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=80=B9=E5=B1=BE=E6=9A=A3=E9=96=B2?= =?UTF-8?q?=E5=B6=86=E7=80=AF=E6=A4=A4=E5=9C=AD=E6=B4=B0=E9=94=9B=E5=B1=BE?= =?UTF-8?q?=E5=9D=8A=E9=8D=94=E7=8A=B2=E7=B4=91=E5=A9=A7=E6=84=B0=E3=80=8D?= =?UTF-8?q?=E9=90=A9=EE=86=BD=E7=88=A3=E9=8D=91=E5=97=98=E6=9E=83=E6=B5=A0?= =?UTF-8?q?=3F=20-=20=E9=96=B2=E5=B6=86=E6=9F=8A=E7=92=81=E6=8D=90?= =?UTF-8?q?=EE=85=B8SmartFolderManager=E9=8D=9C=E5=AD=B2martImageSaver?= =?UTF-8?q?=E9=91=BA=E5=82=9C=E5=81=A3=20-=20=E5=A8=A3=E8=AF=B2=E5=A7=9E?= =?UTF-8?q?=E9=90=8F=E5=9E=AB=E6=A4=BF=E9=90=A8=E5=8B=AC=E6=9E=83=E6=B5=A0?= =?UTF-8?q?=E8=B7=BA=E3=81=99=E7=81=9E=E5=82=9C=E9=AA=87=E9=8E=BA=D1=83?= =?UTF-8?q?=E5=9F=97=20-=20=E9=8F=80=E7=A1=85=E7=B9=98=E9=8D=8F=E5=86=A9?= =?UTF-8?q?=E6=9A=9F=E9=8E=B9=EE=86=BF=E5=B9=8F=E9=8D=99=E6=A0=AD=E2=82=AC?= =?UTF-8?q?=E6=98=8F=E7=B7=AB=E9=94=9B=E5=B1=BE=E6=95=AE=E9=8E=B8=E4=BD=B8?= =?UTF-8?q?=EE=98=BF=E7=BB=89=E5=B6=86=E6=9A=9F=E9=8E=B9=EE=86=BD=E6=BD=B5?= =?UTF-8?q?=E5=A9=A7=3F-=20=E5=A8=A3=E8=AF=B2=E5=A7=9E=E5=AF=AE=E2=82=AC?= =?UTF-8?q?=E5=A9=A7=E6=84=B0=E3=80=8D=E9=90=A9=EE=86=BD=E7=88=A3=E9=8D=91?= =?UTF-8?q?=E5=97=98=E6=9E=83=E6=B5=A0=E8=AE=B9=E7=B4=B0requirements.txt,?= =?UTF-8?q?=20CONTRIBUTING.md,=20CHANGELOG.md=20-=20=E9=8F=87=E5=AD=98?= =?UTF-8?q?=E6=9F=8AREADME.md=E9=94=9B=E5=B1=BE=E5=9D=8A=E9=8D=94=E7=8A=B2?= =?UTF-8?q?=E7=95=A8=E7=91=81=E5=91=B0=EE=87=A9=E9=8F=84=E5=BA=A1=E6=8B=B0?= =?UTF-8?q?=E5=AF=B0=E7=95=8C=E7=8F=B7=20-=20=E9=8F=80=E7=A1=85=E7=B9=98.g?= =?UTF-8?q?itignore=E9=8F=82=E5=9B=A6=E6=AC=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 129 ++++++++++++++++++++++++++--------------------- CHANGELOG.md | 39 ++++++++++++++ CONTRIBUTING.md | 40 +++++++++++++++ README.md | 24 +++++++++ requirements.txt | 3 ++ 5 files changed, 177 insertions(+), 58 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 0fedfe7..a66a20d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,9 @@ -# Byte-compiled / optimized / DLL files +# Python __pycache__/ *.py[cod] *$py.class - -# OSX useful to ignore -*.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# C extensions *.so - -# Distribution / packaging .Python -env/ -venv/ build/ develop-eggs/ dist/ @@ -45,13 +15,13 @@ lib64/ parts/ sdist/ var/ +wheels/ *.egg-info/ .installed.cfg *.egg +MANIFEST # PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec @@ -62,12 +32,13 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml -*,cover +*.cover .hypothesis/ .pytest_cache/ @@ -77,38 +48,80 @@ coverage.xml # Django stuff: *.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy # Sphinx documentation docs/_build/ -# IntelliJ Idea -.idea -*.iml -*.ipr -*.iws - # PyBuilder target/ -# Cookiecutter -output/ -python_boilerplate/ -cookiecutter-pypackage-env/ +# Jupyter Notebook +.ipynb_checkpoints -# vscode settings -.history/ -*.code-workspace +# IPython +profile_default/ +ipython_config.py -# Frontend extension -node_modules/ +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments .env -.env.local -.env.development.local -.env.test.local -.env.production.local -npm-debug.log* -yarn-debug.log* -yarn-error.log* -node.zip +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# IDE .vscode/ -.claude/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# ComfyUI specific +temp/ +output/ +models/ +input/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1017dc8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +# 更新日志 + +所有重要的项目更改都将记录在此文件中。 + +格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), +并且本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。 + +## [0.1.0] - 2025-11-15 + +### 新增 +- 🎉 首次发布 +- ✨ SmartFolderManager 节点 - 智能文件夹管理 +- ✨ SmartImageSaver 节点 - 智能图片保存 +- 🔧 灵活的文件夹层级控制 +- 🔧 多种元数据来源支持 +- 🔧 多种图片格式支持 (PNG, JPEG, WebP, BMP, TIFF) +- 🔧 元数据嵌入功能 +- 📁 模块化代码架构 + +### 特性 +- **文件夹管理** + - 日期文件夹(可自定义格式) + - 模型文件夹(自动提取或手动选择) + - 种子文件夹(手动输入或外部输入) + - 提示词文件夹(手动输入或外部输入) + - 自定义文件夹 + +- **图片保存** + - 多种格式支持 + - 质量控制 + - 元数据嵌入 + - 预览模式 + - 文件冲突处理 + +- **用户体验** + - 直观的开关控制 + - 清晰的数据来源选择 + - 详细的工具提示 + - 错误处理和用户反馈 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ff9c8f1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,40 @@ +# 贡献指南 + +感谢您对 SmartSaveImage 项目的关注!我们欢迎各种形式的贡献。 + +## 🤝 如何贡献 + +### 报告问题 +- 使用 [GitHub Issues](https://github.com/kjqwer/SmartSaveImage/issues) 报告bug +- 提供详细的复现步骤和环境信息 +- 包含错误日志和截图(如果适用) + +### 提出功能请求 +- 在 Issues 中描述您希望的新功能 +- 解释为什么这个功能对用户有用 +- 提供具体的使用场景 + +### 提交代码 +1. Fork 这个仓库 +2. 创建您的功能分支 (`git checkout -b feature/AmazingFeature`) +3. 提交您的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 打开一个 Pull Request + +## 📝 代码规范 + +- 使用 Python 3.8+ 语法 +- 遵循 PEP 8 代码风格 +- 添加适当的注释和文档字符串 +- 确保代码通过现有测试 + +## 🧪 测试 + +在提交 PR 之前,请确保: +- 代码在 ComfyUI 中正常工作 +- 没有破坏现有功能 +- 新功能有适当的测试覆盖 + +## 📄 许可证 + +通过贡献代码,您同意您的贡献将在 MIT 许可证下发布。 diff --git a/README.md b/README.md index 1917c79..835777e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,31 @@ # SmartSaveImage - 智能图片保存节点 +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) +[![ComfyUI](https://img.shields.io/badge/ComfyUI-Compatible-green.svg)](https://github.com/comfyanonymous/ComfyUI) + 一个功能强大的ComfyUI自定义节点包,提供智能的文件夹管理和图片保存功能。 +## 🚀 安装 + +### 方法一:通过ComfyUI Manager安装(推荐) +1. 打开ComfyUI Manager +2. 搜索 "SmartSaveImage" +3. 点击安装 + +### 方法二:手动安装 +```bash +cd ComfyUI/custom_nodes +git clone https://github.com/kjqwer/SmartSaveImage.git +cd SmartSaveImage +pip install -r requirements.txt +``` + +### 方法三:下载ZIP +1. 下载本仓库的ZIP文件 +2. 解压到 `ComfyUI/custom_nodes/` 目录 +3. 重启ComfyUI + ## 🌟 主要特性 - **智能文件夹管理** - 自动创建有组织的文件夹结构 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ffbe029 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +Pillow>=8.0.0 +piexif>=1.1.3 +numpy>=1.19.0