Spaces:
Running
on
Zero
Running
on
Zero
add guidance
Browse files- flux1_img2img.py +2 -1
flux1_img2img.py
CHANGED
@@ -19,7 +19,8 @@ def process_image(image,mask_image,prompt="a person",model_id="black-forest-labs
|
|
19 |
generator = torch.Generator("cuda").manual_seed(seed)
|
20 |
generators.append(generator)
|
21 |
# more parameter see https://huggingface.co/docs/diffusers/api/pipelines/flux#diffusers.FluxInpaintPipeline
|
22 |
-
output = pipe(prompt=prompt, image=image,generator=generator,strength=strength
|
|
|
23 |
|
24 |
# TODO support mask
|
25 |
return output.images[0]
|
|
|
19 |
generator = torch.Generator("cuda").manual_seed(seed)
|
20 |
generators.append(generator)
|
21 |
# more parameter see https://huggingface.co/docs/diffusers/api/pipelines/flux#diffusers.FluxInpaintPipeline
|
22 |
+
output = pipe(prompt=prompt, image=image,generator=generator,strength=strength
|
23 |
+
,guidance_scale=0,num_inference_steps=num_inference_steps)
|
24 |
|
25 |
# TODO support mask
|
26 |
return output.images[0]
|