Overview
This node, named "glmVideo Node," supports generating images based on textual prompts and various style options. It is designed to create customized images by specifying a prompt describing the desired content, selecting an artistic style, and optionally adjusting image proportions or watermark settings. This node is useful in scenarios such as creative content generation, marketing material creation, concept art development, or any workflow requiring automated image synthesis from descriptive text.
Practical examples include:
- Generating a watercolor-style painting of a landscape described by a user.
- Creating cyberpunk-themed character portraits for game design.
- Producing black-and-white line art illustrations from simple prompts.
Properties
| Name | Meaning |
|---|---|
| 提示词 (prompt) | Text prompt describing the image to generate. Example: "A cute cat walking in a flower bush". |
| 风格 (style) | Artistic style to apply to the generated image. Options: 默认 (default), 摄影 (photography), 吉トカ (ghibli), 梵高 (van_gogh), 日式动漫 (jap_anime), 水彩 (watercolor), 赛博朋克 (cyberpunk), 皮克斯 (pixar), 达芬奇 (da_vinci), 油画 (oil_painting), 多巴胺 (psychadelic), 黑白线条 (line_art). |
| 参考图 (image_url) | URL or BASE64 string of a reference image used as input (hidden property, ignored with certain modes). |
| 水印 (rm_label_watermark) | Boolean flag to remove watermark label from the generated image. |
| 图片比例 (aspect_ratio) | Aspect ratio of the output image. Options: 16:9, 9:16, 1:1, 4:3, 3:4. |
| 记录清除 (clear) | Boolean flag indicating whether to clear conversation history before generation. Defaults to true. |
| 记录id (conversation_id) | String identifier for conversation context; used only if 'clear' is false to maintain state. |
Output
The node outputs JSON data representing the generated image(s). The exact structure is not detailed in the source code, but typically it would include fields such as:
- Image URL or base64 encoded image data.
- Metadata about the generation process (e.g., style applied, prompt used).
- Possibly additional information like generation time or identifiers.
If binary data output is supported, it would represent the actual image file content.
Dependencies
- Requires an API key credential for authentication with the underlying image generation service.
- Depends on external services that perform the image synthesis based on the provided prompt and style.
- The node uses a resource-operation factory pattern to dynamically call the appropriate method for the "图片生成" operation under the "图片生成" resource.
- No explicit environment variables are mentioned, but proper API credentials must be configured in n8n.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause authentication failures.
- Invalid or empty prompt strings may result in errors or no image generated.
- Unsupported aspect ratios or styles might cause the operation to fail.
- If 'clear' is set to false but no valid conversation ID is provided, the node might not maintain context properly.
Error messages:
- "未实现方法: 图片生成.图片生成" — indicates the requested resource-operation combination is not implemented; verify correct resource and operation names.
- API errors related to quota limits or invalid parameters should be handled by checking credentials and input values.
- Network or timeout errors require ensuring stable connectivity to the external service.
Links and References
- No direct links are provided in the source code.
- For more information on image generation techniques and styles, consider exploring:
- Consult your image generation service provider's API documentation for specific parameter details and usage guidelines.