Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,7 @@ import torch
|
|
4 |
|
5 |
# Load the quantized model from Hugging Face
|
6 |
model_id = "Intel/sd-1.5-square-quantized"
|
7 |
-
pipe = OVStableDiffusionPipeline.from_pretrained(
|
8 |
-
model_id,
|
9 |
-
export=False,
|
10 |
-
trust_remote_code=True, # Allow custom code if needed
|
11 |
-
ov_config={"CACHE_DIR": ""} # Optional: disable caching if it’s causing issues
|
12 |
-
)
|
13 |
|
14 |
# Define the inference function
|
15 |
def generate_image(prompt):
|
|
|
4 |
|
5 |
# Load the quantized model from Hugging Face
|
6 |
model_id = "Intel/sd-1.5-square-quantized"
|
7 |
+
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, export=False, library_name="diffusers")
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# Define the inference function
|
10 |
def generate_image(prompt):
|