Story Loader
The Phi-3 engine that writes your story before you ever touch a KSampler
- model
- tokenizer
If you've ever stood in front of a blank CLIPTextEncode and wished someone would just write the prompt for you, this is that someone. StoryLoader is the front half of the pack's two-node text pipeline: it loads a small, story-tuned Phi-3 language model that turns a keyword list into a real narrative, and your generated story then becomes the prompt for the image side. You don't interact with the model's output here - the node exists purely to get the weights into memory so the next node can use them.
How it works
The model it loads is oztrkoguz/phi3_short_story_merged_bfloat16, a merge the author fine-tuned from Microsoft's Phi-3-mini on their own "Short-Story" dataset (both live on HuggingFace under the same handle). Under the hood it's plain transformers: AutoModelForCausalLM.from_pretrained(...) for the weights and AutoTokenizer.from_pretrained(...) for the tokenizer, then .to("cuda"). Nothing exotic - which is the whole point. It's a stock causal LM that happens to be really good at finishing "write a short story about these things".
Two details are worth knowing before you run it, because the UI hides them:
- The
modeldropdown has exactly one choice. Don't go looking for a model picker. The widget is an enum with a single entry, so what you see is what you get. - The tokenizer is hardcoded to load from
unsloth/Phi-3-mini-4k-instruct, not from the model's own repo. That means the first run quietly pulls a second HuggingFace download you never explicitly asked for. It works, it just takes a moment and some disk.
Outputs are model and tokenizer, both CUSTOM type, and both plug straight into StorySamplerSimple - that's the only place they're useful. It also caches the loaded weights on the node instance, so re-running the workflow doesn't reload the model from disk every time.
Installing it
It ships inside the pack, so install is one step:
cd ComfyUI/custom_nodes
git clone https://github.com/oztrkoguz/ComfyUI_StoryCreator
then restart ComfyUI. Or use ComfyUI Manager and search for "ComfyUI StoryCreator" - note the registry title is the author's own "ComfyUI StoryCreater" typo, which survives in the pack metadata. Either way it's a two-second install.
The README doesn't mention the catch, but the code does: this pack has no requirements.txt and imports transformers at module load. If your ComfyUI Python environment doesn't already have transformers (plus the CUDA build of torch), the whole pack fails to register. In your ComfyUI venv:
pip install transformers
Common issues
- GPU required.
.to("cuda")is hardcoded - there's no device option on this node. A CPU-only ComfyUI will crash on import/run. - Big first download. The bf16 merge is several gigabytes, plus the separate tokenizer download. First run can look frozen; it's just pulling weights. Give it a cup of coffee.
- Everything's missing. If the nodes don't appear at all after install, it's almost certainly the
transformersimport failing (or a version conflict with another pack - see the ecosystem notes in the modidex KB on shared-node dependency collisions). Check the console for the traceback rather than assuming the install failed.
Is it the best way to write prompts? Honestly, a big local LLM or an API does a fancier job. But if you want a self-contained, offline, one-click "keywords in, story out" loop that never leaves your machine, this is exactly what it was built for. Just respect the download and the GPU.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | oztrkoguz/phi3_short_story_merged_bfloat16 | 1 options: oztrkoguz/phi3_short_story_merged_bfloat16 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | CUSTOM | — |
| tokenizer | CUSTOM | — |