Skip to content

Commit

Permalink
fix: consumer bug 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
LTSGOD committed Jul 28, 2023
1 parent fb3ac11 commit abe2446
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GPUserver/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = key["GOOGLE_APPLICATION_CREDENTIALS"]
with open("model/weights/diffusion/Lora/prompt.json") as Lora:
Lora= json.load(Lora)
# model = Img2ImgWithBboxPipeline()
model = Img2ImgWithBboxPipeline()

# message get
while(True):
Expand Down Expand Up @@ -68,10 +68,10 @@

character,prompt,negative_prompt = Lora[ver]["character"],Lora[ver]["prompt"],Lora[ver]["negative_prompt"]
lora_path = f"model/weights/diffusion/Lora/{character}/checkpoint"
# model.load_lora(lora_path)
model.load_lora(lora_path)

result = model.pipe(image=img,input_bbox=input_bbox,prompt=prompt,negative_prompt = negative_prompt,inference_steps=140,strength=0.55)

# result = model.pipe(image=img,input_bbox=input_bbox,prompt=prompt,negative_prompt = negative_prompt,inference_steps=140,strength=0.55)
# result.save("inference.jpg")
# Bentoml
# model 변경점은 이 코드 위에서 수정해주세요
# bento_service = Transform_Anime()
Expand All @@ -80,4 +80,4 @@
# result = bento_service.transform(image=img,input_bbox=input_bbox,prompt=prompt)
# ------------------------model inference ----------------------------

# send_email(email, result)
send_email(email, result)

0 comments on commit abe2446

Please sign in to comment.