Update app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,7 @@ def infer(source_img, prompt, negative_prompt, guide, steps, seed):
|
|
22 |
generator = torch.Generator(device).manual_seed(seed)
|
23 |
imageio.imwrite("data.png", source_img)
|
24 |
src = resize(768, 'data.png')
|
25 |
-
image = pipe(prompt, negative_prompt=negative_prompt, image=src,
|
26 |
-
adapter_conditioning_factor=.8, guidance_scale=guide, num_inference_steps=steps).images[0]
|
27 |
return image
|
28 |
|
29 |
gr.Interface(fn=infer, inputs=[gr.Image(type='numpy', source='canvas'),
|
|
|
22 |
generator = torch.Generator(device).manual_seed(seed)
|
23 |
imageio.imwrite("data.png", source_img)
|
24 |
src = resize(768, 'data.png')
|
25 |
+
image = pipe(prompt, negative_prompt=negative_prompt, image=src, strength=1, guidance_scale=guide, num_inference_steps=steps).images[0]
|
|
|
26 |
return image
|
27 |
|
28 |
gr.Interface(fn=infer, inputs=[gr.Image(type='numpy', source='canvas'),
|