ComfyUI  >  Nodes  >  ComfyUI-ProPost >  ProPostFilmGrain

ComfyUI Node: ProPostFilmGrain

Class Name

ProPostFilmGrain

Category
Pro Post/Camera Effects
Author
digitaljohn (Account age: 4572 days)
Extension
ComfyUI-ProPost
Latest Updated
8/11/2024
Github Stars
0.1K

How to Install ComfyUI-ProPost

Install this extension via the ComfyUI Manager by searching for  ComfyUI-ProPost
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-ProPost in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ProPostFilmGrain Description

Add film grain effect to images for vintage/cinematic look, with adjustable parameters for artistic effects and batch processing.

ProPostFilmGrain:

The ProPostFilmGrain node is designed to add a film grain effect to your images, simulating the texture and feel of traditional film photography. This node is particularly useful for AI artists looking to enhance their digital images with a vintage or cinematic look. By applying various types of grain, adjusting the grain's saturation, power, and other parameters, you can achieve a wide range of artistic effects. The node processes each image in a batch, ensuring consistent application of the film grain effect across multiple images. This can be especially beneficial for projects requiring a cohesive visual style.

ProPostFilmGrain Input Parameters:

image

This parameter takes a tensor representing the image to which the film grain effect will be applied. The image should be in a format compatible with PyTorch tensors.

gray_scale

A boolean parameter that determines whether the film grain effect should be applied in grayscale. Setting this to True will result in a black-and-white grain effect, while False will retain the color information. Default is False.

grain_type

A string parameter specifying the type of grain to apply. Options include "fine", "coarse", and "coarser". Each type offers a different texture and intensity of grain, allowing for varied artistic effects.

grain_sat

A float parameter that controls the saturation of the grain. Higher values result in more vibrant grain colors, while lower values produce more muted effects. The value typically ranges from 0.0 to 1.0. Default is 0.5.

grain_power

A float parameter that adjusts the intensity of the grain effect. Higher values make the grain more pronounced, while lower values result in a subtler effect. The value typically ranges from 0.0 to 1.0. Default is 0.5.

shadows

A float parameter that controls the grain's impact on the shadow areas of the image. Higher values increase the grain's visibility in darker regions. The value typically ranges from 0.0 to 1.0. Default is 0.5.

highs

A float parameter that adjusts the grain's effect on the highlight areas of the image. Higher values make the grain more visible in brighter regions. The value typically ranges from 0.0 to 1.0. Default is 0.5.

scale

A float parameter that determines the scaling of the grain effect. Values greater than 1.0 will enlarge the grain, while values less than 1.0 will reduce its size. Default is 1.0.

sharpen

An integer parameter that specifies the number of sharpening passes to apply to the image after the grain effect. Higher values result in a sharper image. Default is 0.

src_gamma

A float parameter that adjusts the gamma correction of the source image before applying the grain effect. This can help in achieving the desired contrast and brightness. Default is 1.0.

seed

An integer parameter used to initialize the random number generator for the grain effect. Using the same seed will produce consistent grain patterns across different runs. Default is 0.

ProPostFilmGrain Output Parameters:

IMAGE

The output is a tensor representing the image with the applied film grain effect. This tensor can be further processed or saved as needed. The film grain effect adds a layer of texture and depth, enhancing the overall aesthetic of the image.

ProPostFilmGrain Usage Tips:

  • Experiment with different grain_type settings to find the texture that best suits your artistic vision.
  • Adjust the grain_power and grain_sat parameters to control the intensity and color of the grain effect.
  • Use the gray_scale parameter to create classic black-and-white film grain effects.
  • Fine-tune the shadows and highs parameters to balance the grain effect across different tonal regions of your image.
  • Apply multiple sharpening passes using the sharpen parameter to enhance the final output.

ProPostFilmGrain Common Errors and Solutions:

ValueError: Unknown grain type: <grain_type>

  • Explanation: This error occurs when an invalid grain type is specified.
  • Solution: Ensure that the grain_type parameter is set to one of the valid options: "fine", "coarse", or "coarser".

RuntimeError: Expected tensor for image input

  • Explanation: This error occurs when the input image is not in the expected tensor format.
  • Solution: Convert your image to a PyTorch tensor before passing it to the node.

IndexError: list index out of range

  • Explanation: This error may occur if the batch size of the input image tensor is not correctly handled.
  • Solution: Ensure that the input image tensor has the correct batch size and dimensions.

FileNotFoundError: [Errno 2] No such file or directory: 'mask-cache/grain-...'

  • Explanation: This error occurs when the grain mask cache directory does not exist.
  • Solution: Ensure that the mask-cache directory is created and accessible. The node will attempt to save and reuse grain masks to optimize performance.

ProPostFilmGrain Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-ProPost
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.