tennant commited on
Commit
5546838
1 Parent(s): b8308f9

update title

Browse files
Files changed (1) hide show
  1. edit_app.py +3 -1
edit_app.py CHANGED
@@ -48,9 +48,11 @@ example_instructions = [
48
  model_id = "MudeHui/ip2p-warp-gpt4v"
49
 
50
  def main():
51
- pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float, safety_checker=None)
52
  if torch.cuda.is_available():
 
53
  pipe = pipe.to('cuda')
 
 
54
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
55
  example_image = Image.open("imgs/example.jpg").convert("RGB")
56
 
 
48
  model_id = "MudeHui/ip2p-warp-gpt4v"
49
 
50
  def main():
 
51
  if torch.cuda.is_available():
52
+ pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
53
  pipe = pipe.to('cuda')
54
+ else:
55
+ pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float, safety_checker=None)
56
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
57
  example_image = Image.open("imgs/example.jpg").convert("RGB")
58