Spaces:
Running
on
Zero
Running
on
Zero
zhiweili
commited on
Commit
•
50358bf
1
Parent(s):
ca7b26c
test p2p
Browse files- app_haircolor_img2img.py +2 -4
app_haircolor_img2img.py
CHANGED
@@ -77,17 +77,15 @@ def image_to_image(
|
|
77 |
|
78 |
cond_image = input_image
|
79 |
|
80 |
-
|
81 |
generated_image = basepipeline(
|
82 |
-
|
83 |
-
# generator=generator,
|
84 |
prompt=edit_prompt,
|
85 |
negative_prompt=DEFAULT_NEGATIVE_PROMPT,
|
86 |
image=cond_image,
|
87 |
height=generate_size,
|
88 |
width=generate_size,
|
89 |
guidance_scale=guidance_scale,
|
90 |
-
image_guidance_scale=1.5,
|
91 |
num_inference_steps=num_steps,
|
92 |
).images[0]
|
93 |
|
|
|
77 |
|
78 |
cond_image = input_image
|
79 |
|
80 |
+
generator = torch.Generator(device=DEVICE).manual_seed(seed)
|
81 |
generated_image = basepipeline(
|
82 |
+
generator=generator,
|
|
|
83 |
prompt=edit_prompt,
|
84 |
negative_prompt=DEFAULT_NEGATIVE_PROMPT,
|
85 |
image=cond_image,
|
86 |
height=generate_size,
|
87 |
width=generate_size,
|
88 |
guidance_scale=guidance_scale,
|
|
|
89 |
num_inference_steps=num_steps,
|
90 |
).images[0]
|
91 |
|