AisingioroHao0 commited on
Commit
4428c33
1 Parent(s): f2c1c6b

add device

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,16 +10,17 @@ import cv2
10
  import numpy as np
11
  import os
12
 
 
13
  automatic_coloring_pipeline = StableDiffusionReferenceOnlyPipeline.from_pretrained(
14
  "AisingioroHao0/stable-diffusion-reference-only-automatic-coloring-0.1.2"
15
- )
16
  automatic_coloring_pipeline.scheduler = UniPCMultistepScheduler.from_config(
17
  automatic_coloring_pipeline.scheduler.config
18
  )
19
 
20
  segment_model = anime_segmentation.get_model(
21
  model_path=huggingface_hub.hf_hub_download("skytnt/anime-seg", "isnetis.ckpt")
22
- )
23
 
24
 
25
  def character_segment(img):
 
10
  import numpy as np
11
  import os
12
 
13
+ device = "cpu"
14
  automatic_coloring_pipeline = StableDiffusionReferenceOnlyPipeline.from_pretrained(
15
  "AisingioroHao0/stable-diffusion-reference-only-automatic-coloring-0.1.2"
16
+ ).to(device)
17
  automatic_coloring_pipeline.scheduler = UniPCMultistepScheduler.from_config(
18
  automatic_coloring_pipeline.scheduler.config
19
  )
20
 
21
  segment_model = anime_segmentation.get_model(
22
  model_path=huggingface_hub.hf_hub_download("skytnt/anime-seg", "isnetis.ckpt")
23
+ ).to(device)
24
 
25
 
26
  def character_segment(img):