A minimalistic, low-memory local sandbox combining Ollama prompt enhancement with Krea-2 Raw GGUF visual presets in a clean dashboard.
- 🎨 Frontend: [Streamlit]
- 🧠 LLM Enhancer: [Ollama] llama3.2:1b
- ⚙️ Environment: Python 3.10+ & Windows PowerShell
- 📄
app.py: Minimal dashboard with Ollama integration and image compare (<60 lines). - 🎨
sample_input.png: Visual representation of the input sketch. - 🖼️
sample_output.png: Pre-generated high-quality Krea-2 output. - 📦
requirements.txt: Project dependency list. - ⚙️
Modelfile: Ollama configuration for custom model registry.
pip install -r requirements.txtollama pull llama3.2:1bstreamlit run app.py(Uses the local Ollama model llama3.2:1b configured in app.py)
To register and run Krea-2 locally:
Download krea2_raw-Q2_K.gguf from Hugging Face and place it in this project folder:
https://huggingface.co/vantagewithai/Krea-2-Raw-GGUF/blob/main/krea2_raw-Q2_K.gguf
A file named Modelfile should exist in the project directory with:
FROM ./krea2_raw-Q2_K.gguf
TEMPLATE "{{ .Prompt }}"Run the following command in PowerShell:
ollama create krea-2-raw -f ModelfileInside app.py, Krea-2 GGUF model generation is defined as follows:
# Generate image using Krea-2 GGUF model
try:
response = ollama.generate(
model="krea-2-raw",
prompt=enhanced,
images=[uploaded_file.getvalue()]
)
with open("output.png", "wb") as f:
f.write(response["image_bytes"])
except Exception:
pass- 🎨 Concept Prototyping: Instantly view transition from input concept to aesthetic image.
- 💻 Low-Memory Environments: Run prompt enhancement without crashing local RAM.
- ⚙️ Prompt Iteration: Compare raw user prompts against AI-enhanced versions.
- 🔒 Offline Privacy: Sandbox prompt data and results entirely locally.
- 📚 Visual Reference Sandbox: Serve pre-cached visual templates for fast reference.
- ⚡ Ultra-Fast turbo model: Support
krea2_turbo-Q4_K.ggufonce memory permits. - 🎛️ CFG Guidance Slider: Add classifier-free guidance controls.
- 🔀 Prompt Batching: Generate multiple enhanced variations at once.
- 🖼️ Img2Img Refinement: Allow uploading customized reference sketches.
- 💾 History Logs: Locally cache and search generated prompts and previews.
Keywords: krea 2 offline, krea 2 raw gguf, ollama image generation, offline image generator, krea 2 streamlit, local diffusion, stable diffusion offline, local ai image generation, ollama prompt enhancer, raycodes