Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 27, 2024
1 parent 045a11b commit d4ba8c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion comps/text2image/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ pydub
shortuuid
torch
transformers
uvicorn
uvicorn
17 changes: 9 additions & 8 deletions comps/text2image/text2image.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
statistics_dict,
)


logger = CustomLogger("text2image")
pipe = None
args = None
Expand All @@ -42,12 +41,14 @@ def initialize():
if not args.token:
args.token = os.getenv("HF_TOKEN")
if args.device == "hpu":
kwargs.update({
"use_habana": True,
"use_hpu_graphs": args.use_hpu_graphs,
"gaudi_config": "Habana/stable-diffusion",
"token": args.token,
})
kwargs.update(
{
"use_habana": True,
"use_hpu_graphs": args.use_hpu_graphs,
"gaudi_config": "Habana/stable-diffusion",
"token": args.token,
}
)
# if "stable-diffusion-3" in args.model_name_or_path:
# from optimum.habana.diffusers import GaudiStableDiffusion3Pipeline

Expand Down Expand Up @@ -117,6 +118,6 @@ def text2image(input: SDInputs):
parser.add_argument("--bf16", action="store_true")

args = parser.parse_args()

logger.info("Text2image server started.")
opea_microservices["opea_service@text2image"].start()

0 comments on commit d4ba8c7

Please sign in to comment.