nickdigger commited on
Commit
5c4c2e8
Β·
verified Β·
1 Parent(s): fe5a445

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +82 -12
README.md CHANGED
@@ -1,12 +1,82 @@
1
- ---
2
- title: Joycaption Reliable
3
- emoji: πŸ“ˆ
4
- colorFrom: green
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 5.47.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: JoyCaption Reliable
3
+ emoji: πŸ”
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 4.44.0
8
+ app_file: reliable_joycaption.py
9
+ pinned: false
10
+ license: apache-2.0
11
+ ---
12
+
13
+ # πŸ” JoyCaption Reliable
14
+
15
+ **Ultra-optimized JoyCaption for ZeroGPU - No more stuck generations!**
16
+
17
+ This is a streamlined version of JoyCaption designed specifically for reliable performance on Hugging Face's ZeroGPU infrastructure. It prioritizes **consistency and speed** over advanced features.
18
+
19
+ ## βœ… Key Optimizations
20
+
21
+ - **45-second GPU limit** - Prevents ZeroGPU timeouts
22
+ - **Aggressive memory cleanup** - Immediate model deletion after each generation
23
+ - **Fast loading** - Optimized with `low_cpu_mem_usage=True`
24
+ - **Progress tracking** - Timestamps show exactly where processing is at
25
+ - **Emergency cleanup** - Graceful error handling with memory clearing
26
+
27
+ ## 🎯 Features
28
+
29
+ - **Multiple Styles**: Engaging, Descriptive, SEO-Friendly, Creative
30
+ - **Length Control**: Short (100 tokens), Medium (200 tokens), Long (300 tokens)
31
+ - **Fast Processing**: Typically completes in 15-25 seconds
32
+ - **No Freezing**: Designed to avoid the common ZeroGPU stuck generation issue
33
+
34
+ ## πŸš€ Performance
35
+
36
+ - **Loading**: 5-10 seconds
37
+ - **Generation**: 10-20 seconds
38
+ - **Total Time**: 15-30 seconds
39
+ - **Memory Usage**: Aggressively cleaned after each request
40
+
41
+ ## πŸ’‘ Why This Version is More Reliable
42
+
43
+ Unlike complex dual-model setups that can timeout or freeze, this version:
44
+
45
+ 1. Uses only the JoyCaption model (no secondary Venice model)
46
+ 2. Limits GPU duration to prevent ZeroGPU timeouts
47
+ 3. Performs immediate cleanup to prevent memory issues
48
+ 4. Has simplified prompts for faster processing
49
+ 5. Includes progress timestamps to track performance
50
+
51
+ ## πŸ”§ Technical Details
52
+
53
+ - **Model**: `fancyfeast/llama-joycaption-beta-one-hf-llava`
54
+ - **Framework**: Transformers + PyTorch
55
+ - **Optimization**: `torch.bfloat16`, `device_map="auto"`
56
+ - **GPU Duration**: 45 seconds maximum
57
+ - **Token Limits**: 100-300 based on length setting
58
+
59
+ ## πŸ“Š Trade-offs
60
+
61
+ **Gained**:
62
+ - βœ… Consistent, reliable performance
63
+ - βœ… Fast loading and generation
64
+ - βœ… No stuck generations or timeouts
65
+ - βœ… Predictable timing
66
+
67
+ **Sacrificed**:
68
+ - ❌ No secondary Venice model integration
69
+ - ❌ No advanced keyword injection
70
+ - ❌ No complex correction systems
71
+ - ❌ Reduced maximum output length
72
+
73
+ This version is perfect if you want **reliable, fast captions** without the complexity and potential issues of multi-model systems.
74
+
75
+ ## 🎨 Caption Styles
76
+
77
+ - **Engaging**: Creative, captivating descriptions that avoid "A photo of"
78
+ - **Descriptive**: Focused on people, poses, clothing, and setting details
79
+ - **SEO-Friendly**: Optimized for search with engaging language
80
+ - **Creative**: Witty captions with interesting, unique language
81
+
82
+ Perfect for content creators, social media managers, and anyone who needs consistent, quality image captions without waiting or worrying about system freezes!