Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,10 @@ from PIL import Image
|
|
4 |
from diffusers import StableDiffusionInstructPix2PixPipeline
|
5 |
|
6 |
# Define the path to the SafeTensor model
|
7 |
-
model_path = "/content/
|
8 |
|
9 |
# Load the SafeTensor model
|
10 |
-
safe_pipe =
|
11 |
|
12 |
def generate_edited_image(input_image):
|
13 |
# Convert the Gradio Image object to a PIL Image
|
|
|
4 |
from diffusers import StableDiffusionInstructPix2PixPipeline
|
5 |
|
6 |
# Define the path to the SafeTensor model
|
7 |
+
model_path = "/content/UberRealisticPornMerge_urpmv12.instruct-pix2pix.safetensors"
|
8 |
|
9 |
# Load the SafeTensor model
|
10 |
+
safe_pipe = torch.load(model_path, map_location=torch.device('cuda'))
|
11 |
|
12 |
def generate_edited_image(input_image):
|
13 |
# Convert the Gradio Image object to a PIL Image
|