メむンコンテンツぞスキップ
芋出し画像

GrokのFLUX.1ず有料サヌビスのFLUX.1 Proに぀いお

    ※ Last update 10-4-2024
    ※ 本蚘事にある仕様は以前のもので、珟状ずは異なる箇所がありたす。
    ※ (12-10-2024) Grok 2の珟状぀いおは、新しい蚘事「Grok 2ず画像生成AIのAuroraに぀いお」を参照しおください。
    ※ (10-4-2024) 有料サヌビスにFLUX.1.1 [pro]が登堎したした1枚あたり$0.04に倀䞋げ。アニメ系の描画スタむルが倧幅に倉曎されおいたす。あず、「1 (new)」ず「1.1」を間違えないようにご泚意ください😂
    ※ (8-31-2024) 珟圚は「Grok 2」「Grok 2 mini」「画像の生成成功時をカりント」いずれも2時間あたり50回たでのようですプレミアム。
    ※ 2-6. Tips(?) を远加したした。
    ※ アニメ調の画像ばかりを生成しおいたすが、リアル系ももちろん生成できたすむしろそちらの方が埗意。



    ■ 0. 抂芁

    â–Œ 0-0. 本蚘事に぀いお

     本蚘事では、䞋蚘の内容を掲茉しおいたす。

    • 8-14-2024に登堎したX䞊のGrok 2.0で、FLUX.1の画像生成を詊しおみた䟋。

    • 有料サヌビスでFLUX.1 Proを利甚しおみた䟋。



    ■ 1. XのGrok 2.0にFLUX.1が搭茉


    â–Œ 1-1. 初出の情報

     調べた限りでは8-14-2024の未明日本時間に、Grok 2.0ずFLUX.1の実装に関する最も叀いポストがありたした5.ず6.の箇所。日本では、この日の午埌あたりから話題になり始めたす。

    Changes have been detected in the texts of the X web app!

    Added Strings: pic.twitter.com/69jdkzJ2Sk

    — X ALERTS (@X_ALERTS_) August 13, 2024

    BREAKING: Here's an early look at Grok 2.0 features and abilities!

    It's better at coding, writing, and generating news! It'll also generate images using the FLUX.1 model! pic.twitter.com/UlDW2Spen8

    — Nima Owji (@nima_owji) August 13, 2024

     䞋蚘URLは公匏なリリヌスで、Grok 2䞊でFLUX.1のモデルを実隓しおいる旚が蚘茉されおいたす。


    â–Œ 1-2. Grok䞊のFLUX.1に関する仕様

     8-14-2024の午埌日本時間の時点で刀明しおいる䞻な仕様です。

    • Grok画像の生成を含むは、プレミアムたたはXプレミアムプラスのプランで利甚可胜。

    • モデルは䞍明だが、FLUX.1 Proの可胜性がある意倖ず高性胜雰囲気的にはDev以䞊Pro未満。

    • プロンプトは半角英字1バむト文字で500文字たでずみられる超えた分は切り捚お。

    • プレミアムでは2時間あたり50回たで生成できる暡様※ 8-31珟圚、圓初は20回たで。Xプレミアムプラスではさらに倚い可胜性がある。

    • 画像の解像床は1024x768で、JPG圢匏。

    • 電子透かしの類は無し



    ■ 2. Grok䞊での画像の生成方法


    â–Œ 2-1. 生成の方法日本語

     䞋蚘のようにカギ括匧付きで指瀺をするのが簡単です。基本的に、指瀺した内容を盎蚳したプロンプトで生成されたす。プロンプトを勝手に調敎するChatGPTのDALL·E 3ずは察照的です。

    「アニメ調の氎圩画で䞀茪の花を持぀女の子」を生成

     たたに生成しない堎合があるので、もう少し明確にするず確実です。

    「アニメ調の氎圩画で䞀茪の花を持぀女の子」の画像を生成
    画像
    日本語で生成を行った


    â–Œ 2-2. 生成の方法英語1

     英語の堎合は、プロンプトを盎接䞎える圢になりたす。

    generate an image of "This is a face close-up shot, pastel colored, Japanese anime style artwork. There is a mother and her pre-teen daughter holding hands, make smiile , closed mouth and looking at each other with joy in a bustling daytime fantasy theme park. The daughter wearing a detailed pink magical princess costume. The mother wearing white blouse and navy long apron dress. There is the park under the bright summer sun, with colorful attractions, exciting rides, and lively food stalls. The mother's eyes sparkle with love and pride as she shares this special moment with her daughter. The background is filled with the hustle and bustle of the crowd, creating a sense of excitement and wonder. Include details like balloons floating in the clear blue sky, children running around with ice cream cones, and park mascots greeting visitors."

     䞋蚘の圢匏でも倧䞈倫そうです。

    generate image: This is a face close-up shot, pastel colored, Japanese anime style artwork. There is a mother and her pre-teen daughter holding hands, make smiile , closed mouth and looking at each other with joy in a bustling daytime fantasy theme park. The daughter wearing a detailed pink magical princess costume. The mother wearing white blouse and navy long apron dress. There is the park under the bright summer sun, with colorful attractions, exciting rides, and lively food stalls. The mother's eyes sparkle with love and pride as she shares this special moment with her daughter. The background is filled with the hustle and bustle of the crowd, creating a sense of excitement and wonder. Include details like balloons floating in the clear blue sky, children running around with ice cream cones, and park mascots greeting visitors.

     䞊蚘の指瀺で生成できたしたが、生成埌に衚瀺されたプロンプトが途䞭で切れおいたす。切れた郚分に曞かれおいた颚船やマスコットも登堎しおいたせん。どうやら、生成に䜿甚されるプロンプトは500文字たでのようです。

    画像
    プロンプトの500文字を超えた郚分が切り捚おられおいる


    â–Œ 2-3. 生成の方法英語2

     FLUX.1のプロンプトは自然蚀語英文で衚珟したすが、カンマ区切りの衚珟も受け入れられたす。芁玠の詰め蟌みはこちらの方が有利かもしれたせん。

    generate an image of below:
    anime style, cowboy shot, child 1girl, smile, open mouth, white sailor uniform, light blue hair, long wavy hair, navy blue pleat skirt, shiny purple eyes, red tie, sitting on bed, pigeon-toed, white socks, kawaii bedroom, cluttered books, starry through window, night, toy mech cat

     䞋蚘の圢匏でも倧䞈倫そうです。途䞭に改行があっおも構いたせん。

    generate image:
    anime style, cowboy shot, child 1girl, smile, open mouth, white sailor uniform, light blue hair, long wavy hair, navy blue pleat skirt, shiny purple eyes, red tie, sitting on bed, pigeon-toed, white socks, kawaii bedroom, cluttered books, starry through window, night, toy mech cat
    画像
    カンマ区切りのプロンプトを䜿甚した


    â–Œ 2-4. 生成の方法日本語2

     生成が確実にできる方法では無いので、なるべく次項を参照しおください。文章を先に䜜らせる方法の利点は、指瀺した内容よりも倚くの情報を甚いお生成ができるこずです。

    女の子ずお母さんがプヌルで遊ぶシヌンの描写をanimeで始たる3センテンスの英文でお願いしたす
    
    いたの英文で生成しおください
    画像
    「女の子ずお母さんがプヌルで遊ぶシヌン」ず「anime」の提瀺のみで生成できた


    â–Œ 2-4b. 生成の方法日本語→英語

     2-4.の方法を応甚しようずしたしたが、少し倉曎するだけでプロンプトの匕き枡しが正確に行えなくなりたした。面倒でも、プロンプトを曞かせおから、コピヌペヌストで添えお指瀺する方が確実です。

    "FLUX.1 on Grok"ず曞かれたボヌドを持ったセヌラヌ服の女の子が登堎するシヌンをanimeで始たる3センテンスの英文でお願いしたす
    
    generate image:
    Anime: A girl in a sailor uniform steps into the frame, her eyes wide with determination. She holds up a board that reads "FLUX.1 on Grok", her expression a mix of pride and mischief. The scene bursts into a kaleidoscope of colors as she declares, "Let's get this party started!"
    画像
    文を考案させおからプロンプトずしお枡しお生成を指瀺した


    â–Œ 2-5. 生成の方法おたけ

     最埌に既知のアむデアを玹介したす。FLUX.1はプロンプトぞの远埓性の高さだけではなく、文字の出力も埗意です。様々な堎所に文字を入れるこずができるので、遊んでみおください。

    generate an image of below:
    4-panel manga, watercolor on textured paper.
    Panel 1: Girl with ponytail enters dessert buffet, eyes wide. "Wow! Dessert heaven!"
    Panel 2: Close-up of excited girl piling sweets. "I want to try everything!"
    Panel 3: Girl at table, plate full. Bites shortcake. "Nom!"
    Panel 4: Girl leans back, patting full belly. Empty plates around. "Maybe I overdid it..." Sweat drop visible.
    画像
    4コマ挫画に発蚀を入れおみた


    ▌ 2-6. Tips(?)

     生成しおいお気づいた点を挙げおおきたす。ご参考たで。

    • 察話の繰り返しでも生成できるが、プロンプトはシンプルで短めになる。それで良ければ、ChatGPTやCopilotず同じように話しかければ良い。

    • 指瀺ず応答のプロンプトが完党䞀臎しない堎合がある。基本的には、倉曎されおもわずかで圱響は少ない。ただし、䞀郚の衚珟が削られおしたうケヌスも確認しおいる䞀郚のチャットにお発生を確認。

    • 画像を生成しなかったのに「I generated」ず応答した堎合は、実際にはプロンプトが拒吊されおいる可胜性が高い。指瀺を少し曞き換えるず生成できる堎合がある。

    • 画像を生成せず、内容に関する長文を返しおくる堎合も同様の可胜性がある。

    • 「Something went wrong while responding to your request.」が出た堎合は、リトラむで生成できる可胜性がある。成功の確率はプロンプトによる。

    • たれに、生成枚数の䞊限に達した旚の、停の応答を繰り返す堎合がある。別のチャットで指瀺を行えば問題ない。

    • Grok 2ずGrok 2 miniの利甚回数は別カりントなので、Grok 2 miniが2時間あたり50回の制限に達しおも、Grok 2に切り替えれば画像の生成ができる。無論、画像の生成自䜓も2時間で50回たで。



    ■ 3. Grokで生成した画像

     さきほどの画面に登堎した画像ずプロンプトを掲茉したす。

    画像
    Anime-style watercolor painting of a girl holding a single flower

     䞋蚘画像のプロンプトは途䞭で切れおいたす。切れおいない堎合の生成䟋は別蚘事の5-3.を参照。

    画像
    This is a face close-up shot, pastel colored, Japanese anime style artwork. There is a mother and her pre-teen daughter holding hands, smiling, closed mouth and looking at each other with joy in a bustling daytime fantasy theme park. The daughter wearing a detailed pink magical princess costume. The mother wearing white blouse and navy long apron dress. The park under the bright summer sun, with colorful attractions, exciting rides, and lively food stalls. The mother's eyes sparkle with love and
    画像
    anime style, cowboy shot, child 1girl, smile, open mouth, white sailor uniform, light blue hair, long wavy hair, navy blue pleat skirt, shiny purple eyes, red tie, sitting on bed, pigeon-toed, white socks, kawaii bedroom, cluttered books, starry through window, night, toy mech cat
    画像
    Anime scene of a little girl with pigtails and a bright pink swimsuit splashing in a sparkling pool, her laughter echoing like bells, with her mother watching and joining in, creating ripples that reflect the summer sun.
    画像
    Anime: A girl in a sailor uniform steps into the frame, her eyes wide with determination. She holds up a board that reads "FLUX.1 on Grok", her expression a mix of pride and mischief. The scene bursts into a kaleidoscope of colors as she declares, "Let's get this party started!
    画像
    4-panel manga, watercolor on textured paper. Panel 1: Girl with ponytail enters dessert buffet, eyes wide. "Wow! Dessert heaven!" Panel 2: Close-up of excited girl piling sweets. "I want to try everything!" Panel 3: Girl at table, plate full. Bites shortcake. "Nom!" Panel 4: Girl leans back, patting full belly. Empty plates around. "Maybe I overdid it..." Sweat drop visible.



    ■ 4. FLUX.1 Proが利甚できるサヌビス


    â–Œ 4-1. 抂芁

     FLUX.1 Proを利甚しお画像の生成ができるサヌビスを玹介したす無知なので、他にもっず良い条件のずころがあったらすみたせん。いずれも、サむンむンのためにGitHubのアカりントが必芁です。


    ▌ 4-2. Replicate

    https://replicate.com/black-forest-labs/flux-pro 

    画像
    ReplicateのFLUX.1 Pro甚のUI

     料金は https://replicate.com/pricing に掲茉されおいたす。先にクレゞットカヌドを登録する必芁がありたすが、埌払いのようです。$1単䜍でSpend limitを蚭定できるので安心です。 

    画像
    画像生成の料金

     FLUX.1 Proは1枚あたり$0.055、$1で18枚ほどの生成ができたす。画像のサむズは自由に蚭定できず、プリセットのアスペクト比から遞択したす。16:9では1344x768でした※珟圚は16:9が1024x576になっおいるので泚意。

    画像
    画像のサむズではなくアスペクト比を遞択できる

     生成した画像を掲茉しおおきたす。

    画像
    A cheerful anime girl with long, flowing dark brown hair, crouching with knees pulled close. She's wearing a cute outfit: a pastel pink frilly blouse draping over her knees, and a white tulle mini skirt with lace trim. Her bow-accented ankle boots are visible as she balances on her toes. Viewed diagonally, her bright eyes and warm smile are prominent as she looks at the viewer with friendliness and curiosity. Behind her, an alpine meadow stretches out, dotted with wildflowers. Snow-capped Alps pierce the sky, with a quaint resort town in the valley. The late afternoon sun casts a warm glow, highlighting her silhouette. The image is in a soft, watercolor style, emphasizing the dreamy atmosphere of the scene.

     Replicateは、「Dashboard」から履歎が確認できたす。最初にアクセスした際は簡単な内容に回答する必芁がありたす。その埌、「Recent predictions」に衚瀺されたIDのリンク先ぞ進むず、過去に生成した画像が再床衚瀺できたす。「Predictions」のタブでも構いたせん。

    画像
    過去の履歎


    ▌ 4-3. fal

    https://fal.ai/models/fal-ai/flux-pro 

    画像
    falのFLUX.1 Pro甚のUI

     料金は https://fal.ai/pricing に掲茉されおいたす。初めは$1に達するたではお詊しができお、その埌は予算を決めお先払いしたす。

    画像
    画像生成の料金

     FLUX.1 Proは1MPあたり$0.05です。画像のサむズをプリセットたたはカスタムから遞択できたす。生成UI䞊に単䟡が衚瀺されたす。

    画像
    画像のサむズはプリセットたたはカスタムを遞択できる

     生成した画像を掲茉しおおきたす。

    画像
    プロンプトは先ほどず同様

     falは「Requests」のタブから履歎が確認できたす。「▶」のボタンをクリックするず過去に生成した画像が再床衚瀺できたす。

    画像
    過去の履歎



    ■ 5. その他

     私が曞いた他の蚘事は、メニュヌよりたどっおください。

     noteのアカりントはメむンの@Mayu_Hiraizumiに玐付けおいたすが、蚘事に関するこずはサブアカりントの@riddi0908たでお願いしたす。

     
     
    5060Ti (16GB) ず 3060 (12GB) を所持。蚘茉が無い限り文章は手曞きです。蚘事に関するこずは X の riddi0908 たでお願いしたす。質問箱は気たぐれにお返事したす。

    あなたぞのおすすめ