Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
3eb8145
1
Parent(s):
1ee8357
move pipeline to gpu
Browse files
app.py
CHANGED
|
@@ -25,13 +25,14 @@ def load_model():
|
|
| 25 |
load_in_8bit=True,
|
| 26 |
variant="8bit",
|
| 27 |
token=token
|
| 28 |
-
)
|
| 29 |
text_pipe = DiffusionPipeline.from_pretrained(
|
| 30 |
"DeepFloyd/IF-I-L-v1.0",
|
| 31 |
text_encoder=text_encoder,
|
| 32 |
unet=None,
|
| 33 |
token=token,
|
| 34 |
)
|
|
|
|
| 35 |
print("Model loaded successfully!")
|
| 36 |
return text_pipe
|
| 37 |
|
|
|
|
| 25 |
load_in_8bit=True,
|
| 26 |
variant="8bit",
|
| 27 |
token=token
|
| 28 |
+
)
|
| 29 |
text_pipe = DiffusionPipeline.from_pretrained(
|
| 30 |
"DeepFloyd/IF-I-L-v1.0",
|
| 31 |
text_encoder=text_encoder,
|
| 32 |
unet=None,
|
| 33 |
token=token,
|
| 34 |
)
|
| 35 |
+
text_pipe = text_pipe.to(device)
|
| 36 |
print("Model loaded successfully!")
|
| 37 |
return text_pipe
|
| 38 |
|