私的AI研究会 > AI_memo
「私的AI研究会」AI にかかわる思い付きのメモ・忘備録
You are an assistant that writes short, motion-focused prompts for animating images. When the user sends an image, respond with a single, concise prompt describing visual motion (such as human activity, moving objects, or camera movements). Focus only on how the scene could come alive and become dynamic using brief phrases. Larger and more dynamic motions (like dancing, jumping, running, etc.) are preferred over smaller or more subtle ones (like standing still, sitting, etc.). Describe subject, then motion, then other things. For example: "The girl dances gracefully, with clear movements, full of charm." If there is something that can dance (like a man, girl, robot, etc.), then prefer to describe it as dancing. Stay in a loop: one image in, one motion prompt out. Do not explain, ask questions, or generate multiple options.
あなたは、画像をアニメーション化するための、動きに重点を置いた短いプロンプトを作成するアシスタントです。 ユーザーが画像を送信したら、視覚的な動き(人間の動作、動く物体、カメラの動きなど)を説明する簡潔なプロンプトを1つだけ返します。短いフレーズを用いて、シーンがどのように生き生きと躍動感を増すかに焦点を当ててください。 小さく繊細な動き(静止、座るなど)よりも、大きくダイナミックな動き(ダンス、ジャンプ、走るなど)が好まれます。 対象、動き、その他の順に説明してください。例:「少女は優雅に、はっきりとした動きで、魅力にあふれて踊っています。」 男性、少女、ロボットなど、踊ることができるものがある場合は、それを「ダンス」と表現するようにしてください。 画像1枚に対して、モーションプロンプト1つというループを維持してください。説明したり、質問したり、複数の選択肢を生成したりしないでください。
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 108.00 MiB. GPU 0 has a total capacity of 11.99 GiB of which 7.07 GiB is free. Of the allocated memory 3.55 GiB is allocated by PyTorch, and 71.80 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
torch.OutOfMemoryError: CUDA のメモリ不足です。108.00 MiB の割り当てを試行しました。GPU 0 の総容量は 11.99 GiB で、そのうち 7.07 GiB が空きメモリです。割り当てられたメモリのうち、3.55 GiB は PyTorch によって割り当てられ、71.80 MiB は PyTorch によって予約済みですが未割り当てです。予約済みですが未割り当てのメモリが大きい場合は、断片化を回避するために PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True を設定してみてください。メモリ管理のドキュメント (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables) を参照してください。・17秒の画像は生成できた「250917_145031_624_2486_135.mp4」
The girl dances gracefully, with clear movements, full of charm. 少女は優雅に、はっきりとした動きで、魅力にあふれて踊ります |
A character doing some simple body movements. 簡単な体の動きをしているキャラクター |
Young woman notices us and waves her hand. 若い女性が私たちに気づいて手を振った |
Young woman drinking juice outdoors, smiling with enjoyment. 若い女性が屋外でジュースを飲みながら、楽しそうに微笑んでいます |
smiling girl zoom up smooth 笑顔の女の子のズームアップスムーズ |
The man dances energetically, leaping mid-air with fluid arm swings and quick footwork. 男性は流れるような腕の振りと素早い足さばきで空中に飛び跳ねながら、精力的に踊っています |
The girl skateboarding, repeating the endless spinning and dancing and jumping on a skateboard, with clear movements, full of charm. スケートボードに乗っている女の子は、スケートボードの上で回転したり、踊ったり、ジャンプしたりを延々と繰り返しており、動きがはっきりしていて魅力にあふれています |
The man dances flamboyantly, swinging his hips and striking bold poses with dramatic flair. 男性は腰を振り、ドラマチックな演出で大胆なポーズをとりながら、華やかに踊ります |
The woman dances elegantly among the blossoms, spinning slowly with flowing sleeves and graceful hand movements. 女性は花の間で優雅に踊り、袖をなびかせながらゆっくりと回転し、優雅な手の動きをしています |
The young man writes intensely, flipping papers and adjusting his glasses with swift, focused movements. 若者は熱心に書き続け、素早く集中した動作で紙をめくり、眼鏡を調整している |
(sd_test) PS E:\anaconda_win\workspace_3\sd_test> python rembg_test.py Traceback (most recent call last): File "E:\anaconda_win\workspace_3\sd_test\rembg_test.py", line 16, in <module> from rembg import remove : File "C:\Users\izuts\anaconda3\envs\sd_test\Lib\site-packages\numba\__init__.py", line 45, in _ensure_critical_deps raise ImportError(msg) ImportError: Numba needs NumPy 2.2 or less. Got NumPy 2.3.
(sd_test) PS > pip index versions NumPy NumPy (2.3.2) Available versions: 2.3.2, 2.3.1, 2.3.0, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.2, 2.0.1, 2.0.0, 1.26.4, 1.26.3, 1.26.2, 1.26.1, 1.26.0, 1.25.2, 1.25.1, 1.25.0, 1.24.4, 1.24.3, 1.24.2, 1.24.1, 1.24.0, 1.23.5, 1.23.4, 1.23.3, 1.23.2, 1.23.1, 1.23.0, 1.22.4, 1.22.3, 1.22.2, 1.22.1, 1.22.0, 1.21.1, 1.21.0, 1.20.3, 1.20.2, 1.20.1, 1.20.0, 1.19.5, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19.0, 1.18.5, 1.18.4, 1.18.3, 1.18.2, 1.18.1, 1.18.0, 1.17.5, 1.17.4, 1.17.3, 1.17.2, 1.17.1, 1.17.0, 1.16.6, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16.0, 1.15.4, 1.15.3, 1.15.2, 1.15.1, 1.15.0, 1.14.6, 1.14.5, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14.0, 1.13.3, 1.13.1, 1.13.0, 1.12.1, 1.12.0, 1.11.3, 1.11.2, 1.11.1, 1.11.0, 1.10.4, 1.10.2, 1.10.1, 1.10.0.post2, 1.9.3, 1.9.2, 1.9.1, 1.9.0, 1.8.2, 1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.2, 1.6.1, 1.6.0, 1.5.1, 1.5.0, 1.4.1, 1.3.0 INSTALLED: 2.1.2 LATEST: 2.3.2
(sd_test) PS > pip install numpy==2.2.6
(base) PS D:\anaconda_win> ollama ls NAME ID SIZE MODIFIED deepseek-r1:latest 0a8c26691023 4.7 GB 8 weeks ago llama3.2:latest a80c4f17acd5 2.0 GB 8 weeks ago gemma3:latest a2af6cc3eb7f 3.3 GB 8 weeks ago (base) PS D:\anaconda_win> ollama pull hf.co/tatsuyaaaaaaa/DeepSeek-R1-Distill-Qwen-14B-Japanese-gguf pulling manifest pulling dd4d21338610: 100% ▕██████████████████████████████████████████████████████████▏ 6.9 GB pulling 369ca498f347: 100% ▕██████████████████████████████████████████████████████████▏ 387 B pulling 67a5e0301986: 100% ▕██████████████████████████████████████████████████████████▏ 32 B pulling 36f1dba7a265: 100% ▕██████████████████████████████████████████████████████████▏ 552 B verifying sha256 digest writing manifest success (base) PS D:\anaconda_win> ollama ls NAME ID SIZE MODIFIED hf.co/tatsuyaaaaaaa/DeepSeek-R1-Distill-Qwen-14B-Japanese-gguf:latest 64961a571e20 6.9 GB 3 seconds ago deepseek-r1:latest 0a8c26691023 4.7 GB 8 weeks ago llama3.2:latest a80c4f17acd5 2.0 GB 8 weeks ago gemma3:latest a2af6cc3eb7f 3.3 GB 8 weeks ago
pip install ffmpeg-python pip install imageio pip install scikit-image pip install pyaudio ]] ** 2025/06/17:Python Tips - [[Pythonで既存ファイルを考慮してファイル名の連番をつける>+https://dev.classmethod.jp/articles/python-make-filename-by-sequential/]]~ - [[Python | 文字列に日本語が含まれているか判定する方法>+https://1-notes.com/python-determine-if-the-string-contains-japanese/]]~ ** 2025/06/16:diffusersではじめめる Stable Diffusion - テンプレート「sd_txt2img.py」「sd_img2img.py」~ txt2img img2img~ ** 2025/06/12: stablediffusion python で動かす - [[猫耳とdiffusersで始めるStable Diffusion入門>+https://qiita.com/phyblas/items/00f750b8277f66fb9b13]]~ - [[実は衝撃的に簡単だった Stable Diffusion の使い方>+https://qiita.com/john-rocky/items/956578eaa6edd5988d3b]]~ - ダウンロードしたモデルを使う~ #codeprettify(){{ from diffusers import StableDiffusionPipeline model_file = 'stadifmodel/animekawa_v10.safetensors' pipe = StableDiffusionPipeline.from_single_file(model_file) prompt = 'nekomimi' img = pipe(prompt).images[0] img.save('nekomimi.jpg')・StableDiffusionPipelineクラスのfrom_single_fileメソッド