refactor: remove unused parameter

pull/57/head
Bryce 2 years ago committed by Bryce Drennan
parent 4e72cc2706
commit 299687645b

@ -100,7 +100,6 @@ def imagine_image_files(
latent_channels=4, latent_channels=4,
downsampling_factor=8, downsampling_factor=8,
precision="autocast", precision="autocast",
ddim_eta=0.0,
record_step_images=False, record_step_images=False,
output_file_extension="jpg", output_file_extension="jpg",
print_caption=False, print_caption=False,
@ -129,7 +128,6 @@ def imagine_image_files(
latent_channels=latent_channels, latent_channels=latent_channels,
downsampling_factor=downsampling_factor, downsampling_factor=downsampling_factor,
precision=precision, precision=precision,
ddim_eta=ddim_eta,
img_callback=_record_step if record_step_images else None, img_callback=_record_step if record_step_images else None,
add_caption=print_caption, add_caption=print_caption,
model_weights_path=model_weights_path, model_weights_path=model_weights_path,
@ -157,7 +155,6 @@ def imagine(
latent_channels=4, latent_channels=4,
downsampling_factor=8, downsampling_factor=8,
precision="autocast", precision="autocast",
ddim_eta=0.0,
img_callback=None, img_callback=None,
half_mode=None, half_mode=None,
add_caption=False, add_caption=False,
@ -322,7 +319,6 @@ def imagine(
shape=shape, shape=shape,
unconditional_guidance_scale=prompt.prompt_strength, unconditional_guidance_scale=prompt.prompt_strength,
unconditional_conditioning=uc, unconditional_conditioning=uc,
eta=ddim_eta,
img_callback=_img_callback, img_callback=_img_callback,
) )

@ -76,7 +76,6 @@ logger = logging.getLogger(__name__)
type=click.Choice(SAMPLER_TYPE_OPTIONS), type=click.Choice(SAMPLER_TYPE_OPTIONS),
help="What sampling strategy to use", help="What sampling strategy to use",
) )
@click.option("--ddim-eta", default=0.0, type=float)
@click.option( @click.option(
"--log-level", "--log-level",
default="INFO", default="INFO",
@ -169,7 +168,6 @@ def imagine_cmd(
fix_faces, fix_faces,
fix_faces_fidelity, fix_faces_fidelity,
sampler_type, sampler_type,
ddim_eta,
log_level, log_level,
quiet, quiet,
show_work, show_work,
@ -238,7 +236,6 @@ def imagine_cmd(
imagine_image_files( imagine_image_files(
prompts, prompts,
outdir=outdir, outdir=outdir,
ddim_eta=ddim_eta,
record_step_images=show_work, record_step_images=show_work,
output_file_extension="jpg", output_file_extension="jpg",
print_caption=caption, print_caption=caption,

@ -1,12 +1,9 @@
import pytest
from PIL import Image from PIL import Image
from imaginairy.safety import create_safety_score from imaginairy.safety import create_safety_score
from imaginairy.utils import get_device
from tests import TESTS_FOLDER from tests import TESTS_FOLDER
@pytest.mark.skipif(get_device() == "cpu", reason="Too slow to run on CPU")
def test_is_nsfw(): def test_is_nsfw():
img = Image.open(f"{TESTS_FOLDER}/data/safety.jpg") img = Image.open(f"{TESTS_FOLDER}/data/safety.jpg")

Loading…
Cancel
Save