Spaces:
Running
on
A10G
Running
on
A10G
Fix img2img with 1 step (#2)
Browse files- Fix img2img with 1 step (409a5b8c7dbc504f6b503e21e8931de31c040fc7)
Co-authored-by: Pedro Cuenca <pcuenq@users.noreply.huggingface.co>
app.py
CHANGED
@@ -78,6 +78,8 @@ async def predict(init_image, prompt, strength, steps, seed=1231231):
|
|
78 |
init_image = resize_crop(init_image)
|
79 |
generator = torch.manual_seed(seed)
|
80 |
last_time = time.time()
|
|
|
|
|
81 |
results = i2i_pipe(
|
82 |
prompt=prompt,
|
83 |
image=init_image,
|
|
|
78 |
init_image = resize_crop(init_image)
|
79 |
generator = torch.manual_seed(seed)
|
80 |
last_time = time.time()
|
81 |
+
if steps == 1:
|
82 |
+
strength = 1.0
|
83 |
results = i2i_pipe(
|
84 |
prompt=prompt,
|
85 |
image=init_image,
|