File size: 2,758 Bytes
19b48f8
96b7653
19b48f8
 
 
 
 
 
 
 
 
 
45ddef4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0c96b78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---

title: Chroma
emoji: 🔥
colorFrom: blue
colorTo: pink
sdk: gradio
sdk_version: 5.14.0
app_file: app.py
pinned: true
license: apache-2.0
---


# Chroma Image Generator

A Gradio app for generating images using the [Chroma](https://huggingface.co/lodestones/Chroma) model by [lodestones](https://huggingface.co/lodestones).

## Features

- **High-quality image generation** using the Chroma model
- **Customizable parameters**: width, height, steps, CFG scale, and seed
- **Pre-cached examples** for instant preview and testing
- **Professional UI** with Gradio interface

## Example Prompts

The app includes 11 pre-configured example prompts with optimized parameters:

1. **High-fashion portrait** with anaglyph 3D effect
2. **Young man** with captain's hat and sunglasses
3. **Shiba Inu** with captain's hat and sunglasses
4. **Impressionistic sailing painting**
5. **Anthro wolf** in forest setting
6. **Dragon with galaxy wings** over castle
7. **Anthro dog** in NYC apartment
8. **Leopard geckos collage**
9. **Anthro wolf plushie collage**
10. **Telegram sticker** anthro fox
11. **Tiger eye** with 'Chroma' text overlay

## Caching

The app uses Gradio's built-in `cache_examples=True` feature to pre-generate and cache all example images. This means:

- **Instant results** when clicking on examples
- **No waiting time** for cached examples
- **Automatic cache management** by Gradio
- **Faster user experience** for trying different prompts

## Usage

1. **Manual input**: Enter your own prompt and adjust parameters
2. **Use examples**: Click on any example to load it instantly
3. **Customize**: Modify example prompts to create variations
4. **Generate**: Click the Generate button to create new images

## Parameters

- **Prompt**: Describe what you want to generate
- **Negative Prompt**: Describe what you want to avoid
- **Width/Height**: Image dimensions (512-2048px)
- **Steps**: Number of denoising steps (1-50)
- **CFG Scale**: How closely to follow the prompt (1-20)
- **Seed**: Random seed for reproducible results (-1 for random)

## Technical Details

- Built with **Gradio** for the web interface
- Uses **ComfyUI** workflow backend
- Powered by **Chroma** diffusion model
- Supports **GPU acceleration** with Spaces
- **Automatic caching** for optimal performance

## Running Locally

```bash

python app.py

```

The app will start and be available at `http://localhost:7860`

## Cache Directory

Examples are cached in the `gradio_cached_examples` directory. To rebuild the cache (if examples change), delete this directory and restart the app.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference