Instructions to use PhaiModelLab/Phai-M1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use PhaiModelLab/Phai-M1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("PhaiModelLab/Phai-M1", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Sync prompt_enhancement/enhancement_instructions.md from ModelScope
Browse files
prompt_enhancement/enhancement_instructions.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LTX-2.5 Prompt-Rewriting Instructions
|
| 2 |
+
|
| 3 |
+
## Key Takeaways
|
| 4 |
+
- Prompts should cover shot type, scene/lighting, action, character, camera movement, and audio — single-shot for continuous takes, screenplay-style for dialogue-heavy scenes.
|
| 5 |
+
- Multi-shot prompts (2–4 cuts) need explicit transition language, re-established framing per cut, and stated audio continuity across cuts.
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
## Six Crucial Elements of Your Prompt
|
| 9 |
+
Skipping one you actually need is the no.1 cause of weak output.
|
| 10 |
+
|
| 11 |
+
### Shot & Scene — Anchoring the First Frame
|
| 12 |
+
Shot is the cinematography scale — wide shot, medium close-up, over-the-shoulder. Scene is what fills that frame: lighting condition, color palette, surface textures, and atmosphere. Together they anchor frame one, before anything moves.
|
| 13 |
+
- **Good**: "A photorealistic, wide low-angle shot frames a rain-soaked Tokyo back alley at midnight, neon signs reflecting in every puddle, steam rising from a street vent."
|
| 14 |
+
|
| 15 |
+
### Action — Why "One Dominant Event" Beats a Busy Prompt
|
| 16 |
+
Write the core motion as a natural, present-tense sequence — like stage direction, not a summary. Pick the single most important thing happening in the shot and commit to it.
|
| 17 |
+
- **Good**: "He sets his glass down hard on the counter, the ice rattling, then turns toward the door as it swings open behind him."
|
| 18 |
+
|
| 19 |
+
### Character — Physical Cues, Never Emotion Labels
|
| 20 |
+
Describe age range, hairstyle, clothing, and distinguishing features — only what a camera could actually see. For emotion, describe the physical cue, never the label.
|
| 21 |
+
- **Bad**: "She looks sad about the news."
|
| 22 |
+
- **Good**: "Her shoulders drop, she exhales slowly and looks away from the phone screen."
|
| 23 |
+
|
| 24 |
+
### Camera Movement — Say What It Reveals, Not Just That It Moves
|
| 25 |
+
Don't just say "the camera moves." State when the move starts, what it does, and what it shows once it finishes. That three-part structure — timing, movement, reveal — is what produces a consistent shot.
|
| 26 |
+
|
| 27 |
+
### Audio — The Element Beginners Skip Most Often
|
| 28 |
+
An empty audio description doesn't mean silence — it often means the model invents something wrong. One sentence of ambient sound or music will be enough. **But do NOT add dialogue only if requested**.
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Your Preferred Vocabulary
|
| 32 |
+
|
| 33 |
+
### Categories
|
| 34 |
+
**Animation**: Stop-motion, 2D / 3D animation, Claymation, Hand-drawn \
|
| 35 |
+
**Stylized**: Comic book, Cyberpunk, 8-bit pixel, Surreal, Minimalist, Painterly, Illustrated \
|
| 36 |
+
**Cinematic**: Period drama, Film noir, Fantasy, Epic space opera, Thriller, Modern romance, Experimental film, Arthouse, Documentary
|
| 37 |
+
|
| 38 |
+
### Visual Details
|
| 39 |
+
**Lighting**: Flickering candles, Neon glow, Natural sunlight, Dramatic shadows \
|
| 40 |
+
**Textures**: Rough stone, Smooth metal, Worn fabric, Glossy surfaces \
|
| 41 |
+
**Color Palette**: Vibrant, Muted, Monochromatic, High contrast \
|
| 42 |
+
**Atmosphere**: Fog, Rain, Dust, Smoke, Particles
|
| 43 |
+
|
| 44 |
+
### Technical Style Markers
|
| 45 |
+
**Camera Language**: Follows, Tracks, Pans across, Circles around, Tilts upward, Pushes in / pulls back, Overhead view, Handheld movement, Over-the-shoulder, Wide establishing shot, Static frame \
|
| 46 |
+
**Film Characteristics**: Film grain, Lens flares, Pixelated edges, Jittery stop-motion \
|
| 47 |
+
**Scale Indicators**: Expansive, Epic, Intimate, Claustrophobic \
|
| 48 |
+
**Pacing & Temporal Effects**: Slow motion, Time-lapse, Rapid cuts, Lingering shot, Continuous shot, Freeze-frame, Fade-in / fade-out, Seamless transition, Sudden stop \
|
| 49 |
+
**Visual Effects**: Particle systems, Motion blur, Depth of field
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## ZH-EN Dictionary
|
| 53 |
+
|
| 54 |
+
### Video styles:
|
| 55 |
+
- 真人 / 写实 → "photorealistic live-action"
|
| 56 |
+
- 半写实 → "semi-realistic"
|
| 57 |
+
- 风格化写实 → "stylized-realism" or "anime-influenced characters"
|
| 58 |
+
- Q 版角色 → "chibi-proportioned feature-animation cartoon characters"
|
| 59 |
+
- 卡通(哪吒式) → "a feature-animation cartoon style"
|
| 60 |
+
- 手绘质感 → "a painterly 3D style with hand-painted textures"
|
| 61 |
+
- 大量特效 → "with extensive visual effects"
|
| 62 |
+
- CG(非国漫) → "CG 3D animation"
|
| 63 |
+
- 3D漫剧 → "Chinese 3D short-drama animation"
|
| 64 |
+
- 国漫 → "Chinese 3D animation"
|
| 65 |
+
- 玩具感3D → "toy-like 3D animation with soft, rounded characters"
|
| 66 |
+
- 2D日漫/动画 → "2D anime-style animation with cel-shaded characters"
|
| 67 |
+
|
| 68 |
+
### Settings:
|
| 69 |
+
- 古装(无超自然、无战争) → "in an ancient Chinese setting"
|
| 70 |
+
- 古装战争(有军队、盔甲、战场) → "in an ancient Chinese war setting"
|
| 71 |
+
- 武侠 → "in a wuxia setting"
|
| 72 |
+
- 仙侠 / 修仙 → "in a xianxia setting"
|
| 73 |
+
- 玄幻 / 东方奇幻 → "in an Eastern fantasy setting"
|
| 74 |
+
- 神话(哪吒式) → "with rounded, exaggerated characters from Chinese mythology"
|
| 75 |
+
- 科幻 → "in a science fiction setting"
|
| 76 |
+
- 西方奇幻(精灵、异域) → "in a fantasy setting"
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
## Tips
|
| 80 |
+
- Avoid vague descriptions such as "traditional clothing" or "classical architecture." Instead, specify the origin—for example, "traditional Chinese clothing" or "classical Italian architecture".
|
| 81 |
+
- If the user does not specified a character's nationality, infer based on the language the user is using; however, this must **NEVER** conflict with any information explicitly provided by the user.
|
| 82 |
+
- Describe only what is actually present in the scene. If an element is missing, simply omit it—do not explicitly state its absence (e.g., do not write "no dialogue," "no subtitles," or "no background music").
|
| 83 |
+
- Use temporal connectors to establish a clear sequence of actions, unless multiple actions are occurring simultaneously.
|
| 84 |
+
- Do **NOT** be influenced by the formatting of the user's prompt; strictly follow these rules.
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
## Final Checklist
|
| 88 |
+
- [ ] Your prompt starts **immediately** with the action or visual detail.
|
| 89 |
+
- [ ] Avoid complex sentences and difficult words. Use simple English at a middle school level.
|
| 90 |
+
- [ ] Avoid using multi-shot prompt unless the user requested.
|
| 91 |
+
- [ ] No shot list (e.g. Shot N, Cut N, etc.), bullet points or time stamps in your prompt.
|
| 92 |
+
- [ ] Your prompt covers ALL [six crucial elements](#Six-Crucial-Elements-of-Your-Prompt).
|
| 93 |
+
- [ ] Do NOT specify the scene duration in the prompt. The model will determine it automatically.
|
| 94 |
+
- [ ] Write the prompt in English, but preserve quoted dialogue in its original language.
|