zhiweili commited on
Commit
885c0aa
·
1 Parent(s): 81d6134

change to 1.5

Browse files
Files changed (1) hide show
  1. app_haircolor.py +3 -3
app_haircolor.py CHANGED
@@ -9,6 +9,7 @@ from segment_utils import(
9
  restore_result,
10
  )
11
  from diffusers import (
 
12
  DiffusionPipeline,
13
  T2IAdapter,
14
  MultiAdapter,
@@ -21,7 +22,7 @@ from controlnet_aux import (
21
  MidasDetector,
22
  )
23
 
24
- BASE_MODEL = "stabilityai/sdxl-turbo"
25
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
26
 
27
  DEFAULT_EDIT_PROMPT = "blue hair"
@@ -59,12 +60,11 @@ adapters = MultiAdapter(
59
  adapters = adapters.to(torch.float16)
60
 
61
 
62
- basepipeline = DiffusionPipeline.from_pretrained(
63
  BASE_MODEL,
64
  torch_dtype=torch.float16,
65
  use_safetensors=True,
66
  adapter=adapters,
67
- custom_pipeline="./pipelines/pipeline_sdxl_adapter_img2img.py",
68
  )
69
 
70
  basepipeline = basepipeline.to(DEVICE)
 
9
  restore_result,
10
  )
11
  from diffusers import (
12
+ StableDiffusionAdapterPipeline,
13
  DiffusionPipeline,
14
  T2IAdapter,
15
  MultiAdapter,
 
22
  MidasDetector,
23
  )
24
 
25
+ BASE_MODEL = "stable-diffusion-v1-5/stable-diffusion-v1-5"
26
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
27
 
28
  DEFAULT_EDIT_PROMPT = "blue hair"
 
60
  adapters = adapters.to(torch.float16)
61
 
62
 
63
+ basepipeline = StableDiffusionAdapterPipeline.from_pretrained(
64
  BASE_MODEL,
65
  torch_dtype=torch.float16,
66
  use_safetensors=True,
67
  adapter=adapters,
 
68
  )
69
 
70
  basepipeline = basepipeline.to(DEVICE)