이미지 프롬프트 생성 켜기 (Windows·Mac)

- comfyui.env에 ENABLE_IMAGE_PROMPT_GENERATION=true
- 이미지 설정 맞춤(python): 'Open WebUI와 연결'·처음 설정 때 image_generation.prompt.enable 기록
  (평소 기동·재시작 때는 화면에서 바꾼 값을 그대로 둠)
- 한국어 요청을 채팅 모델이 영어 그림 프롬프트로 다시 써서 ComfyUI로 보냄

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HnDmXrFqktWwYa1cuJRAVZ
This commit is contained in:
2026-11-05 07:00:34 +00:00
parent 6565456566
commit 932f254d16
7 changed files with 13 additions and 5 deletions

View File

@@ -249,6 +249,7 @@ webui_comfy_link() {
{
echo "ENABLE_IMAGE_GENERATION=true"
echo "IMAGE_GENERATION_ENGINE=comfyui"
echo "ENABLE_IMAGE_PROMPT_GENERATION=true" # 보낸 글(한국어 등)을 채팅 모델이 영어 그림 프롬프트로 다시 씀
echo "COMFYUI_BASE_URL=http://${CI_HOST}:8188"
echo "IMAGE_GENERATION_MODEL=${file}"
echo "IMAGE_SIZE=${PR_W}x${PR_H}"

View File

@@ -62,6 +62,7 @@ if e.get('IMAGE_GENERATION_ENGINE', '').lower() == 'comfyui':
if force:
want['image_generation.enable'] = True
want['image_generation.engine'] = 'comfyui'
if e.get('ENABLE_IMAGE_PROMPT_GENERATION'): want['image_generation.prompt.enable'] = e['ENABLE_IMAGE_PROMPT_GENERATION'].lower() == 'true'
if e.get('IMAGE_GENERATION_MODEL'): want['image_generation.model'] = e['IMAGE_GENERATION_MODEL']
if e.get('IMAGE_SIZE'): want['image_generation.size'] = e['IMAGE_SIZE']
if (e.get('IMAGE_STEPS') or '').isdigit(): want['image_generation.steps'] = int(e['IMAGE_STEPS'])
@@ -72,6 +73,7 @@ if e.get('IMAGE_GENERATION_ENGINE', '').lower() == 'comfyui':
# never set up in WebUI yet (engine still default, no workflow) -> write all generation keys
want['image_generation.enable'] = True
want['image_generation.engine'] = 'comfyui'
if e.get('ENABLE_IMAGE_PROMPT_GENERATION'): want['image_generation.prompt.enable'] = e['ENABLE_IMAGE_PROMPT_GENERATION'].lower() == 'true'
if e.get('IMAGE_GENERATION_MODEL'): want['image_generation.model'] = e['IMAGE_GENERATION_MODEL']
if e.get('IMAGE_SIZE'): want['image_generation.size'] = e['IMAGE_SIZE']
if (e.get('IMAGE_STEPS') or '').isdigit(): want['image_generation.steps'] = int(e['IMAGE_STEPS'])

View File

@@ -305,6 +305,7 @@ function Set-WebuiComfyLink($Inst, [string]$File) {
$envLines = @(
'ENABLE_IMAGE_GENERATION=true'
'IMAGE_GENERATION_ENGINE=comfyui'
'ENABLE_IMAGE_PROMPT_GENERATION=true' # 보낸 글(한국어 등)을 채팅 모델이 영어 그림 프롬프트로 다시 씀
"COMFYUI_BASE_URL=$(Get-ComfyUrlForWebui $Inst)"
"IMAGE_GENERATION_MODEL=$File"
"IMAGE_SIZE=$($p.W)x$($p.H)"

View File

@@ -70,6 +70,7 @@ if e.get('IMAGE_GENERATION_ENGINE', '').lower() == 'comfyui':
if force:
want['image_generation.enable'] = True
want['image_generation.engine'] = 'comfyui'
if e.get('ENABLE_IMAGE_PROMPT_GENERATION'): want['image_generation.prompt.enable'] = e['ENABLE_IMAGE_PROMPT_GENERATION'].lower() == 'true'
if e.get('IMAGE_GENERATION_MODEL'): want['image_generation.model'] = e['IMAGE_GENERATION_MODEL']
if e.get('IMAGE_SIZE'): want['image_generation.size'] = e['IMAGE_SIZE']
if (e.get('IMAGE_STEPS') or '').isdigit(): want['image_generation.steps'] = int(e['IMAGE_STEPS'])
@@ -80,6 +81,7 @@ if e.get('IMAGE_GENERATION_ENGINE', '').lower() == 'comfyui':
# never set up in WebUI yet (engine still default, no workflow) -> write all generation keys
want['image_generation.enable'] = True
want['image_generation.engine'] = 'comfyui'
if e.get('ENABLE_IMAGE_PROMPT_GENERATION'): want['image_generation.prompt.enable'] = e['ENABLE_IMAGE_PROMPT_GENERATION'].lower() == 'true'
if e.get('IMAGE_GENERATION_MODEL'): want['image_generation.model'] = e['IMAGE_GENERATION_MODEL']
if e.get('IMAGE_SIZE'): want['image_generation.size'] = e['IMAGE_SIZE']
if (e.get('IMAGE_STEPS') or '').isdigit(): want['image_generation.steps'] = int(e['IMAGE_STEPS'])

View File

@@ -256,4 +256,5 @@ launchctl bootout gui/$(id -u)/com.ollama.serve; sleep 3; launchctl bootstrap gu
- 원인: Windows에서 한 이미지 설정은 Windows WebUI DB에만 들어감. Mac WebUI DB는 `image_generation.enable=false`, 엔진 `openai`, 주소·노드 비어 있음 (`podman exec open-webui python3 …` 로 확인)
- 해결: Mac `src/platform/mac/20_webui_image_sync.sh` (Windows와 같은 python) → ComfyUI (Podman) 관리 → 'Open WebUI와 연결' 실행
- 함수 호출: 스크립트가 WebUI 전체 기본값(`models.default_params.function_calling`)을 `legacy`로 넣음 (관리자가 정한 값이 있으면 그대로). 개인 설정이 '기본값'이면 이 값이 적용됨 (Open WebUI 소스 `main.py`: 전체 기본값 → 모델별 → 요청 값 순서로 덮어씀)
- 한국어로 요청하면 그림이 엉뚱함: SD1.5 계열(DreamShaper8)은 영어 프롬프트 기준 → '이미지 프롬프트 생성'을 켜서 채팅 모델이 영어 프롬프트로 바꾸게 함 (스크립트가 'Open WebUI와 연결' 때 켬, 관리자 → 이미지들 화면에서 끌 수 있음)

View File

@@ -21,7 +21,8 @@ updated: 2026-11-03
## 커밋
| 날짜 | 커밋 | 내용 |
|---|---|---|
| 2026-11-05 | (이번) | WebUI 전체 기본값 함수 호출 = 레거시(`models.default_params`, 값이 없을 때만) — 사용자마다 바꿀 필요 없음 (Windows·Mac 이미지 설정 맞춤에 포함) |
| 2026-11-05 | (이번) | 이미지 프롬프트 생성 켬(`ENABLE_IMAGE_PROMPT_GENERATION=true`, DB `image_generation.prompt.enable`) — 한국어 요청을 채팅 모델이 영어 그림 프롬프트로 바꿈. 'Open WebUI와 연결' 때 적용, 평소에는 화면 설정 유지 |
| 2026-11-05 | 6565456 | WebUI 전체 기본값 함수 호출 = 레거시(`models.default_params`, 값이 없을 때만) — 사용자마다 바꿀 필요 없음 (Windows·Mac 이미지 설정 맞춤에 포함) |
| 2026-11-05 | bd149da | 메인 메뉴 Git(⬇ 최신 받기 · 상태 · 최근 기록, 받으면 다시 시작) (Windows `20_git_menu` · Mac `21_git_menu`) |
| 2026-11-05 | (이번) | Mac: WebUI 이미지 생성·편집 DB 맞춤(`20_webui_image_sync.sh`) · 두 플랫폼: WebUI에서 이미지 설정을 한 번도 안 한 DB면 생성 설정 전체 기록 |
| 2026-11-05 | f567af2 | Ollama 서버 재시작: 모델 저장 위치 그대로 / 바꾸고 기존 모델 옮기기 / 위치만 바꾸기 (Windows·Mac `19_ollama_restart`, 위치 변경 함수에 옮기지 않기 추가) |

View File

@@ -51,10 +51,10 @@ Ollama · Open WebUI · ComfyUI 통합 운영·관리 스크립트 (Windows `jj_
| `src/platform/windows/09_webui.ps1` | Windows 기능 소스 | 388줄 |
| `src/platform/windows/10_webui_menu_comfy.ps1` | Windows 기능 소스 | 399줄 |
| `src/platform/windows/11_comfy_network.ps1` | Windows 기능 소스 | 380줄 |
| `src/platform/windows/12_comfy_install.ps1` | Windows 기능 소스 | 372줄 |
| `src/platform/windows/12_comfy_install.ps1` | Windows 기능 소스 | 373줄 |
| `src/platform/windows/13_comfy_stack_storage.ps1` | Windows 기능 소스 | 383줄 |
| `src/platform/windows/14_storage_quickopen.ps1` | Windows 기능 소스 | 285줄 |
| `src/platform/windows/15_webui_image_sync.ps1` | Windows 기능 소스 (WebUI 이미지 생성·편집 DB 맞춤) | 145줄 |
| `src/platform/windows/15_webui_image_sync.ps1` | Windows 기능 소스 (WebUI 이미지 생성·편집 DB 맞춤) | 147줄 |
| `src/platform/windows/16_factory_reset.ps1` | Windows 기능 소스 (완전 초기화) | 177줄 |
| `src/platform/windows/17_podman_monitor.ps1` | Windows 기능 소스 (상태 화면 맨 위 Podman 줄) | 88줄 |
| `src/platform/windows/18_podman_server.ps1` | Windows 기능 소스 (Podman 서버 기동·종료·재시작) | 139줄 |
@@ -70,7 +70,7 @@ Ollama · Open WebUI · ComfyUI 통합 운영·관리 스크립트 (Windows `jj_
| `src/platform/mac/08_webui.sh` | Mac 기능 소스 | 389줄 |
| `src/platform/mac/09_webui_menu_comfy.sh` | Mac 기능 소스 | 400줄 |
| `src/platform/mac/10_comfy_network_install.sh` | Mac 기능 소스 | 381줄 |
| `src/platform/mac/11_comfy_models_link.sh` | Mac 기능 소스 | 352줄 |
| `src/platform/mac/11_comfy_models_link.sh` | Mac 기능 소스 | 353줄 |
| `src/platform/mac/12_comfy_stack_storage.sh` | Mac 기능 소스 | 398줄 |
| `src/platform/mac/13_storage_paths.sh` | Mac 기능 소스 | 403줄 |
| `src/platform/mac/14_setup.sh` | Mac 기능 소스 | 206줄 |
@@ -79,7 +79,7 @@ Ollama · Open WebUI · ComfyUI 통합 운영·관리 스크립트 (Windows `jj_
| `src/platform/mac/17_podman_monitor.sh` | Mac 기능 소스 (상태 화면 맨 위 Podman 줄) | 66줄 |
| `src/platform/mac/18_podman_server.sh` | Mac 기능 소스 (Podman 서버 기동·종료·재시작) | 136줄 |
| `src/platform/mac/19_ollama_restart.sh` | Mac 기능 소스 (Ollama 서버 재시작 · 모델 저장 위치 선택) | 32줄 |
| `src/platform/mac/20_webui_image_sync.sh` | Mac 기능 소스 (WebUI 이미지 생성·편집 DB 맞춤) | 139줄 |
| `src/platform/mac/20_webui_image_sync.sh` | Mac 기능 소스 (WebUI 이미지 생성·편집 DB 맞춤) | 141줄 |
| `src/platform/mac/21_git_menu.sh` | Mac 기능 소스 (Git 메뉴: 최신 받기·상태·기록) | 83줄 |
> 소스 규칙(파일당 300~400줄, 700줄 이하) 준수 — 2026-11-05 분리. 검사: `python wiki/tools/check_lines.py .` (`.sh`·`.ps1` 포함)