Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files
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="
|
| 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
|