1. Create decimal_scale_example.py demonstrating decimal scale usage 2. Update examples/README.md to include new example documentation 3. Showcase practical decimal scales like 1.25x, 1.5x for high-DPI displays 4. Provide comprehensive usage examples for different scaling scenarios 5. Include file size comparisons and scaling benefits explanation This documentation enhancement helps users understand and utilize the new decimal scaling functionality effectively. The example demonstrates real-world use cases for high-DPI displays and provides clear guidance on when and how to use decimal scale factors for optimal visual results. docs: 添加小数缩放示例和文档更新 1. 创建decimal_scale_example.py展示小数缩放的使用方法 2. 更新examples/README.md包含新示例的文档说明 3. 展示1.25x、1.5x等适用于高DPI显示器的实用缩放比例 4. 提供不同缩放场景的全面使用示例 5. 包含文件大小比较和缩放优势说明 此文档增强帮助用户有效理解和使用新的小数缩放功能。示例演示了 高DPI显示器的实际使用场景,并提供了何时以及如何使用小数缩放 因子以获得最佳视觉效果的清晰指导。
1.9 KiB
1.9 KiB
Examples Directory
This directory contains example workflows and usage demonstrations for the ComfyUI DCI Extension.
Example Files
Workflow Examples
- example_workflow.json: Basic DCI export workflow
- example_dci_preview_workflow.json: DCI preview and analysis workflow
Code Examples
- decimal_scale_example.py: Demonstrates decimal scale factors (1.25x, 1.5x, etc.) for high-DPI displays
Usage
Loading Examples in ComfyUI
- Open ComfyUI
- Use "Load" button or drag and drop the JSON files
- The workflow will be loaded with all necessary nodes
- Adjust input images and parameters as needed
- Execute the workflow
Example Workflows
Basic DCI Export (example_workflow.json)
Demonstrates:
- Loading an image
- Converting to DCI format
- Setting icon parameters
- Exporting DCI file
DCI Preview Workflow (example_dci_preview_workflow.json)
Demonstrates:
- Loading existing DCI files
- Generating visual previews
- Extracting metadata
- Analyzing DCI structure
Decimal Scale Example (decimal_scale_example.py)
Demonstrates:
- Using decimal scale factors like 1.25x, 1.5x for high-DPI displays
- Creating DCI files with mixed integer and decimal scales
- Benefits of decimal scaling for modern display technologies
- Programmatic DCI creation with the Python API
Customization
You can modify these examples to:
- Use different input images
- Change export parameters
- Add additional processing steps
- Combine with other ComfyUI nodes
Requirements
These examples require:
- ComfyUI with DCI extension installed
- Input images (for export workflows)
- Existing DCI files (for preview workflows)
Tips
- Start with the basic workflow to understand the fundamentals
- Use the preview workflow to analyze existing DCI files
- Combine workflows for complete DCI processing pipelines
- Experiment with different parameters to see their effects