新增土豆 API 的 GPT-Image-2-all 异步生图支持 - #163
Open
asd1234455656 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
首先感谢大雄老师的 Infinite-Canvas和开源精神。这个项目在画布式 AI 创作、多平台模型接入和工作流体验上做得很完整,对国内用户和 API 中转平台都有很好的参考价值。
我们作为土豆 API 平台的运营方。这次 fork / PR 的主要目的,是为 Infinite-Canvas 增加土豆平台的 GPT-Image-2 异步生图接入支持,让使用土豆 API 的用户可以在项目中直接调用 gpt-image-2-all 进行 【1K / 2K / 4K】+【低/中/高】 任意组合的图像生成。
本次改动主要包括:
/v1/images/generations/async提交异步生图任务/v1/tasks/{task_id}轮询任务结果size + resolution参数映射data:image/...;base64,...格式aspect_ratio / resolution参数,便于异步接口准确处理尺寸这个 PR 的定位不是改变 Infinite-Canvas 原有的模型调用逻辑,而是尽量以独立 provider 适配层的方式接入土豆异步生图能力,方便使用土豆 API 的用户直接在项目中测试和使用。
如果大雄老师认为接入方式、命名或默认 provider 注入方式需要调整,我们可以继续配合修改。再次感谢老师的项目和持续维护。