that this post is 93% upvoted and the workflow is basically just a couple of opinionated presets is a testament to how aggressively bot-gamed this subreddit it.
class LlavaModel:
...
def process(self, image, colored_image, add_mask):
description = ""
answer1 = ""
answer2 = ""
image_with_sketch = image.clone()
if torch.sum(add_mask).item() > 0:
x_min, y_min, x_max, y_max = get_bounding_box_from_mask(add_mask)
# print(x_min, y_min, x_max, y_max)
question = f"This is an 'I draw, you guess' game. I will upload an image containing some sketches. To help you locate the sketch, I will give you the normalized bounding box coordinates of the sketch where their original coordinates are divided by the image width and height. The top-left corner of the bounding box is at ({x_min}, {y_min}), and the bottom-right corner is at ({x_max}, {y_max}). Now tell me, what am I trying to draw with these sketches in the image?"
# image_with_sketch[add_mask > 0.5] = 1.0
bool_add_mask = add_mask > 0.5
mean_brightness = image_with_sketch[bool_add_mask].mean()
if mean_brightness > 0.8:
image_with_sketch[bool_add_mask] = 0.0
else:
image_with_sketch[bool_add_mask] = 1.0
answer1 = self.generate_description([image_with_sketch.squeeze() * 255], question)
print(answer1)
I feel like most of these posts are mostly a consequence of subjective bias in evaluation and asymmetric investment in hyperparamter tuning between the methods being compared.
that this post is 93% upvoted and the workflow is basically just a couple of opinionated presets is a testament to how aggressively bot-gamed this subreddit it.
it's gonna be so awesome when comfyui finally supports winamp skins
Neat stuff! Looks like the main bit of magic here is a "guessing game" llava (VLM) prompt. via https://github.com/magic-quill/MagicQuill/blob/main/MagicQuill/llava_new.py#L83-L101
The LoRA is so effective, you don't even need to plug the LoRA in!
I feel like most of these posts are mostly a consequence of subjective bias in evaluation and asymmetric investment in hyperparamter tuning between the methods being compared.