Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
9fb935d
1
Parent(s):
7886e60
22
Browse files- app.py +12 -2
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -17,8 +17,18 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
| 17 |
|
| 18 |
device = "cuda"
|
| 19 |
model_path = "Disty0/NewBie-image-Exp0.1-Diffusers"
|
| 20 |
-
text_encoder_2 = AutoModel.from_pretrained(
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
del text_encoder_2
|
| 23 |
|
| 24 |
|
|
|
|
| 17 |
|
| 18 |
device = "cuda"
|
| 19 |
model_path = "Disty0/NewBie-image-Exp0.1-Diffusers"
|
| 20 |
+
text_encoder_2 = AutoModel.from_pretrained(
|
| 21 |
+
model_path,
|
| 22 |
+
subfolder="text_encoder_2",
|
| 23 |
+
trust_remote_code=True,
|
| 24 |
+
torch_dtype=torch.bfloat16,
|
| 25 |
+
device_map="cuda",
|
| 26 |
+
)
|
| 27 |
+
pipe = NewbiePipeline.from_pretrained(
|
| 28 |
+
model_path,
|
| 29 |
+
text_encoder_2=text_encoder_2,
|
| 30 |
+
torch_dtype=torch.bfloat16
|
| 31 |
+
).to("cuda")
|
| 32 |
del text_encoder_2
|
| 33 |
|
| 34 |
|
requirements.txt
CHANGED
|
@@ -3,7 +3,7 @@ torch
|
|
| 3 |
transformers
|
| 4 |
accelerate
|
| 5 |
spaces
|
| 6 |
-
flash-attn
|
| 7 |
git+https://github.com/Disty0/diffusers
|
| 8 |
timm
|
| 9 |
torchvision
|
|
|
|
| 3 |
transformers
|
| 4 |
accelerate
|
| 5 |
spaces
|
| 6 |
+
# flash-attn
|
| 7 |
git+https://github.com/Disty0/diffusers
|
| 8 |
timm
|
| 9 |
torchvision
|