✏️ ComfySketch:
ComfySketch is a versatile node designed for artists who want to integrate sketching and drawing capabilities directly into their digital workflows. This node provides a simple yet powerful canvas that allows you to create sketches with ease. It supports features like pen pressure sensitivity, zoom, and pan, making it an ideal tool for detailed artwork. The node can be used in fullscreen mode for an immersive drawing experience and offers a preview feature similar to loading an image. ComfySketch is particularly beneficial for those who need to quickly draft ideas or create base sketches that can be further refined in other applications. Its integration into the ComfyUI environment ensures seamless interaction with other nodes, enhancing your creative process.
✏️ ComfySketch Input Parameters:
preset_size
The preset_size parameter allows you to select the dimensions of your canvas from a list of predefined sizes. This parameter is crucial as it determines the initial size of your sketching area, which can impact the level of detail you can achieve. The available options include common resolutions such as "512 x 512", "1024 x 1024", and "1920 x 1080", among others. The default value is "1920 x 1080", but you can choose "Custom" if you need a specific size not listed.
custom_width
The custom_width parameter is used when you select "Custom" as your preset_size. It defines the width of the canvas in pixels. This parameter allows for flexibility in creating a canvas that fits your specific needs. The width can range from a minimum of 64 pixels to a maximum of 4096 pixels, with a default value of 512 pixels. Adjusting this parameter affects the horizontal space available for your sketch.
custom_height
Similar to custom_width, the custom_height parameter is applicable when "Custom" is chosen for preset_size. It specifies the height of the canvas in pixels, allowing you to tailor the vertical dimension of your sketching area. The height can also range from 64 to 4096 pixels, with a default of 768 pixels. This parameter is essential for defining the overall aspect ratio of your canvas.
background_color
The background_color parameter sets the initial color of the canvas background. You can choose from "white", "black", or "gray", with "white" being the default option. This parameter is important for setting the tone of your sketch and can influence the visibility and contrast of your drawing strokes.
canvas_data
The canvas_data parameter is a string that contains the base64-encoded image data of your sketch. This parameter is used to load existing sketches onto the canvas, allowing you to continue working on them. It supports multiline input, making it suitable for handling complex image data. If no canvas data is provided, the node will start with a blank canvas.
input_image
The input_image parameter is optional and allows you to use an existing image as the base for your sketch. This can be particularly useful if you want to trace or modify an existing image. The input image should be in the form of a tensor, and if provided, it will be resized to match the specified canvas dimensions.
✏️ ComfySketch Output Parameters:
image
The image output parameter provides the final sketch as an image tensor. This output is crucial as it represents the completed artwork that can be used in further processing or saved for later use. The image tensor is in a format compatible with other nodes in the ComfyUI environment, ensuring seamless integration into your workflow.
✏️ ComfySketch Usage Tips:
- Utilize the
preset_sizeoptions to quickly set up your canvas for common resolutions, saving time on manual adjustments. - Experiment with different
background_colorsettings to see how they affect the visibility and mood of your sketches. - Use the
input_imageparameter to incorporate existing images into your sketches, allowing for creative modifications and enhancements.
✏️ ComfySketch Common Errors and Solutions:
Error decoding canvas
- Explanation: This error occurs when the node fails to decode the base64-encoded canvas data, possibly due to incorrect formatting or corrupted data.
- Solution: Ensure that the
canvas_datastring is correctly formatted and contains valid base64-encoded image data. Double-check for any accidental modifications or truncations in the data string.
Image size mismatch
- Explanation: This error happens when the input image dimensions do not match the specified canvas size, leading to potential resizing issues.
- Solution: Verify that the dimensions of the
input_imagematch thecustom_widthandcustom_heightsettings, or allow the node to automatically resize the image to fit the canvas.
