zhiweili commited on
Commit
fc74b1a
1 Parent(s): 991068d

change to img2img

Browse files
Files changed (1) hide show
  1. app_haircolor_img2img.py +3 -3
app_haircolor_img2img.py CHANGED
@@ -26,7 +26,7 @@ BASE_MODEL = "stabilityai/stable-diffusion-xl-base-1.0"
26
 
27
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
28
 
29
- DEFAULT_EDIT_PROMPT = "change hair to blue"
30
 
31
  DEFAULT_CATEGORY = "hair"
32
 
@@ -94,13 +94,13 @@ def image_to_image(
94
  generator=generator,
95
  prompt=edit_prompt,
96
  image=input_image,
97
- control_image=cond_image,
98
  height=generate_size,
99
  width=generate_size,
100
  guidance_scale=guidance_scale,
101
  strength=strength,
102
  num_inference_steps=num_steps,
103
- controlnet_conditioning_scale=cond_scale,
 
104
  ).images[0]
105
 
106
  run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
 
26
 
27
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
28
 
29
+ DEFAULT_EDIT_PROMPT = "RAW photo, Fujifilm XT3, sharp hair, high resolution hair, hair tones, natural hair, magazine hair, white color hair"
30
 
31
  DEFAULT_CATEGORY = "hair"
32
 
 
94
  generator=generator,
95
  prompt=edit_prompt,
96
  image=input_image,
 
97
  height=generate_size,
98
  width=generate_size,
99
  guidance_scale=guidance_scale,
100
  strength=strength,
101
  num_inference_steps=num_steps,
102
+ adapter_image=cond_image,
103
+ adapter_conditioning_scale=cond_scale,
104
  ).images[0]
105
 
106
  run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)