File size: 1,069 Bytes
75a53d9
 
 
befdbf3
75a53d9
befdbf3
75a53d9
befdbf3
 
 
 
 
747fb93
befdbf3
e22f53a
befdbf3
e22f53a
befdbf3
75a53d9
befdbf3
75a53d9
befdbf3
75a53d9
befdbf3
75a53d9
befdbf3
 
ccefb55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import torch

# Configuration parameters

MODEL_TYPE = "i_blip"

MAX_IMAGE_SIZE = 1024

MIN_LENGTH = 150

MAX_NEW_TOKENS = 400

MODEL_PATH = "m7mdal7aj/captioner"

LOAD_IN_8BIT = False

LOAD_IN_4BIT = True

TORCH_DTYPE = torch.float16

DEVICE_MAP = "auto"

LOW_CPU_MEM_USAGE = True

SKIP_SPECIAL_TOKENS = True


PROMPT = 'Provide a comprehensive and detailed description of the following image. Focus on identifying and describing every element in the scene, including all people (along with their gender, age, color and any prominent feature), animals along with their breed and all objects, their count, their positions, and any actions or interactions taking place. Pay special attention to the positioning of limbs and hands, and any objects they might be holding or interacting with. Describe texts, colors, textures, setting, atmosphere, mood, and any indicators of the time of day, such as the quality of light, shadows. Ensure to capture both the obvious and subtle elements for a complete understanding of the image. Answer as if you were looking at the image'