star-vector icon indicating copy to clipboard operation
star-vector copied to clipboard

confused about the code

Open Qingman-Wu opened this issue 9 months ago • 1 comments

Hello, in class StarVectorStarCoder(StarVectorBase), config._name_or_path is empty, so what is self.processor = AutoProcessor.from_pretrained(config._name_or_path)?

Qingman-Wu avatar Mar 25 '25 16:03 Qingman-Wu

maybe : hf_home = os.environ.get('HF_HOME', '~/.cache/huggingface') cache_dir = os.path.join(hf_home, 'hub')

    model_path = "google/siglip-base-patch16-384"
    
    self.processor = AutoImageProcessor.from_pretrained(
        model_path, 
        trust_remote_code=True,
        cache_dir=cache_dir,
        local_files_only=True  # 强制只使用本地文件
    )

Yukinonooo avatar Jun 02 '25 08:06 Yukinonooo

maybe : hf_home = os.environ.get('HF_HOME', '~/.cache/huggingface') cache_dir = os.path.join(hf_home, 'hub')

    model_path = "google/siglip-base-patch16-384"
    
    self.processor = AutoImageProcessor.from_pretrained(
        model_path, 
        trust_remote_code=True,
        cache_dir=cache_dir,
        local_files_only=True  # 强制只使用本地文件
    )

Hi, how did you solved this? Did you only add this piece of code? Where did you add this to? It will be very helpful if you explain more details, thank you

Eric-zhang-1111 avatar Jul 16 '25 17:07 Eric-zhang-1111