Rhueue commited on
Commit
beff842
·
verified ·
1 Parent(s): 54ef4aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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/uberRealisticPornMerge_urpmv12.instruct-pix2pix.safetensors"
8
 
9
  # Load the SafeTensor model
10
- safe_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_path, torch_dtype=torch.float16, safety_checker=None).to("cuda")
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