Scribble at 2026-11-22 19:11:56 Last modified: 2026-11-22 19:29:43
Qwen-Image 2.1 で生成するプロンプトのジェネレータを作って運用している。幾つかの構成要素をファイルとして初期条件にするのと同時に、Qwen の公式ページで配布されているシステム・プロンプトへ景観あるいはスナップショットのプロンプトを生成するように指示している。これを llama.cpp から起動した "Qwen-Image-2.1-PE-T2I-Q8_0" が走っているサーバに投げて、レスポンスを一つずつ JSON からプロンプト文字列だけ抜き出して、出力用のファイルへ追加していく。おおよそ、10個のプロンプトをまとめたテキスト・ファイルを出力するのに3分ていどかかる。
プロンプト・エンハンサーに投げるシード文字列は "A photorealistic landscape or candid snapshot photograph in Bern, featuring Bushes, Frontal key lighting, continuous streaming data, with subtle details of Brushed aluminum." となっていて、エンハンサーから戻ってくるプロンプトが "A photorealistic landscape photograph shows a historic European cityscape in Bern viewed from an elevated roadside or pedestrian overlook under an overcast sky. Across the upper portion of the image, the sky is pale gray and blue-gray with layered storm clouds, creating a cool, muted atmosphere. Over this sky area, especially from the upper center toward the upper right, translucent digital waveforms appear as thin glowing white and pale cyan lines. These lines curve horizontally in smooth, flowing ribbons and contain tiny dotted particle trails, short dash-like marks, and faint vertical data-like streaks; they look like augmented-reality streaming data or a technological visualization layered over the real scene. The marks are luminous but semi-transparent, allowing the clouds behind them to remain visible. In the middle distance, the old town rises on a green hill with dense historic buildings, dark roofs, and recognizable church architecture. Slightly right of center stands a large cathedral with a dark slate-gray domed roof, a ribbed vertical structure, arched window openings, and a pale stone façade. To the left of the cathedral, a tall historic tower with a pointed roof rises among the buildings, and another smaller church spire appears farther left. The buildings are tightly packed, with beige, tan, cream, and muted stone-colored walls, dark gray and brown roofs, chimneys, dormer windows, and narrow urban streets. Behind the city, forested hills stretch across the horizon in deep green tones, softened by distance and cloudy light. On the far left foreground, a tall black streetlamp pole leans diagonally upward from the lower-left area toward the upper-left corner. It has a matte dark metal surface, visible joints, and an ornate lantern head with a glass housing and decorative cap. The lamp and pole are close to the camera and partially frame the city view. The lower half of the image is dominated by dense bushes and trees in autumnal colors: dark green, olive, yellow-green, and brown leaves. The foliage is wet or glossy, with individual leaves catching soft highlights from frontal lighting. At the lower left, a wet street or walkway runs diagonally into the scene, its dark surface reflecting light and suggesting recent rain. At the lower right foreground, an ornate black metal railing or gate structure with curved scrollwork and vertical bars borders the view. The railing includes shiny brushed aluminum hardware, including a rectangular plate, hinge-like components, screws, and cylindrical fittings. These metallic parts have a smooth reflective texture with warm highlights, contrasting with the dark painted metal frame. The composition combines a candid city-view photograph with subtle futuristic data overlays, using naturalistic perspective, soft frontal illumination, damp autumn textures, and muted cinematic color grading." という長いものになっている。Qwen-Image 2.1 のように、長い自然文によって情景を描写する(できる)モデルともなると、こういう英文をいちいち自分で書いてはいられないから、最低限のシードを与えて、あとはエンハンサーにプロンプトを作ってもらうというわけだ。それでも、シードすら初期条件のキーワードを組み合わせて自然文にするのも AI に任せているのだから、もう殆ど人間が手をつけるところはなく、勝手に情景を考えて描写していることになる。せいぜい、僕らは出来上がった画像を見てプロンプトを少しずつ調整するのが現状の実務となっている。