SonnySW commited on
Commit
ec0009c
·
1 Parent(s): 2ff8509

2024.07.04 change appropriate app.py

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +2 -2
  2. app.py +2 -2
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -8,8 +8,8 @@ import gradio as gr
8
  # 모델 로드
9
  processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
10
  model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
11
- pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float16)
12
- pipe = pipe.to("cuda")
13
 
14
  def detect_objects(image):
15
  # 객체 검출
 
8
  # 모델 로드
9
  processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
10
  model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
11
+ pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float32)
12
+ pipe = pipe.to("cpu")
13
 
14
  def detect_objects(image):
15
  # 객체 검출
app.py CHANGED
@@ -8,8 +8,8 @@ import gradio as gr
8
  # 모델 로드
9
  processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
10
  model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
11
- pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float16)
12
- pipe = pipe.to("cuda")
13
 
14
  def detect_objects(image):
15
  # 객체 검출
 
8
  # 모델 로드
9
  processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50")
10
  model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50")
11
+ pipe = StableDiffusionInpaintPipeline.from_pretrained("runwayml/stable-diffusion-inpainting", torch_dtype=torch.float32)
12
+ pipe = pipe.to("cpu")
13
 
14
  def detect_objects(image):
15
  # 객체 검출