ComfyUI
ComfyUI is a node-based generative AI image generation tool that combines Stable Diffusion and various models to generate high-quality images. It's ideal for visually building complex workflows and having fine-grained control over the image generation process. For AWS deployment, you can build a scalable and cost-effective environment using cost-effective-aws-deployment-of-comfyui.
Key Features
- Node-based Workflow: Visually build workflows using drag-and-drop interface
- Model Support: Supports diverse models including Stable Diffusion, ControlNet, LoRA, and more
- Custom Nodes: Extend functionality with community-developed custom nodes
- Batch Processing: Efficient batch functionality for processing multiple images at once
- API Integration: Connect with external applications through RESTful API
- Real-time Preview: Monitor the generation process in real-time
Primary Use Cases
- Artistic Image Generation: Create art pieces with complex styles and compositions
- Product Design: Generate concept art and prototype images
- Content Creation: Create visual materials for games, movies, and advertisements
- Research & Development: Experiment and test new generative technologies and models
Parameter Settings
You can configure the following parameters during deployment:
- Environment: Type of deployment environment (default: dev)
- NotificationEmailAddress: Email address to receive deployment notifications
- SelfSignUp: Enable/disable self-signup functionality (default: false)
- AllowedSignUpEmailDomains: Email domains allowed for signup (e.g., example1.co.jp, example2.co.jp)
- AllowedIpV4AddressRanges: IPv4 address ranges allowed for access (e.g., 10.0.0.100/32, 192.168.0.0/24)
- AllowedIpV6AddressRanges: IPv6 address ranges allowed for access
Security Considerations
For production use, the following security measures are recommended:
- IP Restrictions: Use
AllowedIpV4AddressRanges
andAllowedIpV6AddressRanges
to restrict access to specific IP addresses - Self-Signup Control: Set
SelfSignUp
tofalse
and have administrators create users, or limit email domain byAllowedSignUpEmailDomains
to allow signups only from specific domains - Resource Monitoring: Regularly monitor GPU usage and costs
Post-Deployment Setup
After clicking the deployment button, you'll receive an AWS Notification - Subscription Confirmation
email. Click the Confirm subscription
link to start receiving deployment status notifications.
When deployment is complete, you'll receive a notification email containing:
- Application URL: Login URL to access ComfyUI
- User Creation Instructions: How to create users in Amazon Cognito (if self-signup is disabled)
- Environment Configuration: Details about the deployed environment
- AWS Cognito User Management URL: Console link for user creation and group management
Usage Instructions
After logging into ComfyUI, you can start generating images by following these steps:
- Select Workflow: Choose a pre-defined workflow or create a new one
- Configure Nodes: Set prompts, models, parameters, and other settings
- Execute: Click the "Queue Prompt" button to start image generation
- Review Results: Download or save the generated images
Resource Removal
To remove deployed resources, delete the following stacks from the CloudFormation console:
- ComfyUI main stack (includes environment name)
ComfyUIDeploymentStack
deployment stack
Warning
Deleting the stacks will remove all saved images and custom settings. Please backup any necessary data beforehand.
Troubleshooting
Common Issues
- Cannot login: Verify that users are correctly created in the Cognito User Pool
- Image generation fails: Check GPU capacity and memory usage
- Access denied: Verify IP restriction settings and ensure your current IP address is allowed
Log Verification
You can check application logs in CloudWatch Logs:
- ComfyUI application logs
- CodeBuild deployment logs