ima2-gen 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/bin/commands/doctor.js +195 -0
- package/bin/commands/doctor.ts +202 -0
- package/bin/ima2.js +3 -105
- package/bin/ima2.ts +3 -109
- package/config.js +1 -0
- package/config.ts +5 -0
- package/docs/CLI.md +36 -0
- package/docs/FAQ.ko.md +82 -2
- package/docs/FAQ.md +85 -2
- package/docs/PROMPT_STUDIO.ko.md +111 -0
- package/docs/PROMPT_STUDIO.md +115 -0
- package/docs/README.ko.md +8 -1
- package/docs/migration/runtime-test-inventory.md +6 -1
- package/lib/agentRuntime.js +9 -2
- package/lib/agentRuntime.ts +8 -2
- package/lib/errorClassify.js +1 -1
- package/lib/errorClassify.ts +1 -1
- package/lib/generationErrors.js +121 -23
- package/lib/generationErrors.ts +100 -13
- package/lib/responsesDoctor.js +386 -0
- package/lib/responsesDoctor.ts +456 -0
- package/lib/responsesErrors.js +57 -0
- package/lib/responsesErrors.ts +83 -0
- package/lib/responsesFallback.js +72 -0
- package/lib/responsesFallback.ts +114 -0
- package/lib/responsesImageAdapter.js +121 -174
- package/lib/responsesImageAdapter.ts +136 -211
- package/lib/responsesParse.js +324 -0
- package/lib/responsesParse.ts +452 -0
- package/lib/responsesTools.js +15 -0
- package/lib/responsesTools.ts +28 -0
- package/package.json +1 -1
- package/routes/edit.js +26 -1
- package/routes/edit.ts +26 -1
- package/routes/generate.js +40 -0
- package/routes/generate.ts +47 -0
- package/ui/dist/.vite/manifest.json +12 -12
- package/ui/dist/assets/{AgentWorkspace-BJe9yxPA.js → AgentWorkspace-B6YNOZHi.js} +1 -1
- package/ui/dist/assets/{CardNewsWorkspace-BBLdwzYU.js → CardNewsWorkspace-EFVeg4l_.js} +1 -1
- package/ui/dist/assets/{NodeCanvas-BSZ527J4.js → NodeCanvas-iM6yjHvO.js} +1 -1
- package/ui/dist/assets/{PromptBuilderPanel-Y2VygFc0.js → PromptBuilderPanel-C3GdLDCl.js} +1 -1
- package/ui/dist/assets/{PromptImportDialog-C6lFV-LL.js → PromptImportDialog-DS9vrc_w.js} +2 -2
- package/ui/dist/assets/{PromptImportDiscoverySection-D8YJFhND.js → PromptImportDiscoverySection-DHFEt_FA.js} +1 -1
- package/ui/dist/assets/{PromptImportFolderSection-ywfcQolW.js → PromptImportFolderSection-BQxb1zs5.js} +1 -1
- package/ui/dist/assets/{PromptLibraryPanel-fk4KmrGy.js → PromptLibraryPanel-NhMKVGfU.js} +2 -2
- package/ui/dist/assets/{SettingsWorkspace-DL5vhAHQ.js → SettingsWorkspace-FjKjaDqj.js} +1 -1
- package/ui/dist/assets/index-BAN6lKgf.js +28 -0
- package/ui/dist/assets/{index-BLx55BOg.js → index-BbFZyM92.js} +1 -1
- package/ui/dist/assets/index-DK1faG9Z.css +1 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-ByViUJfx.css +0 -1
- package/ui/dist/assets/index-Ci36vcFD.js +0 -28
package/bin/ima2.ts
CHANGED
|
@@ -3,13 +3,11 @@ import { createInterface } from "readline/promises";
|
|
|
3
3
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
4
4
|
import { join, dirname } from "path";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
|
-
import { createRequire } from "module";
|
|
7
6
|
import { spawn, execSync } from "child_process";
|
|
8
7
|
import { confirmDestructiveAction } from "./lib/destructive-confirm.js";
|
|
9
|
-
import {
|
|
8
|
+
import { doctor } from "./commands/doctor.js";
|
|
10
9
|
import { openUrl, resolveBin } from "./lib/platform.js";
|
|
11
10
|
import { maybePromptGithubStar } from "./lib/star-prompt.js";
|
|
12
|
-
import { buildStorageDoctorLines } from "./lib/storage-doctor.js";
|
|
13
11
|
import { ensureFreshUiDist } from "./lib/ui-build.js";
|
|
14
12
|
import { detectCodexAuth } from "../lib/codexDetect.js";
|
|
15
13
|
import { config as runtimeConfig } from "../config.js";
|
|
@@ -17,7 +15,6 @@ import { config as runtimeConfig } from "../config.js";
|
|
|
17
15
|
import { errInfo } from "../lib/errInfo.js";
|
|
18
16
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
17
|
const ROOT = join(__dirname, "..");
|
|
20
|
-
const requireFromRoot = createRequire(join(ROOT, "package.json"));
|
|
21
18
|
// Config lives under runtimeConfig.storage.configDir (honors IMA2_CONFIG_DIR).
|
|
22
19
|
// Legacy installs that stored config at <packageRoot>/.ima2/config.json will be
|
|
23
20
|
// migrated on first write.
|
|
@@ -62,18 +59,6 @@ function advertisedServerUrl() {
|
|
|
62
59
|
return adv?.backend?.url || adv?.url || (adv?.port ? `http://localhost:${adv.port}` : null);
|
|
63
60
|
}
|
|
64
61
|
|
|
65
|
-
function missingRuntimeDeps() {
|
|
66
|
-
const deps = ["express", "better-sqlite3", "openai", "openai-oauth"];
|
|
67
|
-
return deps.filter((dep) => {
|
|
68
|
-
try {
|
|
69
|
-
requireFromRoot.resolve(dep);
|
|
70
|
-
return false;
|
|
71
|
-
} catch {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
62
|
async function setup() {
|
|
78
63
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
79
64
|
|
|
@@ -221,97 +206,6 @@ async function showStatus() {
|
|
|
221
206
|
console.log("");
|
|
222
207
|
}
|
|
223
208
|
|
|
224
|
-
async function doctor() {
|
|
225
|
-
console.log(`\n ${pkg.name} v${pkg.version} — Doctor\n`);
|
|
226
|
-
|
|
227
|
-
let ok = 0;
|
|
228
|
-
let fail = 0;
|
|
229
|
-
|
|
230
|
-
// Node version
|
|
231
|
-
const nodeVersion = process.version;
|
|
232
|
-
const nodeMajor = parseInt(nodeVersion.slice(1).split(".")[0]);
|
|
233
|
-
if (nodeMajor >= 20) {
|
|
234
|
-
console.log(` ✓ Node.js ${nodeVersion} (>= 20)`);
|
|
235
|
-
ok++;
|
|
236
|
-
} else {
|
|
237
|
-
console.log(` ✗ Node.js ${nodeVersion} (requires >= 20)`);
|
|
238
|
-
fail++;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// package.json exists
|
|
242
|
-
if (existsSync(join(ROOT, "package.json"))) {
|
|
243
|
-
console.log(" ✓ package.json found");
|
|
244
|
-
ok++;
|
|
245
|
-
} else {
|
|
246
|
-
console.log(" ✗ package.json missing");
|
|
247
|
-
fail++;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// Runtime dependencies may be hoisted by npm, pnpm, or Yarn. Resolve the
|
|
251
|
-
// packages instead of requiring a package-local node_modules folder.
|
|
252
|
-
const missingDeps = missingRuntimeDeps();
|
|
253
|
-
if (missingDeps.length === 0) {
|
|
254
|
-
console.log(" ✓ runtime dependencies resolvable");
|
|
255
|
-
ok++;
|
|
256
|
-
} else {
|
|
257
|
-
console.log(` ✗ missing runtime dependencies: ${missingDeps.join(", ")}`);
|
|
258
|
-
fail++;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// .env
|
|
262
|
-
if (existsSync(join(ROOT, ".env"))) {
|
|
263
|
-
console.log(" ✓ .env file exists");
|
|
264
|
-
ok++;
|
|
265
|
-
} else {
|
|
266
|
-
console.log(" ⚠ .env file not found (optional — copy from .env.example)");
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Config
|
|
270
|
-
const config = loadConfig();
|
|
271
|
-
if (config.provider) {
|
|
272
|
-
console.log(` ✓ Configured: ${config.provider}`);
|
|
273
|
-
ok++;
|
|
274
|
-
} else {
|
|
275
|
-
console.log(" ⚠ Not configured — run 'ima2 setup'");
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// Port availability (simple check)
|
|
279
|
-
const adv = loadAdvertisement();
|
|
280
|
-
console.log(` ℹ Preferred backend port: ${runtimeConfig.server.port}`);
|
|
281
|
-
if (adv?.backend || adv?.port) {
|
|
282
|
-
console.log(` ℹ Backend actual URL: ${adv?.backend?.url || adv?.url || `http://localhost:${adv.port}`}`);
|
|
283
|
-
if (adv?.oauth) {
|
|
284
|
-
console.log(` ℹ OAuth actual URL: ${adv.oauth.url} (${adv.oauth.status || "unknown"})`);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
const hardeningLines = await buildHardeningDoctorLines({
|
|
289
|
-
root: ROOT,
|
|
290
|
-
configFile: CONFIG_FILE,
|
|
291
|
-
fileConfig: config,
|
|
292
|
-
});
|
|
293
|
-
for (const line of hardeningLines) {
|
|
294
|
-
const prefix =
|
|
295
|
-
line.kind === "pass" ? "✓"
|
|
296
|
-
: line.kind === "fail" ? "✗"
|
|
297
|
-
: line.kind === "warn" ? "⚠"
|
|
298
|
-
: "ℹ";
|
|
299
|
-
console.log(` ${prefix} ${line.text}`);
|
|
300
|
-
if (line.kind === "pass") ok++;
|
|
301
|
-
if (line.kind === "fail") fail++;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
const storageLines = await buildStorageDoctorLines({
|
|
305
|
-
rootDir: ROOT,
|
|
306
|
-
config: runtimeConfig,
|
|
307
|
-
});
|
|
308
|
-
console.log("");
|
|
309
|
-
for (const line of storageLines) console.log(line);
|
|
310
|
-
|
|
311
|
-
console.log(`\n ${ok} passed, ${fail} failed\n`);
|
|
312
|
-
process.exit(fail > 0 ? 1 : 0);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
209
|
function openBrowser() {
|
|
316
210
|
const url = advertisedServerUrl() || `http://localhost:${runtimeConfig.server.port}`;
|
|
317
211
|
const res = openUrl(url);
|
|
@@ -400,7 +294,7 @@ if (args.includes("-v") || args.includes("--version")) {
|
|
|
400
294
|
}
|
|
401
295
|
|
|
402
296
|
if ((!command || args.includes("-h") || args.includes("--help"))
|
|
403
|
-
&& !["gen", "edit", "ls", "show", "ps", "cancel", "session", "history", "prompt", "multimode", "node", "annotate", "canvas-versions", "metadata", "comfy", "cardnews", "inflight", "storage", "billing", "providers", "oauth", "config", "defaults", "capabilities", "skill", "ping"].includes(command)) {
|
|
297
|
+
&& !["doctor", "gen", "edit", "ls", "show", "ps", "cancel", "session", "history", "prompt", "multimode", "node", "annotate", "canvas-versions", "metadata", "comfy", "cardnews", "inflight", "storage", "billing", "providers", "oauth", "config", "defaults", "capabilities", "skill", "ping"].includes(command)) {
|
|
404
298
|
showHelp();
|
|
405
299
|
process.exit(command ? 0 : 1);
|
|
406
300
|
}
|
|
@@ -417,7 +311,7 @@ switch (command) {
|
|
|
417
311
|
showStatus();
|
|
418
312
|
break;
|
|
419
313
|
case "doctor":
|
|
420
|
-
await doctor();
|
|
314
|
+
await doctor(args.slice(1));
|
|
421
315
|
break;
|
|
422
316
|
case "open":
|
|
423
317
|
openBrowser();
|
package/config.js
CHANGED
|
@@ -112,6 +112,7 @@ export const config = {
|
|
|
112
112
|
restartDelayMs: pickInt(env.IMA2_OAUTH_RESTART_DELAY_MS, fileCfg.oauth?.restartDelayMs, 5000),
|
|
113
113
|
// Provider-backed masked edit is off until upstream STEP-0 verification is recorded.
|
|
114
114
|
maskedEditEnabled: pickBool(env.IMA2_OAUTH_MASKED_EDIT_ENABLED, fileCfg.oauth?.maskedEditEnabled, false),
|
|
115
|
+
forceImageToolChoice: pickBool(env.IMA2_OAUTH_FORCE_IMAGE_TOOL_CHOICE, fileCfg.oauth?.forceImageToolChoice, true),
|
|
115
116
|
researchSuffix: pickStr(env.IMA2_RESEARCH_SUFFIX, fileCfg.oauth?.researchSuffix, "\n\nIf factual visual accuracy is required and the user's prompt or attached visual context is not already sufficient, use at least one concise web_search call for references before generating. If the user's prompt is already visually sufficient, do not search, rewrite, translate, summarize, or add clarifiers; pass the user's prompt through as the image_generation prompt argument."),
|
|
116
117
|
validModeration: new Set(Array.isArray(fileCfg.oauth?.validModeration) && fileCfg.oauth.validModeration.length
|
|
117
118
|
? fileCfg.oauth.validModeration
|
package/config.ts
CHANGED
|
@@ -195,6 +195,11 @@ export const config = {
|
|
|
195
195
|
fileCfg.oauth?.maskedEditEnabled,
|
|
196
196
|
false,
|
|
197
197
|
),
|
|
198
|
+
forceImageToolChoice: pickBool(
|
|
199
|
+
env.IMA2_OAUTH_FORCE_IMAGE_TOOL_CHOICE,
|
|
200
|
+
fileCfg.oauth?.forceImageToolChoice,
|
|
201
|
+
true,
|
|
202
|
+
),
|
|
198
203
|
researchSuffix: pickStr(
|
|
199
204
|
env.IMA2_RESEARCH_SUFFIX,
|
|
200
205
|
fileCfg.oauth?.researchSuffix,
|
package/docs/CLI.md
CHANGED
|
@@ -12,6 +12,7 @@ For a quick start, see the [main README](../README.md). For endpoint mapping, se
|
|
|
12
12
|
| `ima2 setup` / `ima2 login` | Reconfigure saved auth (interactive) |
|
|
13
13
|
| `ima2 status` | Show config and OAuth status |
|
|
14
14
|
| `ima2 doctor` | Diagnose Node, package, config, and auth |
|
|
15
|
+
| `ima2 doctor image-probe [--json]` | Run live sanitized Responses image probes for `EMPTY_RESPONSE` support |
|
|
15
16
|
| `ima2 open` | Open the web UI in a browser |
|
|
16
17
|
| `ima2 reset` | Remove saved config |
|
|
17
18
|
|
|
@@ -83,6 +84,41 @@ small text, and pixel-perfect typography can still need iteration or post-editin
|
|
|
83
84
|
|
|
84
85
|
Multimode-specific flags include `--max-images <1..8>`, `--ref <file>` (repeatable, max 5), `--mode <auto|direct>`, `--provider <auto|oauth|api>`, and `--show-partial`. `ima2 edit --mask` remains intentionally deferred to #31 because current mask plumbing is guided edit rather than guaranteed true masked/inpaint semantics.
|
|
85
86
|
|
|
87
|
+
## Diagnostics
|
|
88
|
+
|
|
89
|
+
`ima2 doctor image-probe` runs live Responses probes that help classify image
|
|
90
|
+
generation failures such as `EMPTY_RESPONSE`. It is intended for support
|
|
91
|
+
bundles, especially when OAuth is green but a simple prompt produces no image.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
ima2 doctor image-probe --json > ima2-image-probe.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use `--matrix` when a maintainer asks for current-payload comparison probes:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
ima2 doctor image-probe --matrix --json > ima2-image-probe.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The JSON output is sanitized for issue attachments. It includes diagnostic
|
|
104
|
+
codes, event counts, tool-call summaries, byte counts, provider/model labels,
|
|
105
|
+
and probe statuses. It does not include prompt text, auth tokens, URLs with
|
|
106
|
+
credentials, raw upstream responses, or base64 image data.
|
|
107
|
+
|
|
108
|
+
For OAuth no-image reports, a useful support bundle is:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
ima2 doctor
|
|
112
|
+
ima2 doctor image-probe --json > ima2-image-probe.json
|
|
113
|
+
ima2 gen "고양이" --no-web-search --json > ima2-cat-no-search.json
|
|
114
|
+
ima2 gen "고양이" --json > ima2-cat-current.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Do not share ChatGPT cookies, OAuth token files, API keys, prompt history, raw
|
|
118
|
+
upstream responses, or generated base64. Share `ima2-gen` version, OS version,
|
|
119
|
+
and whether VPN, corporate proxy, antivirus TLS inspection, a custom CA, or a
|
|
120
|
+
Windows DNS/fragmentation bypass tool such as SecretDNS is in use.
|
|
121
|
+
|
|
86
122
|
## History and metadata
|
|
87
123
|
|
|
88
124
|
| Command | Description |
|
package/docs/FAQ.ko.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ima2-gen 자주 묻는 질문
|
|
2
2
|
|
|
3
|
-
마지막 확인: 2026-
|
|
3
|
+
마지막 확인: 2026-05-26
|
|
4
4
|
|
|
5
5
|
이 문서는 설치, 업데이트, OAuth, 갤러리, 레퍼런스 이미지 관련 질문을 모아둔 FAQ입니다. README는 짧게 유지하고, 자세한 설명은 이곳에 둡니다.
|
|
6
6
|
|
|
@@ -16,6 +16,8 @@ English version: [FAQ.md](FAQ.md)
|
|
|
16
16
|
| 업데이트 후 예전 이미지가 안 보임 | `ima2 doctor`를 실행한 뒤 [예전 이미지 복구 안내](RECOVER_OLD_IMAGES.md)를 확인합니다. |
|
|
17
17
|
| `gpt-5.5`만 실패함 | Codex CLI를 업데이트하고, 안정 대안으로 `gpt-5.4`를 사용합니다. |
|
|
18
18
|
| 레퍼런스 업로드 실패 | JPEG/PNG로 변환하고 해상도를 낮춰 보세요. 레퍼런스는 최대 5장입니다. |
|
|
19
|
+
| Prompt Studio 기능이 헷갈림 | [Prompt Studio 사용 설명서](PROMPT_STUDIO.ko.md)에서 멀티모드, Direct, 추론 강도, 갤러리 동작을 확인하세요. |
|
|
20
|
+
| 이미지 생성이 `EMPTY_RESPONSE` 또는 no image data로 끝남 | `ima2 doctor image-probe --json`을 실행한 뒤 아래의 안전한 지원 번들을 모아 주세요. |
|
|
19
21
|
| Windows에서 `10531` 포트 관련 OAuth/proxy 오류가 남 | `ima2 doctor`를 실행하고, 필요하면 `IMA2_OAUTH_PROXY_PORT=11531 ima2 serve`로 시작하세요. |
|
|
20
22
|
| 프록시/VPN 환경에서 `fetch failed`가 반복됨 | 프록시 클라이언트의 TUN/TURN류 모드를 켜거나, 같은 터미널에 `HTTP_PROXY` / `HTTPS_PROXY`를 설정하세요. |
|
|
21
23
|
|
|
@@ -118,6 +120,36 @@ ima2 serve
|
|
|
118
120
|
|
|
119
121
|
커뮤니티에서 말하는 숫자를 보장으로 받아들이면 안 됩니다. OAuth 생성은 계정, 백엔드 capability, 트래픽, 정책 변경의 영향을 받을 수 있습니다. `ima2-gen` 문서에서는 고정된 Plus/Pro 생성 횟수를 약속하지 않습니다.
|
|
120
122
|
|
|
123
|
+
## Prompt Studio와 멀티모드
|
|
124
|
+
|
|
125
|
+
### Prompt Studio 상세 설명서가 있나요?
|
|
126
|
+
|
|
127
|
+
네. [Prompt Studio 사용 설명서](PROMPT_STUDIO.ko.md)를 확인하세요. 작성창,
|
|
128
|
+
멀티모드 슬롯, 1:1 Direct, 모델/추론 빠른 설정, 최근 생성, 갤러리 즐겨찾기,
|
|
129
|
+
어떤 액션이 프롬프트를 의도적으로 가져오는지 정리했습니다.
|
|
130
|
+
|
|
131
|
+
### 멀티모드 이미지가 서로 관계없게 나오는 이유는 뭔가요?
|
|
132
|
+
|
|
133
|
+
멀티모드는 같은 프롬프트로 여러 개의 독립 이미지 요청을 시작합니다. 각 슬롯은
|
|
134
|
+
후보 이미지이지, 한 캔버스 안의 패널이나 보장된 연속 장면이 아닙니다. 서로
|
|
135
|
+
관련 있는 대안을 원하면 공통 대상을 먼저 쓰고 바뀌어도 되는 요소를 따로
|
|
136
|
+
적어 주세요. 한 장 안의 2패널, 콜라주, contact sheet가 필요하면 일반 한 장
|
|
137
|
+
생성에서 그렇게 요청하는 편이 맞습니다.
|
|
138
|
+
|
|
139
|
+
### 갤러리 이미지를 선택하면 현재 프롬프트가 바뀌어야 하나요?
|
|
140
|
+
|
|
141
|
+
단순 이미지 선택은 보기 전용입니다. 선택 이미지를 보여줄 뿐 작성창을 바꾸지
|
|
142
|
+
않아야 합니다. 프롬프트 라이브러리 삽입, "이 이미지에서 이어가기", 명시적인
|
|
143
|
+
재사용 액션만 프롬프트를 의도적으로 바꾸는 동작입니다.
|
|
144
|
+
|
|
145
|
+
### Issue #75에서 무엇이 정리됐나요?
|
|
146
|
+
|
|
147
|
+
Prompt Studio의 navigation/state coupling 회귀를 정리했습니다. 키보드 이동은
|
|
148
|
+
보이는 최근 생성 범위를 따르고, 갤러리 진입 버튼은 계속 접근 가능하며, 긴
|
|
149
|
+
프롬프트가 이미지 뷰어를 과하게 줄이지 않고, Direct와 멀티모드 상태가 동시에
|
|
150
|
+
보이며, 갤러리 즐겨찾기와 탭 전환은 보던 위치를 유지하고, 단순 이미지 선택은
|
|
151
|
+
작성창을 자동으로 채우지 않습니다.
|
|
152
|
+
|
|
121
153
|
## 갤러리와 생성 파일
|
|
122
154
|
|
|
123
155
|
### 생성 이미지는 어디에 저장되나요?
|
|
@@ -214,6 +246,7 @@ VITE_IMA2_API_TARGET=http://localhost:3334 npm run ui:dev
|
|
|
214
246
|
- 로컬 OAuth 프록시가 아직 준비되지 않았습니다.
|
|
215
247
|
- 서버가 재시작되었습니다.
|
|
216
248
|
- VPN, 프록시, 방화벽이 요청을 막았습니다.
|
|
249
|
+
- Windows에서 자동 실행되는 DNS/파편화 우회 프로그램(예: SecretDNS)이 OAuth 또는 스트리밍 이미지 응답을 깨뜨렸습니다.
|
|
217
250
|
- Codex/ChatGPT OAuth 사용 중 네트워크가 끊겼습니다.
|
|
218
251
|
|
|
219
252
|
먼저 확인하세요.
|
|
@@ -225,6 +258,53 @@ ima2 ping
|
|
|
225
258
|
|
|
226
259
|
필요하면 `ima2 serve`를 다시 시작합니다.
|
|
227
260
|
|
|
261
|
+
### OAuth 이미지 생성이 이미지 없이 끝나면 무엇을 공유해야 하나요?
|
|
262
|
+
|
|
263
|
+
먼저 moderation으로 단정하지 말고 image probe를 실행하세요. `EMPTY_RESPONSE`는
|
|
264
|
+
Responses 경로에서 `ima2-gen`이 사용할 수 있는 이미지 데이터가 나오지 않았다는
|
|
265
|
+
뜻입니다. 원인은 OAuth capability, stream parsing, web-search/tool-choice
|
|
266
|
+
상호작용, 로컬 프록시/네트워크 transport, 지원되지 않는 옵션, 실제 refusal 등으로
|
|
267
|
+
나뉠 수 있습니다.
|
|
268
|
+
|
|
269
|
+
먼저 실행하세요.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
ima2 doctor
|
|
273
|
+
ima2 doctor image-probe --json > ima2-image-probe.json
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
`ima2 serve`가 실행 중이면 검색을 끈 생성과 일반 생성 결과도 하나씩 저장하세요.
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
ima2 gen "고양이" --no-web-search --json > ima2-cat-no-search.json
|
|
280
|
+
ima2 gen "고양이" --json > ima2-cat-current.json
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
probe JSON은 공개 이슈에 첨부할 수 있도록 설계되어 있습니다. 진단 코드,
|
|
284
|
+
event count, tool-call 요약, byte count는 담지만 prompt text, auth token,
|
|
285
|
+
credential URL, base64 image data는 담지 않습니다.
|
|
286
|
+
|
|
287
|
+
이슈를 열 때 포함해 주세요.
|
|
288
|
+
|
|
289
|
+
- `ima2 doctor` 출력
|
|
290
|
+
- `ima2-image-probe.json`
|
|
291
|
+
- 저장했다면 `ima2-cat-no-search.json`, `ima2-cat-current.json`
|
|
292
|
+
- `ima2-gen` 버전과 Windows 버전
|
|
293
|
+
- VPN, 회사 프록시, 백신 TLS 검사, custom CA 사용 여부
|
|
294
|
+
- Windows에서 SecretDNS 같은 DNS/파편화 우회 프로그램이 자동 실행 중인지 여부
|
|
295
|
+
- API 키가 이미 설정되어 있다면 같은 PC에서 `provider: "api"`가 동작하는지
|
|
296
|
+
|
|
297
|
+
ChatGPT 쿠키, OAuth token 파일, API key, raw upstream response, prompt history,
|
|
298
|
+
generated base64는 공유하지 마세요.
|
|
299
|
+
|
|
300
|
+
결과는 이렇게 분류합니다.
|
|
301
|
+
|
|
302
|
+
- text probe도 실패: OAuth 재로그인, 프록시, 모델 접근성을 먼저 봅니다.
|
|
303
|
+
- text는 되지만 minimal non-stream image가 실패: 계정, OAuth backend, model, image-tool capability 가능성이 큽니다.
|
|
304
|
+
- non-stream image는 되지만 stream image가 실패: stream parsing 또는 transport 가능성이 큽니다.
|
|
305
|
+
- 검색 끈 생성은 되지만 일반 생성이 실패: web-search/tool-choice 상호작용 가능성이 큽니다.
|
|
306
|
+
- bytes는 읽었지만 event가 없음: SSE delimiter 또는 `data:` parsing 가능성이 큽니다.
|
|
307
|
+
|
|
228
308
|
### 프록시나 VPN 뒤에서 `fetch failed`가 계속 나면 어떻게 하나요?
|
|
229
309
|
|
|
230
310
|
대부분 로컬 OAuth 프록시가 현재 네트워크 경로로 upstream 서비스에 닿지 못하는 상황입니다. `openai-oauth`는 보통 `10531` 포트의 localhost 프록시로 실행됩니다.
|
|
@@ -235,7 +315,7 @@ ima2 ping
|
|
|
235
315
|
npx openai-oauth --port 10531
|
|
236
316
|
```
|
|
237
317
|
|
|
238
|
-
프록시가 필요한 네트워크라면 터미널 프로세스도 프록시를 타도록 프록시 클라이언트의 TUN/TURN류 모드를 켜세요. 그래도 안 되면 `openai-oauth` 또는 `ima2 serve`를 실행하는 같은 터미널에 프록시 환경 변수를 설정합니다.
|
|
318
|
+
프록시가 필요한 네트워크라면 터미널 프로세스도 프록시를 타도록 프록시 클라이언트의 TUN/TURN류 모드를 켜세요. Windows에서는 SecretDNS처럼 부팅 때 자동 실행되는 DNS/파편화 우회 프로그램도 잠시 끄고 재시도해 보세요. 그래도 안 되면 `openai-oauth` 또는 `ima2 serve`를 실행하는 같은 터미널에 프록시 환경 변수를 설정합니다.
|
|
239
319
|
|
|
240
320
|
```bash
|
|
241
321
|
export HTTP_PROXY=http://127.0.0.1:7890
|
package/docs/FAQ.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ima2-gen FAQ
|
|
2
2
|
|
|
3
|
-
Last reviewed: 2026-
|
|
3
|
+
Last reviewed: 2026-05-26
|
|
4
4
|
|
|
5
5
|
This FAQ collects the questions that tend to come up after installing or updating `ima2-gen`. The README stays short; this page is the place for practical details and recovery steps.
|
|
6
6
|
|
|
@@ -16,6 +16,8 @@ For Korean, see [FAQ.ko.md](FAQ.ko.md).
|
|
|
16
16
|
| Old gallery images look missing | Run `ima2 doctor`, then see [Recover Old Generated Images](RECOVER_OLD_IMAGES.md). |
|
|
17
17
|
| `gpt-5.5` fails | Update Codex CLI first, then try `gpt-5.4` as the stable fallback. |
|
|
18
18
|
| Reference upload fails | Use JPEG/PNG, lower the resolution, and keep references to 5 images or fewer. |
|
|
19
|
+
| Prompt Studio controls are unclear | Read the [Prompt Studio manual](PROMPT_STUDIO.md) for multimode, Direct, reasoning, and gallery behavior. |
|
|
20
|
+
| Image generation returns `EMPTY_RESPONSE` or no image data | Run `ima2 doctor image-probe --json`, then collect the safe support bundle below. |
|
|
19
21
|
| Windows reports OAuth/proxy failures around port `10531` | Run `ima2 doctor`; if needed start with `IMA2_OAUTH_PROXY_PORT=11531 ima2 serve`. |
|
|
20
22
|
| `fetch failed` repeats on a proxy/VPN network | Enable proxy TUN/TURN-style mode, or set `HTTP_PROXY` / `HTTPS_PROXY` in the same terminal. |
|
|
21
23
|
|
|
@@ -124,6 +126,37 @@ Start with `gpt-5.4` for the safest balanced workflow.
|
|
|
124
126
|
|
|
125
127
|
Do not treat any community number as a guarantee. OAuth generation can be limited by account, backend capability, traffic, and policy changes. `ima2-gen` does not publish a fixed Plus/Pro image count because that number is not stable enough to document as a promise.
|
|
126
128
|
|
|
129
|
+
## Prompt Studio and multimode
|
|
130
|
+
|
|
131
|
+
### Is there a detailed Prompt Studio manual?
|
|
132
|
+
|
|
133
|
+
Yes. See the [Prompt Studio manual](PROMPT_STUDIO.md). It explains the composer,
|
|
134
|
+
multimode slots, 1:1 Direct, model/reasoning quick settings, recent history,
|
|
135
|
+
gallery favorites, and which actions intentionally import prompt text.
|
|
136
|
+
|
|
137
|
+
### Why did multimode images look unrelated?
|
|
138
|
+
|
|
139
|
+
Multimode starts several separate image requests from the same prompt. The slots
|
|
140
|
+
are candidate outputs, not panels inside one shared canvas and not a guaranteed
|
|
141
|
+
story sequence. To get related alternatives, write the common subject first and
|
|
142
|
+
then name the allowed variations. To get one multi-panel image, use a normal
|
|
143
|
+
single-image request and ask for a two-panel, collage, or contact-sheet layout.
|
|
144
|
+
|
|
145
|
+
### Should selecting a gallery image change my current prompt?
|
|
146
|
+
|
|
147
|
+
Passive image selection is view-only. It should focus the selected image without
|
|
148
|
+
rewriting the composer. Prompt Library insert, "continue from this image", and
|
|
149
|
+
other explicit reuse actions are the actions that intentionally change prompt
|
|
150
|
+
text.
|
|
151
|
+
|
|
152
|
+
### What changed for issue #75?
|
|
153
|
+
|
|
154
|
+
The Prompt Studio closeout fixed navigation and state-coupling regressions:
|
|
155
|
+
keyboard movement now follows the visible recent history domain, the gallery
|
|
156
|
+
entry remains reachable, long prompts no longer starve the image viewer,
|
|
157
|
+
Direct and Multimode states are visible together, gallery favorites preserve the
|
|
158
|
+
browsing viewport, and passive image selection does not refill the composer.
|
|
159
|
+
|
|
127
160
|
## Gallery and generated files
|
|
128
161
|
|
|
129
162
|
### Where are generated images stored?
|
|
@@ -222,6 +255,8 @@ Usually one of these:
|
|
|
222
255
|
- the local OAuth proxy is not ready,
|
|
223
256
|
- the server was restarted,
|
|
224
257
|
- a VPN/proxy/firewall blocked the request,
|
|
258
|
+
- an auto-start Windows network interception tool, including a DNS/fragmentation
|
|
259
|
+
bypass tool such as SecretDNS, broke OAuth or streaming image transport,
|
|
225
260
|
- the network dropped while Codex/ChatGPT OAuth was being used.
|
|
226
261
|
|
|
227
262
|
Try:
|
|
@@ -233,6 +268,54 @@ ima2 ping
|
|
|
233
268
|
|
|
234
269
|
Then restart `ima2 serve` if needed.
|
|
235
270
|
|
|
271
|
+
### What should I share when OAuth image generation returns no image?
|
|
272
|
+
|
|
273
|
+
Use the image probe before assuming moderation. `EMPTY_RESPONSE` means the
|
|
274
|
+
Responses path did not produce image data that `ima2-gen` could use; it can be
|
|
275
|
+
caused by OAuth capability, stream parsing, web-search/tool-choice behavior,
|
|
276
|
+
local proxy/network transport, unsupported options, or a real refusal.
|
|
277
|
+
|
|
278
|
+
Run this first:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
ima2 doctor
|
|
282
|
+
ima2 doctor image-probe --json > ima2-image-probe.json
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
If `ima2 serve` is running, also capture one search-off and one normal cat
|
|
286
|
+
generation result:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
ima2 gen "고양이" --no-web-search --json > ima2-cat-no-search.json
|
|
290
|
+
ima2 gen "고양이" --json > ima2-cat-current.json
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
The probe JSON is designed to be safe to attach to a public issue. It reports
|
|
294
|
+
diagnostic codes, event counts, tool-call summaries, and byte counts, but not
|
|
295
|
+
prompt text, auth tokens, credential URLs, or base64 image data.
|
|
296
|
+
|
|
297
|
+
When opening an issue, include:
|
|
298
|
+
|
|
299
|
+
- `ima2 doctor` output.
|
|
300
|
+
- `ima2-image-probe.json`.
|
|
301
|
+
- `ima2-cat-no-search.json` and `ima2-cat-current.json`, if you captured them.
|
|
302
|
+
- `ima2-gen` version and Windows version.
|
|
303
|
+
- Whether you use VPN, corporate proxy, antivirus TLS inspection, or a custom CA.
|
|
304
|
+
- Whether a Windows DNS/fragmentation bypass tool such as SecretDNS is running
|
|
305
|
+
automatically.
|
|
306
|
+
- Whether `provider: "api"` works on the same machine, if you already have an API key configured.
|
|
307
|
+
|
|
308
|
+
Do not share ChatGPT cookies, OAuth token files, API keys, raw upstream
|
|
309
|
+
responses, prompt history, or generated base64.
|
|
310
|
+
|
|
311
|
+
How to read the result:
|
|
312
|
+
|
|
313
|
+
- Text probe fails: refresh OAuth and inspect proxy/model availability first.
|
|
314
|
+
- Text works but minimal non-stream image fails: likely account, OAuth backend, model, or image-tool capability.
|
|
315
|
+
- Non-stream image works but stream image fails: likely stream parsing or transport.
|
|
316
|
+
- Search-off generation works but normal generation fails: likely web-search/tool-choice interaction.
|
|
317
|
+
- Bytes were read but no events were parsed: likely SSE delimiter or `data:` parsing.
|
|
318
|
+
|
|
236
319
|
### What if `fetch failed` keeps happening behind a proxy or VPN?
|
|
237
320
|
|
|
238
321
|
This usually means the local OAuth proxy cannot reach the upstream service through your network path. `openai-oauth` runs as a local localhost proxy, commonly on port `10531`.
|
|
@@ -243,7 +326,7 @@ Try:
|
|
|
243
326
|
npx openai-oauth --port 10531
|
|
244
327
|
```
|
|
245
328
|
|
|
246
|
-
If your network requires a proxy, enable your proxy client's TUN/TURN-style mode so terminal processes can use it. If that is not enough, set the proxy variables in the same terminal that runs `openai-oauth` or `ima2 serve`:
|
|
329
|
+
If your network requires a proxy, enable your proxy client's TUN/TURN-style mode so terminal processes can use it. On Windows, also temporarily disable auto-start DNS or fragmentation bypass tools such as SecretDNS and retry. If that is not enough, set the proxy variables in the same terminal that runs `openai-oauth` or `ima2 serve`:
|
|
247
330
|
|
|
248
331
|
```bash
|
|
249
332
|
export HTTP_PROXY=http://127.0.0.1:7890
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Prompt Studio 사용 설명서
|
|
2
|
+
|
|
3
|
+
Prompt Studio는 이미지를 반복해서 뽑고 비교하는 Classic 작업공간 프로필입니다.
|
|
4
|
+
가운데에는 이미지 뷰어, 옆에는 최근 생성, 아래에는 프롬프트 작성창과 생성
|
|
5
|
+
컨트롤을 둡니다.
|
|
6
|
+
|
|
7
|
+
어떤 기능인지 헷갈리거나, 작업공간 문제를 재현해서 제보해야 할 때 이 문서를
|
|
8
|
+
먼저 확인하세요.
|
|
9
|
+
|
|
10
|
+
## 기능 지도
|
|
11
|
+
|
|
12
|
+
| 영역 | 하는 일 | 참고 |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| 프롬프트 작성창 | 다음 생성 요청에 보낼 프롬프트를 보관합니다. | 기존 이미지를 선택하는 동작은 보기 전용입니다. 작성창을 덮어쓰면 안 됩니다. |
|
|
15
|
+
| 멀티모드 | 현재 프롬프트로 여러 개의 이미지 요청을 시작합니다. | 각 슬롯은 후보 이미지입니다. 콜라주 칸이나 보장된 연속 장면이 아닙니다. |
|
|
16
|
+
| 1:1 Direct | 앱이 프롬프트를 덜 바꾸고 원문에 가깝게 전달합니다. | 정확한 문구 비교, 엄격한 템플릿, provider 쪽 prompt syntax 실험에 씁니다. |
|
|
17
|
+
| 모델 빠른 메뉴 | 사이드바 상단에서 모델과 추론 강도를 바로 바꿉니다. | 자세한 설명과 전체 설정은 Settings 작업공간에 남아 있습니다. |
|
|
18
|
+
| 최근 생성 | Prompt Studio에서 보이는 최근 생성 범위를 보여줍니다. | 화살표 이동은 화면에 보이는 최근 생성 범위와 맞아야 합니다. |
|
|
19
|
+
| 갤러리 | 로컬 저장 이미지, 전체/즐겨찾기 탭, 폴더를 봅니다. | 즐겨찾기 추가/제거는 보고 있던 갤러리 위치를 유지해야 합니다. |
|
|
20
|
+
| 프롬프트 라이브러리 | 저장된 프롬프트를 의도적으로 작성창에 넣습니다. | 라이브러리 삽입/이어가기 같은 명시적 액션만 프롬프트를 가져옵니다. |
|
|
21
|
+
|
|
22
|
+
## 멀티모드 프롬프트 작성법
|
|
23
|
+
|
|
24
|
+
멀티모드는 하나의 요청 형태를 여러 후보 슬롯에 반복해서 보냅니다. 여러 대안을
|
|
25
|
+
뽑는 기능이지, 한 장 안에 여러 칸을 만드는 기능은 아닙니다.
|
|
26
|
+
|
|
27
|
+
서로 관련 있는 후보를 원하면 공통 대상을 먼저 적고, 바뀌어도 되는 요소를 뒤에
|
|
28
|
+
적으세요.
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
모든 이미지에서 같은 캐릭터 디자인: 은발의 배달원, 빨간 우비, 작은 검은 가방.
|
|
32
|
+
4개의 대안을 만들되 카메라 각도, 조명, 배경 골목만 바꿔 주세요.
|
|
33
|
+
얼굴, 옷, 나이, 색감은 유지해 주세요.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
서로 관계없는 후보를 원하면 그 점을 직접 적으세요.
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
로컬 이미지 생성 앱을 위한 서로 관계없는 스티커 아이디어 4개.
|
|
40
|
+
각 이미지는 마스코트, 색상, 구도가 모두 달라야 합니다.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
2컷 만화, 전후 비교, 콜라주, 접촉 시트처럼 한 장 안의 구성이 필요하면
|
|
44
|
+
멀티모드가 아니라 일반 한 장 생성에서 그렇게 요청하세요.
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
한 장의 2패널 비교 이미지를 만들어 주세요. 왼쪽은 거친 스케치 UI,
|
|
48
|
+
오른쪽은 다듬어진 Prompt Studio UI. 각 패널 안에 작은 라벨을 넣어 주세요.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 1:1 Direct
|
|
52
|
+
|
|
53
|
+
**1:1 Direct**는 프롬프트의 정확한 문구가 중요할 때 켭니다.
|
|
54
|
+
|
|
55
|
+
- 문구 차이를 비교할 때
|
|
56
|
+
- 구조화된 프롬프트 템플릿을 유지할 때
|
|
57
|
+
- provider 쪽 지시문 스타일을 실험할 때
|
|
58
|
+
- 문제 재현 중 앱의 문구 보정을 줄이고 싶을 때
|
|
59
|
+
|
|
60
|
+
Direct와 멀티모드를 동시에 켤 수 있습니다. 이때 각 멀티모드 슬롯은 같은 Direct
|
|
61
|
+
프롬프트 요청 형태를 받습니다.
|
|
62
|
+
|
|
63
|
+
## 추론 강도
|
|
64
|
+
|
|
65
|
+
추론 강도는 선택한 모델이 생성 전후로 얼마나 많은 계획을 쓰는지에 가까운
|
|
66
|
+
설정입니다. 평소에는 기본값으로 시작하고, 제약이 많거나 레퍼런스/구도 조건이
|
|
67
|
+
복잡할 때 올리세요.
|
|
68
|
+
|
|
69
|
+
사이드바의 모델 표시를 누르면 모델과 추론 강도를 빠르게 바꿀 수 있습니다.
|
|
70
|
+
자세한 설명과 전체 모델 설정은 Settings 작업공간에 남아 있습니다.
|
|
71
|
+
|
|
72
|
+
## 갤러리와 프롬프트 안전
|
|
73
|
+
|
|
74
|
+
Prompt Studio는 보기와 작성을 분리합니다.
|
|
75
|
+
|
|
76
|
+
- 단순 이미지 선택은 보기 전용입니다.
|
|
77
|
+
- 히스토리나 갤러리 이미지를 클릭하면 이미지를 보는 데만 초점이 갑니다.
|
|
78
|
+
- 즐겨찾기 추가/제거는 저장 이미지의 metadata만 바꾸며, 보던 갤러리 위치를
|
|
79
|
+
튀게 만들면 안 됩니다.
|
|
80
|
+
- 전체/즐겨찾기 탭 전환은 탐색 필터입니다. 프롬프트를 가져오는 동작이 아닙니다.
|
|
81
|
+
- 프롬프트 라이브러리 삽입, "이 이미지에서 이어가기", 명시적인 재사용 액션은
|
|
82
|
+
작성창을 바꾸는 의도적 액션입니다.
|
|
83
|
+
|
|
84
|
+
명시적 프롬프트 가져오기 액션을 썼다면 생성 전에 작성창을 한 번 확인하세요.
|
|
85
|
+
단순 이미지 선택은 작성 중인 초안을 건드리지 않아야 합니다.
|
|
86
|
+
|
|
87
|
+
## Issue #75 정리
|
|
88
|
+
|
|
89
|
+
v1.1.13 Prompt Studio 문제를 고치면서 아래 동작을 계약으로 고정했습니다.
|
|
90
|
+
|
|
91
|
+
- 동시에 끝나는 멀티모드 결과는 각 슬롯/request identity를 유지합니다.
|
|
92
|
+
- 키보드 이동은 화면에 보이는 최근 생성 범위를 따릅니다.
|
|
93
|
+
- 갤러리 버튼은 최근 생성 옆에서 계속 접근 가능해야 합니다.
|
|
94
|
+
- 긴 프롬프트가 기본 이미지 뷰어 영역을 과하게 빼앗지 않습니다.
|
|
95
|
+
- Direct와 멀티모드 상태를 동시에 볼 수 있어야 합니다.
|
|
96
|
+
- 갤러리 즐겨찾기 토글과 탭 전환은 보고 있던 위치를 유지합니다.
|
|
97
|
+
- 기존 이미지를 보기 위해 선택하는 것만으로 작성창이 자동 변경되지 않습니다.
|
|
98
|
+
|
|
99
|
+
## Prompt Studio 문제 제보 방법
|
|
100
|
+
|
|
101
|
+
이슈를 열 때는 아래를 포함해 주세요.
|
|
102
|
+
|
|
103
|
+
- `ima2-gen` 버전과 운영체제
|
|
104
|
+
- 레이아웃 문제라면 브라우저와 화면 크기
|
|
105
|
+
- 작업공간 프로필, 모드 토글, 모델, 추론 강도, 이미지 개수
|
|
106
|
+
- 새 `ima2 serve` 세션에서 재현하는 순서
|
|
107
|
+
- 전체/즐겨찾기/최근 생성 중 어느 화면에서 생겼는지
|
|
108
|
+
- 개인 프롬프트가 드러나지 않는 안전한 스크린샷 또는 화면 녹화
|
|
109
|
+
|
|
110
|
+
ChatGPT 쿠키, OAuth token 파일, API key, raw upstream response, private prompt
|
|
111
|
+
history, generated base64 data는 공유하지 마세요.
|