見出し画像

PaperspaceでComfyUI+FLUX.1を動かした作業ログ(FLUX.1[dev]の評価)

きっかけ


前回、PaperspaceでComfyUI + FLUX.1を動かしました。

こちらは、FLUX.1 [schnell] を導入したものでした。

しかし、いろいろ情報を参照すると、FLUX.1[dev] の方がハイクォリティのようです。そこで、Paperspace上で動くかは未確認ですが、FLUX.1[dev] の導入に挑戦することにしました。

手順については、まゆひらさんの記事を参考にさせいただきました。まゆひらさん、ありがとうございます!

FLUX.1[dev]のインストール

FLUX.1-dev はこちらです。

使用にあたり、使用条件に同意します。Huggingfaceのアカウント情報がリポジトリの作者に共有されるようです。

連絡先情報の共有

[ Agree and access repository ] をクリックすると、リポジトリ画面が表記されました。

FLUX.1-dev画面(同意後)

ComfyUIのexamplesを参考にして、進めます。Regular Full Versionはメモリが足りるか心配なので、Simple to use FP8 Checkpoint version にします。

Flux Devについては以下のように書かれています。
① checkpointを https://huggingface.co/Comfy-Org/flux1-dev/blob/main/flux1-dev-fp8.safetensors からダウンロードして、ComfyUI/models/checkpoints/ に置く
(CFG を 1.0にする)
②ワークフロー用の画像を読み込む

workflowのpng

①checkpointをダウンロードして配置します。上記のURLはファイルそのものではない説明文のページなので、ファイルのURL   https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors  を指定します。
※以下のコマンドでダウンロードしたころ、ファイル名の末尾にスペースかなにかがついているトラブルが発生したので、実施時には注意

root@xxxxxxxxxx:/notebooks/ComfyUI/models/checkpoints#  curl --progress-bar -L -o flux1-dev-fp8.safetensors  https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors?download=true
############################################################################################################# 100.0%############################################################################################################# 100.0%
root@xxxxxxxxxx:/notebooks/ComfyUI/models/checkpoints# ls -l flux1-dev*
-rw-r--r-- 1 root root 17246524772 Aug 12 02:29 flux1-dev-fp8.safetensors 
root@nugjriuetp:/notebooks/ComfyUI/models/checkpoints# 

②workflowのpngをLoad

Load後の画面

↓画像生成 (Queue Prompt) をクリック

エラー画面

リストにファイルが存在しないとのこと、、ファイルは存在するけどファイル名の末尾にスペースか改行コードかよくわからないゴミが付いているみたいなので、リネームしたところ、認識されました。

mv  flux1-dev-fp8.*  xxx
mv xxx flux1-dev-fp8.safetensors

するとCheckpointが認識されたので、Queue Promptして、画像を生成します。

画像生成

処理にかかった時間は、654秒、約11分です。2回目は 550行、約9分です。
Machine Free-P5000 30GiB RAM, 8CPU, 16GiB GPU なのでもともと遅いうえに、ステップが 20あるので、時間がかかります。
 同じ P5000 でも、[schnell] だと4ステップなので、体感で2分くらいで終わっていたと思います。

その後、Free-A4000 45GiB RAM, 8CPU, 16GiB GPU で実行したところ、1回目は 96秒、2回目は 40秒でした。桁違いに速いです。ただ、Paperspaceで Free-A4000 がなかなか出てこないのが、残念なところです。

実施結果の評価

画像のクオリティはどうでしょうか。[schnell]のときと同様に、shiba*2さんと同じプロンプトで生成してみます。

アニメっぽい画像ができました。完成度は高い感じです。

他にも[schnell] と同じプロンプトで比較します。
A stylish 22-year-old beautiful woman in Tokyo, wearing a cropped white top with a slight texture, paired with a high-waisted, light blue denim mini skirt. She completes the outfit with strappy black sandals that have a slight heel. On her wrist, she wears a delicate charm bracelet with small, playful charms. The overall look is fresh, youthful, and perfect for a sunny summer day.

[schnell]と比べると、なんとなく繊細な感じがします。
さらに試してみます。
A high school beautiful girl working a part-time job as a cashier in a convenience store during summer vacation. She is standing at the clean and organized counter, wearing the store's uniform: a short-sleeve blue polo shirt, black pants, and a dark apron. Her hair is tied back in a ponytail, and she has a bright smile.

In the scene, she is scanning a bottle of water with a handheld barcode scanner, which is black in color. The counter includes a cash register, a display showing the scanned item, and a receipt printer. Behind her, shelves are stocked with various drinks and snacks, all neatly arranged. The store is brightly lit with a cool, air-conditioned atmosphere.

The customer has placed the bottle on the counter, and the girl is in the process of scanning it. She holds the bottle in one hand and the scanner in the other. The interaction is friendly and efficient, showcasing her professionalism and cheerful attitude.

結果です↓ 細かなところは変ですが、自然な雰囲気があります。

さらに試します。
A 22-year-old beautiful female dental assistant wearing a clean white scrub top and mint green scrub pants, with her hair neatly tied back. She is assisting a patient seated in a dentist's chair, adjusting the chair's angle with a gentle smile. She is holding a small dental mirror in one hand, carefully inspecting the patient's teeth under the bright overhead light. The scene exudes professionalism and calmness, with the dental office in the background, featuring modern equipment and soft, neutral colors.
↓こちらも自然な感じです。

A young female nurse, 22 years old, wearing a soft pink scrub top and matching pants, is in a medical examination room during a health checkup. Her shoulder-length black hair is neatly tied back into a simple ponytail. She is standing beside a seated patient, carefully measuring their blood pressure using a manual sphygmomanometer. The nurse has a focused yet gentle expression, her eyes fixed on the gauge as she listens to the stethoscope placed on the patient’s arm. The room is bright and clean, with medical equipment neatly organized on nearby shelves. The patient is seated comfortably in a chair, their arm extended on a small table for the blood pressure measurement. The nurse’s calm and professional demeanor creates a reassuring atmosphere as she performs her task with precision and care.
↓かなりリアルに近づいています。

A slender Japanese woman in her 20s with black hair elegantly descends from the seat of a chauffeured luxury car as the door opens. She is dressed in a charming pastel pink knee-length dress with a flared hemline, which beautifully accentuates her slim figure and adds a playful, yet elegant touch. The dress features delicate lace detailing and a ribbon accentuating her waist, enhancing her feminine charm while creating a flattering silhouette.

She pairs the dress with nude-colored high heels, which complement the outfit and elongate her already slender legs, creating a harmonious and refined look. She wears sheer nude stockings, adding a layer of sophistication and ensuring a seamless transition from her dress to her shoes. Her black hair is styled in a loose half-updo with soft curls framing her face, contributing to her overall graceful appearance.

For accessories, she opts for a pearl necklace and small diamond earrings, providing just the right amount of sparkle without overwhelming her delicate features. She completes her ensemble with a small clutch bag in a matching pastel shade, maintaining consistency in her color palette. As she gracefully steps out of the luxury car and moves elegantly towards the wedding venue, her dress coordination strikes the perfect balance between modern elegance and timeless femininity, making her a standout guest at the celebration.
↓自動車がリアルさを増してます。

これらをみると、FLUX.1 [dev]のクオリティが高いことが実感できます。これからしばらくは、FLUX.1 [dev]で画像を作っていこうと思います。

この記事が気に入ったらサポートをしてみませんか?