Text-to-Image
Transformers
Safetensors
qwen2
text-generation
art
text-rendering
text-generation-inference
Instructions to use X-ART/LeX-Enhancer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use X-ART/LeX-Enhancer with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("X-ART/LeX-Enhancer") model = AutoModelForCausalLM.from_pretrained("X-ART/LeX-Enhancer") - Notebooks
- Google Colab
- Kaggle
Correct pipeline tag and add link to Github repo (#1)
Browse files- Correct pipeline tag and add link to Github repo (fc06ce2fdfd8774759bbe413dc9fcec1a3000d5f)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: mit
|
| 4 |
-
|
| 5 |
-
- X-ART/LeX-R1-60K
|
| 6 |
-
base_model:
|
| 7 |
-
- deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
| 8 |
-
pipeline_tag: text-generation
|
| 9 |
tags:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
---
|
| 13 |
|
| 14 |
[](https://arxiv.org/abs/2503.21749)
|
|
@@ -73,7 +73,9 @@ def create_user_prompt(simple_caption):
|
|
| 73 |
"5. The detailed caption should be human readable and fluent. "
|
| 74 |
"6. Avoid using vague expressions such as \"may be\" or \"might be\"; the generated caption must be in a definitive, narrative tone. "
|
| 75 |
"7. Do not use negative sentence structures, such as \"there is nothing in the image,\" etc. The entire caption should directly describe the content of the image. "
|
| 76 |
-
"8. The entire output should be limited to 200 words.
|
|
|
|
|
|
|
| 77 |
f"SIMPLE CAPTION: {simple_caption}"
|
| 78 |
)
|
| 79 |
|
|
@@ -98,4 +100,7 @@ output = model.generate(
|
|
| 98 |
)
|
| 99 |
|
| 100 |
print("*" * 80)
|
| 101 |
-
# Output will stream via TextStreamer
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
|
| 4 |
+
datasets:
|
| 5 |
+
- X-ART/LeX-R1-60K
|
| 6 |
library_name: transformers
|
| 7 |
license: mit
|
| 8 |
+
pipeline_tag: text-to-image
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
tags:
|
| 10 |
+
- art
|
| 11 |
+
- text-rendering
|
| 12 |
---
|
| 13 |
|
| 14 |
[](https://arxiv.org/abs/2503.21749)
|
|
|
|
| 73 |
"5. The detailed caption should be human readable and fluent. "
|
| 74 |
"6. Avoid using vague expressions such as \"may be\" or \"might be\"; the generated caption must be in a definitive, narrative tone. "
|
| 75 |
"7. Do not use negative sentence structures, such as \"there is nothing in the image,\" etc. The entire caption should directly describe the content of the image. "
|
| 76 |
+
"8. The entire output should be limited to 200 words.
|
| 77 |
+
|
| 78 |
+
"
|
| 79 |
f"SIMPLE CAPTION: {simple_caption}"
|
| 80 |
)
|
| 81 |
|
|
|
|
| 100 |
)
|
| 101 |
|
| 102 |
print("*" * 80)
|
| 103 |
+
# Output will stream via TextStreamer
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
Github repository: https://github.com/zhaoshitian/LeX-Art
|