13 Commits
Author SHA1 Message Date
neverbiasu 39775b186d style: Refactor code formatting and improve readability in nodes.py 2026-04-10 17:48:02 +01:00
neverbiasu 5623493ed8 feat: Add Ruff workflow for code linting 2026-04-10 17:46:42 +01:00
7e210fe777 Refactor ModelScope Image Generator API (#5)
* Refactor ModelScope Image Generator to use new Async API.

Updates `ModelScopeImageGenerator` in `nodes.py` to:
- Use `v1/images/generations` with `X-ModelScope-Async-Mode: true`.
- Implement polling logic for task completion.
- Update input parameters to match API documentation (steps, guidance, seed, loras, size).
- Support `loras` as string or JSON dict.

* Initial plan

* Address all review comments from PR review thread

Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>

* Add .gitignore and remove __pycache__

Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>

* Move logging import to top and improve headers copy

Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>

* Define logger at module level and fix formatting

Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>

* Refactor ModelScope Image Generator API

Updates `ModelScopeImageGenerator` to use the asynchronous `v1/images/generations` endpoint.
- Implements task polling logic with timestamp-based timeout.
- Adds fail-fast logic for 4xx client errors during polling.
- Updates input parameters to match API: `steps`, `guidance`, `seed`, `loras`.
- Supports `loras` as JSON dict or string ID.
- Uses `logging` instead of `print`.
- Ensures UTF-8 charset in headers for multi-language support.

* Simplify loras parsing logic to avoid duplication

Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: neverbiasu <90372299+neverbiasu@users.noreply.github.com>
2026-01-05 02:26:23 +00:00
Faych feef7b6829 Merge pull request #4 from neverbiasu/refactor-nodes-py-16452786324079548898 2025-12-27 21:26:41 +00:00
google-labs-jules[bot] 8abcff7340 Refactor nodes.py to fix code smells and enable SSL verification
- Renamed `PIL_Image` local variable to `pil_image` to match naming conventions.
- Introduced constants `PLACEHOLDER_MODEL_ID`, `PLACEHOLDER_API_KEY`, and `CONTENT_TYPE_JSON` to remove duplicated literals.
- Removed `verify=False` from `requests.post` calls to enable SSL certificate validation.
2025-12-27 18:36:30 +00:00
Faych 08fcac51ae Merge pull request #1 from ComfyNodePRs/publish
Add Github Action for Publishing to Comfy Registry
2025-11-08 21:10:35 +00:00
Faych 7083b0f37e Merge pull request #2 from ComfyNodePRs/pyproject
Add pyproject.toml for Custom Node Registry
2025-11-08 21:09:20 +00:00
Faych 1a699adad0 Update pyproject.toml 2025-11-08 21:08:47 +00:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") 2a0fd29210 chore(publish): Add Github Action for Publishing to Comfy Registry 2025-10-22 21:08:27 +00:00
async () = process.env.GIT_USERNAME || (await ghUser()).email && (await ghUser()).name || DIE("Missing env.GIT_USERNAME") da9c322495 chore(pyproject): Add pyproject.toml for Custom Node Registry 2025-10-22 21:08:27 +00:00
neverbiasu 2369a82f9f docs: Add logo to README 2025-09-25 16:39:14 +01:00
neverbiasu 60908ae102 fix: Repair the link 2025-09-24 07:42:43 +08:00
neverbiasu ffbb2dfed6 feat: Init Project 2025-09-24 07:41:07 +08:00