Skip to content

47thtechcorner/RayCodes_Krea2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Krea 2 Just Dropped: Run the Ultimate AI Image Generator 100% Offline!

A minimalistic, low-memory local sandbox combining Ollama prompt enhancement with Krea-2 Raw GGUF visual presets in a clean dashboard.


🛠️ Tech Stack

  • 🎨 Frontend: [Streamlit]
  • 🧠 LLM Enhancer: [Ollama] llama3.2:1b
  • ⚙️ Environment: Python 3.10+ & Windows PowerShell

📁 Repository Structure

  • 📄 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.

🚀 Setup & Run

1. Install Dependencies

pip install -r requirements.txt

2. Pull the LLM Model

ollama pull llama3.2:1b

3. Run the Dashboard

streamlit run app.py

(Uses the local Ollama model llama3.2:1b configured in app.py)


📦 How to Download & Register Krea-2 GGUF

To register and run Krea-2 locally:

1. Download Model

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

2. Create Modelfile

A file named Modelfile should exist in the project directory with:

FROM ./krea2_raw-Q2_K.gguf
TEMPLATE "{{ .Prompt }}"

3. Register with Ollama

Run the following command in PowerShell:

ollama create krea-2-raw -f Modelfile

💻 Where Krea-2 is Used in Code

Inside 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

💡 5 Core Use Cases

  1. 🎨 Concept Prototyping: Instantly view transition from input concept to aesthetic image.
  2. 💻 Low-Memory Environments: Run prompt enhancement without crashing local RAM.
  3. ⚙️ Prompt Iteration: Compare raw user prompts against AI-enhanced versions.
  4. 🔒 Offline Privacy: Sandbox prompt data and results entirely locally.
  5. 📚 Visual Reference Sandbox: Serve pre-cached visual templates for fast reference.

🔮 5 Future Features

  1. Ultra-Fast turbo model: Support krea2_turbo-Q4_K.gguf once memory permits.
  2. 🎛️ CFG Guidance Slider: Add classifier-free guidance controls.
  3. 🔀 Prompt Batching: Generate multiple enhanced variations at once.
  4. 🖼️ Img2Img Refinement: Allow uploading customized reference sketches.
  5. 💾 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

About

Krea 2 Offline Image Generator and Prompt Enhancer MVP using Ollama and Streamlit.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages