Skip to content

Commit

Permalink
refactor: improve code formating
Browse files Browse the repository at this point in the history
This commit improves the I2I code formatting.
  • Loading branch information
rickstaa committed Jun 26, 2024
1 parent 57c5728 commit bd77a8b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runner/app/pipelines/text_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
from safetensors.torch import load_file

from app.pipelines.base import Pipeline
from app.pipelines.util import get_model_dir, get_torch_device, SafetyChecker, is_lightning_model, is_turbo_model
from app.pipelines.util import (
get_model_dir,
get_torch_device,
SafetyChecker,
is_lightning_model,
is_turbo_model,
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -52,7 +58,6 @@ def __init__(self, model_id: str):
logger.info("TextToImagePipeline using bfloat16 precision for %s", model_id)
kwargs["torch_dtype"] = torch.bfloat16


# Special case SDXL-Lightning because the unet for SDXL needs to be swapped
if SDXL_LIGHTNING_MODEL_ID in model_id:
base = "stabilityai/stable-diffusion-xl-base-1.0"
Expand Down

0 comments on commit bd77a8b

Please sign in to comment.