Instructions to use UmeAiRT/ComfyUI-Auto-Installer-Assets with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use UmeAiRT/ComfyUI-Auto-Installer-Assets with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("UmeAiRT/ComfyUI-Auto-Installer-Assets", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Sync upload processing_florence2.py
Browse files
models/LLM/Florence-2-base-PromptGen-v2.0/processing_florence2.py
CHANGED
|
@@ -84,7 +84,7 @@ class Florence2Processor(ProcessorMixin):
|
|
| 84 |
|
| 85 |
tokens_to_add = {
|
| 86 |
'additional_special_tokens': \
|
| 87 |
-
tokenizer
|
| 88 |
['<od>', '</od>', '<ocr>', '</ocr>'] + \
|
| 89 |
[f'<loc_{x}>' for x in range(1000)] + \
|
| 90 |
['<cap>', '</cap>', '<ncap>', '</ncap>','<dcap>', '</dcap>', '<grounding>', '</grounding>', '<seg>', '</seg>', '<sep>', '<region_cap>', '</region_cap>', '<region_to_desciption>', '</region_to_desciption>', '<proposal>', '</proposal>', '<poly>', '</poly>', '<and>']
|
|
|
|
| 84 |
|
| 85 |
tokens_to_add = {
|
| 86 |
'additional_special_tokens': \
|
| 87 |
+
getattr(tokenizer, 'additional_special_tokens', []) + \
|
| 88 |
['<od>', '</od>', '<ocr>', '</ocr>'] + \
|
| 89 |
[f'<loc_{x}>' for x in range(1000)] + \
|
| 90 |
['<cap>', '</cap>', '<ncap>', '</ncap>','<dcap>', '</dcap>', '<grounding>', '</grounding>', '<seg>', '</seg>', '<sep>', '<region_cap>', '</region_cap>', '<region_to_desciption>', '</region_to_desciption>', '<proposal>', '</proposal>', '<poly>', '</poly>', '<and>']
|