Update app.py
Browse files
app.py
CHANGED
|
@@ -22,12 +22,11 @@ def caricature_from_photo(image):
|
|
| 22 |
raw_image = image.convert('RGB')
|
| 23 |
inputs = blip_processor(raw_image, return_tensors="pt").to(device)
|
| 24 |
out = blip_model.generate(**inputs, max_new_tokens=30)
|
| 25 |
-
description = blip_processor.decode(out[0], skip_special_tokens=
|
| 26 |
|
| 27 |
# 캐리커쳐 스타일 프롬프트 (이모티콘과 직관적 키워드로 꾸밈)
|
| 28 |
caricature_prompt = (
|
| 29 |
-
f"{description}, normal hands, five fingers,
|
| 30 |
-
"cheerful, simple background, joy, cartoon-style, caricature"
|
| 31 |
)
|
| 32 |
|
| 33 |
# turbo SD: 매우 빠른 생성!
|
|
|
|
| 22 |
raw_image = image.convert('RGB')
|
| 23 |
inputs = blip_processor(raw_image, return_tensors="pt").to(device)
|
| 24 |
out = blip_model.generate(**inputs, max_new_tokens=30)
|
| 25 |
+
description = blip_processor.decode(out[0], skip_special_tokens=False)
|
| 26 |
|
| 27 |
# 캐리커쳐 스타일 프롬프트 (이모티콘과 직관적 키워드로 꾸밈)
|
| 28 |
caricature_prompt = (
|
| 29 |
+
f"{description}, normal hands, five fingers, gentle lines, charming and lovely, sweet expression, cheerful, simple background, joy, cartoon-style, caricature"
|
|
|
|
| 30 |
)
|
| 31 |
|
| 32 |
# turbo SD: 매우 빠른 생성!
|