You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Florence2ForConditionalGeneration not found in any transformers version #77
area: inferenceModel loading and image/video processing runtimebugSomething isn't workingdependenciesPull requests that update a dependency fileneeds-infoAdditional reproduction details or confirmation on current main needed
Hi, I'm getting this error when trying to run the app on Windows:
ImportError: cannot import name 'Florence2ForConditionalGeneration' from 'transformers'
I've tried transformers versions 4.44.2, 4.48.3, 4.49.0, 4.50.0 and none of them include Florence2 in the models folder. The folder is always empty for florence.
What is the correct transformers version that includes Florence2ForConditionalGeneration?
Windows 10/11, Python 3.12.7
Keeping this as a Florence-2 import compatibility report, linked to #48. The lower bound in requirements.txt is not evidence that every permitted Transformers version provides the imported API.
Please include the full traceback and the exact interpreter path, installed Transformers version and package path from the environment that launches the application. The installer uses a project-local interpreter on Windows, so changing another Python environment may not affect the app. A fix needs a validated Transformers constraint and an import smoke test in the complete application environment; the suggested version ranges in this thread have not been established as a supported configuration.
Fixed in #88 and validated again with the dependency migration in #89. The application now requires transformers>=4.56.0,<5 for the native Florence2ForConditionalGeneration API. The previously suggested 4.50 lower bound was insufficient.
Fresh full application environments resolve to Transformers 4.57.6 and pass imports on Windows/Linux/macOS. Full offline CLI processing with actual Florence-2 and LaMA weights also completed on Windows Python 3.12 on both CPU and RTX 4090 CUDA.
area: inferenceModel loading and image/video processing runtimebugSomething isn't workingdependenciesPull requests that update a dependency fileneeds-infoAdditional reproduction details or confirmation on current main needed
Activity
xSoczek commentedon Jun 19, 2026
You need to install another vesrion of transfoemers:
Fix upstream install-breaking bugs and document system requirements
D-Ogi commentedon Sep 16, 2026
Keeping this as a Florence-2 import compatibility report, linked to #48. The lower bound in requirements.txt is not evidence that every permitted Transformers version provides the imported API.
Please include the full traceback and the exact interpreter path, installed Transformers version and package path from the environment that launches the application. The installer uses a project-local interpreter on Windows, so changing another Python environment may not affect the app. A fix needs a validated Transformers constraint and an import smoke test in the complete application environment; the suggested version ranges in this thread have not been established as a supported configuration.
D-Ogi commentedon Sep 16, 2026
Fixed in #88 and validated again with the dependency migration in #89. The application now requires transformers>=4.56.0,<5 for the native Florence2ForConditionalGeneration API. The previously suggested 4.50 lower bound was insufficient.
Fresh full application environments resolve to Transformers 4.57.6 and pass imports on Windows/Linux/macOS. Full offline CLI processing with actual Florence-2 and LaMA weights also completed on Windows Python 3.12 on both CPU and RTX 4090 CUDA.
For an existing IOPaint installation, use the documented fresh-environment migration so old constraints do not remain installed: https://github.com/D-Ogi/WatermarkRemover-AI/blob/main/docs/lama-runtime.md#installation-and-migration . Closing this import compatibility report as fixed.