Skip to content

Commit

Permalink
more types
Browse files Browse the repository at this point in the history
  • Loading branch information
palp committed Aug 9, 2023
1 parent 725bea9 commit d245e20
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions sgm/inference/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
LinearMultistepSampler,
)
from sgm.util import load_model_from_config
import torch
from typing import Optional, Dict, Any


Expand Down Expand Up @@ -226,8 +227,8 @@ def text_to_image(
negative_prompt: str = "",
samples: int = 1,
return_latents: bool = False,
noise_strength=None,
filter=None,
noise_strength: Optional[float] = None,
filter: Any = None,
):
sampler = get_sampler_config(params)

Expand Down Expand Up @@ -260,13 +261,13 @@ def text_to_image(
def image_to_image(
self,
params: SamplingParams,
image,
image: torch.Tensor,
prompt: str,
negative_prompt: str = "",
samples: int = 1,
return_latents: bool = False,
noise_strength=None,
filter=None,
noise_strength: Optional[float] = None,
filter: Any = None,
):
sampler = get_sampler_config(params)

Expand Down Expand Up @@ -321,16 +322,16 @@ def wrap_discretization(

def refiner(
self,
image,
image: torch.Tensor,
prompt: str,
negative_prompt: str = "",
params: SamplingParams = SamplingParams(
sampler=Sampler.EULER_EDM, steps=40, img2img_strength=0.15
),
samples: int = 1,
return_latents: bool = False,
filter=None,
add_noise=False,
filter: Any = None,
add_noise: bool = False,
):
sampler = get_sampler_config(params)
value_dict = {
Expand Down

0 comments on commit d245e20

Please sign in to comment.