Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ import torch
|
|
3 |
from diffusers import DiffusionPipeline
|
4 |
|
5 |
# Load the model with authentication
|
6 |
-
pipe = DiffusionPipeline.from_pretrained("Shakker-Labs/AWPortrait-FL", torch_dtype=torch.
|
7 |
-
pipe.
|
8 |
|
9 |
def generate_image(prompt):
|
10 |
image = pipe(
|
|
|
3 |
from diffusers import DiffusionPipeline
|
4 |
|
5 |
# Load the model with authentication
|
6 |
+
pipe = DiffusionPipeline.from_pretrained("Shakker-Labs/AWPortrait-FL", torch_dtype=torch.float32, use_auth_token=True)
|
7 |
+
pipe.to("cpu") # Save some VRAM by offloading the model to CPU
|
8 |
|
9 |
def generate_image(prompt):
|
10 |
image = pipe(
|