From 299687645b71b364abe5f194308d5d5b0853c8ac Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 10 Oct 2022 22:21:09 -0700 Subject: [PATCH] refactor: remove unused parameter --- imaginairy/api.py | 4 ---- imaginairy/cmds.py | 3 --- tests/test_safety.py | 3 --- 3 files changed, 10 deletions(-) diff --git a/imaginairy/api.py b/imaginairy/api.py index eced708..dd9274a 100755 --- a/imaginairy/api.py +++ b/imaginairy/api.py @@ -100,7 +100,6 @@ def imagine_image_files( latent_channels=4, downsampling_factor=8, precision="autocast", - ddim_eta=0.0, record_step_images=False, output_file_extension="jpg", print_caption=False, @@ -129,7 +128,6 @@ def imagine_image_files( latent_channels=latent_channels, downsampling_factor=downsampling_factor, precision=precision, - ddim_eta=ddim_eta, img_callback=_record_step if record_step_images else None, add_caption=print_caption, model_weights_path=model_weights_path, @@ -157,7 +155,6 @@ def imagine( latent_channels=4, downsampling_factor=8, precision="autocast", - ddim_eta=0.0, img_callback=None, half_mode=None, add_caption=False, @@ -322,7 +319,6 @@ def imagine( shape=shape, unconditional_guidance_scale=prompt.prompt_strength, unconditional_conditioning=uc, - eta=ddim_eta, img_callback=_img_callback, ) diff --git a/imaginairy/cmds.py b/imaginairy/cmds.py index e1d0976..7963a3d 100644 --- a/imaginairy/cmds.py +++ b/imaginairy/cmds.py @@ -76,7 +76,6 @@ logger = logging.getLogger(__name__) type=click.Choice(SAMPLER_TYPE_OPTIONS), help="What sampling strategy to use", ) -@click.option("--ddim-eta", default=0.0, type=float) @click.option( "--log-level", default="INFO", @@ -169,7 +168,6 @@ def imagine_cmd( fix_faces, fix_faces_fidelity, sampler_type, - ddim_eta, log_level, quiet, show_work, @@ -238,7 +236,6 @@ def imagine_cmd( imagine_image_files( prompts, outdir=outdir, - ddim_eta=ddim_eta, record_step_images=show_work, output_file_extension="jpg", print_caption=caption, diff --git a/tests/test_safety.py b/tests/test_safety.py index bbb57ce..d421e06 100644 --- a/tests/test_safety.py +++ b/tests/test_safety.py @@ -1,12 +1,9 @@ -import pytest from PIL import Image from imaginairy.safety import create_safety_score -from imaginairy.utils import get_device from tests import TESTS_FOLDER -@pytest.mark.skipif(get_device() == "cpu", reason="Too slow to run on CPU") def test_is_nsfw(): img = Image.open(f"{TESTS_FOLDER}/data/safety.jpg")