API Node
- Image
- BFL
- Luma
- Recraft
- Save SVG
- Recraft Style - Realistic Image
- Recraft Text to Vector
- Recraft Creative Upscale
- Recraft Image to Image
- Recraft Crisp Upscale
- Recraft Color RGB
- Recraft Text to Image
- Recraft Image Inpainting
- Recraft Vectorize Image
- Recraft Style - Digital Illustration
- Recraft Remove Background
- Recraft Style - Logo Raster
- Recraft Controls
- Recraft Replace Background
- Ideogram
- Stability AI
- OpenAI
- Video
Recraft Crisp Upscale - ComfyUI 原生节点文档
Recraft Crisp Upscale - ComfyUI 原生节点文档
使用AI技术增加图像清晰度和分辨率的 Recraft API 节点
Recraft Crisp Upscale 节点利用 Recraft 的 API 增强图像分辨率和清晰度。
参数说明
基本参数
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
image | 图像 | - | 需要放大的输入图像 |
输出
输出 | 类型 | 说明 |
---|---|---|
IMAGE | 图像 | 放大和增强后的图像 |
源码参考
[节点源码 (更新于2025-05-03)]
class RecraftCrispUpscaleNode:
"""
Upscale image synchronously.
Enhances a given raster image using ‘crisp upscale’ tool, increasing image resolution, making the image sharper and cleaner.
"""
RETURN_TYPES = (IO.IMAGE,)
DESCRIPTION = cleandoc(__doc__ or "") # Handle potential None value
FUNCTION = "api_call"
API_NODE = True
CATEGORY = "api node/image/Recraft"
RECRAFT_PATH = "/proxy/recraft/images/crispUpscale"
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": (IO.IMAGE, ),
},
"optional": {
},
"hidden": {
"auth_token": "AUTH_TOKEN_COMFY_ORG",
},
}
def api_call(
self,
image: torch.Tensor,
auth_token=None,
**kwargs,
):
images = []
total = image.shape[0]
pbar = ProgressBar(total)
for i in range(total):
sub_bytes = handle_recraft_file_request(
image=image[i],
path=self.RECRAFT_PATH,
auth_token=auth_token,
)
images.append(torch.cat([bytesio_to_image_tensor(x) for x in sub_bytes], dim=0))
pbar.update(1)
images_tensor = torch.cat(images, dim=0)
return (images_tensor,)