Spaces:
Paused
Paused
Commit
·
c887cc6
1
Parent(s):
fceeb2f
Add BriaFiboPipeline integration and update requirements
Browse files- Integrated BriaFiboPipeline from the diffusers library into app.py.
- Updated requirements.txt to include necessary dependencies for the new pipeline, including torch, torchvision, and other related libraries.
- app.py +8 -0
- requirements.txt +9 -1
app.py
CHANGED
|
@@ -6,6 +6,14 @@ import os
|
|
| 6 |
from api_utils import get_prompt_api, generate_image
|
| 7 |
from schema import claude_structured_output
|
| 8 |
import time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
dotenv.load_dotenv()
|
| 10 |
|
| 11 |
def get_image_suffix(image):
|
|
|
|
| 6 |
from api_utils import get_prompt_api, generate_image
|
| 7 |
from schema import claude_structured_output
|
| 8 |
import time
|
| 9 |
+
import torch
|
| 10 |
+
from diffusers import BriaFiboPipeline
|
| 11 |
+
|
| 12 |
+
pipe = BriaFiboPipeline.from_pretrained(
|
| 13 |
+
"briaai/FIBO",
|
| 14 |
+
torch_dtype=torch.bfloat16,
|
| 15 |
+
)
|
| 16 |
+
pipe.to("cpu")
|
| 17 |
dotenv.load_dotenv()
|
| 18 |
|
| 19 |
def get_image_suffix(image):
|
requirements.txt
CHANGED
|
@@ -2,4 +2,12 @@ gradio>=3.36.1
|
|
| 2 |
pillow>=12.0.0
|
| 3 |
setuptools>=80.9.0
|
| 4 |
pydantic>=2.12.3
|
| 5 |
-
pydantic-ai>=1.11.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
pillow>=12.0.0
|
| 3 |
setuptools>=80.9.0
|
| 4 |
pydantic>=2.12.3
|
| 5 |
+
pydantic-ai>=1.11.0
|
| 6 |
+
git+https://github.com/huggingface/diffusers@main
|
| 7 |
+
torch>=2.5.1
|
| 8 |
+
torchvision
|
| 9 |
+
boltons
|
| 10 |
+
ujson
|
| 11 |
+
sentencepiece
|
| 12 |
+
accelerate
|
| 13 |
+
transformers
|