Spaces:
Runtime error
Runtime error
fix: use Florence-2-base-ft with PR#6 revision for transformers 4.57 compat
Browse files
app.py
CHANGED
|
@@ -122,9 +122,9 @@ qwen_pipe = QwenImageEditPlusPipeline.from_pretrained(
|
|
| 122 |
print("Qwen loaded!")
|
| 123 |
|
| 124 |
print("Loading Florence-2 captioner...")
|
| 125 |
-
florence_processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
|
| 126 |
florence_model = AutoModelForCausalLM.from_pretrained(
|
| 127 |
-
"microsoft/Florence-2-base", torch_dtype=torch.float32, trust_remote_code=True,
|
| 128 |
).to("cpu")
|
| 129 |
print("Florence-2 loaded (CPU)!")
|
| 130 |
|
|
|
|
| 122 |
print("Qwen loaded!")
|
| 123 |
|
| 124 |
print("Loading Florence-2 captioner...")
|
| 125 |
+
florence_processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base-ft", trust_remote_code=True, revision="refs/pr/6")
|
| 126 |
florence_model = AutoModelForCausalLM.from_pretrained(
|
| 127 |
+
"microsoft/Florence-2-base-ft", torch_dtype=torch.float32, trust_remote_code=True, revision="refs/pr/6",
|
| 128 |
).to("cpu")
|
| 129 |
print("Florence-2 loaded (CPU)!")
|
| 130 |
|