Visit ComfyUI Online for ready-to-use ComfyUI environment
Evaluate and rank images based on relevance to prompts using pre-trained model for AI artists to streamline selection process.
The ImageRewardScore| Image Reward Score ๐ผ node is designed to evaluate and rank images based on their relevance to a given prompt using a pre-trained model. This node is particularly useful for AI artists who want to assess the quality and relevance of generated images in relation to specific textual prompts. By leveraging a scoring mechanism, the node helps in identifying the top-performing images, thereby streamlining the selection process. The primary goal of this node is to provide a quantitative measure of how well each image matches the prompt, making it easier to curate and refine image outputs.
This parameter expects an IMAGEREWARD_MODEL which is a pre-trained model used to score the images. The model is responsible for evaluating the relevance of each image to the provided prompt. Ensure that the model is loaded and compatible with the device being used (either cuda or cpu).
The prompt parameter is a STRING input that contains the textual description or query against which the images will be evaluated. This prompt guides the model in scoring the images based on their relevance to the provided text. The prompt can be multiline, allowing for detailed descriptions.
The top_k parameter is an INT that specifies the number of top-scoring images to return. It determines how many of the highest-ranked images will be included in the output. The default value is 3, with a minimum of 1 and a maximum of 500. This parameter helps in filtering the most relevant images from the entire set.
The images parameter is an IMAGE input that consists of the images to be evaluated. These images are scored by the model based on their relevance to the provided prompt. The input should be a list of images that the model will process and rank.
The IMAGES output is a list of images that have been ranked and filtered based on their scores. This output contains the top k images that are most relevant to the provided prompt, as determined by the model.
The SCORES_STR output is a list of strings representing the scores of the images. Each score is a string that indicates how well the corresponding image matches the prompt. This output provides a human-readable format of the scores.
The SCORES_INT output is a list of integers representing the scores of the images. Each score is a numerical value that quantifies the relevance of the corresponding image to the prompt. This output is useful for further processing or analysis.
cuda or cpu) to avoid runtime errors.top_k parameter based on the number of images you want to filter and rank, keeping in mind the default, minimum, and maximum values.RuntimeError: CUDA device not availablecuda device is selected, but it is not available on the system.cpu if a GPU is not available.ValueError: Invalid prompt formatIndexError: List index out of rangetop_k value exceeds the number of available images.top_k value is within the range of the number of images provided. Adjust the top_k parameter accordingly.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.