Spaces:
Runtime error
Runtime error
Commit
•
d9e1ab4
1
Parent(s):
c5d972d
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
|
|
6 |
# Function to generate and display image
|
7 |
def generate_and_display_image(prompt):
|
8 |
# Initialize the UNet model
|
9 |
-
unet = UNet2DConditionModel.from_pretrained("
|
10 |
|
11 |
# Initialize the diffusion pipeline
|
12 |
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", unet=unet, torch_dtype=torch.float16, variant="fp16")
|
|
|
6 |
# Function to generate and display image
|
7 |
def generate_and_display_image(prompt):
|
8 |
# Initialize the UNet model
|
9 |
+
unet = UNet2DConditionModel.from_pretrained("./unet", torch_dtype=torch.float16, variant="fp16")
|
10 |
|
11 |
# Initialize the diffusion pipeline
|
12 |
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", unet=unet, torch_dtype=torch.float16, variant="fp16")
|