John6666 commited on
Commit
b60c26f
·
verified ·
1 Parent(s): bffaec0

Upload 4 files

Browse files
Files changed (1) hide show
  1. prompt.py +1 -1
prompt.py CHANGED
@@ -21,7 +21,7 @@ huggingface_token = os.getenv("HF_TOKEN")
21
 
22
  # Initialize Florence model
23
  device = "cuda" if torch.cuda.is_available() else "cpu"
24
- florence_model = AutoModelForCausalLM.from_pretrained('gokaygokay/Florence-2-Flux-Large', trust_remote_code=True, attn_implementation="flash_attention_2" if torch.cuda.is_available() else "eager").to("cpu").eval()
25
  florence_processor = AutoProcessor.from_pretrained('gokaygokay/Florence-2-Flux-Large', trust_remote_code=True)
26
 
27
  # Florence caption function
 
21
 
22
  # Initialize Florence model
23
  device = "cuda" if torch.cuda.is_available() else "cpu"
24
+ florence_model = AutoModelForCausalLM.from_pretrained('gokaygokay/Florence-2-Flux-Large', trust_remote_code=True, attn_implementation="eager").to("cpu").eval()
25
  florence_processor = AutoProcessor.from_pretrained('gokaygokay/Florence-2-Flux-Large', trust_remote_code=True)
26
 
27
  # Florence caption function