Commit
·
7bd1180
1
Parent(s):
55bbec3
Update parquet files (step 52 of 121)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- spaces/17TheWord/RealESRGAN/scripts/generate_meta_info.py +0 -58
- spaces/1gistliPinn/ChatGPT4/Examples/Code De La Route Rousseau Dvd 32 Torrent __TOP__.md +0 -26
- spaces/1gistliPinn/ChatGPT4/Examples/Dance EJay 6 Cd1 Serial Key Keygen Where to Find and Download the Software.md +0 -6
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/8 Ball Pool Long Lines Hack Download the Best Version for Android.md +0 -112
- spaces/1phancelerku/anime-remove-background/Clash Royale Private Server APK The Best Way to Test New Strategies and Decks.md +0 -141
- spaces/1phancelerku/anime-remove-background/Download Brawlhalla 6.02 APK and Experience the Fast-Paced Combat and Online Multiplayer.md +0 -129
- spaces/2ndelement/voicevox/test/test_mora_to_text.py +0 -29
- spaces/2ndelement/voicevox/test/test_user_dict.py +0 -348
- spaces/2ndelement/voicevox/voicevox_engine/utility/mutex_utility.py +0 -15
- spaces/3B-Group/ConvRe-Leaderboard/src/css_html.py +0 -83
- spaces/4Taps/SadTalker/src/face3d/util/html.py +0 -86
- spaces/801artistry/RVC801/infer/lib/uvr5_pack/lib_v5/nets_33966KB.py +0 -122
- spaces/AIFILMS/generate_human_motion/VQ-Trans/visualize/render_mesh.py +0 -33
- spaces/AIGC-Audio/Make_An_Audio/ldm/models/autoencoder_multi.py +0 -201
- spaces/AIWaves/Debate/src/agents/SOP.py +0 -296
- spaces/AIZero2Hero4Health/2-BiomedEntityRecognition-GR/app.py +0 -81
- spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/utils/analytics.ts +0 -39
- spaces/Amrrs/DragGan-Inversion/PTI/training/projectors/w_projector.py +0 -142
- spaces/Amrrs/DragGan-Inversion/gradio_utils/utils.py +0 -154
- spaces/Amrrs/DragGan-Inversion/stylegan_human/training_scripts/sg2/training/dataset.py +0 -271
- spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/models/unet.md +0 -13
- spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_paradigms.py +0 -227
- spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/unidiffuser/test_unidiffuser.py +0 -673
- spaces/Andy1621/uniformer_image_detection/configs/instaboost/cascade_mask_rcnn_r101_fpn_instaboost_4x_coco.py +0 -3
- spaces/Andy1621/uniformer_image_detection/mmdet/core/bbox/assigners/point_assigner.py +0 -133
- spaces/Andy1621/uniformer_image_segmentation/configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py +0 -9
- spaces/Anilegna/Colour-Personallity/info.md +0 -16
- spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/utils/config.py +0 -688
- spaces/Arnasltlt/KlauskKnygos/README.md +0 -13
- spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/chardet/johabfreq.py +0 -2382
- spaces/Atualli/yoloxTeste/yoloxdetect2/configs/yolox_s.py +0 -15
- spaces/Banbri/zcvzcv/src/components/ui/popover.tsx +0 -31
- spaces/Benson/text-generation/Examples/30 Segundos Tamil Whatsapp Estado Vdeo Descarga 2018 Hdvd9.md +0 -151
- spaces/Benson/text-generation/Examples/3D Juego De Conduccin Apk.md +0 -49
- spaces/Benson/text-generation/Examples/Aparcamiento De Coches Multijugador Mod Apk Datos 4.7 4.md +0 -83
- spaces/Benson/text-generation/Examples/Descargar Apk Kinemaster Mod Digitbin 2021.md +0 -82
- spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +0 -102
- spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/rich/live_render.py +0 -113
- spaces/BilalQ/Stable_Difussion/README.md +0 -12
- spaces/CVPR/BrAD/README.md +0 -18
- spaces/CVPR/LIVE/thrust/thrust/detail/algorithm_wrapper.h +0 -27
- spaces/CVPR/LIVE/thrust/thrust/system/cuda/detail/core/agent_launcher.h +0 -1184
- spaces/CVPR/lama-example/saicinpainting/evaluation/utils.py +0 -28
- spaces/CVPR/lama-example/saicinpainting/training/trainers/default.py +0 -175
- spaces/CVPR/regionclip-demo/detectron2/data/datasets/pascal_voc.py +0 -82
- spaces/ChandraMohanNayal/AutoGPT/autogpt/json_utils/json_fix_llm.py +0 -220
- spaces/CognitiveLabs/GPT-4-Vision-Chat/chainlit.md +0 -19
- spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/datasets/builders/video_caption_builder.py +0 -34
- spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/models/video_llama.py +0 -424
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/JpegImagePlugin.py +0 -849
spaces/17TheWord/RealESRGAN/scripts/generate_meta_info.py
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
import argparse
|
2 |
-
import cv2
|
3 |
-
import glob
|
4 |
-
import os
|
5 |
-
|
6 |
-
|
7 |
-
def main(args):
|
8 |
-
txt_file = open(args.meta_info, 'w')
|
9 |
-
for folder, root in zip(args.input, args.root):
|
10 |
-
img_paths = sorted(glob.glob(os.path.join(folder, '*')))
|
11 |
-
for img_path in img_paths:
|
12 |
-
status = True
|
13 |
-
if args.check:
|
14 |
-
# read the image once for check, as some images may have errors
|
15 |
-
try:
|
16 |
-
img = cv2.imread(img_path)
|
17 |
-
except (IOError, OSError) as error:
|
18 |
-
print(f'Read {img_path} error: {error}')
|
19 |
-
status = False
|
20 |
-
if img is None:
|
21 |
-
status = False
|
22 |
-
print(f'Img is None: {img_path}')
|
23 |
-
if status:
|
24 |
-
# get the relative path
|
25 |
-
img_name = os.path.relpath(img_path, root)
|
26 |
-
print(img_name)
|
27 |
-
txt_file.write(f'{img_name}\n')
|
28 |
-
|
29 |
-
|
30 |
-
if __name__ == '__main__':
|
31 |
-
"""Generate meta info (txt file) for only Ground-Truth images.
|
32 |
-
|
33 |
-
It can also generate meta info from several folders into one txt file.
|
34 |
-
"""
|
35 |
-
parser = argparse.ArgumentParser()
|
36 |
-
parser.add_argument(
|
37 |
-
'--input',
|
38 |
-
nargs='+',
|
39 |
-
default=['datasets/DF2K/DF2K_HR', 'datasets/DF2K/DF2K_multiscale'],
|
40 |
-
help='Input folder, can be a list')
|
41 |
-
parser.add_argument(
|
42 |
-
'--root',
|
43 |
-
nargs='+',
|
44 |
-
default=['datasets/DF2K', 'datasets/DF2K'],
|
45 |
-
help='Folder root, should have the length as input folders')
|
46 |
-
parser.add_argument(
|
47 |
-
'--meta_info',
|
48 |
-
type=str,
|
49 |
-
default='datasets/DF2K/meta_info/meta_info_DF2Kmultiscale.txt',
|
50 |
-
help='txt path for meta info')
|
51 |
-
parser.add_argument('--check', action='store_true', help='Read image to check whether it is ok')
|
52 |
-
args = parser.parse_args()
|
53 |
-
|
54 |
-
assert len(args.input) == len(args.root), ('Input folder and folder root should have the same length, but got '
|
55 |
-
f'{len(args.input)} and {len(args.root)}.')
|
56 |
-
os.makedirs(os.path.dirname(args.meta_info), exist_ok=True)
|
57 |
-
|
58 |
-
main(args)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Code De La Route Rousseau Dvd 32 Torrent __TOP__.md
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<h2>Code de la route rousseau dvd 32 torrent</h2><br /><p><b><b>Download</b> ===== <a href="https://imgfil.com/2uxXGf">https://imgfil.com/2uxXGf</a></b></p><br /><br />
|
2 |
-
<br />
|
3 |
-
It’s so easy. Check it out.
|
4 |
-
|
5 |
-
Okay, moving on. A good use of WebVTT, by YouTube, is to embed video with a custom title and description. This way, you can identify your video as yours, and the search algorithms will give you more views and a better placement.
|
6 |
-
|
7 |
-
As I mentioned, I tried embedding my video with a description. It didn’t work for me. The description didn’t show up. They are there but they don’t show up. I’ll try it again and let you know.
|
8 |
-
|
9 |
-
The title is what matters. Why? Because the title is what the search engines will use for keywords. So, if your video title is “How to start learning guitar”, the search engines will put it into Google, and it will be a page-one result. And guess what? More people will click on it.
|
10 |
-
|
11 |
-
So, in summary, here are the things I wish I knew when I started learning guitar:
|
12 |
-
|
13 |
-
Learning guitar is hard. Don’t take this as a criticism. I think it’s the best thing that ever happened to me. I’ve learned so much, and I’m still learning. Everyone has their own way of learning.
|
14 |
-
|
15 |
-
Practice. You can’t learn guitar on the first day. You have to practice. You can’t expect to become a musician on the first day.
|
16 |
-
|
17 |
-
Don’t be discouraged by the videos you see. Sure, they’re great and they will get you started. But they won’t make you a great musician. I’ve read a lot of people saying that they’re so jealous of certain musicians and that they wish they could be like them. That is a very negative way to look at it.
|
18 |
-
|
19 |
-
To be like a musician, you have to work like a musician. Musicians work hard. Even when they’re not playing, they still practice. Don’t expect to be a great musician the first day you start. Be a great musician over time.
|
20 |
-
|
21 |
-
The search engines will never give you quality traffic, so don’t expect that. You can’t be an overnight success. You’re not going to get thousands of views or get a lot of followers on day one. Be a musician for a long time. Be patient.
|
22 |
-
|
23 |
-
There’ 4fefd39f24<br />
|
24 |
-
<br />
|
25 |
-
<br />
|
26 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Dance EJay 6 Cd1 Serial Key Keygen Where to Find and Download the Software.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2>!!LINK!! Dance EJay 6 Cd1 Serial Key Keygen</h2><br /><p><b><b>Download File</b> → <a href="https://imgfil.com/2uy0Yp">https://imgfil.com/2uy0Yp</a></b></p><br /><br />
|
2 |
-
|
3 |
-
aaccfb2cb3<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
6 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/8 Ball Pool Long Lines Hack Download the Best Version for Android.md
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Download Hack Version of 8 Ball Pool Long Line</h1>
|
3 |
-
<p>Do you love playing 8 Ball Pool, but wish you could have more coins, longer lines, better aim, and more fun? If so, you might be interested in downloading a hack version of 8 Ball Pool long line. In this article, we will show you what 8 Ball Pool is, why you need a hack version, how to download and install it, how to use it, and what are the risks involved. Let's get started!</p>
|
4 |
-
<h2>download hack version of 8 ball pool long line</h2><br /><p><b><b>Download</b> 🌟 <a href="https://urlin.us/2uSUdH">https://urlin.us/2uSUdH</a></b></p><br /><br />
|
5 |
-
<h2>What is 8 Ball Pool?</h2>
|
6 |
-
<p>8 Ball Pool is an online pool game where you can play against other players from around the world. You can choose from different modes, such as 1-on-1 matches, tournaments, mini-games, and more. You can also customize your cue and table, chat with your opponents, and join clubs with your friends. 8 Ball Pool is one of the most popular and addictive pool games on the web. You can play it on your browser or download it on your mobile device.</p>
|
7 |
-
<h2>Why do you need a hack version of 8 Ball Pool?</h2>
|
8 |
-
<p>While 8 Ball Pool is fun and challenging, it can also be frustrating and expensive. You need coins to enter matches, buy cues, tables, and other items. You also need to have good skills and strategies to win games and climb the ranks. However, not everyone has enough time, money, or patience to do that. That's why some people look for a hack version of 8 Ball Pool long line.</p>
|
9 |
-
<p>A hack version of 8 Ball Pool long line is a modified version of the game that gives you access to various cheat features, such as:</p>
|
10 |
-
<p>How to download hack version of 8 ball pool long line<br />
|
11 |
-
Download hack version of 8 ball pool long line apk<br />
|
12 |
-
Download hack version of 8 ball pool long line for android<br />
|
13 |
-
Download hack version of 8 ball pool long line mod<br />
|
14 |
-
Download hack version of 8 ball pool long line unlimited coins<br />
|
15 |
-
Download hack version of 8 ball pool long line no root<br />
|
16 |
-
Download hack version of 8 ball pool long line ios<br />
|
17 |
-
Download hack version of 8 ball pool long line latest<br />
|
18 |
-
Download hack version of 8 ball pool long line free<br />
|
19 |
-
Download hack version of 8 ball pool long line 2023<br />
|
20 |
-
Download hack version of 8 ball pool long line online<br />
|
21 |
-
Download hack version of 8 ball pool long line generator<br />
|
22 |
-
Download hack version of 8 ball pool long line without verification<br />
|
23 |
-
Download hack version of 8 ball pool long line anti ban<br />
|
24 |
-
Download hack version of 8 ball pool long line app<br />
|
25 |
-
Download hack version of 8 ball pool long line cheat<br />
|
26 |
-
Download hack version of 8 ball pool long line easy<br />
|
27 |
-
Download hack version of 8 ball pool long line game<br />
|
28 |
-
Download hack version of 8 ball pool long line link<br />
|
29 |
-
Download hack version of 8 ball pool long line pc<br />
|
30 |
-
Download hack version of 8 ball pool long line tool<br />
|
31 |
-
Download hack version of 8 ball pool long line video<br />
|
32 |
-
Download hack version of 8 ball pool long line website<br />
|
33 |
-
Download hack version of 8 ball pool long line youtube<br />
|
34 |
-
Download hack version of 8 ball pool long line zip<br />
|
35 |
-
Best download hack version of 8 ball pool long line<br />
|
36 |
-
Safe download hack version of 8 ball pool long line<br />
|
37 |
-
Fast download hack version of 8 ball pool long line<br />
|
38 |
-
Working download hack version of 8 ball pool long line<br />
|
39 |
-
New download hack version of 8 ball pool long line<br />
|
40 |
-
Real download hack version of 8 ball pool long line<br />
|
41 |
-
Trusted download hack version of 8 ball pool long line<br />
|
42 |
-
Legal download hack version of 8 ball pool long line<br />
|
43 |
-
Official download hack version of 8 ball pool long line<br />
|
44 |
-
Premium download hack version of 8 ball pool long line<br />
|
45 |
-
Pro download hack version of 8 ball pool long line<br />
|
46 |
-
Full download hack version of 8 ball pool long line<br />
|
47 |
-
Updated download hack version of 8 ball pool long line<br />
|
48 |
-
Cracked download hack version of 8 ball pool long line<br />
|
49 |
-
Patched download hack version of 8 ball pool long line<br />
|
50 |
-
Unlimited download hack version of 8 ball pool long line<br />
|
51 |
-
Mega download hack version of 8 ball pool long line<br />
|
52 |
-
Mediafire download hack version of 8 ball pool long line<br />
|
53 |
-
Google drive download hack version of 8 ball pool long line<br />
|
54 |
-
Dropbox download hack version of 8 ball pool long line<br />
|
55 |
-
Direct download hack version of 8 ball pool long line<br />
|
56 |
-
Torrent download hack version of 8 ball pool long line<br />
|
57 |
-
Review download hack version of 8 ball pool long line<br />
|
58 |
-
Guide download hack version of 8 ball pool long line</p>
|
59 |
-
<ul>
|
60 |
-
<li>Unlimited coins: You can get as many coins as you want without spending real money or watching ads.</li>
|
61 |
-
<li>Long lines: You can see longer lines that show you where the cue ball and the target ball will go.</li>
|
62 |
-
<li>Aim hack: You can adjust the angle and power of your shots with precision.</li>
|
63 |
-
<li>Mega hit: You can hit the balls with more force and speed.</li>
|
64 |
-
<li>And more: You can unlock all cues, tables, levels, achievements, etc.</li>
|
65 |
-
</ul>
|
66 |
-
<p>With these features, you can have more fun and win more games in 8 Ball Pool. You can also impress your friends and opponents with your skills and style.</p>
|
67 |
-
<h2>How to download hack version of 8 Ball Pool long line?</h2>
|
68 |
-
<p>If you want to download a hack version of 8 Ball Pool long line, you need to follow these steps:</p>
|
69 |
-
<ol>
|
70 |
-
<li>Find a reliable source that offers the hack version. There are many websites that claim to provide the hack version, but not all of them are safe and trustworthy. Some of them may contain viruses, malware, or fake links that can harm your device or steal your personal information. One of the sources that we recommend is [GetModsApk.com](^4^), which offers a safe and updated hack version of 8 Ball Pool long line. </li>
|
71 |
-
<li>Download the APK file of the hack version from the source. The APK file is the installer file for Android devices. You need to make sure that you have enough storage space on your device before downloading it.</li>
|
72 |
-
<li>Enable unknown sources on your device. This is a security setting that allows you to install apps from unknown sources that are not from the official Google Play Store. To do this, go to your device settings, then security, then unknown sources, and turn it on.</li>
|
73 |
-
<li>Install the APK file of the hack version on your device. Locate the downloaded file on your device and tap on it to start the installation process. Follow the instructions on the screen and wait for the installation to finish.</li>
|
74 |
-
<li>Launch the hack version of 8 Ball Pool long line on your device. You will see a new icon on your home screen or app drawer that represents the hack version. Tap on it to open the game and enjoy the hack features.</li>
|
75 |
-
</ol>
|
76 |
-
<h2>How to use the hack version of 8 Ball Pool long line?</h2>
|
77 |
-
<p>Using the hack version of 8 Ball Pool long line is easy and simple. Here are some tips on how to use it:</p>
|
78 |
-
<ul>
|
79 |
-
<li>When you open the game, you will see a menu with different options, such as coins, lines, aim, mega hit, etc. You can toggle these options on or off according to your preference.</li>
|
80 |
-
<li>When you enter a match, you will see longer lines that show you the trajectory of the cue ball and the target ball. You can also adjust the angle and power of your shots with more accuracy.</li>
|
81 |
-
<li>You can also use the mega hit feature to hit the balls with more force and speed. This can help you clear the table faster and win more games.</li>
|
82 |
-
<li>You can also access other features, such as unlocking all cues, tables, levels, achievements, etc. You can customize your game experience and show off your style.</li>
|
83 |
-
</ul>
|
84 |
-
<h2>What are the risks of using a hack version of 8 Ball Pool?</h2>
|
85 |
-
<p>While using a hack version of 8 Ball Pool long line can be fun and exciting, it also comes with some risks that you should be aware of. Here are some of them:</p>
|
86 |
-
<ul>
|
87 |
-
<li>Account ban: Using a hack version of 8 Ball Pool is against the game's terms of service and fair play policy. If you are caught using a hack version, your account may be banned permanently or temporarily by the game developers. This means that you will lose all your progress, coins, items, etc. You may also be unable to play the game again with your account.</li>
|
88 |
-
<li>Malware infection: Downloading a hack version of 8 Ball Pool from an unreliable source may expose your device to viruses, malware, or spyware that can damage your device or steal your personal information. You may also be redirected to malicious websites or ads that can harm your device or privacy.</li>
|
89 |
-
<li>Legal issues: Using a hack version of 8 Ball Pool may also violate some laws or regulations in your country or region. You may face legal consequences or penalties if you are found using a hack version of 8 Ball Pool.</li>
|
90 |
-
</ul>
|
91 |
-
<h2>Conclusion</h2>
|
92 |
-
<p>In conclusion, downloading a hack version of 8 Ball Pool long line can be a way to have more fun and win more games in 8 Ball Pool. However, it also comes with some risks that you should consider before using it. If you decide to use a hack version of 8 Ball Pool long line, make sure that you download it from a reliable source, use it wisely and responsibly, and be prepared for the possible consequences. We hope that this article has been helpful and informative for you. Thank you for reading!</p>
|
93 |
-
<h3>Frequently Asked Questions</h3>
|
94 |
-
<ol>
|
95 |
-
<li><strong>Is using a hack version of 8 Ball Pool illegal?</strong></li>
|
96 |
-
<p>Using a hack version of 8 Ball Pool is not illegal per se, but it may violate some laws or regulations in your country or region. You should check your local laws before using a hack version of 8 Ball Pool.</p>
|
97 |
-
<li><strong>How can I avoid getting banned by using a hack version of 8 Ball Pool?</strong></li>
|
98 |
-
<p>There is no guarantee that you can avoid getting banned by using a hack version of 8 Ball Pool. However, some tips that may help are: use a VPN service to hide your IP address, use a fake account or an alternate account to play with the hack version, do not use the hack features too often or too blatantly, do not brag about using the hack version or report other players who use it.</p>
|
99 |
-
<li><strong>Can I play with my friends who do not use a hack version of 8 Ball Pool?</strong></li>
|
100 |
-
<p>Yes, you can play with your friends who do not use a hack version of 8 Ball Pool. However, this may not be fair or ethical for them, as you will have an unfair advantage over them. You may also risk getting reported by them if they find out that you are using a hack version.</p>
|
101 |
-
<li><strong> <strong>How can I update the hack version of 8 Ball Pool long line?</strong></li>
|
102 |
-
<p>Usually, the hack version of 8 Ball Pool long line will update automatically when there is a new version available. However, sometimes you may need to manually update it by downloading the latest APK file from the source and installing it on your device. You should always check the source for updates and download them as soon as possible to avoid any issues or errors.</p>
|
103 |
-
<li><strong>What are some alternatives to using a hack version of 8 Ball Pool?</strong></li>
|
104 |
-
<p>If you do not want to use a hack version of 8 Ball Pool, but still want to have more fun and win more games, you can try some alternatives, such as:</p>
|
105 |
-
<ul>
|
106 |
-
<li>Practice more: The best way to improve your skills and strategies in 8 Ball Pool is to practice more. You can play in different modes, levels, and tables to learn from your mistakes and master your shots.</li>
|
107 |
-
<li>Watch tutorials: You can watch online tutorials from experts and pro players who can teach you tips and tricks on how to play better in 8 Ball Pool. You can also watch replays of your own games or other players' games to analyze your performance and learn from them.</li>
|
108 |
-
<li>Use guides: You can use online guides that can help you with various aspects of 8 Ball Pool, such as rules, terms, cues, tables, coins, etc. You can also use tools that can help you with calculations, measurements, angles, etc.</li>
|
109 |
-
</ul>
|
110 |
-
</ol></p> 197e85843d<br />
|
111 |
-
<br />
|
112 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Clash Royale Private Server APK The Best Way to Test New Strategies and Decks.md
DELETED
@@ -1,141 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Clash Royale APK Private Server: How to Play with Unlimited Resources and Custom Cards</h1>
|
3 |
-
<p>Clash Royale is one of the most popular mobile games made by Supercell. It is an online multiplayer strategy game in which players construct their own deck to fight in real-time battles. The game features various modes, such as ladder, tournaments, special events, clan wars, and more. Players can also collect and upgrade different cards, from common to legendary, each with their own abilities and roles.</p>
|
4 |
-
<p>However, playing Clash Royale can also be challenging and time consuming. It can take a lot of time and effort to obtain every card in the game, as well as gather enough gold to upgrade them. Moreover, some players may find it frustrating to face opponents who have better cards or higher levels than them.</p>
|
5 |
-
<h2>clash royale apk private server</h2><br /><p><b><b>Download Zip</b> ::: <a href="https://jinyurl.com/2uNTWq">https://jinyurl.com/2uNTWq</a></b></p><br /><br />
|
6 |
-
<p>Fortunately, there is a way to play Clash Royale with unlimited resources and custom cards. This is possible by playing on a private server. A private server is a modified version of the original game that runs on a separate server. It allows players to play with infinite gems, gold, elixir, and other resources. It also enables players to create their own cards or use pre-unlocked cards that are not available in the official game.</p>
|
7 |
-
<p>In this article, we will show you how to download and install a private server on your device. We will also compare the top 3 Clash Royale private servers in 2022 and their features. By playing on a private server, you can enjoy Clash Royale like never before.</p>
|
8 |
-
<p>clash royale private server apk download<br />
|
9 |
-
clash royale mod apk private server<br />
|
10 |
-
clash royale hack apk private server<br />
|
11 |
-
clash royale apk private server 2022<br />
|
12 |
-
clash royale apk private server unlimited gems<br />
|
13 |
-
clash royale apk private server with clan wars<br />
|
14 |
-
clash royale apk private server latest version<br />
|
15 |
-
clash royale apk private server master royale<br />
|
16 |
-
clash royale apk private server plenix royale<br />
|
17 |
-
clash royale apk private server retro royale<br />
|
18 |
-
clash royale apk private server custom cards<br />
|
19 |
-
clash royale apk private server no root<br />
|
20 |
-
clash royale apk private server android<br />
|
21 |
-
clash royale apk private server ios<br />
|
22 |
-
clash royale apk private server online<br />
|
23 |
-
clash royale apk private server offline<br />
|
24 |
-
clash royale apk private server free download<br />
|
25 |
-
clash royale apk private server fun royale<br />
|
26 |
-
clash royale apk private server legendary royale<br />
|
27 |
-
clash royale apk private server null's royale<br />
|
28 |
-
clash royale apk private server reddit<br />
|
29 |
-
clash royale apk private server youtube<br />
|
30 |
-
clash royale apk private server 2021 download<br />
|
31 |
-
clash royale apk private server 2021 mod<br />
|
32 |
-
clash royale apk private server 2021 hack<br />
|
33 |
-
clash royale apk private server 2021 unlimited gems<br />
|
34 |
-
clash royale apk private server 2021 with clan wars<br />
|
35 |
-
clash royale apk private server 2021 latest version<br />
|
36 |
-
clash royale apk private server 2021 master royale<br />
|
37 |
-
clash royale apk private server 2021 plenix royale<br />
|
38 |
-
clash royale apk private server 2021 retro royale<br />
|
39 |
-
clash royale apk private server 2021 custom cards<br />
|
40 |
-
clash royale apk private server 2021 no root<br />
|
41 |
-
clash royale apk private server 2021 android<br />
|
42 |
-
clash royale apk private server 2021 ios<br />
|
43 |
-
clash royale apk private server 2021 online<br />
|
44 |
-
clash royale apk private server 2021 offline<br />
|
45 |
-
clash royale apk private server 2021 free download<br />
|
46 |
-
clash royale apk private server 2021 fun royale<br />
|
47 |
-
clash royale apk private server 2021 legendary royale<br />
|
48 |
-
clash royale apk private server 2021 null's royale<br />
|
49 |
-
clash royale apk private server 2021 reddit<br />
|
50 |
-
clash royale apk private server 2021 youtube</p>
|
51 |
-
<h2>What is a Private Server?</h2>
|
52 |
-
<p>A private server is a customized version of the original game that runs on a separate server. It is created by altering the game files or using third-party software. A private server can have different features and settings than the official game. For example, it can have unlimited resources, custom cards, faster gameplay, or different modes.</p>
|
53 |
-
<p>A private server is not affiliated with Supercell or the official game. It is created by independent developers or fans who want to provide a different experience for the players. However, playing on a private server also has some risks and drawbacks. For instance, it can be unstable, buggy, or incompatible with some devices. It can also violate the terms of service of the official game and result in a ban or suspension.</p>
|
54 |
-
<p>Therefore, before playing on a private server, you should be aware of the possible consequences and take precautions. You should always backup your data and use a different account than your main one. You should also avoid using any personal or sensitive information on a private server. Finally, you should only download and install a private server from a trusted source.</p>
|
55 |
-
<h2>Why Play on a Private Server?</h2>
|
56 |
-
<p>Playing on a private server can have many benefits for the players. Here are some of the reasons why you might want to play on a private server:</p>
|
57 |
-
<ul>
|
58 |
-
<li><b>Unlimited resources:</b> You can play with unlimited gems, gold, elixir, and other resources on a private server. This means you can unlock any card or upgrade you want without spending any money or time. You can also experiment with different decks and strategies without worrying about losing resources.</li>
|
59 |
-
<li><b>Custom cards:</b> You can play with custom cards that are not available in the official game on a private server. These cards can have unique abilities, stats, or designs. You can also create your own cards or modify existing ones to suit your preferences.</li>
|
60 |
-
<li><b>More fun and variety:</b> You can play with more fun and variety on a private server. You can access different modes, such as clan wars, 2v2 battles, special events, or custom challenges. You can also play with other players who are using the same private server and chat with them.</li>
|
61 |
-
</ul>
|
62 |
-
<p>Playing on a private server can give you a new and exciting way to enjoy Clash Royale. However, you should also respect the official game and its developers. You should not use a private server to gain an unfair advantage over other players or to harm the game's reputation. You should also support the official game by playing it regularly and purchasing in-game items if you can.</p>
|
63 |
-
<h2>How to Download and Install a Private Server?</h2>
|
64 |
-
<p>To play on a private server, you need to download and install a private server APK file on your device. An APK file is an Android application package that contains the game files and settings. Here are the steps to download and install a private server:</p>
|
65 |
-
<ol>
|
66 |
-
<li><b>Find a reliable source:</b> You need to find a reliable source that provides the private server APK file. You can search online for the best Clash Royale private servers or check out some of the recommendations below. Make sure the source is trustworthy and updated.</li>
|
67 |
-
<li><b>Download the APK file:</b> Once you find the source, you need to download the APK file to your device. You can use your browser or a download manager to do this. Make sure you have enough storage space on your device.</li>
|
68 |
-
<li><b>Enable unknown sources:</b> Before you can install the APK file, you need to enable unknown sources on your device. This allows you to install applications that are not from the Google Play Store. To do this, go to your device's settings, then security, then unknown sources, and turn it on.</li>
|
69 |
-
<li><b>Install the APK file:</b> After you enable unknown sources, you need to install the APK file on your device. You can use a file manager or your browser to locate the file and tap on it. Follow the instructions on the screen to complete the installation.</li>
|
70 |
-
<li><b>Launch the game:</b> Once you install the APK file, you can launch the game from your app drawer or home screen. You should see a different icon and name than the official game. Tap on it and enjoy playing on a private server.</li>
|
71 |
-
</ol>
|
72 |
-
<p>Note: Some private servers may require additional steps or permissions to work properly. For example, some may ask you to sign in with a specific account or enter a verification code. Follow the instructions provided by the source or contact their support team if you encounter any issues.</p>
|
73 |
-
<h2>Top 3 Clash Royale Private Servers in 2022</h2>
|
74 |
-
<p>There are many Clash Royale private servers available online, but not all of them are worth playing. Some may be outdated, unstable, or unsafe. To help you choose the best one for you, we have compared the top 3 Clash Royale private servers in 2022 and their features. Here they are:</p>
|
75 |
-
<table>
|
76 |
-
<tr>
|
77 |
-
<th>Name</th>
|
78 |
-
<th>Features</th>
|
79 |
-
<th>How to Access</th>
|
80 |
-
</tr>
|
81 |
-
<tr>
|
82 |
-
<td><h3>Master Royale</h3></td>
|
83 |
-
<td>
|
84 |
-
<ul>
|
85 |
-
<li>Unlimited gems and gold</li>
|
86 |
-
<li>Friendly challenges</li>
|
87 |
-
<li>All cards unlocked</li>
|
88 |
-
<li>New cards added regularly</li>
|
89 |
-
<li>No root required</li>
|
90 |
-
</ul>
|
91 |
-
</td>
|
92 |
-
<td><a href="">Download Master Royale APK here</a></td>
|
93 |
-
</tr>
|
94 |
-
<tr>
|
95 |
-
<td><h3>Retro Royale</h3></td>
|
96 |
-
<td>
|
97 |
-
<ul>
|
98 |
-
<li>Unlimited gems and gold</li>
|
99 |
-
<li>Clan wars</li>
|
100 |
-
<li>Instant chest opening</li>
|
101 |
-
<li>1v1 and 2v2 battles</li>
|
102 |
-
<li>No root required</li>
|
103 |
-
</ul>
|
104 |
-
</td>
|
105 |
-
<td><a href="">Download Retro Royale APK here</a></td>
|
106 |
-
</tr>
|
107 |
-
<tr>
|
108 |
-
<td><h3>Plenix Royale</h3></td>
|
109 |
-
<td>
|
110 |
-
<ul>
|
111 |
-
<li>Unlimited gold and elixir</li>
|
112 |
-
<li>Custom cards</li>
|
113 |
-
<li>Clan information</li>
|
114 |
-
<li>2v2 combat</li>
|
115 |
-
<li>Clan wars</li>
|
116 |
-
<li >li>No root required</li>
|
117 |
-
</ul>
|
118 |
-
</td>
|
119 |
-
<td><a href="">Download Plenix Royale APK here</a></td>
|
120 |
-
</tr>
|
121 |
-
</table>
|
122 |
-
<p>These are the top 3 Clash Royale private servers in 2022 that we recommend. You can try them out and see which one suits you best. However, remember to always play responsibly and respect the official game and its developers.</p>
|
123 |
-
<h2>Conclusion</h2>
|
124 |
-
<p>Clash Royale is a fun and addictive game that millions of players enjoy. However, if you want to play with unlimited resources and custom cards, you can try playing on a private server. A private server is a modified version of the original game that runs on a separate server. It can have different features and settings than the official game.</p>
|
125 |
-
<p>To play on a private server, you need to download and install a private server APK file on your device. You also need to enable unknown sources and follow the instructions provided by the source. However, you should also be aware of the risks and drawbacks of playing on a private server. You should always backup your data and use a different account than your main one. You should also avoid using any personal or sensitive information on a private server.</p>
|
126 |
-
<p>We have compared the top 3 Clash Royale private servers in 2022 and their features. You can choose the one that suits you best and enjoy playing Clash Royale like never before. However, you should also support the official game by playing it regularly and purchasing in-game items if you can.</p>
|
127 |
-
<p>We hope this article has helped you learn more about Clash Royale APK private server and how to play with unlimited resources and custom cards. If you have any questions or feedback, please let us know in the comments below.</p>
|
128 |
-
<h2>FAQs</h2>
|
129 |
-
<p>Here are some of the frequently asked questions and their answers about Clash Royale APK private server:</p>
|
130 |
-
<h3>Q: Is playing on a private server legal?</h3>
|
131 |
-
<p>A: Playing on a private server is not illegal, but it is not authorized by Supercell or the official game. It can violate the terms of service of the official game and result in a ban or suspension. Therefore, you should play on a private server at your own risk and responsibility.</p>
|
132 |
-
<h3>Q: Is playing on a private server safe?</h3>
|
133 |
-
<p>A: Playing on a private server can be safe if you download and install it from a trusted source. However, some private servers may contain malware, viruses, or spyware that can harm your device or steal your information. Therefore, you should always scan the APK file before installing it and use an antivirus software on your device.</p>
|
134 |
-
<h3>Q: Can I play with my friends on a private server?</h3>
|
135 |
-
<p>A: Yes, you can play with your friends on a private server if they are using the same private server as you. You can invite them to join your clan or challenge them to friendly battles. However, you cannot play with your friends who are using the official game or a different private server.</p>
|
136 |
-
<h3>Q: Can I switch between the official game and a private server?</h3>
|
137 |
-
<p>A: Yes, you can switch between the official game and a private server by installing both APK files on your device. However, you should not use the same account or data for both games, as this can cause conflicts or errors. You should also clear the cache and data of the game before switching to avoid any issues.</p>
|
138 |
-
<h3>Q: How can I update my private server?</h3>
|
139 |
-
<p>A: To update your private server, you need to download and install the latest version of the APK file from the source. You may also need to uninstall the previous version of the APK file before installing the new one. However, some private servers may not be updated regularly or at all, so you may miss out on some features or bug fixes.</p> 401be4b1e0<br />
|
140 |
-
<br />
|
141 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Download Brawlhalla 6.02 APK and Experience the Fast-Paced Combat and Online Multiplayer.md
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Brawlhalla 6.02 APK: Everything You Need to Know</h1>
|
3 |
-
<p>If you are looking for a fun and exciting fighting game to play on your Android device, you might want to check out Brawlhalla. This is a free-to-play platform fighting game that supports cross-play across various platforms, including PC, PlayStation, Xbox, Nintendo Switch, iOS, and Android. In this article, we will tell you everything you need to know about Brawlhalla 6.02 APK, the latest version of the game for Android devices. We will also give you some tips and tricks on how to play the game and win more matches.</p>
|
4 |
-
<h2>What is Brawlhalla?</h2>
|
5 |
-
<p>Brawlhalla is a game developed by Blue Mammoth Games and published by Ubisoft. It is a 2D platform fighting game that features cartoonish graphics and simple controls. The game has been compared to Nintendo's Super Smash Bros., as both games involve fighters trying to knock their opponents off the stage. However, Brawlhalla has its own unique features and mechanics that make it stand out from other fighting games.</p>
|
6 |
-
<h2>brawlhalla 6.02 apk</h2><br /><p><b><b>Download</b> 🗸🗸🗸 <a href="https://jinyurl.com/2uNKMK">https://jinyurl.com/2uNKMK</a></b></p><br /><br />
|
7 |
-
<h3>A free-to-play platform fighting game with cross-play support</h3>
|
8 |
-
<p>One of the best things about Brawlhalla is that it is free-to-play, meaning that anyone can download and play the game without paying anything. There are no pay-to-win advantages or premium content that will affect the gameplay, so all players are always on equal ground. The game also supports cross-play across different platforms, so you can play with your friends or other players online regardless of what device they are using.</p>
|
9 |
-
<h3>A game with over 50 Legends and various game modes</h3>
|
10 |
-
<p>Brawlhalla has a growing roster of over 50 Legends, each with their own unique skills and weapons. You can choose from a variety of characters, such as knights, ninjas, pirates, aliens, robots, and even some crossover characters from other franchises, such as Lara Croft from Tomb Raider, Finn and Jake from Adventure Time, or Shovel Knight from Shovel Knight. You can also customize your Legend's appearance with different skins, colors, taunts, and KO effects.</p>
|
11 |
-
<p>Brawlhalla also offers a wide range of game modes that cater to different preferences and skill levels. You can play casual free-for-alls, ranked matches, custom online matches, or offline matches with bots or local players. You can also try out different modes that have special rules or objectives, such as Brawlball, Kung Foot, Horde, Snowbrawl, Dodgebomb, Switchcraft, Bombsketball, Beachbrawl, Buddy Brawldown, Capture the Flag, Bubble Tag, Temple Climb, Morph Walker Attack!, Showdown Crew Battle Street Brawl Bounty Dice & Destruction Volleybrawl.</p>
|
12 |
-
<h3>A game with frequent updates and events</h3>
|
13 |
-
<p>Brawlhalla is constantly updated with new content and features that keep the game fresh and exciting. The developers regularly add new Legends, weapons, skins, maps, modes, balance changes, bug fixes, and performance improvements. The game also hosts seasonal events that offer special rewards and challenges for players to enjoy. For example, there are events for Halloween, Christmas, Valentine's Day, Easter, Summer Heatwave etc.</p>
|
14 |
-
<h2>What is new in Brawlhalla 6.02 APK?</h2>
|
15 |
-
<p>Brawlhalla 6.02 APK is the latest version of the game for Android devices. It was released on Dec 15th ,2021 . It contains some new features and improvements that enhance the gameplay experience for Android users.</p>
|
16 |
-
<p>brawlhalla 6.02 apk download<br />
|
17 |
-
brawlhalla 6.02 apk free<br />
|
18 |
-
brawlhalla 6.02 apk mod<br />
|
19 |
-
brawlhalla 6.02 apk latest version<br />
|
20 |
-
brawlhalla 6.02 apk update<br />
|
21 |
-
brawlhalla 6.02 apk android<br />
|
22 |
-
brawlhalla 6.02 apk file<br />
|
23 |
-
brawlhalla 6.02 apk offline<br />
|
24 |
-
brawlhalla 6.02 apk online<br />
|
25 |
-
brawlhalla 6.02 apk hack<br />
|
26 |
-
brawlhalla 6.02 apk unlimited money<br />
|
27 |
-
brawlhalla 6.02 apk no root<br />
|
28 |
-
brawlhalla 6.02 apk obb<br />
|
29 |
-
brawlhalla 6.02 apk data<br />
|
30 |
-
brawlhalla 6.02 apk mirror<br />
|
31 |
-
brawlhalla 6.02 apk revdl<br />
|
32 |
-
brawlhalla 6.02 apk rexdl<br />
|
33 |
-
brawlhalla 6.02 apk apkpure<br />
|
34 |
-
brawlhalla 6.02 apk uptodown<br />
|
35 |
-
brawlhalla 6.02 apk apkmirror<br />
|
36 |
-
brawlhalla 6.02 apk android oyun club<br />
|
37 |
-
brawlhalla 6.02 apk andropalace<br />
|
38 |
-
brawlhalla 6.02 apk android republic<br />
|
39 |
-
brawlhalla 6.02 apk appvn<br />
|
40 |
-
brawlhalla 6.02 apk ac market<br />
|
41 |
-
brawlhalla 6.02 apk blackmod<br />
|
42 |
-
brawlhalla 6.02 apk bluestacks<br />
|
43 |
-
brawlhalla 6.02 apk by ubisoft entertainment<br />
|
44 |
-
brawlhalla 6.02 apk cracked<br />
|
45 |
-
brawlhalla 6.02 apk cheat<br />
|
46 |
-
brawlhalla 6.02 apk direct link<br />
|
47 |
-
brawlhalla 6.02 apk download for pc<br />
|
48 |
-
brawlhalla 6.02 apk download apkpure<br />
|
49 |
-
brawlhalla 6.02 apk download uptodown<br />
|
50 |
-
brawlhalla 6.02 apk download latest version<br />
|
51 |
-
brawlhalla 6.02 apk emulator<br />
|
52 |
-
brawlhalla 6.02 apk english version<br />
|
53 |
-
brawlhalla 6.02 apk full version<br />
|
54 |
-
brawlhalla 6.02 apk for pc<br />
|
55 |
-
brawlhalla 6.02 apk for ios<br />
|
56 |
-
brawlhalla 6.02 apk game download<br />
|
57 |
-
brawlhalla 6.02 apk google play store link</p>
|
58 |
-
<h3>The latest version of the game for Android devices</h3>
|
59 |
-
<p>Brawlhalla 6.02 APK is the most recent version of the game that you can download and install on your Android device. It has a file size of 97.4 MB and requires Android 5.0 or higher to run. You can download the APK file from various sources, such as APKCombo, or you can update the game from the Google Play Store if you already have it installed.</p>
|
60 |
-
<h3>The features and improvements of the update</h3>
|
61 |
-
<p>Brawlhalla 6.02 APK brings some new features and improvements that make the game more enjoyable and smooth for Android users. Some of the main changes are:</p>
|
62 |
-
<ul>
|
63 |
-
<li>The addition of Mako, the new Legend who is a shark-themed fighter with a Katars and Greatsword combination. She has a unique moveset that allows her to dash, dive, and bite her enemies with her shark-like abilities.</li>
|
64 |
-
<li>The introduction of The Greatsword, a new weapon that is exclusive to Mako for now. It is a heavy and powerful weapon that has different attacks depending on how long you hold the attack button. It also has a special stance mechanic that lets you chain different attacks together.</li>
|
65 |
-
<li>The implementation of Performance Mode, a new option that lets you adjust the graphics quality and frame rate of the game to suit your device's capabilities. You can choose from three modes: High, Medium, or Low. The higher the mode, the better the graphics but the lower the frame rate, and vice versa.</li>
|
66 |
-
<li>The improvement of Controller Support, which makes it easier and more comfortable to play the game with a controller on your Android device. You can now use any controller that is compatible with your device, such as Xbox, PlayStation, or Bluetooth controllers. You can also customize the controller layout and sensitivity in the settings menu.</li>
|
67 |
-
<li>The update of Bug Fixes and Balance Changes, which fix some issues and glitches that affect the gameplay and performance of the game. The update also tweaks some aspects of the Legends, weapons, maps, modes, and mechanics to make them more balanced and fair.</li>
|
68 |
-
</ul>
|
69 |
-
<h3>How to download and install the APK file</h3>
|
70 |
-
<p>If you want to download and install Brawlhalla 6.02 APK on your Android device, you need to follow these steps:</p>
|
71 |
-
<ol>
|
72 |
-
<li>Go to a reliable source that offers the APK file, such as APKCombo, and click on the download button.</li>
|
73 |
-
<li>Wait for the download to finish and locate the APK file on your device's storage.</li>
|
74 |
-
<li>Before installing the APK file, make sure that you have enabled the option to install apps from unknown sources on your device's settings. This will allow you to install apps that are not from the Google Play Store.</li>
|
75 |
-
<li>Tap on the APK file and follow the instructions to install it on your device.</li>
|
76 |
-
<li>Once the installation is complete, you can launch the game and enjoy playing Brawlhalla 6.02 APK on your Android device.</li>
|
77 |
-
</ol>
|
78 |
-
<h2>How to play Brawlhalla on your Android device?</h2>
|
79 |
-
<p>Now that you have downloaded and installed Brawlhalla 6.02 APK on your Android device, you might be wondering how to play it and have fun. Here are some basic tips and tricks that will help you get started and improve your skills in Brawlhalla.</p>
|
80 |
-
<h3>The basic mechanics and controls of the game</h3>
|
81 |
-
<p>Brawlhalla is a 2D platform fighting game that involves up to eight players fighting each other on various stages. The goal is to knock your opponents off the stage by depleting their health or launching them with powerful attacks. The last player or team standing wins the match.</p>
|
82 |
-
<p>The game has simple controls that are easy to learn but hard to master. You can use either touch controls or a controller to play the game on your Android device. The touch controls consist of four buttons: Jump, Attack, Special, and Dodge/Throw. You can also swipe on the screen to move your character left or right. The controller layout depends on the type of controller you are using, but you can always customize it in the settings menu.</p>
|
83 |
-
<p>The game has two main types of attacks: light attacks and heavy attacks. Light attacks are quick and weak, while heavy attacks are slow and strong. You can also perform different attacks depending on the direction you are holding or the weapon you are using. Each Legend has two weapons that they can pick up during the match, and each weapon has its own set of attacks and combos. You can switch between weapons by throwing your current weapon with the Dodge/Throw button.</p>
|
84 |
-
<p>The game also has a dodge mechanic that lets you avoid incoming attacks or move faster. You can dodge in any direction by pressing the Dodge/Throw button and holding a direction. You can also perform a spot dodge by pressing the Dodge/Throw button without holding a direction. Dodging gives you invincibility frames, but it also has a cooldown, so you have to time it well.</p>
|
85 |
-
<p>The game also has a gravity cancel mechanic that lets you perform ground attacks in the air. You can do this by performing a spot dodge in the air and then pressing an attack button. This can be useful for extending your combos or surprising your opponents.</p>
|
86 |
-
<h3>The tips and tricks to win more matches</h3>
|
87 |
-
<p>Brawlhalla is a game that requires skill, strategy, and practice to win more matches. Here are some tips and tricks that will help you improve your gameplay and beat your opponents.</p>
|
88 |
-
<ul>
|
89 |
-
<li>Learn the basics of each Legend and weapon. Each Legend and weapon has its own strengths, weaknesses, and playstyles. You should try out different Legends and weapons to find out which ones suit you best. You should also learn the basic attacks, combos, and signatures of each Legend and weapon, as well as their range, speed, damage, and recovery.</li>
|
90 |
-
<li>Use the training mode to practice your skills. The training mode is a great way to practice your moves, combos, and techniques without any pressure or interruption. You can customize the settings of the training mode, such as the stage, the bots, the damage, the items, and the hitboxes. You can also use the frame data and hitbox viewer to analyze your attacks and improve your timing and accuracy.</li>
|
91 |
-
<li>Watch replays and streams of other players. Watching replays and streams of other players can help you learn from their mistakes and successes. You can watch replays of your own matches or other players' matches in the replay menu. You can also watch streams of professional players or tournaments on platforms like Twitch or YouTube. You can observe how they play, what they do, and why they do it.</li>
|
92 |
-
<li>Play online matches with other players. Playing online matches with other players is the best way to test your skills and learn from real opponents. You can play casual free-for-alls, ranked matches, custom online matches, or join a clan or a crew. You can also chat with other players, make friends, or challenge them to a rematch.</li>
|
93 |
-
<li>Have fun and enjoy the game. Brawlhalla is a game that is meant to be fun and enjoyable for everyone. You should not get frustrated or angry if you lose or make mistakes. Instead, you should learn from them and try to improve yourself. You should also respect your opponents and be polite and friendly to them. Remember that Brawlhalla is a game that celebrates diversity, creativity, and fun.</li>
|
94 |
-
</ul>
|
95 |
-
<h3>The best Legends and weapons to use</h3>
|
96 |
-
<p>Brawlhalla has over 50 Legends and 13 weapons to choose from, so it can be hard to decide which ones are the best for you. However, there is no definitive answer to this question, as different Legends and weapons have different advantages and disadvantages depending on your playstyle, preference, and skill level. However, here are some general guidelines that might help you choose your Legend and weapon:</p>
|
97 |
-
<table>
|
98 |
-
<tr><th>Legend</th><th>Weapon 1</th><th>Weapon 2</th><th>Description</th></tr>
|
99 |
-
<tr><td>Mako</td><td>Katars</td><td>Greatsword</td><td>A new Legend who is a shark-themed fighter with a Katars and Greatsword combination. She has a unique moveset that allows her to dash, dive, and bite her enemies with her shark-like abilities.</td></tr>
|
100 |
-
<tr><td>Bodvar</td><td>Sword</td><td>Hammer</td><td>A classic Legend who is a bear-themed fighter with a Sword and Hammer combination. He has a balanced moveset that allows him to deal damage, knockback, and stun his enemies with his bear-like strength.</td></tr>
|
101 |
-
<tr><td>Hattori</td><td>Sword</td><td>Spear</ td><td>A popular Legend who is a ninja-themed fighter with a Sword and Spear combination. She has a fast and agile moveset that allows her to dash, teleport, and slash her enemies with her ninja-like skills.</td></tr>
|
102 |
-
<tr><td>Orion</td><td>Spear</td><td>Rocket Lance</td><td>A mysterious Legend who is a space-themed fighter with a Spear and Rocket Lance combination. He has a powerful and versatile moveset that allows him to fly, charge, and blast his enemies with his space-like technology.</td></tr>
|
103 |
-
<tr><td>Ada</td><td>Blasters</td><td>Spear</td><td>A futuristic Legend who is a cyber-themed fighter with a Blasters and Spear combination. She has a ranged and precise moveset that allows her to shoot, hack, and pierce her enemies with her cyber-like abilities.</td></tr>
|
104 |
-
<tr><td>Lucien</td><td>Katars</td><td>Blasters</td><td>A stealthy Legend who is a thief-themed fighter with a Katars and Blasters combination. He has a sneaky and cunning moveset that allows him to evade, strike, and shoot his enemies with his thief-like tactics.</td></tr>
|
105 |
-
<tr><td>Scarlet</td><td>Hammer</td><td>Rocket Lance</td><td>A creative Legend who is an inventor-themed fighter with a Hammer and Rocket Lance combination. She has an inventive and explosive moveset that allows her to smash, drill, and rocket her enemies with her inventor-like gadgets.</td></tr>
|
106 |
-
<tr><td>Teros</td><td>Axe</td><td>Hammer</td><td>A brutal Legend who is a minotaur-themed fighter with an Axe and Hammer combination. He has a savage and destructive moveset that allows him to chop, slam, and crush his enemies with his minotaur-like fury.</td></tr>
|
107 |
-
<tr><td>Koji</td><td>Sword</td><td>Bow</td><td>A noble Legend who is a samurai-themed fighter with a Sword and Bow combination. He has a graceful and elegant moveset that allows him to slash, shoot, and slice his enemies with his samurai-like honor.</td></tr>
|
108 |
-
<tr><td>Ulgrim</td><td>Axe</td><td>Rocket Lance</td>< td><td>A loyal Legend who is a blacksmith-themed fighter with an Axe and Rocket Lance combination. He has a sturdy and reliable moveset that allows him to swing, thrust, and fire his enemies with his blacksmith-like craftsmanship.</td></tr>
|
109 |
-
</table>
|
110 |
-
<p>Of course, these are not the only Legends and weapons that you can use in Brawlhalla. You can experiment with different combinations and find out which ones work best for you. You can also check out the stats, lore, and skins of each Legend and weapon in the game's menu.</p>
|
111 |
-
<h2>Conclusion</h2>
|
112 |
-
<p>Brawlhalla is a fun and exciting platform fighting game that you can play on your Android device. It is free-to-play, cross-play, and constantly updated with new content and features. It has over 50 Legends and 13 weapons to choose from, as well as various game modes and events to enjoy. Brawlhalla 6.02 APK is the latest version of the game for Android devices, and it brings some new features and improvements, such as Mako, the Greatsword, the Performance Mode, the Controller Support, and the Bug Fixes and Balance Changes. If you want to download and install Brawlhalla 6.02 APK on your Android device, you can follow the steps we have provided in this article. You can also use the tips and tricks we have shared to improve your gameplay and win more matches. We hope you have found this article helpful and informative. Thank you for reading and have fun playing Brawlhalla!</p>
|
113 |
-
<h2>FAQs</h2>
|
114 |
-
<p>Here are some frequently asked questions about Brawlhalla 6.02 APK:</p>
|
115 |
-
<ul>
|
116 |
-
<li><b>Q: Is Brawlhalla 6.02 APK safe to download and install?</b></li>
|
117 |
-
<li>A: Yes, Brawlhalla 6.02 APK is safe to download and install, as long as you get it from a reliable source, such as APKCombo, or the Google Play Store. You should also scan the APK file with an antivirus software before installing it on your device.</li>
|
118 |
-
<li><b>Q: How can I update Brawlhalla 6.02 APK if there is a new version available?</b></li>
|
119 |
-
<li>A: You can update Brawlhalla 6.02 APK by downloading and installing the new version from the same source you got it from, or by updating it from the Google Play Store if you have it installed there. You should also delete the old version of the game before installing the new one to avoid any conflicts or errors.</li>
|
120 |
-
<li><b>Q: How can I play Brawlhalla 6.02 APK with my friends or other players online?</b></li>
|
121 |
-
<li>A: You can play Brawlhalla 6.02 APK with your friends or other players online by using the online matchmaking system in the game's menu. You can choose from different online modes, such as free-for-alls, ranked matches, custom online matches, or clan or crew battles. You can also invite your friends to join your party or room by using the invite code or link in the game's menu.</li>
|
122 |
-
<li><b>Q: How can I get more gold, mammoth coins, or skins in Brawlhalla 6.02 APK?</b></li>
|
123 |
-
<li>A: You can get more gold in Brawlhalla 6.02 APK by playing online or offline matches, completing daily missions, logging in daily, or watching ads in the game's menu. You can use gold to buy new Legends or colors in the game's store. You can get more mammoth coins in Brawlhalla 6.02 APK by purchasing them with real money in the game's store or by earning them through special events or promotions in the game's menu. You can use mammoth coins to buy skins, taunts, KO effects, sidekicks, podiums, avatars, or chests in the game's store. You can get more skins in Brawlhalla 6.02 APK by buying them with mammoth coins in the game's store or by unlocking them through chests or events in the game's menu.</li>
|
124 |
-
<li><b>Q: How can I contact the developers or report a bug or issue in Brawlhalla 6.02 APK?</b></li>
|
125 |
-
<li>A: You can contact the developers or report a bug or issue in Brawlhalla 6.02 APK by using the feedback or support options in the game's menu or by visiting their official website, Twitter, Facebook, Discord, Reddit, or YouTube. You should provide as much detail as possible about your problem and include screenshots or videos if possible.</li>
|
126 |
-
</ul>
|
127 |
-
<|im_end|</p> 197e85843d<br />
|
128 |
-
<br />
|
129 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2ndelement/voicevox/test/test_mora_to_text.py
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
from unittest import TestCase
|
2 |
-
|
3 |
-
# TODO: import from voicevox_engine.synthesis_engine.mora
|
4 |
-
from voicevox_engine.synthesis_engine.synthesis_engine_base import mora_to_text
|
5 |
-
|
6 |
-
|
7 |
-
class TestMoraToText(TestCase):
|
8 |
-
def test_voice(self):
|
9 |
-
self.assertEqual(mora_to_text("a"), "ア")
|
10 |
-
self.assertEqual(mora_to_text("i"), "イ")
|
11 |
-
self.assertEqual(mora_to_text("ka"), "カ")
|
12 |
-
self.assertEqual(mora_to_text("N"), "ン")
|
13 |
-
self.assertEqual(mora_to_text("cl"), "ッ")
|
14 |
-
self.assertEqual(mora_to_text("gye"), "ギェ")
|
15 |
-
self.assertEqual(mora_to_text("ye"), "イェ")
|
16 |
-
self.assertEqual(mora_to_text("wo"), "ウォ")
|
17 |
-
|
18 |
-
def test_unvoice(self):
|
19 |
-
self.assertEqual(mora_to_text("A"), "ア")
|
20 |
-
self.assertEqual(mora_to_text("I"), "イ")
|
21 |
-
self.assertEqual(mora_to_text("kA"), "カ")
|
22 |
-
self.assertEqual(mora_to_text("gyE"), "ギェ")
|
23 |
-
self.assertEqual(mora_to_text("yE"), "イェ")
|
24 |
-
self.assertEqual(mora_to_text("wO"), "ウォ")
|
25 |
-
|
26 |
-
def test_invalid_mora(self):
|
27 |
-
"""変なモーラが来ても例外を投げない"""
|
28 |
-
self.assertEqual(mora_to_text("x"), "x")
|
29 |
-
self.assertEqual(mora_to_text(""), "")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2ndelement/voicevox/test/test_user_dict.py
DELETED
@@ -1,348 +0,0 @@
|
|
1 |
-
import json
|
2 |
-
from copy import deepcopy
|
3 |
-
from pathlib import Path
|
4 |
-
from tempfile import TemporaryDirectory
|
5 |
-
from typing import Dict
|
6 |
-
from unittest import TestCase
|
7 |
-
|
8 |
-
from fastapi import HTTPException
|
9 |
-
from pyopenjtalk import g2p, unset_user_dict
|
10 |
-
|
11 |
-
from voicevox_engine.model import UserDictWord, WordTypes
|
12 |
-
from voicevox_engine.part_of_speech_data import MAX_PRIORITY, part_of_speech_data
|
13 |
-
from voicevox_engine.user_dict import (
|
14 |
-
apply_word,
|
15 |
-
create_word,
|
16 |
-
delete_word,
|
17 |
-
import_user_dict,
|
18 |
-
read_dict,
|
19 |
-
rewrite_word,
|
20 |
-
update_dict,
|
21 |
-
)
|
22 |
-
|
23 |
-
# jsonとして保存される正しい形式の辞書データ
|
24 |
-
valid_dict_dict_json = {
|
25 |
-
"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e": {
|
26 |
-
"surface": "test",
|
27 |
-
"cost": part_of_speech_data[WordTypes.PROPER_NOUN].cost_candidates[5],
|
28 |
-
"part_of_speech": "名詞",
|
29 |
-
"part_of_speech_detail_1": "固有名詞",
|
30 |
-
"part_of_speech_detail_2": "一般",
|
31 |
-
"part_of_speech_detail_3": "*",
|
32 |
-
"inflectional_type": "*",
|
33 |
-
"inflectional_form": "*",
|
34 |
-
"stem": "*",
|
35 |
-
"yomi": "テスト",
|
36 |
-
"pronunciation": "テスト",
|
37 |
-
"accent_type": 1,
|
38 |
-
"accent_associative_rule": "*",
|
39 |
-
},
|
40 |
-
}
|
41 |
-
|
42 |
-
# APIでやり取りされる正しい形式の辞書データ
|
43 |
-
valid_dict_dict_api = deepcopy(valid_dict_dict_json)
|
44 |
-
del valid_dict_dict_api["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"]["cost"]
|
45 |
-
valid_dict_dict_api["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"]["priority"] = 5
|
46 |
-
|
47 |
-
import_word = UserDictWord(
|
48 |
-
surface="test2",
|
49 |
-
priority=5,
|
50 |
-
part_of_speech="名詞",
|
51 |
-
part_of_speech_detail_1="固有名詞",
|
52 |
-
part_of_speech_detail_2="一般",
|
53 |
-
part_of_speech_detail_3="*",
|
54 |
-
inflectional_type="*",
|
55 |
-
inflectional_form="*",
|
56 |
-
stem="*",
|
57 |
-
yomi="テストツー",
|
58 |
-
pronunciation="テストツー",
|
59 |
-
accent_type=1,
|
60 |
-
accent_associative_rule="*",
|
61 |
-
)
|
62 |
-
|
63 |
-
|
64 |
-
def get_new_word(user_dict: Dict[str, UserDictWord]):
|
65 |
-
assert len(user_dict) == 2 or (
|
66 |
-
len(user_dict) == 1 and "aab7dda2-0d97-43c8-8cb7-3f440dab9b4e" not in user_dict
|
67 |
-
)
|
68 |
-
for word_uuid in user_dict.keys():
|
69 |
-
if word_uuid == "aab7dda2-0d97-43c8-8cb7-3f440dab9b4e":
|
70 |
-
continue
|
71 |
-
return user_dict[word_uuid]
|
72 |
-
raise AssertionError
|
73 |
-
|
74 |
-
|
75 |
-
class TestUserDict(TestCase):
|
76 |
-
def setUp(self):
|
77 |
-
self.tmp_dir = TemporaryDirectory()
|
78 |
-
self.tmp_dir_path = Path(self.tmp_dir.name)
|
79 |
-
|
80 |
-
def tearDown(self):
|
81 |
-
unset_user_dict()
|
82 |
-
self.tmp_dir.cleanup()
|
83 |
-
|
84 |
-
def test_read_not_exist_json(self):
|
85 |
-
self.assertEqual(
|
86 |
-
read_dict(user_dict_path=(self.tmp_dir_path / "not_exist.json")),
|
87 |
-
{},
|
88 |
-
)
|
89 |
-
|
90 |
-
def test_create_word(self):
|
91 |
-
# 将来的に品詞などが追加された時にテストを増やす
|
92 |
-
self.assertEqual(
|
93 |
-
create_word(surface="test", pronunciation="テスト", accent_type=1),
|
94 |
-
UserDictWord(
|
95 |
-
surface="test",
|
96 |
-
priority=5,
|
97 |
-
part_of_speech="名詞",
|
98 |
-
part_of_speech_detail_1="固有名詞",
|
99 |
-
part_of_speech_detail_2="一般",
|
100 |
-
part_of_speech_detail_3="*",
|
101 |
-
inflectional_type="*",
|
102 |
-
inflectional_form="*",
|
103 |
-
stem="*",
|
104 |
-
yomi="テスト",
|
105 |
-
pronunciation="テスト",
|
106 |
-
accent_type=1,
|
107 |
-
accent_associative_rule="*",
|
108 |
-
),
|
109 |
-
)
|
110 |
-
|
111 |
-
def test_apply_word_without_json(self):
|
112 |
-
user_dict_path = self.tmp_dir_path / "test_apply_word_without_json.json"
|
113 |
-
apply_word(
|
114 |
-
surface="test",
|
115 |
-
pronunciation="テスト",
|
116 |
-
accent_type=1,
|
117 |
-
user_dict_path=user_dict_path,
|
118 |
-
compiled_dict_path=(self.tmp_dir_path / "test_apply_word_without_json.dic"),
|
119 |
-
)
|
120 |
-
res = read_dict(user_dict_path=user_dict_path)
|
121 |
-
self.assertEqual(len(res), 1)
|
122 |
-
new_word = get_new_word(res)
|
123 |
-
self.assertEqual(
|
124 |
-
(
|
125 |
-
new_word.surface,
|
126 |
-
new_word.pronunciation,
|
127 |
-
new_word.accent_type,
|
128 |
-
),
|
129 |
-
("test", "テスト", 1),
|
130 |
-
)
|
131 |
-
|
132 |
-
def test_apply_word_with_json(self):
|
133 |
-
user_dict_path = self.tmp_dir_path / "test_apply_word_with_json.json"
|
134 |
-
user_dict_path.write_text(
|
135 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
136 |
-
)
|
137 |
-
apply_word(
|
138 |
-
surface="test2",
|
139 |
-
pronunciation="テストツー",
|
140 |
-
accent_type=3,
|
141 |
-
user_dict_path=user_dict_path,
|
142 |
-
compiled_dict_path=(self.tmp_dir_path / "test_apply_word_with_json.dic"),
|
143 |
-
)
|
144 |
-
res = read_dict(user_dict_path=user_dict_path)
|
145 |
-
self.assertEqual(len(res), 2)
|
146 |
-
new_word = get_new_word(res)
|
147 |
-
self.assertEqual(
|
148 |
-
(
|
149 |
-
new_word.surface,
|
150 |
-
new_word.pronunciation,
|
151 |
-
new_word.accent_type,
|
152 |
-
),
|
153 |
-
("test2", "テストツー", 3),
|
154 |
-
)
|
155 |
-
|
156 |
-
def test_rewrite_word_invalid_id(self):
|
157 |
-
user_dict_path = self.tmp_dir_path / "test_rewrite_word_invalid_id.json"
|
158 |
-
user_dict_path.write_text(
|
159 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
160 |
-
)
|
161 |
-
self.assertRaises(
|
162 |
-
HTTPException,
|
163 |
-
rewrite_word,
|
164 |
-
word_uuid="c2be4dc5-d07d-4767-8be1-04a1bb3f05a9",
|
165 |
-
surface="test2",
|
166 |
-
pronunciation="テストツー",
|
167 |
-
accent_type=2,
|
168 |
-
user_dict_path=user_dict_path,
|
169 |
-
compiled_dict_path=(self.tmp_dir_path / "test_rewrite_word_invalid_id.dic"),
|
170 |
-
)
|
171 |
-
|
172 |
-
def test_rewrite_word_valid_id(self):
|
173 |
-
user_dict_path = self.tmp_dir_path / "test_rewrite_word_valid_id.json"
|
174 |
-
user_dict_path.write_text(
|
175 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
176 |
-
)
|
177 |
-
rewrite_word(
|
178 |
-
word_uuid="aab7dda2-0d97-43c8-8cb7-3f440dab9b4e",
|
179 |
-
surface="test2",
|
180 |
-
pronunciation="テストツー",
|
181 |
-
accent_type=2,
|
182 |
-
user_dict_path=user_dict_path,
|
183 |
-
compiled_dict_path=(self.tmp_dir_path / "test_rewrite_word_valid_id.dic"),
|
184 |
-
)
|
185 |
-
new_word = read_dict(user_dict_path=user_dict_path)[
|
186 |
-
"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"
|
187 |
-
]
|
188 |
-
self.assertEqual(
|
189 |
-
(new_word.surface, new_word.pronunciation, new_word.accent_type),
|
190 |
-
("test2", "テストツー", 2),
|
191 |
-
)
|
192 |
-
|
193 |
-
def test_delete_word_invalid_id(self):
|
194 |
-
user_dict_path = self.tmp_dir_path / "test_delete_word_invalid_id.json"
|
195 |
-
user_dict_path.write_text(
|
196 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
197 |
-
)
|
198 |
-
self.assertRaises(
|
199 |
-
HTTPException,
|
200 |
-
delete_word,
|
201 |
-
word_uuid="c2be4dc5-d07d-4767-8be1-04a1bb3f05a9",
|
202 |
-
user_dict_path=user_dict_path,
|
203 |
-
compiled_dict_path=(self.tmp_dir_path / "test_delete_word_invalid_id.dic"),
|
204 |
-
)
|
205 |
-
|
206 |
-
def test_delete_word_valid_id(self):
|
207 |
-
user_dict_path = self.tmp_dir_path / "test_delete_word_valid_id.json"
|
208 |
-
user_dict_path.write_text(
|
209 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
210 |
-
)
|
211 |
-
delete_word(
|
212 |
-
word_uuid="aab7dda2-0d97-43c8-8cb7-3f440dab9b4e",
|
213 |
-
user_dict_path=user_dict_path,
|
214 |
-
compiled_dict_path=(self.tmp_dir_path / "test_delete_word_valid_id.dic"),
|
215 |
-
)
|
216 |
-
self.assertEqual(len(read_dict(user_dict_path=user_dict_path)), 0)
|
217 |
-
|
218 |
-
def test_priority(self):
|
219 |
-
for pos in part_of_speech_data:
|
220 |
-
for i in range(MAX_PRIORITY + 1):
|
221 |
-
self.assertEqual(
|
222 |
-
create_word(
|
223 |
-
surface="test",
|
224 |
-
pronunciation="テスト",
|
225 |
-
accent_type=1,
|
226 |
-
word_type=pos,
|
227 |
-
priority=i,
|
228 |
-
).priority,
|
229 |
-
i,
|
230 |
-
)
|
231 |
-
|
232 |
-
def test_import_dict(self):
|
233 |
-
user_dict_path = self.tmp_dir_path / "test_import_dict.json"
|
234 |
-
compiled_dict_path = self.tmp_dir_path / "test_import_dict.dic"
|
235 |
-
user_dict_path.write_text(
|
236 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
237 |
-
)
|
238 |
-
import_user_dict(
|
239 |
-
{"b1affe2a-d5f0-4050-926c-f28e0c1d9a98": import_word},
|
240 |
-
override=False,
|
241 |
-
user_dict_path=user_dict_path,
|
242 |
-
compiled_dict_path=compiled_dict_path,
|
243 |
-
)
|
244 |
-
self.assertEqual(
|
245 |
-
read_dict(user_dict_path)["b1affe2a-d5f0-4050-926c-f28e0c1d9a98"],
|
246 |
-
import_word,
|
247 |
-
)
|
248 |
-
self.assertEqual(
|
249 |
-
read_dict(user_dict_path)["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"],
|
250 |
-
UserDictWord(**valid_dict_dict_api["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"]),
|
251 |
-
)
|
252 |
-
|
253 |
-
def test_import_dict_no_override(self):
|
254 |
-
user_dict_path = self.tmp_dir_path / "test_import_dict_no_override.json"
|
255 |
-
compiled_dict_path = self.tmp_dir_path / "test_import_dict_no_override.dic"
|
256 |
-
user_dict_path.write_text(
|
257 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
258 |
-
)
|
259 |
-
import_user_dict(
|
260 |
-
{"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e": import_word},
|
261 |
-
override=False,
|
262 |
-
user_dict_path=user_dict_path,
|
263 |
-
compiled_dict_path=compiled_dict_path,
|
264 |
-
)
|
265 |
-
self.assertEqual(
|
266 |
-
read_dict(user_dict_path)["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"],
|
267 |
-
UserDictWord(**valid_dict_dict_api["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"]),
|
268 |
-
)
|
269 |
-
|
270 |
-
def test_import_dict_override(self):
|
271 |
-
user_dict_path = self.tmp_dir_path / "test_import_dict_override.json"
|
272 |
-
compiled_dict_path = self.tmp_dir_path / "test_import_dict_override.dic"
|
273 |
-
user_dict_path.write_text(
|
274 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
275 |
-
)
|
276 |
-
import_user_dict(
|
277 |
-
{"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e": import_word},
|
278 |
-
override=True,
|
279 |
-
user_dict_path=user_dict_path,
|
280 |
-
compiled_dict_path=compiled_dict_path,
|
281 |
-
)
|
282 |
-
self.assertEqual(
|
283 |
-
read_dict(user_dict_path)["aab7dda2-0d97-43c8-8cb7-3f440dab9b4e"],
|
284 |
-
import_word,
|
285 |
-
)
|
286 |
-
|
287 |
-
def test_import_invalid_word(self):
|
288 |
-
user_dict_path = self.tmp_dir_path / "test_import_invalid_dict.json"
|
289 |
-
compiled_dict_path = self.tmp_dir_path / "test_import_invalid_dict.dic"
|
290 |
-
invalid_accent_associative_rule_word = deepcopy(import_word)
|
291 |
-
invalid_accent_associative_rule_word.accent_associative_rule = "invalid"
|
292 |
-
user_dict_path.write_text(
|
293 |
-
json.dumps(valid_dict_dict_json, ensure_ascii=False), encoding="utf-8"
|
294 |
-
)
|
295 |
-
self.assertRaises(
|
296 |
-
AssertionError,
|
297 |
-
import_user_dict,
|
298 |
-
{
|
299 |
-
"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e": invalid_accent_associative_rule_word
|
300 |
-
},
|
301 |
-
override=True,
|
302 |
-
user_dict_path=user_dict_path,
|
303 |
-
compiled_dict_path=compiled_dict_path,
|
304 |
-
)
|
305 |
-
invalid_pos_word = deepcopy(import_word)
|
306 |
-
invalid_pos_word.context_id = 2
|
307 |
-
invalid_pos_word.part_of_speech = "フィラー"
|
308 |
-
invalid_pos_word.part_of_speech_detail_1 = "*"
|
309 |
-
invalid_pos_word.part_of_speech_detail_2 = "*"
|
310 |
-
invalid_pos_word.part_of_speech_detail_3 = "*"
|
311 |
-
self.assertRaises(
|
312 |
-
ValueError,
|
313 |
-
import_user_dict,
|
314 |
-
{"aab7dda2-0d97-43c8-8cb7-3f440dab9b4e": invalid_pos_word},
|
315 |
-
override=True,
|
316 |
-
user_dict_path=user_dict_path,
|
317 |
-
compiled_dict_path=compiled_dict_path,
|
318 |
-
)
|
319 |
-
|
320 |
-
def test_update_dict(self):
|
321 |
-
user_dict_path = self.tmp_dir_path / "test_update_dict.json"
|
322 |
-
compiled_dict_path = self.tmp_dir_path / "test_update_dict.dic"
|
323 |
-
update_dict(
|
324 |
-
user_dict_path=user_dict_path, compiled_dict_path=compiled_dict_path
|
325 |
-
)
|
326 |
-
test_text = "テスト用の文字列"
|
327 |
-
success_pronunciation = "デフォルトノジショデハゼッタイニセイセイサレナイヨミ"
|
328 |
-
|
329 |
-
# 既に辞書に登録されていないか確認する
|
330 |
-
self.assertNotEqual(g2p(text=test_text, kana=True), success_pronunciation)
|
331 |
-
|
332 |
-
apply_word(
|
333 |
-
surface=test_text,
|
334 |
-
pronunciation=success_pronunciation,
|
335 |
-
accent_type=1,
|
336 |
-
priority=10,
|
337 |
-
user_dict_path=user_dict_path,
|
338 |
-
compiled_dict_path=compiled_dict_path,
|
339 |
-
)
|
340 |
-
self.assertEqual(g2p(text=test_text, kana=True), success_pronunciation)
|
341 |
-
|
342 |
-
# 疑似的にエンジンを再起動する
|
343 |
-
unset_user_dict()
|
344 |
-
update_dict(
|
345 |
-
user_dict_path=user_dict_path, compiled_dict_path=compiled_dict_path
|
346 |
-
)
|
347 |
-
|
348 |
-
self.assertEqual(g2p(text=test_text, kana=True), success_pronunciation)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2ndelement/voicevox/voicevox_engine/utility/mutex_utility.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
import threading
|
2 |
-
|
3 |
-
|
4 |
-
def mutex_wrapper(lock: threading.Lock):
|
5 |
-
def wrap(f):
|
6 |
-
def func(*args, **kw):
|
7 |
-
lock.acquire()
|
8 |
-
try:
|
9 |
-
return f(*args, **kw)
|
10 |
-
finally:
|
11 |
-
lock.release()
|
12 |
-
|
13 |
-
return func
|
14 |
-
|
15 |
-
return wrap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/3B-Group/ConvRe-Leaderboard/src/css_html.py
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
# source: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/blob/main/src/assets/css_html_js.py
|
2 |
-
custom_css = """
|
3 |
-
#changelog-text {
|
4 |
-
font-size: 16px !important;
|
5 |
-
}
|
6 |
-
|
7 |
-
#changelog-text h2 {
|
8 |
-
font-size: 18px !important;
|
9 |
-
}
|
10 |
-
|
11 |
-
.markdown-text {
|
12 |
-
font-size: 16px !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
#answer-text {
|
16 |
-
font-size: 28px !important;
|
17 |
-
}
|
18 |
-
|
19 |
-
#models-to-add-text {
|
20 |
-
font-size: 18px !important;
|
21 |
-
}
|
22 |
-
|
23 |
-
#citation-button span {
|
24 |
-
font-size: 16px !important;
|
25 |
-
}
|
26 |
-
|
27 |
-
#citation-button textarea {
|
28 |
-
font-size: 16px !important;
|
29 |
-
}
|
30 |
-
|
31 |
-
#citation-button > label > button {
|
32 |
-
margin: 6px;
|
33 |
-
transform: scale(1.3);
|
34 |
-
}
|
35 |
-
|
36 |
-
#leaderboard-table {
|
37 |
-
margin-top: 15px
|
38 |
-
}
|
39 |
-
|
40 |
-
#leaderboard-table-lite {
|
41 |
-
margin-top: 15px
|
42 |
-
}
|
43 |
-
|
44 |
-
#search-bar-table-box > div:first-child {
|
45 |
-
background: none;
|
46 |
-
border: none;
|
47 |
-
}
|
48 |
-
|
49 |
-
#search-bar {
|
50 |
-
padding: 0px;
|
51 |
-
}
|
52 |
-
|
53 |
-
/* Hides the final AutoEvalColumn */
|
54 |
-
#llm-benchmark-tab-table table td:last-child,
|
55 |
-
#llm-benchmark-tab-table table th:last-child {
|
56 |
-
display: none;
|
57 |
-
}
|
58 |
-
|
59 |
-
/* Limit the width of the first AutoEvalColumn so that names don't expand too much */
|
60 |
-
table td:first-child,
|
61 |
-
table th:first-child {
|
62 |
-
max-width: 400px;
|
63 |
-
overflow: auto;
|
64 |
-
white-space: nowrap;
|
65 |
-
}
|
66 |
-
|
67 |
-
.tab-buttons button {
|
68 |
-
font-size: 20px;
|
69 |
-
}
|
70 |
-
|
71 |
-
#scale-logo {
|
72 |
-
border-style: none !important;
|
73 |
-
box-shadow: none;
|
74 |
-
display: block;
|
75 |
-
margin-left: auto;
|
76 |
-
margin-right: auto;
|
77 |
-
max-width: 600px;
|
78 |
-
}
|
79 |
-
|
80 |
-
#scale-logo .download {
|
81 |
-
display: none;
|
82 |
-
}
|
83 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/4Taps/SadTalker/src/face3d/util/html.py
DELETED
@@ -1,86 +0,0 @@
|
|
1 |
-
import dominate
|
2 |
-
from dominate.tags import meta, h3, table, tr, td, p, a, img, br
|
3 |
-
import os
|
4 |
-
|
5 |
-
|
6 |
-
class HTML:
|
7 |
-
"""This HTML class allows us to save images and write texts into a single HTML file.
|
8 |
-
|
9 |
-
It consists of functions such as <add_header> (add a text header to the HTML file),
|
10 |
-
<add_images> (add a row of images to the HTML file), and <save> (save the HTML to the disk).
|
11 |
-
It is based on Python library 'dominate', a Python library for creating and manipulating HTML documents using a DOM API.
|
12 |
-
"""
|
13 |
-
|
14 |
-
def __init__(self, web_dir, title, refresh=0):
|
15 |
-
"""Initialize the HTML classes
|
16 |
-
|
17 |
-
Parameters:
|
18 |
-
web_dir (str) -- a directory that stores the webpage. HTML file will be created at <web_dir>/index.html; images will be saved at <web_dir/images/
|
19 |
-
title (str) -- the webpage name
|
20 |
-
refresh (int) -- how often the website refresh itself; if 0; no refreshing
|
21 |
-
"""
|
22 |
-
self.title = title
|
23 |
-
self.web_dir = web_dir
|
24 |
-
self.img_dir = os.path.join(self.web_dir, 'images')
|
25 |
-
if not os.path.exists(self.web_dir):
|
26 |
-
os.makedirs(self.web_dir)
|
27 |
-
if not os.path.exists(self.img_dir):
|
28 |
-
os.makedirs(self.img_dir)
|
29 |
-
|
30 |
-
self.doc = dominate.document(title=title)
|
31 |
-
if refresh > 0:
|
32 |
-
with self.doc.head:
|
33 |
-
meta(http_equiv="refresh", content=str(refresh))
|
34 |
-
|
35 |
-
def get_image_dir(self):
|
36 |
-
"""Return the directory that stores images"""
|
37 |
-
return self.img_dir
|
38 |
-
|
39 |
-
def add_header(self, text):
|
40 |
-
"""Insert a header to the HTML file
|
41 |
-
|
42 |
-
Parameters:
|
43 |
-
text (str) -- the header text
|
44 |
-
"""
|
45 |
-
with self.doc:
|
46 |
-
h3(text)
|
47 |
-
|
48 |
-
def add_images(self, ims, txts, links, width=400):
|
49 |
-
"""add images to the HTML file
|
50 |
-
|
51 |
-
Parameters:
|
52 |
-
ims (str list) -- a list of image paths
|
53 |
-
txts (str list) -- a list of image names shown on the website
|
54 |
-
links (str list) -- a list of hyperref links; when you click an image, it will redirect you to a new page
|
55 |
-
"""
|
56 |
-
self.t = table(border=1, style="table-layout: fixed;") # Insert a table
|
57 |
-
self.doc.add(self.t)
|
58 |
-
with self.t:
|
59 |
-
with tr():
|
60 |
-
for im, txt, link in zip(ims, txts, links):
|
61 |
-
with td(style="word-wrap: break-word;", halign="center", valign="top"):
|
62 |
-
with p():
|
63 |
-
with a(href=os.path.join('images', link)):
|
64 |
-
img(style="width:%dpx" % width, src=os.path.join('images', im))
|
65 |
-
br()
|
66 |
-
p(txt)
|
67 |
-
|
68 |
-
def save(self):
|
69 |
-
"""save the current content to the HMTL file"""
|
70 |
-
html_file = '%s/index.html' % self.web_dir
|
71 |
-
f = open(html_file, 'wt')
|
72 |
-
f.write(self.doc.render())
|
73 |
-
f.close()
|
74 |
-
|
75 |
-
|
76 |
-
if __name__ == '__main__': # we show an example usage here.
|
77 |
-
html = HTML('web/', 'test_html')
|
78 |
-
html.add_header('hello world')
|
79 |
-
|
80 |
-
ims, txts, links = [], [], []
|
81 |
-
for n in range(4):
|
82 |
-
ims.append('image_%d.png' % n)
|
83 |
-
txts.append('text_%d' % n)
|
84 |
-
links.append('image_%d.png' % n)
|
85 |
-
html.add_images(ims, txts, links)
|
86 |
-
html.save()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/801artistry/RVC801/infer/lib/uvr5_pack/lib_v5/nets_33966KB.py
DELETED
@@ -1,122 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
import torch.nn.functional as F
|
3 |
-
from torch import nn
|
4 |
-
|
5 |
-
from . import layers_33966KB as layers
|
6 |
-
|
7 |
-
|
8 |
-
class BaseASPPNet(nn.Module):
|
9 |
-
def __init__(self, nin, ch, dilations=(4, 8, 16, 32)):
|
10 |
-
super(BaseASPPNet, self).__init__()
|
11 |
-
self.enc1 = layers.Encoder(nin, ch, 3, 2, 1)
|
12 |
-
self.enc2 = layers.Encoder(ch, ch * 2, 3, 2, 1)
|
13 |
-
self.enc3 = layers.Encoder(ch * 2, ch * 4, 3, 2, 1)
|
14 |
-
self.enc4 = layers.Encoder(ch * 4, ch * 8, 3, 2, 1)
|
15 |
-
|
16 |
-
self.aspp = layers.ASPPModule(ch * 8, ch * 16, dilations)
|
17 |
-
|
18 |
-
self.dec4 = layers.Decoder(ch * (8 + 16), ch * 8, 3, 1, 1)
|
19 |
-
self.dec3 = layers.Decoder(ch * (4 + 8), ch * 4, 3, 1, 1)
|
20 |
-
self.dec2 = layers.Decoder(ch * (2 + 4), ch * 2, 3, 1, 1)
|
21 |
-
self.dec1 = layers.Decoder(ch * (1 + 2), ch, 3, 1, 1)
|
22 |
-
|
23 |
-
def __call__(self, x):
|
24 |
-
h, e1 = self.enc1(x)
|
25 |
-
h, e2 = self.enc2(h)
|
26 |
-
h, e3 = self.enc3(h)
|
27 |
-
h, e4 = self.enc4(h)
|
28 |
-
|
29 |
-
h = self.aspp(h)
|
30 |
-
|
31 |
-
h = self.dec4(h, e4)
|
32 |
-
h = self.dec3(h, e3)
|
33 |
-
h = self.dec2(h, e2)
|
34 |
-
h = self.dec1(h, e1)
|
35 |
-
|
36 |
-
return h
|
37 |
-
|
38 |
-
|
39 |
-
class CascadedASPPNet(nn.Module):
|
40 |
-
def __init__(self, n_fft):
|
41 |
-
super(CascadedASPPNet, self).__init__()
|
42 |
-
self.stg1_low_band_net = BaseASPPNet(2, 16)
|
43 |
-
self.stg1_high_band_net = BaseASPPNet(2, 16)
|
44 |
-
|
45 |
-
self.stg2_bridge = layers.Conv2DBNActiv(18, 8, 1, 1, 0)
|
46 |
-
self.stg2_full_band_net = BaseASPPNet(8, 16)
|
47 |
-
|
48 |
-
self.stg3_bridge = layers.Conv2DBNActiv(34, 16, 1, 1, 0)
|
49 |
-
self.stg3_full_band_net = BaseASPPNet(16, 32)
|
50 |
-
|
51 |
-
self.out = nn.Conv2d(32, 2, 1, bias=False)
|
52 |
-
self.aux1_out = nn.Conv2d(16, 2, 1, bias=False)
|
53 |
-
self.aux2_out = nn.Conv2d(16, 2, 1, bias=False)
|
54 |
-
|
55 |
-
self.max_bin = n_fft // 2
|
56 |
-
self.output_bin = n_fft // 2 + 1
|
57 |
-
|
58 |
-
self.offset = 128
|
59 |
-
|
60 |
-
def forward(self, x, aggressiveness=None):
|
61 |
-
mix = x.detach()
|
62 |
-
x = x.clone()
|
63 |
-
|
64 |
-
x = x[:, :, : self.max_bin]
|
65 |
-
|
66 |
-
bandw = x.size()[2] // 2
|
67 |
-
aux1 = torch.cat(
|
68 |
-
[
|
69 |
-
self.stg1_low_band_net(x[:, :, :bandw]),
|
70 |
-
self.stg1_high_band_net(x[:, :, bandw:]),
|
71 |
-
],
|
72 |
-
dim=2,
|
73 |
-
)
|
74 |
-
|
75 |
-
h = torch.cat([x, aux1], dim=1)
|
76 |
-
aux2 = self.stg2_full_band_net(self.stg2_bridge(h))
|
77 |
-
|
78 |
-
h = torch.cat([x, aux1, aux2], dim=1)
|
79 |
-
h = self.stg3_full_band_net(self.stg3_bridge(h))
|
80 |
-
|
81 |
-
mask = torch.sigmoid(self.out(h))
|
82 |
-
mask = F.pad(
|
83 |
-
input=mask,
|
84 |
-
pad=(0, 0, 0, self.output_bin - mask.size()[2]),
|
85 |
-
mode="replicate",
|
86 |
-
)
|
87 |
-
|
88 |
-
if self.training:
|
89 |
-
aux1 = torch.sigmoid(self.aux1_out(aux1))
|
90 |
-
aux1 = F.pad(
|
91 |
-
input=aux1,
|
92 |
-
pad=(0, 0, 0, self.output_bin - aux1.size()[2]),
|
93 |
-
mode="replicate",
|
94 |
-
)
|
95 |
-
aux2 = torch.sigmoid(self.aux2_out(aux2))
|
96 |
-
aux2 = F.pad(
|
97 |
-
input=aux2,
|
98 |
-
pad=(0, 0, 0, self.output_bin - aux2.size()[2]),
|
99 |
-
mode="replicate",
|
100 |
-
)
|
101 |
-
return mask * mix, aux1 * mix, aux2 * mix
|
102 |
-
else:
|
103 |
-
if aggressiveness:
|
104 |
-
mask[:, :, : aggressiveness["split_bin"]] = torch.pow(
|
105 |
-
mask[:, :, : aggressiveness["split_bin"]],
|
106 |
-
1 + aggressiveness["value"] / 3,
|
107 |
-
)
|
108 |
-
mask[:, :, aggressiveness["split_bin"] :] = torch.pow(
|
109 |
-
mask[:, :, aggressiveness["split_bin"] :],
|
110 |
-
1 + aggressiveness["value"],
|
111 |
-
)
|
112 |
-
|
113 |
-
return mask * mix
|
114 |
-
|
115 |
-
def predict(self, x_mag, aggressiveness=None):
|
116 |
-
h = self.forward(x_mag, aggressiveness)
|
117 |
-
|
118 |
-
if self.offset > 0:
|
119 |
-
h = h[:, :, :, self.offset : -self.offset]
|
120 |
-
assert h.size()[3] > 0
|
121 |
-
|
122 |
-
return h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIFILMS/generate_human_motion/VQ-Trans/visualize/render_mesh.py
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
import argparse
|
2 |
-
import os
|
3 |
-
from visualize import vis_utils
|
4 |
-
import shutil
|
5 |
-
from tqdm import tqdm
|
6 |
-
|
7 |
-
if __name__ == '__main__':
|
8 |
-
parser = argparse.ArgumentParser()
|
9 |
-
parser.add_argument("--input_path", type=str, required=True, help='stick figure mp4 file to be rendered.')
|
10 |
-
parser.add_argument("--cuda", type=bool, default=True, help='')
|
11 |
-
parser.add_argument("--device", type=int, default=0, help='')
|
12 |
-
params = parser.parse_args()
|
13 |
-
|
14 |
-
assert params.input_path.endswith('.mp4')
|
15 |
-
parsed_name = os.path.basename(params.input_path).replace('.mp4', '').replace('sample', '').replace('rep', '')
|
16 |
-
sample_i, rep_i = [int(e) for e in parsed_name.split('_')]
|
17 |
-
npy_path = os.path.join(os.path.dirname(params.input_path), 'results.npy')
|
18 |
-
out_npy_path = params.input_path.replace('.mp4', '_smpl_params.npy')
|
19 |
-
assert os.path.exists(npy_path)
|
20 |
-
results_dir = params.input_path.replace('.mp4', '_obj')
|
21 |
-
if os.path.exists(results_dir):
|
22 |
-
shutil.rmtree(results_dir)
|
23 |
-
os.makedirs(results_dir)
|
24 |
-
|
25 |
-
npy2obj = vis_utils.npy2obj(npy_path, sample_i, rep_i,
|
26 |
-
device=params.device, cuda=params.cuda)
|
27 |
-
|
28 |
-
print('Saving obj files to [{}]'.format(os.path.abspath(results_dir)))
|
29 |
-
for frame_i in tqdm(range(npy2obj.real_num_frames)):
|
30 |
-
npy2obj.save_obj(os.path.join(results_dir, 'frame{:03d}.obj'.format(frame_i)), frame_i)
|
31 |
-
|
32 |
-
print('Saving SMPL params to [{}]'.format(os.path.abspath(out_npy_path)))
|
33 |
-
npy2obj.save_npy(out_npy_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIGC-Audio/Make_An_Audio/ldm/models/autoencoder_multi.py
DELETED
@@ -1,201 +0,0 @@
|
|
1 |
-
"""
|
2 |
-
与autoencoder.py的区别在于,autoencoder.py计算loss时只有一个discriminator,而此处又多了个multiwindowDiscriminator,所以优化器
|
3 |
-
优化的参数改为:
|
4 |
-
opt_disc = torch.optim.Adam(list(self.loss.discriminator.parameters()) + list(self.loss.discriminator_multi.parameters()),
|
5 |
-
lr=lr, betas=(0.5, 0.9))
|
6 |
-
"""
|
7 |
-
|
8 |
-
import os
|
9 |
-
import torch
|
10 |
-
import pytorch_lightning as pl
|
11 |
-
import torch.nn.functional as F
|
12 |
-
from contextlib import contextmanager
|
13 |
-
|
14 |
-
from packaging import version
|
15 |
-
import numpy as np
|
16 |
-
from ldm.modules.diffusionmodules.model import Encoder, Decoder
|
17 |
-
from ldm.modules.distributions.distributions import DiagonalGaussianDistribution
|
18 |
-
from torch.optim.lr_scheduler import LambdaLR
|
19 |
-
from ldm.util import instantiate_from_config
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
class AutoencoderKL(pl.LightningModule):
|
24 |
-
def __init__(self,
|
25 |
-
ddconfig,
|
26 |
-
lossconfig,
|
27 |
-
embed_dim,
|
28 |
-
ckpt_path=None,
|
29 |
-
ignore_keys=[],
|
30 |
-
image_key="image",
|
31 |
-
colorize_nlabels=None,
|
32 |
-
monitor=None,
|
33 |
-
):
|
34 |
-
super().__init__()
|
35 |
-
self.image_key = image_key
|
36 |
-
self.encoder = Encoder(**ddconfig)
|
37 |
-
self.decoder = Decoder(**ddconfig)
|
38 |
-
self.loss = instantiate_from_config(lossconfig)
|
39 |
-
assert ddconfig["double_z"]
|
40 |
-
self.quant_conv = torch.nn.Conv2d(2*ddconfig["z_channels"], 2*embed_dim, 1)
|
41 |
-
self.post_quant_conv = torch.nn.Conv2d(embed_dim, ddconfig["z_channels"], 1)
|
42 |
-
self.embed_dim = embed_dim
|
43 |
-
if colorize_nlabels is not None:
|
44 |
-
assert type(colorize_nlabels)==int
|
45 |
-
self.register_buffer("colorize", torch.randn(3, colorize_nlabels, 1, 1))
|
46 |
-
if monitor is not None:
|
47 |
-
self.monitor = monitor
|
48 |
-
if ckpt_path is not None:
|
49 |
-
self.init_from_ckpt(ckpt_path, ignore_keys=ignore_keys)
|
50 |
-
|
51 |
-
def init_from_ckpt(self, path, ignore_keys=list()):
|
52 |
-
sd = torch.load(path, map_location="cpu")["state_dict"]
|
53 |
-
keys = list(sd.keys())
|
54 |
-
for k in keys:
|
55 |
-
for ik in ignore_keys:
|
56 |
-
if k.startswith(ik):
|
57 |
-
print("Deleting key {} from state_dict.".format(k))
|
58 |
-
del sd[k]
|
59 |
-
self.load_state_dict(sd, strict=False)
|
60 |
-
print(f"Restored from {path}")
|
61 |
-
|
62 |
-
def encode(self, x):
|
63 |
-
h = self.encoder(x)
|
64 |
-
moments = self.quant_conv(h)
|
65 |
-
posterior = DiagonalGaussianDistribution(moments)
|
66 |
-
return posterior
|
67 |
-
|
68 |
-
def decode(self, z):
|
69 |
-
z = self.post_quant_conv(z)
|
70 |
-
dec = self.decoder(z)
|
71 |
-
return dec
|
72 |
-
|
73 |
-
def forward(self, input, sample_posterior=True):
|
74 |
-
posterior = self.encode(input)
|
75 |
-
if sample_posterior:
|
76 |
-
z = posterior.sample()
|
77 |
-
else:
|
78 |
-
z = posterior.mode()
|
79 |
-
dec = self.decode(z)
|
80 |
-
return dec, posterior
|
81 |
-
|
82 |
-
def get_input(self, batch, k):
|
83 |
-
x = batch[k]
|
84 |
-
if len(x.shape) == 3:
|
85 |
-
x = x[..., None]
|
86 |
-
x = x.permute(0, 3, 1, 2).to(memory_format=torch.contiguous_format).float()
|
87 |
-
return x
|
88 |
-
|
89 |
-
def training_step(self, batch, batch_idx, optimizer_idx):
|
90 |
-
inputs = self.get_input(batch, self.image_key)
|
91 |
-
reconstructions, posterior = self(inputs)
|
92 |
-
|
93 |
-
if optimizer_idx == 0:
|
94 |
-
# train encoder+decoder+logvar
|
95 |
-
aeloss, log_dict_ae = self.loss(inputs, reconstructions, posterior, optimizer_idx, self.global_step,
|
96 |
-
last_layer=self.get_last_layer(), split="train")
|
97 |
-
self.log("aeloss", aeloss, prog_bar=True, logger=True, on_step=True, on_epoch=True)
|
98 |
-
self.log_dict(log_dict_ae, prog_bar=False, logger=True, on_step=True, on_epoch=False)
|
99 |
-
return aeloss
|
100 |
-
|
101 |
-
if optimizer_idx == 1:
|
102 |
-
# train the discriminator
|
103 |
-
discloss, log_dict_disc = self.loss(inputs, reconstructions, posterior, optimizer_idx, self.global_step,
|
104 |
-
last_layer=self.get_last_layer(), split="train")
|
105 |
-
|
106 |
-
self.log("discloss", discloss, prog_bar=True, logger=True, on_step=True, on_epoch=True)
|
107 |
-
self.log_dict(log_dict_disc, prog_bar=False, logger=True, on_step=True, on_epoch=False)
|
108 |
-
return discloss
|
109 |
-
|
110 |
-
def validation_step(self, batch, batch_idx):
|
111 |
-
inputs = self.get_input(batch, self.image_key)
|
112 |
-
reconstructions, posterior = self(inputs)
|
113 |
-
aeloss, log_dict_ae = self.loss(inputs, reconstructions, posterior, 0, self.global_step,
|
114 |
-
last_layer=self.get_last_layer(), split="val")
|
115 |
-
|
116 |
-
discloss, log_dict_disc = self.loss(inputs, reconstructions, posterior, 1, self.global_step,
|
117 |
-
last_layer=self.get_last_layer(), split="val")
|
118 |
-
|
119 |
-
self.log("val/rec_loss", log_dict_ae["val/rec_loss"])
|
120 |
-
self.log_dict(log_dict_ae)
|
121 |
-
self.log_dict(log_dict_disc)
|
122 |
-
return self.log_dict
|
123 |
-
|
124 |
-
def test_step(self, batch, batch_idx):
|
125 |
-
inputs = self.get_input(batch, self.image_key)# inputs shape:(b,c,mel_len,T) or (b,c,h,w)
|
126 |
-
reconstructions, posterior = self(inputs)# reconstructions:(b,c,mel_len,T) or (b,c,h,w)
|
127 |
-
reconstructions = (reconstructions + 1)/2 # to mel scale
|
128 |
-
test_ckpt_path = os.path.basename(self.trainer.tested_ckpt_path)
|
129 |
-
savedir = os.path.join(self.trainer.log_dir,f'output_imgs_{test_ckpt_path}','fake_class')
|
130 |
-
if not os.path.exists(savedir):
|
131 |
-
os.makedirs(savedir)
|
132 |
-
|
133 |
-
file_names = batch['f_name']
|
134 |
-
# print(f"reconstructions.shape:{reconstructions.shape}",file_names)
|
135 |
-
reconstructions = reconstructions.cpu().numpy().squeeze(1) # squuze channel dim
|
136 |
-
for b in range(reconstructions.shape[0]):
|
137 |
-
vname_num_split_index = file_names[b].rfind('_')# file_names[b]:video_name+'_'+num
|
138 |
-
v_n,num = file_names[b][:vname_num_split_index],file_names[b][vname_num_split_index+1:]
|
139 |
-
save_img_path = os.path.join(savedir,f'{v_n}_sample_{num}.npy')
|
140 |
-
np.save(save_img_path,reconstructions[b])
|
141 |
-
|
142 |
-
return None
|
143 |
-
|
144 |
-
def configure_optimizers(self):
|
145 |
-
lr = self.learning_rate
|
146 |
-
opt_ae = torch.optim.Adam(list(self.encoder.parameters())+
|
147 |
-
list(self.decoder.parameters())+
|
148 |
-
list(self.quant_conv.parameters())+
|
149 |
-
list(self.post_quant_conv.parameters()),
|
150 |
-
lr=lr, betas=(0.5, 0.9))
|
151 |
-
opt_disc = torch.optim.Adam(list(self.loss.discriminator.parameters()) + list(self.loss.discriminator_multi.parameters()),
|
152 |
-
lr=lr, betas=(0.5, 0.9))
|
153 |
-
return [opt_ae, opt_disc], []
|
154 |
-
|
155 |
-
def get_last_layer(self):
|
156 |
-
return self.decoder.conv_out.weight
|
157 |
-
|
158 |
-
@torch.no_grad()
|
159 |
-
def log_images(self, batch, only_inputs=False, **kwargs):
|
160 |
-
log = dict()
|
161 |
-
x = self.get_input(batch, self.image_key)
|
162 |
-
x = x.to(self.device)
|
163 |
-
if not only_inputs:
|
164 |
-
xrec, posterior = self(x)
|
165 |
-
if x.shape[1] > 3:
|
166 |
-
# colorize with random projection
|
167 |
-
assert xrec.shape[1] > 3
|
168 |
-
x = self.to_rgb(x)
|
169 |
-
xrec = self.to_rgb(xrec)
|
170 |
-
log["samples"] = self.decode(torch.randn_like(posterior.sample()))
|
171 |
-
log["reconstructions"] = xrec
|
172 |
-
log["inputs"] = x
|
173 |
-
return log
|
174 |
-
|
175 |
-
def to_rgb(self, x):
|
176 |
-
assert self.image_key == "segmentation"
|
177 |
-
if not hasattr(self, "colorize"):
|
178 |
-
self.register_buffer("colorize", torch.randn(3, x.shape[1], 1, 1).to(x))
|
179 |
-
x = F.conv2d(x, weight=self.colorize)
|
180 |
-
x = 2.*(x-x.min())/(x.max()-x.min()) - 1.
|
181 |
-
return x
|
182 |
-
|
183 |
-
|
184 |
-
class IdentityFirstStage(torch.nn.Module):
|
185 |
-
def __init__(self, *args, vq_interface=False, **kwargs):
|
186 |
-
self.vq_interface = vq_interface # TODO: Should be true by default but check to not break older stuff
|
187 |
-
super().__init__()
|
188 |
-
|
189 |
-
def encode(self, x, *args, **kwargs):
|
190 |
-
return x
|
191 |
-
|
192 |
-
def decode(self, x, *args, **kwargs):
|
193 |
-
return x
|
194 |
-
|
195 |
-
def quantize(self, x, *args, **kwargs):
|
196 |
-
if self.vq_interface:
|
197 |
-
return x, None, [None, None, None]
|
198 |
-
return x
|
199 |
-
|
200 |
-
def forward(self, x, *args, **kwargs):
|
201 |
-
return x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIWaves/Debate/src/agents/SOP.py
DELETED
@@ -1,296 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2023 The AIWaves Inc. team.
|
3 |
-
|
4 |
-
#
|
5 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
-
# you may not use this file except in compliance with the License.
|
7 |
-
# You may obtain a copy of the License at
|
8 |
-
#
|
9 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10 |
-
#
|
11 |
-
# Unless required by applicable law or agreed to in writing, software
|
12 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 |
-
# See the License for the specific language governing permissions and
|
15 |
-
# limitations under the License.
|
16 |
-
"""standard operation procedure of an LLM Autonomous agent"""
|
17 |
-
import random
|
18 |
-
from LLM.base_LLM import *
|
19 |
-
from State import State
|
20 |
-
from utils import extract, get_relevant_history
|
21 |
-
from Memory import Memory
|
22 |
-
from Prompt import *
|
23 |
-
import json
|
24 |
-
import os
|
25 |
-
|
26 |
-
class SOP:
|
27 |
-
"""
|
28 |
-
Responsible for managing the operational processes of all agents
|
29 |
-
"""
|
30 |
-
|
31 |
-
# SOP should have args : "states" "relations" "root"
|
32 |
-
|
33 |
-
def __init__(self, **kwargs):
|
34 |
-
self.controller_dict = {}
|
35 |
-
self.LLM = init_LLM("logs/god",**kwargs)
|
36 |
-
|
37 |
-
self.states = {}
|
38 |
-
self.init_states(kwargs["states"])
|
39 |
-
self.init_relation(kwargs["relations"])
|
40 |
-
for state_name, states_dict in kwargs["states"].items():
|
41 |
-
if state_name != "end_state" and "controller" in states_dict:
|
42 |
-
self.controller_dict[state_name] = states_dict["controller"]
|
43 |
-
|
44 |
-
self.user_names = kwargs["user_names"] if "user_names" in kwargs else []
|
45 |
-
self.root = self.states[kwargs["root"]]
|
46 |
-
self.current_state = self.root
|
47 |
-
self.finish_state_name = (
|
48 |
-
kwargs["finish_state_name"]
|
49 |
-
if "finish_state_name" in kwargs
|
50 |
-
else "end_state"
|
51 |
-
)
|
52 |
-
self.roles_to_names = None
|
53 |
-
self.names_to_roles = None
|
54 |
-
self.finished = False
|
55 |
-
|
56 |
-
@classmethod
|
57 |
-
def from_config(cls, config_path):
|
58 |
-
with open(config_path) as f:
|
59 |
-
config = json.load(f)
|
60 |
-
os.environ.clear()
|
61 |
-
for key,value in config["config"].items():
|
62 |
-
if key == "API_BASE":
|
63 |
-
if value == "":
|
64 |
-
pass
|
65 |
-
else:
|
66 |
-
os.environ[key] = value
|
67 |
-
# assert "API_KEY" in os.environ and os.environ["API_KEY"] != "API_KEY","Please go to config.json to set API_KEY"
|
68 |
-
|
69 |
-
sop = SOP(**config)
|
70 |
-
return sop
|
71 |
-
|
72 |
-
def init_states(self, states_dict):
|
73 |
-
for state_name, state_dict in states_dict.items():
|
74 |
-
state_dict["name"] = state_name
|
75 |
-
self.states[state_name] = State(**state_dict)
|
76 |
-
|
77 |
-
def init_relation(self, relations):
|
78 |
-
for state_name, state_relation in relations.items():
|
79 |
-
for idx, next_state_name in state_relation.items():
|
80 |
-
self.states[state_name].next_states[idx] = self.states[next_state_name]
|
81 |
-
|
82 |
-
def transit(self, chat_history, **kwargs):
|
83 |
-
"""
|
84 |
-
Determine the next state based on the current situation
|
85 |
-
Return :
|
86 |
-
next_state(State) : the next state
|
87 |
-
"""
|
88 |
-
# 如果是单一循环节点,则一直循环即可
|
89 |
-
# If it is a single loop node, just keep looping
|
90 |
-
if len(self.current_state.next_states) == 1:
|
91 |
-
next_state = "0"
|
92 |
-
|
93 |
-
# 否则则需要controller去判断进入哪一节点
|
94 |
-
# Otherwise, the controller needs to determine which node to enter.
|
95 |
-
else:
|
96 |
-
current_state = self.current_state
|
97 |
-
controller_dict = self.controller_dict[current_state.name]
|
98 |
-
relevant_history = kwargs["relevant_history"]
|
99 |
-
|
100 |
-
max_chat_nums = controller_dict["max_chat_nums"] if "max_chat_nums" in controller_dict else 1000
|
101 |
-
if current_state.chat_nums>=max_chat_nums:
|
102 |
-
return self.current_state.next_states["1"]
|
103 |
-
|
104 |
-
|
105 |
-
# 否则则让controller判断是否结束
|
106 |
-
# Otherwise, let the controller judge whether to end
|
107 |
-
judge_system_prompt = controller_dict["judge_system_prompt"]
|
108 |
-
environment_prompt = eval(Get_environment_prompt) if current_state.environment_prompt else ""
|
109 |
-
transit_system_prompt = eval(Transit_system_prompt)
|
110 |
-
|
111 |
-
judge_last_prompt = controller_dict["judge_last_prompt"]
|
112 |
-
transit_last_prompt = eval(Transit_last_prompt)
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
environment = kwargs["environment"]
|
117 |
-
environment_summary = environment.shared_memory["short_term_memory"]
|
118 |
-
chat_history_message = Memory.get_chat_history(chat_history)
|
119 |
-
query = chat_history[-1].get_query()
|
120 |
-
|
121 |
-
chat_messages = [
|
122 |
-
{
|
123 |
-
"role": "user",
|
124 |
-
"content": eval(Transit_message)
|
125 |
-
}
|
126 |
-
]
|
127 |
-
|
128 |
-
extract_words = controller_dict["judge_extract_words"] if "judge_extract_words" in controller_dict else "end"
|
129 |
-
|
130 |
-
|
131 |
-
response = self.LLM.get_response(
|
132 |
-
chat_messages, transit_system_prompt, transit_last_prompt, stream=False, **kwargs
|
133 |
-
)
|
134 |
-
next_state = (
|
135 |
-
response if response.isdigit() else extract(response, extract_words)
|
136 |
-
)
|
137 |
-
|
138 |
-
# 如果没有parse出来则继续循环
|
139 |
-
# If no parse comes out, continue looping
|
140 |
-
if not next_state.isdigit():
|
141 |
-
next_state = "0"
|
142 |
-
|
143 |
-
next_state = self.current_state.next_states[next_state]
|
144 |
-
return next_state
|
145 |
-
|
146 |
-
|
147 |
-
def route(self, chat_history, **kwargs):
|
148 |
-
"""
|
149 |
-
Determine the role that needs action based on the current situation
|
150 |
-
Return :
|
151 |
-
current_agent(Agent) : the next act agent
|
152 |
-
"""
|
153 |
-
|
154 |
-
agents = kwargs["agents"]
|
155 |
-
|
156 |
-
# 知道进入哪一状态后开始分配角色,如果该状态下只有一个角色则直接分配给他
|
157 |
-
# Start assigning roles after knowing which state you have entered. If there is only one role in that state, assign it directly to him.
|
158 |
-
if len(self.current_state.roles) == 1:
|
159 |
-
next_role = self.current_state.roles[0]
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
# 否则controller进行分配
|
164 |
-
# Otherwise the controller determines
|
165 |
-
else:
|
166 |
-
relevant_history = kwargs["relevant_history"]
|
167 |
-
controller_type = (
|
168 |
-
self.controller_dict[self.current_state.name]["controller_type"]
|
169 |
-
if "controller_type" in self.controller_dict[self.current_state.name]
|
170 |
-
else "order"
|
171 |
-
)
|
172 |
-
|
173 |
-
|
174 |
-
# 如果是rule 控制器,则交由LLM进行分配角色
|
175 |
-
# If controller type is rule, it is left to LLM to assign roles.
|
176 |
-
if controller_type == "rule":
|
177 |
-
controller_dict = self.controller_dict[self.current_state.name]
|
178 |
-
|
179 |
-
call_last_prompt = controller_dict["call_last_prompt"] if "call_last_prompt" in controller_dict else ""
|
180 |
-
|
181 |
-
allocate_prompt = ""
|
182 |
-
roles = list(set(self.current_state.roles))
|
183 |
-
for role in roles:
|
184 |
-
allocate_prompt += eval(Allocate_component)
|
185 |
-
|
186 |
-
call_system_prompt = controller_dict["call_system_prompt"] if "call_system_prompt" in controller_dict else ""
|
187 |
-
environment_prompt = eval(Get_environment_prompt) if self.current_state.environment_prompt else ""
|
188 |
-
# call_system_prompt + environment + allocate_prompt
|
189 |
-
call_system_prompt = eval(Call_system_prompt)
|
190 |
-
|
191 |
-
query = chat_history[-1].get_query()
|
192 |
-
last_name = chat_history[-1].send_name
|
193 |
-
# last_prompt: note + last_prompt + query
|
194 |
-
call_last_prompt =eval(Call_last_prompt)
|
195 |
-
|
196 |
-
|
197 |
-
chat_history_message = Memory.get_chat_history(chat_history)
|
198 |
-
# Intermediate historical conversation records
|
199 |
-
chat_messages = [
|
200 |
-
{
|
201 |
-
"role": "user",
|
202 |
-
"content": eval(Call_message),
|
203 |
-
}
|
204 |
-
]
|
205 |
-
|
206 |
-
extract_words = controller_dict["call_extract_words"] if "call_extract_words" in controller_dict else "end"
|
207 |
-
|
208 |
-
response = self.LLM.get_response(
|
209 |
-
chat_messages, call_system_prompt, call_last_prompt, stream=False, **kwargs
|
210 |
-
)
|
211 |
-
|
212 |
-
# get next role
|
213 |
-
next_role = extract(response, extract_words)
|
214 |
-
|
215 |
-
# Speak in order
|
216 |
-
elif controller_type == "order":
|
217 |
-
# If there is no begin role, it will be given directly to the first person.
|
218 |
-
if not self.current_state.current_role:
|
219 |
-
next_role = self.current_state.roles[0]
|
220 |
-
# otherwise first
|
221 |
-
else:
|
222 |
-
self.current_state.index += 1
|
223 |
-
self.current_state.index = (self.current_state.index) % len(self.current_state.roles)
|
224 |
-
next_role = self.current_state.roles[self.current_state.index]
|
225 |
-
# random speak
|
226 |
-
elif controller_type == "random":
|
227 |
-
next_role = random.choice(self.current_state.roles)
|
228 |
-
|
229 |
-
# 如果下一角色不在,则随机挑选一个
|
230 |
-
# If the next character is not available, pick one at random
|
231 |
-
if next_role not in self.current_state.roles:
|
232 |
-
next_role = random.choice(self.current_state.roles)
|
233 |
-
|
234 |
-
self.current_state.current_role = next_role
|
235 |
-
|
236 |
-
next_agent = agents[self.roles_to_names[self.current_state.name][next_role]]
|
237 |
-
|
238 |
-
return next_agent
|
239 |
-
|
240 |
-
def next(self, environment, agents):
|
241 |
-
"""
|
242 |
-
Determine the next state and the agent that needs action based on the current situation
|
243 |
-
"""
|
244 |
-
|
245 |
-
# 如��是第一次进入该状态
|
246 |
-
# If it is the first time to enter this state
|
247 |
-
|
248 |
-
if self.current_state.is_begin:
|
249 |
-
agent_name = self.roles_to_names[self.current_state.name][self.current_state.begin_role]
|
250 |
-
agent = agents[agent_name]
|
251 |
-
return self.current_state,agent
|
252 |
-
|
253 |
-
|
254 |
-
# get relevant history
|
255 |
-
query = environment.shared_memory["long_term_memory"][-1].content
|
256 |
-
relevant_history = get_relevant_history(
|
257 |
-
query,
|
258 |
-
environment.shared_memory["long_term_memory"][:-1],
|
259 |
-
environment.shared_memory["chat_embeddings"][:-1],
|
260 |
-
)
|
261 |
-
relevant_history = Memory.get_chat_history(relevant_history)
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
next_state = self.transit(
|
266 |
-
chat_history=environment.shared_memory["long_term_memory"][
|
267 |
-
environment.current_chat_history_idx :
|
268 |
-
],
|
269 |
-
relevant_history=relevant_history,
|
270 |
-
environment=environment,
|
271 |
-
)
|
272 |
-
# 如果进入终止节点,则直接终止
|
273 |
-
# If you enter the termination node, terminate directly
|
274 |
-
if next_state.name == self.finish_state_name:
|
275 |
-
self.finished = True
|
276 |
-
return None, None
|
277 |
-
|
278 |
-
self.current_state = next_state
|
279 |
-
|
280 |
-
# 如果是首次进入该节点且有开场白,则直接分配给开场角色
|
281 |
-
# If it is the first time to enter the state and there is a begin query, it will be directly assigned to the begin role.
|
282 |
-
if self.current_state.is_begin and self.current_state.begin_role:
|
283 |
-
agent_name = self.roles_to_names[self.current_state.name][self.current_state.begin_role]
|
284 |
-
agent = agents[agent_name]
|
285 |
-
return self.current_state,agent
|
286 |
-
|
287 |
-
|
288 |
-
next_agent = self.route(
|
289 |
-
chat_history=environment.shared_memory["long_term_memory"][
|
290 |
-
environment.current_chat_history_idx :
|
291 |
-
],
|
292 |
-
agents = agents,
|
293 |
-
relevant_history=relevant_history,
|
294 |
-
)
|
295 |
-
|
296 |
-
return self.current_state, next_agent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIZero2Hero4Health/2-BiomedEntityRecognition-GR/app.py
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import pandas as pd
|
3 |
-
import json
|
4 |
-
from collections import defaultdict
|
5 |
-
|
6 |
-
# Create tokenizer for biomed model
|
7 |
-
from transformers import pipeline, AutoTokenizer, AutoModelForTokenClassification
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained("d4data/biomedical-ner-all")
|
9 |
-
model = AutoModelForTokenClassification.from_pretrained("d4data/biomedical-ner-all")
|
10 |
-
pipe = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
|
11 |
-
|
12 |
-
# Matplotlib for entity graph
|
13 |
-
import matplotlib.pyplot as plt
|
14 |
-
plt.switch_backend("Agg")
|
15 |
-
|
16 |
-
# Load examples from JSON
|
17 |
-
EXAMPLES = {}
|
18 |
-
with open("examples.json", "r") as f:
|
19 |
-
example_json = json.load(f)
|
20 |
-
EXAMPLES = {x["text"]: x["label"] for x in example_json}
|
21 |
-
|
22 |
-
def group_by_entity(raw):
|
23 |
-
out = defaultdict(int)
|
24 |
-
for ent in raw:
|
25 |
-
out[ent["entity_group"]] += 1
|
26 |
-
# out["total"] = sum(out.values())
|
27 |
-
return out
|
28 |
-
|
29 |
-
|
30 |
-
def plot_to_figure(grouped):
|
31 |
-
fig = plt.figure()
|
32 |
-
plt.bar(x=list(grouped.keys()), height=list(grouped.values()))
|
33 |
-
plt.margins(0.2)
|
34 |
-
plt.subplots_adjust(bottom=0.4)
|
35 |
-
plt.xticks(rotation=90)
|
36 |
-
return fig
|
37 |
-
|
38 |
-
|
39 |
-
def ner(text):
|
40 |
-
raw = pipe(text)
|
41 |
-
ner_content = {
|
42 |
-
"text": text,
|
43 |
-
"entities": [
|
44 |
-
{
|
45 |
-
"entity": x["entity_group"],
|
46 |
-
"word": x["word"],
|
47 |
-
"score": x["score"],
|
48 |
-
"start": x["start"],
|
49 |
-
"end": x["end"],
|
50 |
-
}
|
51 |
-
for x in raw
|
52 |
-
],
|
53 |
-
}
|
54 |
-
|
55 |
-
grouped = group_by_entity(raw)
|
56 |
-
figure = plot_to_figure(grouped)
|
57 |
-
label = EXAMPLES.get(text, "Unknown")
|
58 |
-
|
59 |
-
meta = {
|
60 |
-
"entity_counts": grouped,
|
61 |
-
"entities": len(set(grouped.keys())),
|
62 |
-
"counts": sum(grouped.values()),
|
63 |
-
}
|
64 |
-
|
65 |
-
return (ner_content, meta, label, figure)
|
66 |
-
|
67 |
-
|
68 |
-
interface = gr.Interface(
|
69 |
-
ner,
|
70 |
-
inputs=gr.Textbox(label="Note text", value=""),
|
71 |
-
outputs=[
|
72 |
-
gr.HighlightedText(label="NER", combine_adjacent=True),
|
73 |
-
gr.JSON(label="Entity Counts"),
|
74 |
-
gr.Label(label="Rating"),
|
75 |
-
gr.Plot(label="Bar"),
|
76 |
-
],
|
77 |
-
examples=list(EXAMPLES.keys()),
|
78 |
-
allow_flagging="never",
|
79 |
-
)
|
80 |
-
|
81 |
-
interface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/utils/analytics.ts
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
export interface GAEvent {
|
2 |
-
hitType: "event";
|
3 |
-
eventCategory: string;
|
4 |
-
eventAction: string;
|
5 |
-
eventLabel?: string;
|
6 |
-
eventValue?: number;
|
7 |
-
}
|
8 |
-
|
9 |
-
// Send a Google Analytics event
|
10 |
-
export function sendAnalyticsEvent({
|
11 |
-
eventCategory,
|
12 |
-
eventAction,
|
13 |
-
eventLabel,
|
14 |
-
eventValue,
|
15 |
-
}: Omit<GAEvent, "hitType">): void {
|
16 |
-
// Mandatory fields
|
17 |
-
const event: GAEvent = {
|
18 |
-
hitType: "event",
|
19 |
-
eventCategory,
|
20 |
-
eventAction,
|
21 |
-
};
|
22 |
-
// Optional fields
|
23 |
-
if (eventLabel) {
|
24 |
-
event.eventLabel = eventLabel;
|
25 |
-
}
|
26 |
-
if (eventValue) {
|
27 |
-
event.eventValue = eventValue;
|
28 |
-
}
|
29 |
-
|
30 |
-
// @ts-expect-error typescript doesn't know gtag is on the window object
|
31 |
-
if (!!window?.gtag && typeof window?.gtag === "function") {
|
32 |
-
// @ts-expect-error typescript doesn't know gtag is on the window object
|
33 |
-
window?.gtag("event", eventAction, {
|
34 |
-
event_category: event.eventCategory,
|
35 |
-
event_label: event.eventLabel,
|
36 |
-
value: event.eventValue,
|
37 |
-
});
|
38 |
-
}
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/PTI/training/projectors/w_projector.py
DELETED
@@ -1,142 +0,0 @@
|
|
1 |
-
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
2 |
-
#
|
3 |
-
# NVIDIA CORPORATION and its licensors retain all intellectual property
|
4 |
-
# and proprietary rights in and to this software, related documentation
|
5 |
-
# and any modifications thereto. Any use, reproduction, disclosure or
|
6 |
-
# distribution of this software and related documentation without an express
|
7 |
-
# license agreement from NVIDIA CORPORATION is strictly prohibited.
|
8 |
-
|
9 |
-
"""Project given image to the latent space of pretrained network pickle."""
|
10 |
-
|
11 |
-
import copy
|
12 |
-
import wandb
|
13 |
-
import numpy as np
|
14 |
-
import torch
|
15 |
-
import torch.nn.functional as F
|
16 |
-
from tqdm import tqdm
|
17 |
-
from PTI.configs import global_config, hyperparameters
|
18 |
-
from PTI.utils import log_utils
|
19 |
-
import dnnlib
|
20 |
-
|
21 |
-
|
22 |
-
def project(
|
23 |
-
G,
|
24 |
-
target: torch.Tensor, # [C,H,W] and dynamic range [0,255], W & H must match G output resolution
|
25 |
-
*,
|
26 |
-
num_steps=1000,
|
27 |
-
w_avg_samples=10000,
|
28 |
-
initial_learning_rate=0.01,
|
29 |
-
initial_noise_factor=0.05,
|
30 |
-
lr_rampdown_length=0.25,
|
31 |
-
lr_rampup_length=0.05,
|
32 |
-
noise_ramp_length=0.75,
|
33 |
-
regularize_noise_weight=1e5,
|
34 |
-
verbose=False,
|
35 |
-
device: torch.device,
|
36 |
-
use_wandb=False,
|
37 |
-
initial_w=None,
|
38 |
-
image_log_step=global_config.image_rec_result_log_snapshot,
|
39 |
-
w_name: str
|
40 |
-
):
|
41 |
-
assert target.shape == (G.img_channels, G.img_resolution, G.img_resolution),print(target.shape,G.img_resolution)
|
42 |
-
|
43 |
-
def logprint(*args):
|
44 |
-
if verbose:
|
45 |
-
print(*args)
|
46 |
-
|
47 |
-
G = copy.deepcopy(G).eval().requires_grad_(False).to(device).float() # type: ignore
|
48 |
-
|
49 |
-
# Compute w stats.
|
50 |
-
logprint(f'Computing W midpoint and stddev using {w_avg_samples} samples...')
|
51 |
-
z_samples = np.random.RandomState(123).randn(w_avg_samples, G.z_dim)
|
52 |
-
w_samples = G.mapping(torch.from_numpy(z_samples).to(device), None) # [N, L, C]
|
53 |
-
w_samples = w_samples[:, :1, :].cpu().numpy().astype(np.float32) # [N, 1, C]
|
54 |
-
w_avg = np.mean(w_samples, axis=0, keepdims=True) # [1, 1, C]
|
55 |
-
w_avg_tensor = torch.from_numpy(w_avg).to(global_config.device)
|
56 |
-
w_std = (np.sum((w_samples - w_avg) ** 2) / w_avg_samples) ** 0.5
|
57 |
-
|
58 |
-
start_w = initial_w if initial_w is not None else w_avg
|
59 |
-
|
60 |
-
# Setup noise inputs.
|
61 |
-
noise_bufs = {name: buf for (name, buf) in G.synthesis.named_buffers() if 'noise_const' in name}
|
62 |
-
|
63 |
-
# Load VGG16 feature detector.
|
64 |
-
url = 'https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/metrics/vgg16.pt'
|
65 |
-
with dnnlib.util.open_url(url) as f:
|
66 |
-
vgg16 = torch.jit.load(f).eval().to(device)
|
67 |
-
|
68 |
-
# Features for target image.
|
69 |
-
target_images = target.unsqueeze(0).to(device).to(torch.float32)
|
70 |
-
if target_images.shape[2] > 256:
|
71 |
-
target_images = F.interpolate(target_images, size=(256, 256), mode='area')
|
72 |
-
target_features = vgg16(target_images, resize_images=False, return_lpips=True)
|
73 |
-
|
74 |
-
w_opt = torch.tensor(start_w, dtype=torch.float32, device=device,
|
75 |
-
requires_grad=True) # pylint: disable=not-callable
|
76 |
-
optimizer = torch.optim.Adam([w_opt] + list(noise_bufs.values()), betas=(0.9, 0.999),
|
77 |
-
lr=hyperparameters.first_inv_lr)
|
78 |
-
|
79 |
-
# Init noise.
|
80 |
-
for buf in noise_bufs.values():
|
81 |
-
buf[:] = torch.randn_like(buf)
|
82 |
-
buf.requires_grad = True
|
83 |
-
|
84 |
-
for step in tqdm(range(num_steps)):
|
85 |
-
|
86 |
-
# Learning rate schedule.
|
87 |
-
t = step / num_steps
|
88 |
-
w_noise_scale = w_std * initial_noise_factor * max(0.0, 1.0 - t / noise_ramp_length) ** 2
|
89 |
-
lr_ramp = min(1.0, (1.0 - t) / lr_rampdown_length)
|
90 |
-
lr_ramp = 0.5 - 0.5 * np.cos(lr_ramp * np.pi)
|
91 |
-
lr_ramp = lr_ramp * min(1.0, t / lr_rampup_length)
|
92 |
-
lr = initial_learning_rate * lr_ramp
|
93 |
-
for param_group in optimizer.param_groups:
|
94 |
-
param_group['lr'] = lr
|
95 |
-
|
96 |
-
# Synth images from opt_w.
|
97 |
-
w_noise = torch.randn_like(w_opt) * w_noise_scale
|
98 |
-
ws = (w_opt + w_noise).repeat([1, G.mapping.num_ws, 1])
|
99 |
-
synth_images = G.synthesis(ws, noise_mode='const', force_fp32=True)
|
100 |
-
|
101 |
-
# Downsample image to 256x256 if it's larger than that. VGG was built for 224x224 images.
|
102 |
-
synth_images = (synth_images + 1) * (255 / 2)
|
103 |
-
if synth_images.shape[2] > 256:
|
104 |
-
synth_images = F.interpolate(synth_images, size=(256, 256), mode='area')
|
105 |
-
|
106 |
-
# Features for synth images.
|
107 |
-
synth_features = vgg16(synth_images, resize_images=False, return_lpips=True)
|
108 |
-
dist = (target_features - synth_features).square().sum()
|
109 |
-
|
110 |
-
# Noise regularization.
|
111 |
-
reg_loss = 0.0
|
112 |
-
for v in noise_bufs.values():
|
113 |
-
noise = v[None, None, :, :] # must be [1,1,H,W] for F.avg_pool2d()
|
114 |
-
while True:
|
115 |
-
reg_loss += (noise * torch.roll(noise, shifts=1, dims=3)).mean() ** 2
|
116 |
-
reg_loss += (noise * torch.roll(noise, shifts=1, dims=2)).mean() ** 2
|
117 |
-
if noise.shape[2] <= 8:
|
118 |
-
break
|
119 |
-
noise = F.avg_pool2d(noise, kernel_size=2)
|
120 |
-
loss = dist + reg_loss * regularize_noise_weight
|
121 |
-
|
122 |
-
if step % image_log_step == 0:
|
123 |
-
with torch.no_grad():
|
124 |
-
if use_wandb:
|
125 |
-
global_config.training_step += 1
|
126 |
-
wandb.log({f'first projection _{w_name}': loss.detach().cpu()}, step=global_config.training_step)
|
127 |
-
log_utils.log_image_from_w(w_opt.repeat([1, G.mapping.num_ws, 1]), G, w_name)
|
128 |
-
|
129 |
-
# Step
|
130 |
-
optimizer.zero_grad(set_to_none=True)
|
131 |
-
loss.backward()
|
132 |
-
optimizer.step()
|
133 |
-
logprint(f'step {step + 1:>4d}/{num_steps}: dist {dist:<4.2f} loss {float(loss):<5.2f}')
|
134 |
-
|
135 |
-
# Normalize noise.
|
136 |
-
with torch.no_grad():
|
137 |
-
for buf in noise_bufs.values():
|
138 |
-
buf -= buf.mean()
|
139 |
-
buf *= buf.square().mean().rsqrt()
|
140 |
-
|
141 |
-
del G
|
142 |
-
return w_opt.repeat([1, 18, 1])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/gradio_utils/utils.py
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import numpy as np
|
3 |
-
from PIL import Image, ImageDraw
|
4 |
-
|
5 |
-
|
6 |
-
class ImageMask(gr.components.Image):
|
7 |
-
"""
|
8 |
-
Sets: source="canvas", tool="sketch"
|
9 |
-
"""
|
10 |
-
|
11 |
-
is_template = True
|
12 |
-
|
13 |
-
def __init__(self, **kwargs):
|
14 |
-
super().__init__(source="upload",
|
15 |
-
tool="sketch",
|
16 |
-
interactive=False,
|
17 |
-
**kwargs)
|
18 |
-
|
19 |
-
def preprocess(self, x):
|
20 |
-
if x is None:
|
21 |
-
return x
|
22 |
-
if self.tool == "sketch" and self.source in ["upload", "webcam"
|
23 |
-
] and type(x) != dict:
|
24 |
-
decode_image = gr.processing_utils.decode_base64_to_image(x)
|
25 |
-
width, height = decode_image.size
|
26 |
-
mask = np.ones((height, width, 4), dtype=np.uint8)
|
27 |
-
mask[..., -1] = 255
|
28 |
-
mask = self.postprocess(mask)
|
29 |
-
x = {'image': x, 'mask': mask}
|
30 |
-
return super().preprocess(x)
|
31 |
-
|
32 |
-
|
33 |
-
def get_valid_mask(mask: np.ndarray):
|
34 |
-
"""Convert mask from gr.Image(0 to 255, RGBA) to binary mask.
|
35 |
-
"""
|
36 |
-
if mask.ndim == 3:
|
37 |
-
mask_pil = Image.fromarray(mask).convert('L')
|
38 |
-
mask = np.array(mask_pil)
|
39 |
-
if mask.max() == 255:
|
40 |
-
mask = mask / 255
|
41 |
-
return mask
|
42 |
-
|
43 |
-
|
44 |
-
def draw_points_on_image(image,
|
45 |
-
points,
|
46 |
-
curr_point=None,
|
47 |
-
highlight_all=True,
|
48 |
-
radius_scale=0.01):
|
49 |
-
overlay_rgba = Image.new("RGBA", image.size, 0)
|
50 |
-
overlay_draw = ImageDraw.Draw(overlay_rgba)
|
51 |
-
for point_key, point in points.items():
|
52 |
-
if ((curr_point is not None and curr_point == point_key)
|
53 |
-
or highlight_all):
|
54 |
-
p_color = (255, 0, 0)
|
55 |
-
t_color = (0, 0, 255)
|
56 |
-
|
57 |
-
else:
|
58 |
-
p_color = (255, 0, 0, 35)
|
59 |
-
t_color = (0, 0, 255, 35)
|
60 |
-
|
61 |
-
rad_draw = int(image.size[0] * radius_scale)
|
62 |
-
|
63 |
-
p_start = point.get("start_temp", point["start"])
|
64 |
-
p_target = point["target"]
|
65 |
-
|
66 |
-
if p_start is not None and p_target is not None:
|
67 |
-
p_draw = int(p_start[0]), int(p_start[1])
|
68 |
-
t_draw = int(p_target[0]), int(p_target[1])
|
69 |
-
|
70 |
-
overlay_draw.line(
|
71 |
-
(p_draw[0], p_draw[1], t_draw[0], t_draw[1]),
|
72 |
-
fill=(255, 255, 0),
|
73 |
-
width=2,
|
74 |
-
)
|
75 |
-
|
76 |
-
if p_start is not None:
|
77 |
-
p_draw = int(p_start[0]), int(p_start[1])
|
78 |
-
overlay_draw.ellipse(
|
79 |
-
(
|
80 |
-
p_draw[0] - rad_draw,
|
81 |
-
p_draw[1] - rad_draw,
|
82 |
-
p_draw[0] + rad_draw,
|
83 |
-
p_draw[1] + rad_draw,
|
84 |
-
),
|
85 |
-
fill=p_color,
|
86 |
-
)
|
87 |
-
|
88 |
-
if curr_point is not None and curr_point == point_key:
|
89 |
-
# overlay_draw.text(p_draw, "p", font=font, align="center", fill=(0, 0, 0))
|
90 |
-
overlay_draw.text(p_draw, "p", align="center", fill=(0, 0, 0))
|
91 |
-
|
92 |
-
if p_target is not None:
|
93 |
-
t_draw = int(p_target[0]), int(p_target[1])
|
94 |
-
overlay_draw.ellipse(
|
95 |
-
(
|
96 |
-
t_draw[0] - rad_draw,
|
97 |
-
t_draw[1] - rad_draw,
|
98 |
-
t_draw[0] + rad_draw,
|
99 |
-
t_draw[1] + rad_draw,
|
100 |
-
),
|
101 |
-
fill=t_color,
|
102 |
-
)
|
103 |
-
|
104 |
-
if curr_point is not None and curr_point == point_key:
|
105 |
-
# overlay_draw.text(t_draw, "t", font=font, align="center", fill=(0, 0, 0))
|
106 |
-
overlay_draw.text(t_draw, "t", align="center", fill=(0, 0, 0))
|
107 |
-
|
108 |
-
return Image.alpha_composite(image.convert("RGBA"),
|
109 |
-
overlay_rgba).convert("RGB")
|
110 |
-
|
111 |
-
|
112 |
-
def draw_mask_on_image(image, mask):
|
113 |
-
im_mask = np.uint8(mask * 255)
|
114 |
-
im_mask_rgba = np.concatenate(
|
115 |
-
(
|
116 |
-
np.tile(im_mask[..., None], [1, 1, 3]),
|
117 |
-
45 * np.ones(
|
118 |
-
(im_mask.shape[0], im_mask.shape[1], 1), dtype=np.uint8),
|
119 |
-
),
|
120 |
-
axis=-1,
|
121 |
-
)
|
122 |
-
im_mask_rgba = Image.fromarray(im_mask_rgba).convert("RGBA")
|
123 |
-
|
124 |
-
return Image.alpha_composite(image.convert("RGBA"),
|
125 |
-
im_mask_rgba).convert("RGB")
|
126 |
-
|
127 |
-
|
128 |
-
def on_change_single_global_state(keys,
|
129 |
-
value,
|
130 |
-
global_state,
|
131 |
-
map_transform=None):
|
132 |
-
if map_transform is not None:
|
133 |
-
value = map_transform(value)
|
134 |
-
|
135 |
-
curr_state = global_state
|
136 |
-
if isinstance(keys, str):
|
137 |
-
last_key = keys
|
138 |
-
|
139 |
-
else:
|
140 |
-
for k in keys[:-1]:
|
141 |
-
curr_state = curr_state[k]
|
142 |
-
|
143 |
-
last_key = keys[-1]
|
144 |
-
|
145 |
-
curr_state[last_key] = value
|
146 |
-
return global_state
|
147 |
-
|
148 |
-
|
149 |
-
def get_latest_points_pair(points_dict):
|
150 |
-
if not points_dict:
|
151 |
-
return None
|
152 |
-
point_idx = list(points_dict.keys())
|
153 |
-
latest_point_idx = max(point_idx)
|
154 |
-
return latest_point_idx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/stylegan_human/training_scripts/sg2/training/dataset.py
DELETED
@@ -1,271 +0,0 @@
|
|
1 |
-
# Copyright (c) SenseTime Research. All rights reserved.
|
2 |
-
|
3 |
-
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
4 |
-
#
|
5 |
-
# NVIDIA CORPORATION and its licensors retain all intellectual property
|
6 |
-
# and proprietary rights in and to this software, related documentation
|
7 |
-
# and any modifications thereto. Any use, reproduction, disclosure or
|
8 |
-
# distribution of this software and related documentation without an express
|
9 |
-
# license agreement from NVIDIA CORPORATION is strictly prohibited.
|
10 |
-
|
11 |
-
import os
|
12 |
-
import numpy as np
|
13 |
-
import zipfile
|
14 |
-
import PIL.Image
|
15 |
-
import json
|
16 |
-
import torch
|
17 |
-
import dnnlib
|
18 |
-
import cv2
|
19 |
-
from collections import Counter
|
20 |
-
|
21 |
-
|
22 |
-
try:
|
23 |
-
import pyspng
|
24 |
-
except ImportError:
|
25 |
-
pyspng = None
|
26 |
-
|
27 |
-
# ----------------------------------------------------------------------------
|
28 |
-
|
29 |
-
|
30 |
-
class Dataset(torch.utils.data.Dataset):
|
31 |
-
def __init__(self,
|
32 |
-
name, # Name of the dataset.
|
33 |
-
raw_shape, # Shape of the raw image data (NCHW).
|
34 |
-
# Artificially limit the size of the dataset. None = no limit. Applied before xflip.
|
35 |
-
max_size=None,
|
36 |
-
# Enable conditioning labels? False = label dimension is zero.
|
37 |
-
use_labels=False,
|
38 |
-
# Artificially double the size of the dataset via x-flips. Applied after max_size.
|
39 |
-
xflip=False,
|
40 |
-
# Random seed to use when applying max_size.
|
41 |
-
random_seed=0,
|
42 |
-
square=False,
|
43 |
-
):
|
44 |
-
# print(' Inside Dataset ')
|
45 |
-
self._name = name
|
46 |
-
self._raw_shape = list(raw_shape)
|
47 |
-
self._use_labels = use_labels
|
48 |
-
self._raw_labels = None
|
49 |
-
self._label_shape = None
|
50 |
-
self._square = square
|
51 |
-
|
52 |
-
# Apply max_size.
|
53 |
-
self._raw_idx = np.arange(self._raw_shape[0], dtype=np.int64)
|
54 |
-
if (max_size is not None) and (self._raw_idx.size > max_size):
|
55 |
-
np.random.RandomState(random_seed).shuffle(self._raw_idx)
|
56 |
-
self._raw_idx = np.sort(self._raw_idx[:max_size])
|
57 |
-
|
58 |
-
# Apply xflip.
|
59 |
-
self._xflip = np.zeros(self._raw_idx.size, dtype=np.uint8)
|
60 |
-
if xflip:
|
61 |
-
self._raw_idx = np.tile(self._raw_idx, 2)
|
62 |
-
self._xflip = np.concatenate(
|
63 |
-
[self._xflip, np.ones_like(self._xflip)])
|
64 |
-
|
65 |
-
def _get_raw_labels(self):
|
66 |
-
if self._raw_labels is None:
|
67 |
-
self._raw_labels = self._load_raw_labels() if self._use_labels else None
|
68 |
-
if self._raw_labels is None:
|
69 |
-
self._raw_labels = np.zeros(
|
70 |
-
[self._raw_shape[0], 0], dtype=np.float32)
|
71 |
-
assert isinstance(self._raw_labels, np.ndarray)
|
72 |
-
assert self._raw_labels.shape[0] == self._raw_shape[0]
|
73 |
-
assert self._raw_labels.dtype in [np.float32, np.int64]
|
74 |
-
if self._raw_labels.dtype == np.int64:
|
75 |
-
assert self._raw_labels.ndim == 1
|
76 |
-
assert np.all(self._raw_labels >= 0)
|
77 |
-
return self._raw_labels
|
78 |
-
|
79 |
-
def close(self): # to be overridden by subclass
|
80 |
-
pass
|
81 |
-
|
82 |
-
def _load_raw_image(self, raw_idx): # to be overridden by subclass
|
83 |
-
raise NotImplementedError
|
84 |
-
|
85 |
-
def _load_raw_labels(self): # to be overridden by subclass
|
86 |
-
raise NotImplementedError
|
87 |
-
|
88 |
-
def __getstate__(self):
|
89 |
-
return dict(self.__dict__, _raw_labels=None)
|
90 |
-
|
91 |
-
def __del__(self):
|
92 |
-
try:
|
93 |
-
self.close()
|
94 |
-
except:
|
95 |
-
pass
|
96 |
-
|
97 |
-
def __len__(self):
|
98 |
-
return self._raw_idx.size
|
99 |
-
|
100 |
-
def __getitem__(self, idx):
|
101 |
-
image = self._load_raw_image(self._raw_idx[idx])
|
102 |
-
assert isinstance(image, np.ndarray)
|
103 |
-
assert list(image.shape) == self.image_shape
|
104 |
-
assert image.dtype == np.uint8
|
105 |
-
if self._xflip[idx]:
|
106 |
-
assert image.ndim == 3 # CHW
|
107 |
-
image = image[:, :, ::-1]
|
108 |
-
return image.copy(), self.get_label(idx)
|
109 |
-
|
110 |
-
def get_label(self, idx):
|
111 |
-
label = self._get_raw_labels()[self._raw_idx[idx]]
|
112 |
-
if label.dtype == np.int64:
|
113 |
-
onehot = np.zeros(self.label_shape, dtype=np.float32)
|
114 |
-
onehot[label] = 1
|
115 |
-
label = onehot
|
116 |
-
return label.copy()
|
117 |
-
|
118 |
-
def get_details(self, idx):
|
119 |
-
d = dnnlib.EasyDict()
|
120 |
-
d.raw_idx = int(self._raw_idx[idx])
|
121 |
-
d.xflip = (int(self._xflip[idx]) != 0)
|
122 |
-
d.raw_label = self._get_raw_labels()[d.raw_idx].copy()
|
123 |
-
return d
|
124 |
-
|
125 |
-
@property
|
126 |
-
def name(self):
|
127 |
-
return self._name
|
128 |
-
|
129 |
-
@property
|
130 |
-
def image_shape(self):
|
131 |
-
return list(self._raw_shape[1:])
|
132 |
-
|
133 |
-
@property
|
134 |
-
def num_channels(self):
|
135 |
-
assert len(self.image_shape) == 3 # CHW
|
136 |
-
return self.image_shape[0]
|
137 |
-
|
138 |
-
@property
|
139 |
-
def resolution(self):
|
140 |
-
assert len(self.image_shape) == 3 # CHW
|
141 |
-
if self._square:
|
142 |
-
assert self.image_shape[1] == self.image_shape[2]
|
143 |
-
else:
|
144 |
-
assert self.image_shape[1] == self.image_shape[2] * 2
|
145 |
-
return self.image_shape[1]
|
146 |
-
|
147 |
-
@property
|
148 |
-
def label_shape(self):
|
149 |
-
if self._label_shape is None:
|
150 |
-
raw_labels = self._get_raw_labels()
|
151 |
-
if raw_labels.dtype == np.int64:
|
152 |
-
self._label_shape = [int(np.max(raw_labels)) + 1]
|
153 |
-
else:
|
154 |
-
self._label_shape = raw_labels.shape[1:]
|
155 |
-
return list(self._label_shape)
|
156 |
-
|
157 |
-
@property
|
158 |
-
def label_dim(self):
|
159 |
-
assert len(self.label_shape) == 1
|
160 |
-
return self.label_shape[0]
|
161 |
-
|
162 |
-
@property
|
163 |
-
def has_labels(self):
|
164 |
-
return any(x != 0 for x in self.label_shape)
|
165 |
-
|
166 |
-
@property
|
167 |
-
def has_onehot_labels(self):
|
168 |
-
return self._get_raw_labels().dtype == np.int64
|
169 |
-
|
170 |
-
# ----------------------------------------------------------------------------
|
171 |
-
|
172 |
-
|
173 |
-
class ImageFolderDataset(Dataset):
|
174 |
-
def __init__(self,
|
175 |
-
path, # Path to directory or zip.
|
176 |
-
# Ensure specific resolution, None = highest available.
|
177 |
-
resolution=None,
|
178 |
-
square=False,
|
179 |
-
# Additional arguments for the Dataset base class.
|
180 |
-
**super_kwargs,
|
181 |
-
):
|
182 |
-
self._path = path
|
183 |
-
self._zipfile = None
|
184 |
-
self._square = square
|
185 |
-
|
186 |
-
if os.path.isdir(self._path):
|
187 |
-
self._type = 'dir'
|
188 |
-
self._all_fnames = {os.path.relpath(os.path.join(
|
189 |
-
root, fname), start=self._path) for root, _dirs, files in os.walk(self._path) for fname in files}
|
190 |
-
elif self._file_ext(self._path) == '.zip':
|
191 |
-
self._type = 'zip'
|
192 |
-
self._all_fnames = set(self._get_zipfile().namelist())
|
193 |
-
else:
|
194 |
-
raise IOError('Path must point to a directory or zip')
|
195 |
-
|
196 |
-
PIL.Image.init()
|
197 |
-
self._image_fnames = sorted(
|
198 |
-
fname for fname in self._all_fnames if self._file_ext(fname) in PIL.Image.EXTENSION)
|
199 |
-
if len(self._image_fnames) == 0:
|
200 |
-
raise IOError('No image files found in the specified path')
|
201 |
-
|
202 |
-
name = os.path.splitext(os.path.basename(self._path))[0]
|
203 |
-
raw_shape = [len(self._image_fnames)] + \
|
204 |
-
list(self._load_raw_image(0).shape)
|
205 |
-
# if resolution is not None and (raw_shape[2] != resolution or raw_shape[3] != resolution):
|
206 |
-
# raise IOError('Image files do not match the specified resolution')
|
207 |
-
if resolution is not None:
|
208 |
-
if self._square:
|
209 |
-
raw_shape[2] = raw_shape[3] = resolution
|
210 |
-
else:
|
211 |
-
raw_shape[2] = resolution
|
212 |
-
raw_shape[3] = resolution // 2
|
213 |
-
# print(raw_shape)
|
214 |
-
super().__init__(name=name, raw_shape=raw_shape, square=square, **super_kwargs)
|
215 |
-
|
216 |
-
@staticmethod
|
217 |
-
def _file_ext(fname):
|
218 |
-
return os.path.splitext(fname)[1].lower()
|
219 |
-
|
220 |
-
def _get_zipfile(self):
|
221 |
-
assert self._type == 'zip'
|
222 |
-
if self._zipfile is None:
|
223 |
-
self._zipfile = zipfile.ZipFile(self._path)
|
224 |
-
return self._zipfile
|
225 |
-
|
226 |
-
def _open_file(self, fname):
|
227 |
-
if self._type == 'dir':
|
228 |
-
return open(os.path.join(self._path, fname), 'rb')
|
229 |
-
if self._type == 'zip':
|
230 |
-
return self._get_zipfile().open(fname, 'r')
|
231 |
-
return None
|
232 |
-
|
233 |
-
def close(self):
|
234 |
-
try:
|
235 |
-
if self._zipfile is not None:
|
236 |
-
self._zipfile.close()
|
237 |
-
finally:
|
238 |
-
self._zipfile = None
|
239 |
-
|
240 |
-
def __getstate__(self):
|
241 |
-
return dict(super().__getstate__(), _zipfile=None)
|
242 |
-
|
243 |
-
def _load_raw_image(self, raw_idx): # load single image
|
244 |
-
fname = self._image_fnames[raw_idx]
|
245 |
-
with self._open_file(fname) as f:
|
246 |
-
if pyspng is not None and self._file_ext(fname) == '.png':
|
247 |
-
image = pyspng.load(f.read())
|
248 |
-
else:
|
249 |
-
image = np.array(PIL.Image.open(f))
|
250 |
-
if image.ndim == 2:
|
251 |
-
image = image[:, :, np.newaxis] # HW => HWC
|
252 |
-
image = image.transpose(2, 0, 1) # HWC => CHW
|
253 |
-
return image
|
254 |
-
|
255 |
-
def _load_raw_labels(self):
|
256 |
-
fname = 'dataset.json'
|
257 |
-
if fname not in self._all_fnames:
|
258 |
-
return None
|
259 |
-
with self._open_file(fname) as f:
|
260 |
-
labels = json.load(f)['labels']
|
261 |
-
if labels is None:
|
262 |
-
return None
|
263 |
-
labels = dict(labels)
|
264 |
-
labels = [labels[fname.replace('\\', '/')]
|
265 |
-
for fname in self._image_fnames]
|
266 |
-
labels = np.array(labels)
|
267 |
-
labels = labels.astype({1: np.int64, 2: np.float32}[labels.ndim])
|
268 |
-
return labels
|
269 |
-
|
270 |
-
|
271 |
-
# ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/models/unet.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
# UNet1DModel
|
2 |
-
|
3 |
-
The [UNet](https://huggingface.co/papers/1505.04597) model was originally introduced by Ronneberger et al for biomedical image segmentation, but it is also commonly used in 🤗 Diffusers because it outputs images that are the same size as the input. It is one of the most important components of a diffusion system because it facilitates the actual diffusion process. There are several variants of the UNet model in 🤗 Diffusers, depending on it's number of dimensions and whether it is a conditional model or not. This is a 1D UNet model.
|
4 |
-
|
5 |
-
The abstract from the paper is:
|
6 |
-
|
7 |
-
*There is large consent that successful training of deep networks requires many thousand annotated training samples. In this paper, we present a network and training strategy that relies on the strong use of data augmentation to use the available annotated samples more efficiently. The architecture consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. We show that such a network can be trained end-to-end from very few images and outperforms the prior best method (a sliding-window convolutional network) on the ISBI challenge for segmentation of neuronal structures in electron microscopic stacks. Using the same network trained on transmitted light microscopy images (phase contrast and DIC) we won the ISBI cell tracking challenge 2015 in these categories by a large margin. Moreover, the network is fast. Segmentation of a 512x512 image takes less than a second on a recent GPU. The full implementation (based on Caffe) and the trained networks are available at http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net.*
|
8 |
-
|
9 |
-
## UNet1DModel
|
10 |
-
[[autodoc]] UNet1DModel
|
11 |
-
|
12 |
-
## UNet1DOutput
|
13 |
-
[[autodoc]] models.unet_1d.UNet1DOutput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/stable_diffusion/test_stable_diffusion_paradigms.py
DELETED
@@ -1,227 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2023 HuggingFace Inc.
|
3 |
-
#
|
4 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
# you may not use this file except in compliance with the License.
|
6 |
-
# You may obtain a copy of the License at
|
7 |
-
#
|
8 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
#
|
10 |
-
# Unless required by applicable law or agreed to in writing, software
|
11 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
# See the License for the specific language governing permissions and
|
14 |
-
# limitations under the License.
|
15 |
-
|
16 |
-
import gc
|
17 |
-
import unittest
|
18 |
-
|
19 |
-
import numpy as np
|
20 |
-
import torch
|
21 |
-
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer
|
22 |
-
|
23 |
-
from diffusers import (
|
24 |
-
AutoencoderKL,
|
25 |
-
DDIMParallelScheduler,
|
26 |
-
DDPMParallelScheduler,
|
27 |
-
StableDiffusionParadigmsPipeline,
|
28 |
-
UNet2DConditionModel,
|
29 |
-
)
|
30 |
-
from diffusers.utils import slow, torch_device
|
31 |
-
from diffusers.utils.testing_utils import (
|
32 |
-
enable_full_determinism,
|
33 |
-
require_torch_gpu,
|
34 |
-
)
|
35 |
-
|
36 |
-
from ..pipeline_params import TEXT_TO_IMAGE_BATCH_PARAMS, TEXT_TO_IMAGE_IMAGE_PARAMS, TEXT_TO_IMAGE_PARAMS
|
37 |
-
from ..test_pipelines_common import PipelineLatentTesterMixin, PipelineTesterMixin
|
38 |
-
|
39 |
-
|
40 |
-
enable_full_determinism()
|
41 |
-
|
42 |
-
|
43 |
-
class StableDiffusionParadigmsPipelineFastTests(PipelineLatentTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
44 |
-
pipeline_class = StableDiffusionParadigmsPipeline
|
45 |
-
params = TEXT_TO_IMAGE_PARAMS
|
46 |
-
batch_params = TEXT_TO_IMAGE_BATCH_PARAMS
|
47 |
-
image_params = TEXT_TO_IMAGE_IMAGE_PARAMS
|
48 |
-
image_latents_params = TEXT_TO_IMAGE_IMAGE_PARAMS
|
49 |
-
|
50 |
-
def get_dummy_components(self):
|
51 |
-
torch.manual_seed(0)
|
52 |
-
unet = UNet2DConditionModel(
|
53 |
-
block_out_channels=(32, 64),
|
54 |
-
layers_per_block=2,
|
55 |
-
sample_size=32,
|
56 |
-
in_channels=4,
|
57 |
-
out_channels=4,
|
58 |
-
down_block_types=("DownBlock2D", "CrossAttnDownBlock2D"),
|
59 |
-
up_block_types=("CrossAttnUpBlock2D", "UpBlock2D"),
|
60 |
-
cross_attention_dim=32,
|
61 |
-
# SD2-specific config below
|
62 |
-
attention_head_dim=(2, 4),
|
63 |
-
use_linear_projection=True,
|
64 |
-
)
|
65 |
-
scheduler = DDIMParallelScheduler(
|
66 |
-
beta_start=0.00085,
|
67 |
-
beta_end=0.012,
|
68 |
-
beta_schedule="scaled_linear",
|
69 |
-
clip_sample=False,
|
70 |
-
set_alpha_to_one=False,
|
71 |
-
)
|
72 |
-
torch.manual_seed(0)
|
73 |
-
vae = AutoencoderKL(
|
74 |
-
block_out_channels=[32, 64],
|
75 |
-
in_channels=3,
|
76 |
-
out_channels=3,
|
77 |
-
down_block_types=["DownEncoderBlock2D", "DownEncoderBlock2D"],
|
78 |
-
up_block_types=["UpDecoderBlock2D", "UpDecoderBlock2D"],
|
79 |
-
latent_channels=4,
|
80 |
-
sample_size=128,
|
81 |
-
)
|
82 |
-
torch.manual_seed(0)
|
83 |
-
text_encoder_config = CLIPTextConfig(
|
84 |
-
bos_token_id=0,
|
85 |
-
eos_token_id=2,
|
86 |
-
hidden_size=32,
|
87 |
-
intermediate_size=37,
|
88 |
-
layer_norm_eps=1e-05,
|
89 |
-
num_attention_heads=4,
|
90 |
-
num_hidden_layers=5,
|
91 |
-
pad_token_id=1,
|
92 |
-
vocab_size=1000,
|
93 |
-
# SD2-specific config below
|
94 |
-
hidden_act="gelu",
|
95 |
-
projection_dim=512,
|
96 |
-
)
|
97 |
-
text_encoder = CLIPTextModel(text_encoder_config)
|
98 |
-
tokenizer = CLIPTokenizer.from_pretrained("hf-internal-testing/tiny-random-clip")
|
99 |
-
|
100 |
-
components = {
|
101 |
-
"unet": unet,
|
102 |
-
"scheduler": scheduler,
|
103 |
-
"vae": vae,
|
104 |
-
"text_encoder": text_encoder,
|
105 |
-
"tokenizer": tokenizer,
|
106 |
-
"safety_checker": None,
|
107 |
-
"feature_extractor": None,
|
108 |
-
}
|
109 |
-
return components
|
110 |
-
|
111 |
-
def get_dummy_inputs(self, device, seed=0):
|
112 |
-
if str(device).startswith("mps"):
|
113 |
-
generator = torch.manual_seed(seed)
|
114 |
-
else:
|
115 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
116 |
-
inputs = {
|
117 |
-
"prompt": "a photograph of an astronaut riding a horse",
|
118 |
-
"generator": generator,
|
119 |
-
"num_inference_steps": 10,
|
120 |
-
"guidance_scale": 6.0,
|
121 |
-
"output_type": "numpy",
|
122 |
-
"parallel": 3,
|
123 |
-
"debug": True,
|
124 |
-
}
|
125 |
-
return inputs
|
126 |
-
|
127 |
-
def test_stable_diffusion_paradigms_default_case(self):
|
128 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
129 |
-
components = self.get_dummy_components()
|
130 |
-
sd_pipe = StableDiffusionParadigmsPipeline(**components)
|
131 |
-
sd_pipe = sd_pipe.to(device)
|
132 |
-
sd_pipe.set_progress_bar_config(disable=None)
|
133 |
-
|
134 |
-
inputs = self.get_dummy_inputs(device)
|
135 |
-
image = sd_pipe(**inputs).images
|
136 |
-
image_slice = image[0, -3:, -3:, -1]
|
137 |
-
assert image.shape == (1, 64, 64, 3)
|
138 |
-
|
139 |
-
expected_slice = np.array([0.4773, 0.5417, 0.4723, 0.4925, 0.5631, 0.4752, 0.5240, 0.4935, 0.5023])
|
140 |
-
|
141 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
142 |
-
|
143 |
-
def test_stable_diffusion_paradigms_default_case_ddpm(self):
|
144 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
145 |
-
components = self.get_dummy_components()
|
146 |
-
torch.manual_seed(0)
|
147 |
-
components["scheduler"] = DDPMParallelScheduler()
|
148 |
-
torch.manual_seed(0)
|
149 |
-
sd_pipe = StableDiffusionParadigmsPipeline(**components)
|
150 |
-
sd_pipe = sd_pipe.to(device)
|
151 |
-
sd_pipe.set_progress_bar_config(disable=None)
|
152 |
-
|
153 |
-
inputs = self.get_dummy_inputs(device)
|
154 |
-
image = sd_pipe(**inputs).images
|
155 |
-
image_slice = image[0, -3:, -3:, -1]
|
156 |
-
assert image.shape == (1, 64, 64, 3)
|
157 |
-
|
158 |
-
expected_slice = np.array([0.3573, 0.4420, 0.4960, 0.4799, 0.3796, 0.3879, 0.4819, 0.4365, 0.4468])
|
159 |
-
|
160 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
161 |
-
|
162 |
-
# override to speed the overall test timing up.
|
163 |
-
def test_inference_batch_consistent(self):
|
164 |
-
super().test_inference_batch_consistent(batch_sizes=[1, 2])
|
165 |
-
|
166 |
-
# override to speed the overall test timing up.
|
167 |
-
def test_inference_batch_single_identical(self):
|
168 |
-
super().test_inference_batch_single_identical(batch_size=2, expected_max_diff=3e-3)
|
169 |
-
|
170 |
-
def test_stable_diffusion_paradigms_negative_prompt(self):
|
171 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
172 |
-
components = self.get_dummy_components()
|
173 |
-
sd_pipe = StableDiffusionParadigmsPipeline(**components)
|
174 |
-
sd_pipe = sd_pipe.to(device)
|
175 |
-
sd_pipe.set_progress_bar_config(disable=None)
|
176 |
-
|
177 |
-
inputs = self.get_dummy_inputs(device)
|
178 |
-
negative_prompt = "french fries"
|
179 |
-
output = sd_pipe(**inputs, negative_prompt=negative_prompt)
|
180 |
-
image = output.images
|
181 |
-
image_slice = image[0, -3:, -3:, -1]
|
182 |
-
|
183 |
-
assert image.shape == (1, 64, 64, 3)
|
184 |
-
|
185 |
-
expected_slice = np.array([0.4771, 0.5420, 0.4683, 0.4918, 0.5636, 0.4725, 0.5230, 0.4923, 0.5015])
|
186 |
-
|
187 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
188 |
-
|
189 |
-
|
190 |
-
@slow
|
191 |
-
@require_torch_gpu
|
192 |
-
class StableDiffusionParadigmsPipelineSlowTests(unittest.TestCase):
|
193 |
-
def tearDown(self):
|
194 |
-
super().tearDown()
|
195 |
-
gc.collect()
|
196 |
-
torch.cuda.empty_cache()
|
197 |
-
|
198 |
-
def get_inputs(self, seed=0):
|
199 |
-
generator = torch.Generator(device=torch_device).manual_seed(seed)
|
200 |
-
inputs = {
|
201 |
-
"prompt": "a photograph of an astronaut riding a horse",
|
202 |
-
"generator": generator,
|
203 |
-
"num_inference_steps": 10,
|
204 |
-
"guidance_scale": 7.5,
|
205 |
-
"output_type": "numpy",
|
206 |
-
"parallel": 3,
|
207 |
-
"debug": True,
|
208 |
-
}
|
209 |
-
return inputs
|
210 |
-
|
211 |
-
def test_stable_diffusion_paradigms_default(self):
|
212 |
-
model_ckpt = "stabilityai/stable-diffusion-2-base"
|
213 |
-
scheduler = DDIMParallelScheduler.from_pretrained(model_ckpt, subfolder="scheduler")
|
214 |
-
pipe = StableDiffusionParadigmsPipeline.from_pretrained(model_ckpt, scheduler=scheduler, safety_checker=None)
|
215 |
-
pipe.to(torch_device)
|
216 |
-
pipe.set_progress_bar_config(disable=None)
|
217 |
-
pipe.enable_attention_slicing()
|
218 |
-
|
219 |
-
inputs = self.get_inputs()
|
220 |
-
image = pipe(**inputs).images
|
221 |
-
image_slice = image[0, -3:, -3:, -1].flatten()
|
222 |
-
|
223 |
-
assert image.shape == (1, 512, 512, 3)
|
224 |
-
|
225 |
-
expected_slice = np.array([0.9622, 0.9602, 0.9748, 0.9591, 0.9630, 0.9691, 0.9661, 0.9631, 0.9741])
|
226 |
-
|
227 |
-
assert np.abs(expected_slice - image_slice).max() < 1e-2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/unidiffuser/test_unidiffuser.py
DELETED
@@ -1,673 +0,0 @@
|
|
1 |
-
import gc
|
2 |
-
import random
|
3 |
-
import unittest
|
4 |
-
|
5 |
-
import numpy as np
|
6 |
-
import torch
|
7 |
-
from PIL import Image
|
8 |
-
from transformers import (
|
9 |
-
CLIPImageProcessor,
|
10 |
-
CLIPTextModel,
|
11 |
-
CLIPTokenizer,
|
12 |
-
CLIPVisionModelWithProjection,
|
13 |
-
GPT2Tokenizer,
|
14 |
-
)
|
15 |
-
|
16 |
-
from diffusers import (
|
17 |
-
AutoencoderKL,
|
18 |
-
DPMSolverMultistepScheduler,
|
19 |
-
UniDiffuserModel,
|
20 |
-
UniDiffuserPipeline,
|
21 |
-
UniDiffuserTextDecoder,
|
22 |
-
)
|
23 |
-
from diffusers.utils import floats_tensor, load_image, randn_tensor, slow, torch_device
|
24 |
-
from diffusers.utils.testing_utils import require_torch_gpu
|
25 |
-
|
26 |
-
from ..pipeline_params import TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS, TEXT_GUIDED_IMAGE_VARIATION_PARAMS
|
27 |
-
from ..test_pipelines_common import PipelineTesterMixin
|
28 |
-
|
29 |
-
|
30 |
-
class UniDiffuserPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
|
31 |
-
pipeline_class = UniDiffuserPipeline
|
32 |
-
params = TEXT_GUIDED_IMAGE_VARIATION_PARAMS
|
33 |
-
batch_params = TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS
|
34 |
-
|
35 |
-
def get_dummy_components(self):
|
36 |
-
unet = UniDiffuserModel.from_pretrained(
|
37 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
38 |
-
subfolder="unet",
|
39 |
-
)
|
40 |
-
|
41 |
-
scheduler = DPMSolverMultistepScheduler(
|
42 |
-
beta_start=0.00085,
|
43 |
-
beta_end=0.012,
|
44 |
-
beta_schedule="scaled_linear",
|
45 |
-
solver_order=3,
|
46 |
-
)
|
47 |
-
|
48 |
-
vae = AutoencoderKL.from_pretrained(
|
49 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
50 |
-
subfolder="vae",
|
51 |
-
)
|
52 |
-
|
53 |
-
text_encoder = CLIPTextModel.from_pretrained(
|
54 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
55 |
-
subfolder="text_encoder",
|
56 |
-
)
|
57 |
-
clip_tokenizer = CLIPTokenizer.from_pretrained(
|
58 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
59 |
-
subfolder="clip_tokenizer",
|
60 |
-
)
|
61 |
-
|
62 |
-
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
|
63 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
64 |
-
subfolder="image_encoder",
|
65 |
-
)
|
66 |
-
# From the Stable Diffusion Image Variation pipeline tests
|
67 |
-
image_processor = CLIPImageProcessor(crop_size=32, size=32)
|
68 |
-
# image_processor = CLIPImageProcessor.from_pretrained("hf-internal-testing/tiny-random-clip")
|
69 |
-
|
70 |
-
text_tokenizer = GPT2Tokenizer.from_pretrained(
|
71 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
72 |
-
subfolder="text_tokenizer",
|
73 |
-
)
|
74 |
-
text_decoder = UniDiffuserTextDecoder.from_pretrained(
|
75 |
-
"hf-internal-testing/unidiffuser-diffusers-test",
|
76 |
-
subfolder="text_decoder",
|
77 |
-
)
|
78 |
-
|
79 |
-
components = {
|
80 |
-
"vae": vae,
|
81 |
-
"text_encoder": text_encoder,
|
82 |
-
"image_encoder": image_encoder,
|
83 |
-
"image_processor": image_processor,
|
84 |
-
"clip_tokenizer": clip_tokenizer,
|
85 |
-
"text_decoder": text_decoder,
|
86 |
-
"text_tokenizer": text_tokenizer,
|
87 |
-
"unet": unet,
|
88 |
-
"scheduler": scheduler,
|
89 |
-
}
|
90 |
-
|
91 |
-
return components
|
92 |
-
|
93 |
-
def get_dummy_inputs(self, device, seed=0):
|
94 |
-
image = floats_tensor((1, 3, 32, 32), rng=random.Random(seed)).to(device)
|
95 |
-
image = image.cpu().permute(0, 2, 3, 1)[0]
|
96 |
-
image = Image.fromarray(np.uint8(image)).convert("RGB")
|
97 |
-
if str(device).startswith("mps"):
|
98 |
-
generator = torch.manual_seed(seed)
|
99 |
-
else:
|
100 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
101 |
-
inputs = {
|
102 |
-
"prompt": "an elephant under the sea",
|
103 |
-
"image": image,
|
104 |
-
"generator": generator,
|
105 |
-
"num_inference_steps": 2,
|
106 |
-
"guidance_scale": 6.0,
|
107 |
-
"output_type": "numpy",
|
108 |
-
}
|
109 |
-
return inputs
|
110 |
-
|
111 |
-
def get_fixed_latents(self, device, seed=0):
|
112 |
-
if type(device) == str:
|
113 |
-
device = torch.device(device)
|
114 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
115 |
-
# Hardcode the shapes for now.
|
116 |
-
prompt_latents = randn_tensor((1, 77, 32), generator=generator, device=device, dtype=torch.float32)
|
117 |
-
vae_latents = randn_tensor((1, 4, 16, 16), generator=generator, device=device, dtype=torch.float32)
|
118 |
-
clip_latents = randn_tensor((1, 1, 32), generator=generator, device=device, dtype=torch.float32)
|
119 |
-
|
120 |
-
latents = {
|
121 |
-
"prompt_latents": prompt_latents,
|
122 |
-
"vae_latents": vae_latents,
|
123 |
-
"clip_latents": clip_latents,
|
124 |
-
}
|
125 |
-
return latents
|
126 |
-
|
127 |
-
def get_dummy_inputs_with_latents(self, device, seed=0):
|
128 |
-
# image = floats_tensor((1, 3, 32, 32), rng=random.Random(seed)).to(device)
|
129 |
-
# image = image.cpu().permute(0, 2, 3, 1)[0]
|
130 |
-
# image = Image.fromarray(np.uint8(image)).convert("RGB")
|
131 |
-
image = load_image(
|
132 |
-
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg",
|
133 |
-
)
|
134 |
-
image = image.resize((32, 32))
|
135 |
-
latents = self.get_fixed_latents(device, seed=seed)
|
136 |
-
|
137 |
-
if str(device).startswith("mps"):
|
138 |
-
generator = torch.manual_seed(seed)
|
139 |
-
else:
|
140 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
141 |
-
|
142 |
-
inputs = {
|
143 |
-
"prompt": "an elephant under the sea",
|
144 |
-
"image": image,
|
145 |
-
"generator": generator,
|
146 |
-
"num_inference_steps": 2,
|
147 |
-
"guidance_scale": 6.0,
|
148 |
-
"output_type": "numpy",
|
149 |
-
"prompt_latents": latents.get("prompt_latents"),
|
150 |
-
"vae_latents": latents.get("vae_latents"),
|
151 |
-
"clip_latents": latents.get("clip_latents"),
|
152 |
-
}
|
153 |
-
return inputs
|
154 |
-
|
155 |
-
def test_unidiffuser_default_joint_v0(self):
|
156 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
157 |
-
components = self.get_dummy_components()
|
158 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
159 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
160 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
161 |
-
|
162 |
-
# Set mode to 'joint'
|
163 |
-
unidiffuser_pipe.set_joint_mode()
|
164 |
-
assert unidiffuser_pipe.mode == "joint"
|
165 |
-
|
166 |
-
# inputs = self.get_dummy_inputs(device)
|
167 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
168 |
-
# Delete prompt and image for joint inference.
|
169 |
-
del inputs["prompt"]
|
170 |
-
del inputs["image"]
|
171 |
-
sample = unidiffuser_pipe(**inputs)
|
172 |
-
image = sample.images
|
173 |
-
text = sample.text
|
174 |
-
assert image.shape == (1, 32, 32, 3)
|
175 |
-
|
176 |
-
image_slice = image[0, -3:, -3:, -1]
|
177 |
-
expected_img_slice = np.array([0.5760, 0.6270, 0.6571, 0.4965, 0.4638, 0.5663, 0.5254, 0.5068, 0.5716])
|
178 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-3
|
179 |
-
|
180 |
-
expected_text_prefix = " no no no "
|
181 |
-
assert text[0][:10] == expected_text_prefix
|
182 |
-
|
183 |
-
def test_unidiffuser_default_joint_no_cfg_v0(self):
|
184 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
185 |
-
components = self.get_dummy_components()
|
186 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
187 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
188 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
189 |
-
|
190 |
-
# Set mode to 'joint'
|
191 |
-
unidiffuser_pipe.set_joint_mode()
|
192 |
-
assert unidiffuser_pipe.mode == "joint"
|
193 |
-
|
194 |
-
# inputs = self.get_dummy_inputs(device)
|
195 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
196 |
-
# Delete prompt and image for joint inference.
|
197 |
-
del inputs["prompt"]
|
198 |
-
del inputs["image"]
|
199 |
-
# Set guidance scale to 1.0 to turn off CFG
|
200 |
-
inputs["guidance_scale"] = 1.0
|
201 |
-
sample = unidiffuser_pipe(**inputs)
|
202 |
-
image = sample.images
|
203 |
-
text = sample.text
|
204 |
-
assert image.shape == (1, 32, 32, 3)
|
205 |
-
|
206 |
-
image_slice = image[0, -3:, -3:, -1]
|
207 |
-
expected_img_slice = np.array([0.5760, 0.6270, 0.6571, 0.4965, 0.4638, 0.5663, 0.5254, 0.5068, 0.5716])
|
208 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-3
|
209 |
-
|
210 |
-
expected_text_prefix = " no no no "
|
211 |
-
assert text[0][:10] == expected_text_prefix
|
212 |
-
|
213 |
-
def test_unidiffuser_default_text2img_v0(self):
|
214 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
215 |
-
components = self.get_dummy_components()
|
216 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
217 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
218 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
219 |
-
|
220 |
-
# Set mode to 'text2img'
|
221 |
-
unidiffuser_pipe.set_text_to_image_mode()
|
222 |
-
assert unidiffuser_pipe.mode == "text2img"
|
223 |
-
|
224 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
225 |
-
# Delete image for text-conditioned image generation
|
226 |
-
del inputs["image"]
|
227 |
-
image = unidiffuser_pipe(**inputs).images
|
228 |
-
assert image.shape == (1, 32, 32, 3)
|
229 |
-
|
230 |
-
image_slice = image[0, -3:, -3:, -1]
|
231 |
-
expected_slice = np.array([0.5758, 0.6269, 0.6570, 0.4967, 0.4639, 0.5664, 0.5257, 0.5067, 0.5715])
|
232 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-3
|
233 |
-
|
234 |
-
def test_unidiffuser_default_image_0(self):
|
235 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
236 |
-
components = self.get_dummy_components()
|
237 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
238 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
239 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
240 |
-
|
241 |
-
# Set mode to 'img'
|
242 |
-
unidiffuser_pipe.set_image_mode()
|
243 |
-
assert unidiffuser_pipe.mode == "img"
|
244 |
-
|
245 |
-
inputs = self.get_dummy_inputs(device)
|
246 |
-
# Delete prompt and image for unconditional ("marginal") text generation.
|
247 |
-
del inputs["prompt"]
|
248 |
-
del inputs["image"]
|
249 |
-
image = unidiffuser_pipe(**inputs).images
|
250 |
-
assert image.shape == (1, 32, 32, 3)
|
251 |
-
|
252 |
-
image_slice = image[0, -3:, -3:, -1]
|
253 |
-
expected_slice = np.array([0.5760, 0.6270, 0.6571, 0.4966, 0.4638, 0.5663, 0.5254, 0.5068, 0.5715])
|
254 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-3
|
255 |
-
|
256 |
-
def test_unidiffuser_default_text_v0(self):
|
257 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
258 |
-
components = self.get_dummy_components()
|
259 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
260 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
261 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
262 |
-
|
263 |
-
# Set mode to 'img'
|
264 |
-
unidiffuser_pipe.set_text_mode()
|
265 |
-
assert unidiffuser_pipe.mode == "text"
|
266 |
-
|
267 |
-
inputs = self.get_dummy_inputs(device)
|
268 |
-
# Delete prompt and image for unconditional ("marginal") text generation.
|
269 |
-
del inputs["prompt"]
|
270 |
-
del inputs["image"]
|
271 |
-
text = unidiffuser_pipe(**inputs).text
|
272 |
-
|
273 |
-
expected_text_prefix = " no no no "
|
274 |
-
assert text[0][:10] == expected_text_prefix
|
275 |
-
|
276 |
-
def test_unidiffuser_default_img2text_v0(self):
|
277 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
278 |
-
components = self.get_dummy_components()
|
279 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
280 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
281 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
282 |
-
|
283 |
-
# Set mode to 'img2text'
|
284 |
-
unidiffuser_pipe.set_image_to_text_mode()
|
285 |
-
assert unidiffuser_pipe.mode == "img2text"
|
286 |
-
|
287 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
288 |
-
# Delete text for image-conditioned text generation
|
289 |
-
del inputs["prompt"]
|
290 |
-
text = unidiffuser_pipe(**inputs).text
|
291 |
-
|
292 |
-
expected_text_prefix = " no no no "
|
293 |
-
assert text[0][:10] == expected_text_prefix
|
294 |
-
|
295 |
-
def test_unidiffuser_default_joint_v1(self):
|
296 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
297 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained("hf-internal-testing/unidiffuser-test-v1")
|
298 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
299 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
300 |
-
|
301 |
-
# Set mode to 'joint'
|
302 |
-
unidiffuser_pipe.set_joint_mode()
|
303 |
-
assert unidiffuser_pipe.mode == "joint"
|
304 |
-
|
305 |
-
# inputs = self.get_dummy_inputs(device)
|
306 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
307 |
-
# Delete prompt and image for joint inference.
|
308 |
-
del inputs["prompt"]
|
309 |
-
del inputs["image"]
|
310 |
-
inputs["data_type"] = 1
|
311 |
-
sample = unidiffuser_pipe(**inputs)
|
312 |
-
image = sample.images
|
313 |
-
text = sample.text
|
314 |
-
assert image.shape == (1, 32, 32, 3)
|
315 |
-
|
316 |
-
image_slice = image[0, -3:, -3:, -1]
|
317 |
-
expected_img_slice = np.array([0.5760, 0.6270, 0.6571, 0.4965, 0.4638, 0.5663, 0.5254, 0.5068, 0.5716])
|
318 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-3
|
319 |
-
|
320 |
-
expected_text_prefix = " no no no "
|
321 |
-
assert text[0][:10] == expected_text_prefix
|
322 |
-
|
323 |
-
def test_unidiffuser_default_text2img_v1(self):
|
324 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
325 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained("hf-internal-testing/unidiffuser-test-v1")
|
326 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
327 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
328 |
-
|
329 |
-
# Set mode to 'text2img'
|
330 |
-
unidiffuser_pipe.set_text_to_image_mode()
|
331 |
-
assert unidiffuser_pipe.mode == "text2img"
|
332 |
-
|
333 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
334 |
-
# Delete image for text-conditioned image generation
|
335 |
-
del inputs["image"]
|
336 |
-
image = unidiffuser_pipe(**inputs).images
|
337 |
-
assert image.shape == (1, 32, 32, 3)
|
338 |
-
|
339 |
-
image_slice = image[0, -3:, -3:, -1]
|
340 |
-
expected_slice = np.array([0.5758, 0.6269, 0.6570, 0.4967, 0.4639, 0.5664, 0.5257, 0.5067, 0.5715])
|
341 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-3
|
342 |
-
|
343 |
-
def test_unidiffuser_default_img2text_v1(self):
|
344 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
345 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained("hf-internal-testing/unidiffuser-test-v1")
|
346 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
347 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
348 |
-
|
349 |
-
# Set mode to 'img2text'
|
350 |
-
unidiffuser_pipe.set_image_to_text_mode()
|
351 |
-
assert unidiffuser_pipe.mode == "img2text"
|
352 |
-
|
353 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
354 |
-
# Delete text for image-conditioned text generation
|
355 |
-
del inputs["prompt"]
|
356 |
-
text = unidiffuser_pipe(**inputs).text
|
357 |
-
|
358 |
-
expected_text_prefix = " no no no "
|
359 |
-
assert text[0][:10] == expected_text_prefix
|
360 |
-
|
361 |
-
def test_unidiffuser_text2img_multiple_images(self):
|
362 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
363 |
-
components = self.get_dummy_components()
|
364 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
365 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
366 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
367 |
-
|
368 |
-
# Set mode to 'text2img'
|
369 |
-
unidiffuser_pipe.set_text_to_image_mode()
|
370 |
-
assert unidiffuser_pipe.mode == "text2img"
|
371 |
-
|
372 |
-
inputs = self.get_dummy_inputs(device)
|
373 |
-
# Delete image for text-conditioned image generation
|
374 |
-
del inputs["image"]
|
375 |
-
inputs["num_images_per_prompt"] = 2
|
376 |
-
inputs["num_prompts_per_image"] = 3
|
377 |
-
image = unidiffuser_pipe(**inputs).images
|
378 |
-
assert image.shape == (2, 32, 32, 3)
|
379 |
-
|
380 |
-
def test_unidiffuser_img2text_multiple_prompts(self):
|
381 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
382 |
-
components = self.get_dummy_components()
|
383 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
384 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
385 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
386 |
-
|
387 |
-
# Set mode to 'img2text'
|
388 |
-
unidiffuser_pipe.set_image_to_text_mode()
|
389 |
-
assert unidiffuser_pipe.mode == "img2text"
|
390 |
-
|
391 |
-
inputs = self.get_dummy_inputs(device)
|
392 |
-
# Delete text for image-conditioned text generation
|
393 |
-
del inputs["prompt"]
|
394 |
-
inputs["num_images_per_prompt"] = 2
|
395 |
-
inputs["num_prompts_per_image"] = 3
|
396 |
-
text = unidiffuser_pipe(**inputs).text
|
397 |
-
|
398 |
-
assert len(text) == 3
|
399 |
-
|
400 |
-
def test_unidiffuser_text2img_multiple_images_with_latents(self):
|
401 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
402 |
-
components = self.get_dummy_components()
|
403 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
404 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
405 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
406 |
-
|
407 |
-
# Set mode to 'text2img'
|
408 |
-
unidiffuser_pipe.set_text_to_image_mode()
|
409 |
-
assert unidiffuser_pipe.mode == "text2img"
|
410 |
-
|
411 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
412 |
-
# Delete image for text-conditioned image generation
|
413 |
-
del inputs["image"]
|
414 |
-
inputs["num_images_per_prompt"] = 2
|
415 |
-
inputs["num_prompts_per_image"] = 3
|
416 |
-
image = unidiffuser_pipe(**inputs).images
|
417 |
-
assert image.shape == (2, 32, 32, 3)
|
418 |
-
|
419 |
-
def test_unidiffuser_img2text_multiple_prompts_with_latents(self):
|
420 |
-
device = "cpu" # ensure determinism for the device-dependent torch.Generator
|
421 |
-
components = self.get_dummy_components()
|
422 |
-
unidiffuser_pipe = UniDiffuserPipeline(**components)
|
423 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
424 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
425 |
-
|
426 |
-
# Set mode to 'img2text'
|
427 |
-
unidiffuser_pipe.set_image_to_text_mode()
|
428 |
-
assert unidiffuser_pipe.mode == "img2text"
|
429 |
-
|
430 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
431 |
-
# Delete text for image-conditioned text generation
|
432 |
-
del inputs["prompt"]
|
433 |
-
inputs["num_images_per_prompt"] = 2
|
434 |
-
inputs["num_prompts_per_image"] = 3
|
435 |
-
text = unidiffuser_pipe(**inputs).text
|
436 |
-
|
437 |
-
assert len(text) == 3
|
438 |
-
|
439 |
-
def test_inference_batch_single_identical(self):
|
440 |
-
super().test_inference_batch_single_identical(expected_max_diff=2e-4)
|
441 |
-
|
442 |
-
@require_torch_gpu
|
443 |
-
def test_unidiffuser_default_joint_v1_cuda_fp16(self):
|
444 |
-
device = "cuda"
|
445 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained(
|
446 |
-
"hf-internal-testing/unidiffuser-test-v1", torch_dtype=torch.float16
|
447 |
-
)
|
448 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
449 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
450 |
-
|
451 |
-
# Set mode to 'joint'
|
452 |
-
unidiffuser_pipe.set_joint_mode()
|
453 |
-
assert unidiffuser_pipe.mode == "joint"
|
454 |
-
|
455 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
456 |
-
# Delete prompt and image for joint inference.
|
457 |
-
del inputs["prompt"]
|
458 |
-
del inputs["image"]
|
459 |
-
inputs["data_type"] = 1
|
460 |
-
sample = unidiffuser_pipe(**inputs)
|
461 |
-
image = sample.images
|
462 |
-
text = sample.text
|
463 |
-
assert image.shape == (1, 32, 32, 3)
|
464 |
-
|
465 |
-
image_slice = image[0, -3:, -3:, -1]
|
466 |
-
expected_img_slice = np.array([0.5049, 0.5498, 0.5854, 0.3052, 0.4460, 0.6489, 0.5122, 0.4810, 0.6138])
|
467 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-3
|
468 |
-
|
469 |
-
expected_text_prefix = '" This This'
|
470 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
471 |
-
|
472 |
-
@require_torch_gpu
|
473 |
-
def test_unidiffuser_default_text2img_v1_cuda_fp16(self):
|
474 |
-
device = "cuda"
|
475 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained(
|
476 |
-
"hf-internal-testing/unidiffuser-test-v1", torch_dtype=torch.float16
|
477 |
-
)
|
478 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
479 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
480 |
-
|
481 |
-
# Set mode to 'text2img'
|
482 |
-
unidiffuser_pipe.set_text_to_image_mode()
|
483 |
-
assert unidiffuser_pipe.mode == "text2img"
|
484 |
-
|
485 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
486 |
-
# Delete prompt and image for joint inference.
|
487 |
-
del inputs["image"]
|
488 |
-
inputs["data_type"] = 1
|
489 |
-
sample = unidiffuser_pipe(**inputs)
|
490 |
-
image = sample.images
|
491 |
-
assert image.shape == (1, 32, 32, 3)
|
492 |
-
|
493 |
-
image_slice = image[0, -3:, -3:, -1]
|
494 |
-
expected_img_slice = np.array([0.5054, 0.5498, 0.5854, 0.3052, 0.4458, 0.6489, 0.5122, 0.4810, 0.6138])
|
495 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-3
|
496 |
-
|
497 |
-
@require_torch_gpu
|
498 |
-
def test_unidiffuser_default_img2text_v1_cuda_fp16(self):
|
499 |
-
device = "cuda"
|
500 |
-
unidiffuser_pipe = UniDiffuserPipeline.from_pretrained(
|
501 |
-
"hf-internal-testing/unidiffuser-test-v1", torch_dtype=torch.float16
|
502 |
-
)
|
503 |
-
unidiffuser_pipe = unidiffuser_pipe.to(device)
|
504 |
-
unidiffuser_pipe.set_progress_bar_config(disable=None)
|
505 |
-
|
506 |
-
# Set mode to 'img2text'
|
507 |
-
unidiffuser_pipe.set_image_to_text_mode()
|
508 |
-
assert unidiffuser_pipe.mode == "img2text"
|
509 |
-
|
510 |
-
inputs = self.get_dummy_inputs_with_latents(device)
|
511 |
-
# Delete prompt and image for joint inference.
|
512 |
-
del inputs["prompt"]
|
513 |
-
inputs["data_type"] = 1
|
514 |
-
text = unidiffuser_pipe(**inputs).text
|
515 |
-
|
516 |
-
expected_text_prefix = '" This This'
|
517 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
518 |
-
|
519 |
-
|
520 |
-
@slow
|
521 |
-
@require_torch_gpu
|
522 |
-
class UniDiffuserPipelineSlowTests(unittest.TestCase):
|
523 |
-
def tearDown(self):
|
524 |
-
super().tearDown()
|
525 |
-
gc.collect()
|
526 |
-
torch.cuda.empty_cache()
|
527 |
-
|
528 |
-
def get_inputs(self, device, seed=0, generate_latents=False):
|
529 |
-
generator = torch.manual_seed(seed)
|
530 |
-
image = load_image(
|
531 |
-
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/unidiffuser/unidiffuser_example_image.jpg"
|
532 |
-
)
|
533 |
-
inputs = {
|
534 |
-
"prompt": "an elephant under the sea",
|
535 |
-
"image": image,
|
536 |
-
"generator": generator,
|
537 |
-
"num_inference_steps": 3,
|
538 |
-
"guidance_scale": 8.0,
|
539 |
-
"output_type": "numpy",
|
540 |
-
}
|
541 |
-
if generate_latents:
|
542 |
-
latents = self.get_fixed_latents(device, seed=seed)
|
543 |
-
for latent_name, latent_tensor in latents.items():
|
544 |
-
inputs[latent_name] = latent_tensor
|
545 |
-
return inputs
|
546 |
-
|
547 |
-
def get_fixed_latents(self, device, seed=0):
|
548 |
-
if type(device) == str:
|
549 |
-
device = torch.device(device)
|
550 |
-
latent_device = torch.device("cpu")
|
551 |
-
generator = torch.Generator(device=latent_device).manual_seed(seed)
|
552 |
-
# Hardcode the shapes for now.
|
553 |
-
prompt_latents = randn_tensor((1, 77, 768), generator=generator, device=device, dtype=torch.float32)
|
554 |
-
vae_latents = randn_tensor((1, 4, 64, 64), generator=generator, device=device, dtype=torch.float32)
|
555 |
-
clip_latents = randn_tensor((1, 1, 512), generator=generator, device=device, dtype=torch.float32)
|
556 |
-
|
557 |
-
# Move latents onto desired device.
|
558 |
-
prompt_latents = prompt_latents.to(device)
|
559 |
-
vae_latents = vae_latents.to(device)
|
560 |
-
clip_latents = clip_latents.to(device)
|
561 |
-
|
562 |
-
latents = {
|
563 |
-
"prompt_latents": prompt_latents,
|
564 |
-
"vae_latents": vae_latents,
|
565 |
-
"clip_latents": clip_latents,
|
566 |
-
}
|
567 |
-
return latents
|
568 |
-
|
569 |
-
def test_unidiffuser_default_joint_v1(self):
|
570 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1")
|
571 |
-
pipe.to(torch_device)
|
572 |
-
pipe.set_progress_bar_config(disable=None)
|
573 |
-
pipe.enable_attention_slicing()
|
574 |
-
|
575 |
-
# inputs = self.get_dummy_inputs(device)
|
576 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
577 |
-
# Delete prompt and image for joint inference.
|
578 |
-
del inputs["prompt"]
|
579 |
-
del inputs["image"]
|
580 |
-
sample = pipe(**inputs)
|
581 |
-
image = sample.images
|
582 |
-
text = sample.text
|
583 |
-
assert image.shape == (1, 512, 512, 3)
|
584 |
-
|
585 |
-
image_slice = image[0, -3:, -3:, -1]
|
586 |
-
expected_img_slice = np.array([0.2402, 0.2375, 0.2285, 0.2378, 0.2407, 0.2263, 0.2354, 0.2307, 0.2520])
|
587 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 1e-1
|
588 |
-
|
589 |
-
expected_text_prefix = "a living room"
|
590 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
591 |
-
|
592 |
-
def test_unidiffuser_default_text2img_v1(self):
|
593 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1")
|
594 |
-
pipe.to(torch_device)
|
595 |
-
pipe.set_progress_bar_config(disable=None)
|
596 |
-
pipe.enable_attention_slicing()
|
597 |
-
|
598 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
599 |
-
del inputs["image"]
|
600 |
-
sample = pipe(**inputs)
|
601 |
-
image = sample.images
|
602 |
-
assert image.shape == (1, 512, 512, 3)
|
603 |
-
|
604 |
-
image_slice = image[0, -3:, -3:, -1]
|
605 |
-
expected_slice = np.array([0.0242, 0.0103, 0.0022, 0.0129, 0.0000, 0.0090, 0.0376, 0.0508, 0.0005])
|
606 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-1
|
607 |
-
|
608 |
-
def test_unidiffuser_default_img2text_v1(self):
|
609 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1")
|
610 |
-
pipe.to(torch_device)
|
611 |
-
pipe.set_progress_bar_config(disable=None)
|
612 |
-
pipe.enable_attention_slicing()
|
613 |
-
|
614 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
615 |
-
del inputs["prompt"]
|
616 |
-
sample = pipe(**inputs)
|
617 |
-
text = sample.text
|
618 |
-
|
619 |
-
expected_text_prefix = "An astronaut"
|
620 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
621 |
-
|
622 |
-
def test_unidiffuser_default_joint_v1_fp16(self):
|
623 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1", torch_dtype=torch.float16)
|
624 |
-
pipe.to(torch_device)
|
625 |
-
pipe.set_progress_bar_config(disable=None)
|
626 |
-
pipe.enable_attention_slicing()
|
627 |
-
|
628 |
-
# inputs = self.get_dummy_inputs(device)
|
629 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
630 |
-
# Delete prompt and image for joint inference.
|
631 |
-
del inputs["prompt"]
|
632 |
-
del inputs["image"]
|
633 |
-
sample = pipe(**inputs)
|
634 |
-
image = sample.images
|
635 |
-
text = sample.text
|
636 |
-
assert image.shape == (1, 512, 512, 3)
|
637 |
-
|
638 |
-
image_slice = image[0, -3:, -3:, -1]
|
639 |
-
expected_img_slice = np.array([0.2402, 0.2375, 0.2285, 0.2378, 0.2407, 0.2263, 0.2354, 0.2307, 0.2520])
|
640 |
-
assert np.abs(image_slice.flatten() - expected_img_slice).max() < 2e-1
|
641 |
-
|
642 |
-
expected_text_prefix = "a living room"
|
643 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
644 |
-
|
645 |
-
def test_unidiffuser_default_text2img_v1_fp16(self):
|
646 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1", torch_dtype=torch.float16)
|
647 |
-
pipe.to(torch_device)
|
648 |
-
pipe.set_progress_bar_config(disable=None)
|
649 |
-
pipe.enable_attention_slicing()
|
650 |
-
|
651 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
652 |
-
del inputs["image"]
|
653 |
-
sample = pipe(**inputs)
|
654 |
-
image = sample.images
|
655 |
-
assert image.shape == (1, 512, 512, 3)
|
656 |
-
|
657 |
-
image_slice = image[0, -3:, -3:, -1]
|
658 |
-
expected_slice = np.array([0.0242, 0.0103, 0.0022, 0.0129, 0.0000, 0.0090, 0.0376, 0.0508, 0.0005])
|
659 |
-
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-1
|
660 |
-
|
661 |
-
def test_unidiffuser_default_img2text_v1_fp16(self):
|
662 |
-
pipe = UniDiffuserPipeline.from_pretrained("thu-ml/unidiffuser-v1", torch_dtype=torch.float16)
|
663 |
-
pipe.to(torch_device)
|
664 |
-
pipe.set_progress_bar_config(disable=None)
|
665 |
-
pipe.enable_attention_slicing()
|
666 |
-
|
667 |
-
inputs = self.get_inputs(device=torch_device, generate_latents=True)
|
668 |
-
del inputs["prompt"]
|
669 |
-
sample = pipe(**inputs)
|
670 |
-
text = sample.text
|
671 |
-
|
672 |
-
expected_text_prefix = "An astronaut"
|
673 |
-
assert text[0][: len(expected_text_prefix)] == expected_text_prefix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/configs/instaboost/cascade_mask_rcnn_r101_fpn_instaboost_4x_coco.py
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
_base_ = './cascade_mask_rcnn_r50_fpn_instaboost_4x_coco.py'
|
2 |
-
|
3 |
-
model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101))
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/mmdet/core/bbox/assigners/point_assigner.py
DELETED
@@ -1,133 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
|
3 |
-
from ..builder import BBOX_ASSIGNERS
|
4 |
-
from .assign_result import AssignResult
|
5 |
-
from .base_assigner import BaseAssigner
|
6 |
-
|
7 |
-
|
8 |
-
@BBOX_ASSIGNERS.register_module()
|
9 |
-
class PointAssigner(BaseAssigner):
|
10 |
-
"""Assign a corresponding gt bbox or background to each point.
|
11 |
-
|
12 |
-
Each proposals will be assigned with `0`, or a positive integer
|
13 |
-
indicating the ground truth index.
|
14 |
-
|
15 |
-
- 0: negative sample, no assigned gt
|
16 |
-
- positive integer: positive sample, index (1-based) of assigned gt
|
17 |
-
"""
|
18 |
-
|
19 |
-
def __init__(self, scale=4, pos_num=3):
|
20 |
-
self.scale = scale
|
21 |
-
self.pos_num = pos_num
|
22 |
-
|
23 |
-
def assign(self, points, gt_bboxes, gt_bboxes_ignore=None, gt_labels=None):
|
24 |
-
"""Assign gt to points.
|
25 |
-
|
26 |
-
This method assign a gt bbox to every points set, each points set
|
27 |
-
will be assigned with the background_label (-1), or a label number.
|
28 |
-
-1 is background, and semi-positive number is the index (0-based) of
|
29 |
-
assigned gt.
|
30 |
-
The assignment is done in following steps, the order matters.
|
31 |
-
|
32 |
-
1. assign every points to the background_label (-1)
|
33 |
-
2. A point is assigned to some gt bbox if
|
34 |
-
(i) the point is within the k closest points to the gt bbox
|
35 |
-
(ii) the distance between this point and the gt is smaller than
|
36 |
-
other gt bboxes
|
37 |
-
|
38 |
-
Args:
|
39 |
-
points (Tensor): points to be assigned, shape(n, 3) while last
|
40 |
-
dimension stands for (x, y, stride).
|
41 |
-
gt_bboxes (Tensor): Groundtruth boxes, shape (k, 4).
|
42 |
-
gt_bboxes_ignore (Tensor, optional): Ground truth bboxes that are
|
43 |
-
labelled as `ignored`, e.g., crowd boxes in COCO.
|
44 |
-
NOTE: currently unused.
|
45 |
-
gt_labels (Tensor, optional): Label of gt_bboxes, shape (k, ).
|
46 |
-
|
47 |
-
Returns:
|
48 |
-
:obj:`AssignResult`: The assign result.
|
49 |
-
"""
|
50 |
-
num_points = points.shape[0]
|
51 |
-
num_gts = gt_bboxes.shape[0]
|
52 |
-
|
53 |
-
if num_gts == 0 or num_points == 0:
|
54 |
-
# If no truth assign everything to the background
|
55 |
-
assigned_gt_inds = points.new_full((num_points, ),
|
56 |
-
0,
|
57 |
-
dtype=torch.long)
|
58 |
-
if gt_labels is None:
|
59 |
-
assigned_labels = None
|
60 |
-
else:
|
61 |
-
assigned_labels = points.new_full((num_points, ),
|
62 |
-
-1,
|
63 |
-
dtype=torch.long)
|
64 |
-
return AssignResult(
|
65 |
-
num_gts, assigned_gt_inds, None, labels=assigned_labels)
|
66 |
-
|
67 |
-
points_xy = points[:, :2]
|
68 |
-
points_stride = points[:, 2]
|
69 |
-
points_lvl = torch.log2(
|
70 |
-
points_stride).int() # [3...,4...,5...,6...,7...]
|
71 |
-
lvl_min, lvl_max = points_lvl.min(), points_lvl.max()
|
72 |
-
|
73 |
-
# assign gt box
|
74 |
-
gt_bboxes_xy = (gt_bboxes[:, :2] + gt_bboxes[:, 2:]) / 2
|
75 |
-
gt_bboxes_wh = (gt_bboxes[:, 2:] - gt_bboxes[:, :2]).clamp(min=1e-6)
|
76 |
-
scale = self.scale
|
77 |
-
gt_bboxes_lvl = ((torch.log2(gt_bboxes_wh[:, 0] / scale) +
|
78 |
-
torch.log2(gt_bboxes_wh[:, 1] / scale)) / 2).int()
|
79 |
-
gt_bboxes_lvl = torch.clamp(gt_bboxes_lvl, min=lvl_min, max=lvl_max)
|
80 |
-
|
81 |
-
# stores the assigned gt index of each point
|
82 |
-
assigned_gt_inds = points.new_zeros((num_points, ), dtype=torch.long)
|
83 |
-
# stores the assigned gt dist (to this point) of each point
|
84 |
-
assigned_gt_dist = points.new_full((num_points, ), float('inf'))
|
85 |
-
points_range = torch.arange(points.shape[0])
|
86 |
-
|
87 |
-
for idx in range(num_gts):
|
88 |
-
gt_lvl = gt_bboxes_lvl[idx]
|
89 |
-
# get the index of points in this level
|
90 |
-
lvl_idx = gt_lvl == points_lvl
|
91 |
-
points_index = points_range[lvl_idx]
|
92 |
-
# get the points in this level
|
93 |
-
lvl_points = points_xy[lvl_idx, :]
|
94 |
-
# get the center point of gt
|
95 |
-
gt_point = gt_bboxes_xy[[idx], :]
|
96 |
-
# get width and height of gt
|
97 |
-
gt_wh = gt_bboxes_wh[[idx], :]
|
98 |
-
# compute the distance between gt center and
|
99 |
-
# all points in this level
|
100 |
-
points_gt_dist = ((lvl_points - gt_point) / gt_wh).norm(dim=1)
|
101 |
-
# find the nearest k points to gt center in this level
|
102 |
-
min_dist, min_dist_index = torch.topk(
|
103 |
-
points_gt_dist, self.pos_num, largest=False)
|
104 |
-
# the index of nearest k points to gt center in this level
|
105 |
-
min_dist_points_index = points_index[min_dist_index]
|
106 |
-
# The less_than_recorded_index stores the index
|
107 |
-
# of min_dist that is less then the assigned_gt_dist. Where
|
108 |
-
# assigned_gt_dist stores the dist from previous assigned gt
|
109 |
-
# (if exist) to each point.
|
110 |
-
less_than_recorded_index = min_dist < assigned_gt_dist[
|
111 |
-
min_dist_points_index]
|
112 |
-
# The min_dist_points_index stores the index of points satisfy:
|
113 |
-
# (1) it is k nearest to current gt center in this level.
|
114 |
-
# (2) it is closer to current gt center than other gt center.
|
115 |
-
min_dist_points_index = min_dist_points_index[
|
116 |
-
less_than_recorded_index]
|
117 |
-
# assign the result
|
118 |
-
assigned_gt_inds[min_dist_points_index] = idx + 1
|
119 |
-
assigned_gt_dist[min_dist_points_index] = min_dist[
|
120 |
-
less_than_recorded_index]
|
121 |
-
|
122 |
-
if gt_labels is not None:
|
123 |
-
assigned_labels = assigned_gt_inds.new_full((num_points, ), -1)
|
124 |
-
pos_inds = torch.nonzero(
|
125 |
-
assigned_gt_inds > 0, as_tuple=False).squeeze()
|
126 |
-
if pos_inds.numel() > 0:
|
127 |
-
assigned_labels[pos_inds] = gt_labels[
|
128 |
-
assigned_gt_inds[pos_inds] - 1]
|
129 |
-
else:
|
130 |
-
assigned_labels = None
|
131 |
-
|
132 |
-
return AssignResult(
|
133 |
-
num_gts, assigned_gt_inds, None, labels=assigned_labels)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_segmentation/configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
_base_ = '../pspnet/pspnet_r101-d8_512x512_160k_ade20k.py'
|
2 |
-
model = dict(
|
3 |
-
pretrained='open-mmlab://resnest101',
|
4 |
-
backbone=dict(
|
5 |
-
type='ResNeSt',
|
6 |
-
stem_channels=128,
|
7 |
-
radix=2,
|
8 |
-
reduction_factor=4,
|
9 |
-
avg_down_stride=True))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Anilegna/Colour-Personallity/info.md
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
# 😌 Colour-Personallity
|
2 |
-
|
3 |
-
### 🧐 Problem Statement and Research Summary
|
4 |
-
[add info about your problem statement and your research here!]
|
5 |
-
|
6 |
-
### 🎣 Data Collection Plan
|
7 |
-
[Edit info.md - add info about what data you collected and why here!]
|
8 |
-
|
9 |
-
### 💥 Ethical Considerations (Data Privacy and Bias)
|
10 |
-
* Data privacy: [Edit info.md - add info about you considered users' privacy here!]
|
11 |
-
* Bias: [Edit info.md - add info about you considered bias here!]
|
12 |
-
|
13 |
-
### 👻 Our Team
|
14 |
-
[Edit info.md - add info about your team members here!]
|
15 |
-
|
16 |
-

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/utils/config.py
DELETED
@@ -1,688 +0,0 @@
|
|
1 |
-
# Copyright (c) OpenMMLab. All rights reserved.
|
2 |
-
import ast
|
3 |
-
import copy
|
4 |
-
import os
|
5 |
-
import os.path as osp
|
6 |
-
import platform
|
7 |
-
import shutil
|
8 |
-
import sys
|
9 |
-
import tempfile
|
10 |
-
import uuid
|
11 |
-
import warnings
|
12 |
-
from argparse import Action, ArgumentParser
|
13 |
-
from collections import abc
|
14 |
-
from importlib import import_module
|
15 |
-
|
16 |
-
from addict import Dict
|
17 |
-
from yapf.yapflib.yapf_api import FormatCode
|
18 |
-
|
19 |
-
from .misc import import_modules_from_strings
|
20 |
-
from .path import check_file_exist
|
21 |
-
|
22 |
-
if platform.system() == 'Windows':
|
23 |
-
import regex as re
|
24 |
-
else:
|
25 |
-
import re
|
26 |
-
|
27 |
-
BASE_KEY = '_base_'
|
28 |
-
DELETE_KEY = '_delete_'
|
29 |
-
DEPRECATION_KEY = '_deprecation_'
|
30 |
-
RESERVED_KEYS = ['filename', 'text', 'pretty_text']
|
31 |
-
|
32 |
-
|
33 |
-
class ConfigDict(Dict):
|
34 |
-
|
35 |
-
def __missing__(self, name):
|
36 |
-
raise KeyError(name)
|
37 |
-
|
38 |
-
def __getattr__(self, name):
|
39 |
-
try:
|
40 |
-
value = super(ConfigDict, self).__getattr__(name)
|
41 |
-
except KeyError:
|
42 |
-
ex = AttributeError(f"'{self.__class__.__name__}' object has no "
|
43 |
-
f"attribute '{name}'")
|
44 |
-
except Exception as e:
|
45 |
-
ex = e
|
46 |
-
else:
|
47 |
-
return value
|
48 |
-
raise ex
|
49 |
-
|
50 |
-
|
51 |
-
def add_args(parser, cfg, prefix=''):
|
52 |
-
for k, v in cfg.items():
|
53 |
-
if isinstance(v, str):
|
54 |
-
parser.add_argument('--' + prefix + k)
|
55 |
-
elif isinstance(v, int):
|
56 |
-
parser.add_argument('--' + prefix + k, type=int)
|
57 |
-
elif isinstance(v, float):
|
58 |
-
parser.add_argument('--' + prefix + k, type=float)
|
59 |
-
elif isinstance(v, bool):
|
60 |
-
parser.add_argument('--' + prefix + k, action='store_true')
|
61 |
-
elif isinstance(v, dict):
|
62 |
-
add_args(parser, v, prefix + k + '.')
|
63 |
-
elif isinstance(v, abc.Iterable):
|
64 |
-
parser.add_argument('--' + prefix + k, type=type(v[0]), nargs='+')
|
65 |
-
else:
|
66 |
-
print(f'cannot parse key {prefix + k} of type {type(v)}')
|
67 |
-
return parser
|
68 |
-
|
69 |
-
|
70 |
-
class Config:
|
71 |
-
"""A facility for config and config files.
|
72 |
-
|
73 |
-
It supports common file formats as configs: python/json/yaml. The interface
|
74 |
-
is the same as a dict object and also allows access config values as
|
75 |
-
attributes.
|
76 |
-
|
77 |
-
Example:
|
78 |
-
>>> cfg = Config(dict(a=1, b=dict(b1=[0, 1])))
|
79 |
-
>>> cfg.a
|
80 |
-
1
|
81 |
-
>>> cfg.b
|
82 |
-
{'b1': [0, 1]}
|
83 |
-
>>> cfg.b.b1
|
84 |
-
[0, 1]
|
85 |
-
>>> cfg = Config.fromfile('tests/data/config/a.py')
|
86 |
-
>>> cfg.filename
|
87 |
-
"/home/kchen/projects/mmcv/tests/data/config/a.py"
|
88 |
-
>>> cfg.item4
|
89 |
-
'test'
|
90 |
-
>>> cfg
|
91 |
-
"Config [path: /home/kchen/projects/mmcv/tests/data/config/a.py]: "
|
92 |
-
"{'item1': [1, 2], 'item2': {'a': 0}, 'item3': True, 'item4': 'test'}"
|
93 |
-
"""
|
94 |
-
|
95 |
-
@staticmethod
|
96 |
-
def _validate_py_syntax(filename):
|
97 |
-
with open(filename, 'r', encoding='utf-8') as f:
|
98 |
-
# Setting encoding explicitly to resolve coding issue on windows
|
99 |
-
content = f.read()
|
100 |
-
try:
|
101 |
-
ast.parse(content)
|
102 |
-
except SyntaxError as e:
|
103 |
-
raise SyntaxError('There are syntax errors in config '
|
104 |
-
f'file {filename}: {e}')
|
105 |
-
|
106 |
-
@staticmethod
|
107 |
-
def _substitute_predefined_vars(filename, temp_config_name):
|
108 |
-
file_dirname = osp.dirname(filename)
|
109 |
-
file_basename = osp.basename(filename)
|
110 |
-
file_basename_no_extension = osp.splitext(file_basename)[0]
|
111 |
-
file_extname = osp.splitext(filename)[1]
|
112 |
-
support_templates = dict(
|
113 |
-
fileDirname=file_dirname,
|
114 |
-
fileBasename=file_basename,
|
115 |
-
fileBasenameNoExtension=file_basename_no_extension,
|
116 |
-
fileExtname=file_extname)
|
117 |
-
with open(filename, 'r', encoding='utf-8') as f:
|
118 |
-
# Setting encoding explicitly to resolve coding issue on windows
|
119 |
-
config_file = f.read()
|
120 |
-
for key, value in support_templates.items():
|
121 |
-
regexp = r'\{\{\s*' + str(key) + r'\s*\}\}'
|
122 |
-
value = value.replace('\\', '/')
|
123 |
-
config_file = re.sub(regexp, value, config_file)
|
124 |
-
with open(temp_config_name, 'w', encoding='utf-8') as tmp_config_file:
|
125 |
-
tmp_config_file.write(config_file)
|
126 |
-
|
127 |
-
@staticmethod
|
128 |
-
def _pre_substitute_base_vars(filename, temp_config_name):
|
129 |
-
"""Substitute base variable placehoders to string, so that parsing
|
130 |
-
would work."""
|
131 |
-
with open(filename, 'r', encoding='utf-8') as f:
|
132 |
-
# Setting encoding explicitly to resolve coding issue on windows
|
133 |
-
config_file = f.read()
|
134 |
-
base_var_dict = {}
|
135 |
-
regexp = r'\{\{\s*' + BASE_KEY + r'\.([\w\.]+)\s*\}\}'
|
136 |
-
base_vars = set(re.findall(regexp, config_file))
|
137 |
-
for base_var in base_vars:
|
138 |
-
randstr = f'_{base_var}_{uuid.uuid4().hex.lower()[:6]}'
|
139 |
-
base_var_dict[randstr] = base_var
|
140 |
-
regexp = r'\{\{\s*' + BASE_KEY + r'\.' + base_var + r'\s*\}\}'
|
141 |
-
config_file = re.sub(regexp, f'"{randstr}"', config_file)
|
142 |
-
with open(temp_config_name, 'w', encoding='utf-8') as tmp_config_file:
|
143 |
-
tmp_config_file.write(config_file)
|
144 |
-
return base_var_dict
|
145 |
-
|
146 |
-
@staticmethod
|
147 |
-
def _substitute_base_vars(cfg, base_var_dict, base_cfg):
|
148 |
-
"""Substitute variable strings to their actual values."""
|
149 |
-
cfg = copy.deepcopy(cfg)
|
150 |
-
|
151 |
-
if isinstance(cfg, dict):
|
152 |
-
for k, v in cfg.items():
|
153 |
-
if isinstance(v, str) and v in base_var_dict:
|
154 |
-
new_v = base_cfg
|
155 |
-
for new_k in base_var_dict[v].split('.'):
|
156 |
-
new_v = new_v[new_k]
|
157 |
-
cfg[k] = new_v
|
158 |
-
elif isinstance(v, (list, tuple, dict)):
|
159 |
-
cfg[k] = Config._substitute_base_vars(
|
160 |
-
v, base_var_dict, base_cfg)
|
161 |
-
elif isinstance(cfg, tuple):
|
162 |
-
cfg = tuple(
|
163 |
-
Config._substitute_base_vars(c, base_var_dict, base_cfg)
|
164 |
-
for c in cfg)
|
165 |
-
elif isinstance(cfg, list):
|
166 |
-
cfg = [
|
167 |
-
Config._substitute_base_vars(c, base_var_dict, base_cfg)
|
168 |
-
for c in cfg
|
169 |
-
]
|
170 |
-
elif isinstance(cfg, str) and cfg in base_var_dict:
|
171 |
-
new_v = base_cfg
|
172 |
-
for new_k in base_var_dict[cfg].split('.'):
|
173 |
-
new_v = new_v[new_k]
|
174 |
-
cfg = new_v
|
175 |
-
|
176 |
-
return cfg
|
177 |
-
|
178 |
-
@staticmethod
|
179 |
-
def _file2dict(filename, use_predefined_variables=True):
|
180 |
-
filename = osp.abspath(osp.expanduser(filename))
|
181 |
-
check_file_exist(filename)
|
182 |
-
fileExtname = osp.splitext(filename)[1]
|
183 |
-
if fileExtname not in ['.py', '.json', '.yaml', '.yml']:
|
184 |
-
raise IOError('Only py/yml/yaml/json type are supported now!')
|
185 |
-
|
186 |
-
with tempfile.TemporaryDirectory() as temp_config_dir:
|
187 |
-
temp_config_file = tempfile.NamedTemporaryFile(
|
188 |
-
dir=temp_config_dir, suffix=fileExtname)
|
189 |
-
if platform.system() == 'Windows':
|
190 |
-
temp_config_file.close()
|
191 |
-
temp_config_name = osp.basename(temp_config_file.name)
|
192 |
-
# Substitute predefined variables
|
193 |
-
if use_predefined_variables:
|
194 |
-
Config._substitute_predefined_vars(filename,
|
195 |
-
temp_config_file.name)
|
196 |
-
else:
|
197 |
-
shutil.copyfile(filename, temp_config_file.name)
|
198 |
-
# Substitute base variables from placeholders to strings
|
199 |
-
base_var_dict = Config._pre_substitute_base_vars(
|
200 |
-
temp_config_file.name, temp_config_file.name)
|
201 |
-
|
202 |
-
if filename.endswith('.py'):
|
203 |
-
temp_module_name = osp.splitext(temp_config_name)[0]
|
204 |
-
sys.path.insert(0, temp_config_dir)
|
205 |
-
Config._validate_py_syntax(filename)
|
206 |
-
mod = import_module(temp_module_name)
|
207 |
-
sys.path.pop(0)
|
208 |
-
cfg_dict = {
|
209 |
-
name: value
|
210 |
-
for name, value in mod.__dict__.items()
|
211 |
-
if not name.startswith('__')
|
212 |
-
}
|
213 |
-
# delete imported module
|
214 |
-
del sys.modules[temp_module_name]
|
215 |
-
elif filename.endswith(('.yml', '.yaml', '.json')):
|
216 |
-
import annotator.uniformer.mmcv as mmcv
|
217 |
-
cfg_dict = mmcv.load(temp_config_file.name)
|
218 |
-
# close temp file
|
219 |
-
temp_config_file.close()
|
220 |
-
|
221 |
-
# check deprecation information
|
222 |
-
if DEPRECATION_KEY in cfg_dict:
|
223 |
-
deprecation_info = cfg_dict.pop(DEPRECATION_KEY)
|
224 |
-
warning_msg = f'The config file {filename} will be deprecated ' \
|
225 |
-
'in the future.'
|
226 |
-
if 'expected' in deprecation_info:
|
227 |
-
warning_msg += f' Please use {deprecation_info["expected"]} ' \
|
228 |
-
'instead.'
|
229 |
-
if 'reference' in deprecation_info:
|
230 |
-
warning_msg += ' More information can be found at ' \
|
231 |
-
f'{deprecation_info["reference"]}'
|
232 |
-
warnings.warn(warning_msg)
|
233 |
-
|
234 |
-
cfg_text = filename + '\n'
|
235 |
-
with open(filename, 'r', encoding='utf-8') as f:
|
236 |
-
# Setting encoding explicitly to resolve coding issue on windows
|
237 |
-
cfg_text += f.read()
|
238 |
-
|
239 |
-
if BASE_KEY in cfg_dict:
|
240 |
-
cfg_dir = osp.dirname(filename)
|
241 |
-
base_filename = cfg_dict.pop(BASE_KEY)
|
242 |
-
base_filename = base_filename if isinstance(
|
243 |
-
base_filename, list) else [base_filename]
|
244 |
-
|
245 |
-
cfg_dict_list = list()
|
246 |
-
cfg_text_list = list()
|
247 |
-
for f in base_filename:
|
248 |
-
_cfg_dict, _cfg_text = Config._file2dict(osp.join(cfg_dir, f))
|
249 |
-
cfg_dict_list.append(_cfg_dict)
|
250 |
-
cfg_text_list.append(_cfg_text)
|
251 |
-
|
252 |
-
base_cfg_dict = dict()
|
253 |
-
for c in cfg_dict_list:
|
254 |
-
duplicate_keys = base_cfg_dict.keys() & c.keys()
|
255 |
-
if len(duplicate_keys) > 0:
|
256 |
-
raise KeyError('Duplicate key is not allowed among bases. '
|
257 |
-
f'Duplicate keys: {duplicate_keys}')
|
258 |
-
base_cfg_dict.update(c)
|
259 |
-
|
260 |
-
# Substitute base variables from strings to their actual values
|
261 |
-
cfg_dict = Config._substitute_base_vars(cfg_dict, base_var_dict,
|
262 |
-
base_cfg_dict)
|
263 |
-
|
264 |
-
base_cfg_dict = Config._merge_a_into_b(cfg_dict, base_cfg_dict)
|
265 |
-
cfg_dict = base_cfg_dict
|
266 |
-
|
267 |
-
# merge cfg_text
|
268 |
-
cfg_text_list.append(cfg_text)
|
269 |
-
cfg_text = '\n'.join(cfg_text_list)
|
270 |
-
|
271 |
-
return cfg_dict, cfg_text
|
272 |
-
|
273 |
-
@staticmethod
|
274 |
-
def _merge_a_into_b(a, b, allow_list_keys=False):
|
275 |
-
"""merge dict ``a`` into dict ``b`` (non-inplace).
|
276 |
-
|
277 |
-
Values in ``a`` will overwrite ``b``. ``b`` is copied first to avoid
|
278 |
-
in-place modifications.
|
279 |
-
|
280 |
-
Args:
|
281 |
-
a (dict): The source dict to be merged into ``b``.
|
282 |
-
b (dict): The origin dict to be fetch keys from ``a``.
|
283 |
-
allow_list_keys (bool): If True, int string keys (e.g. '0', '1')
|
284 |
-
are allowed in source ``a`` and will replace the element of the
|
285 |
-
corresponding index in b if b is a list. Default: False.
|
286 |
-
|
287 |
-
Returns:
|
288 |
-
dict: The modified dict of ``b`` using ``a``.
|
289 |
-
|
290 |
-
Examples:
|
291 |
-
# Normally merge a into b.
|
292 |
-
>>> Config._merge_a_into_b(
|
293 |
-
... dict(obj=dict(a=2)), dict(obj=dict(a=1)))
|
294 |
-
{'obj': {'a': 2}}
|
295 |
-
|
296 |
-
# Delete b first and merge a into b.
|
297 |
-
>>> Config._merge_a_into_b(
|
298 |
-
... dict(obj=dict(_delete_=True, a=2)), dict(obj=dict(a=1)))
|
299 |
-
{'obj': {'a': 2}}
|
300 |
-
|
301 |
-
# b is a list
|
302 |
-
>>> Config._merge_a_into_b(
|
303 |
-
... {'0': dict(a=2)}, [dict(a=1), dict(b=2)], True)
|
304 |
-
[{'a': 2}, {'b': 2}]
|
305 |
-
"""
|
306 |
-
b = b.copy()
|
307 |
-
for k, v in a.items():
|
308 |
-
if allow_list_keys and k.isdigit() and isinstance(b, list):
|
309 |
-
k = int(k)
|
310 |
-
if len(b) <= k:
|
311 |
-
raise KeyError(f'Index {k} exceeds the length of list {b}')
|
312 |
-
b[k] = Config._merge_a_into_b(v, b[k], allow_list_keys)
|
313 |
-
elif isinstance(v,
|
314 |
-
dict) and k in b and not v.pop(DELETE_KEY, False):
|
315 |
-
allowed_types = (dict, list) if allow_list_keys else dict
|
316 |
-
if not isinstance(b[k], allowed_types):
|
317 |
-
raise TypeError(
|
318 |
-
f'{k}={v} in child config cannot inherit from base '
|
319 |
-
f'because {k} is a dict in the child config but is of '
|
320 |
-
f'type {type(b[k])} in base config. You may set '
|
321 |
-
f'`{DELETE_KEY}=True` to ignore the base config')
|
322 |
-
b[k] = Config._merge_a_into_b(v, b[k], allow_list_keys)
|
323 |
-
else:
|
324 |
-
b[k] = v
|
325 |
-
return b
|
326 |
-
|
327 |
-
@staticmethod
|
328 |
-
def fromfile(filename,
|
329 |
-
use_predefined_variables=True,
|
330 |
-
import_custom_modules=True):
|
331 |
-
cfg_dict, cfg_text = Config._file2dict(filename,
|
332 |
-
use_predefined_variables)
|
333 |
-
if import_custom_modules and cfg_dict.get('custom_imports', None):
|
334 |
-
import_modules_from_strings(**cfg_dict['custom_imports'])
|
335 |
-
return Config(cfg_dict, cfg_text=cfg_text, filename=filename)
|
336 |
-
|
337 |
-
@staticmethod
|
338 |
-
def fromstring(cfg_str, file_format):
|
339 |
-
"""Generate config from config str.
|
340 |
-
|
341 |
-
Args:
|
342 |
-
cfg_str (str): Config str.
|
343 |
-
file_format (str): Config file format corresponding to the
|
344 |
-
config str. Only py/yml/yaml/json type are supported now!
|
345 |
-
|
346 |
-
Returns:
|
347 |
-
obj:`Config`: Config obj.
|
348 |
-
"""
|
349 |
-
if file_format not in ['.py', '.json', '.yaml', '.yml']:
|
350 |
-
raise IOError('Only py/yml/yaml/json type are supported now!')
|
351 |
-
if file_format != '.py' and 'dict(' in cfg_str:
|
352 |
-
# check if users specify a wrong suffix for python
|
353 |
-
warnings.warn(
|
354 |
-
'Please check "file_format", the file format may be .py')
|
355 |
-
with tempfile.NamedTemporaryFile(
|
356 |
-
'w', encoding='utf-8', suffix=file_format,
|
357 |
-
delete=False) as temp_file:
|
358 |
-
temp_file.write(cfg_str)
|
359 |
-
# on windows, previous implementation cause error
|
360 |
-
# see PR 1077 for details
|
361 |
-
cfg = Config.fromfile(temp_file.name)
|
362 |
-
os.remove(temp_file.name)
|
363 |
-
return cfg
|
364 |
-
|
365 |
-
@staticmethod
|
366 |
-
def auto_argparser(description=None):
|
367 |
-
"""Generate argparser from config file automatically (experimental)"""
|
368 |
-
partial_parser = ArgumentParser(description=description)
|
369 |
-
partial_parser.add_argument('config', help='config file path')
|
370 |
-
cfg_file = partial_parser.parse_known_args()[0].config
|
371 |
-
cfg = Config.fromfile(cfg_file)
|
372 |
-
parser = ArgumentParser(description=description)
|
373 |
-
parser.add_argument('config', help='config file path')
|
374 |
-
add_args(parser, cfg)
|
375 |
-
return parser, cfg
|
376 |
-
|
377 |
-
def __init__(self, cfg_dict=None, cfg_text=None, filename=None):
|
378 |
-
if cfg_dict is None:
|
379 |
-
cfg_dict = dict()
|
380 |
-
elif not isinstance(cfg_dict, dict):
|
381 |
-
raise TypeError('cfg_dict must be a dict, but '
|
382 |
-
f'got {type(cfg_dict)}')
|
383 |
-
for key in cfg_dict:
|
384 |
-
if key in RESERVED_KEYS:
|
385 |
-
raise KeyError(f'{key} is reserved for config file')
|
386 |
-
|
387 |
-
super(Config, self).__setattr__('_cfg_dict', ConfigDict(cfg_dict))
|
388 |
-
super(Config, self).__setattr__('_filename', filename)
|
389 |
-
if cfg_text:
|
390 |
-
text = cfg_text
|
391 |
-
elif filename:
|
392 |
-
with open(filename, 'r') as f:
|
393 |
-
text = f.read()
|
394 |
-
else:
|
395 |
-
text = ''
|
396 |
-
super(Config, self).__setattr__('_text', text)
|
397 |
-
|
398 |
-
@property
|
399 |
-
def filename(self):
|
400 |
-
return self._filename
|
401 |
-
|
402 |
-
@property
|
403 |
-
def text(self):
|
404 |
-
return self._text
|
405 |
-
|
406 |
-
@property
|
407 |
-
def pretty_text(self):
|
408 |
-
|
409 |
-
indent = 4
|
410 |
-
|
411 |
-
def _indent(s_, num_spaces):
|
412 |
-
s = s_.split('\n')
|
413 |
-
if len(s) == 1:
|
414 |
-
return s_
|
415 |
-
first = s.pop(0)
|
416 |
-
s = [(num_spaces * ' ') + line for line in s]
|
417 |
-
s = '\n'.join(s)
|
418 |
-
s = first + '\n' + s
|
419 |
-
return s
|
420 |
-
|
421 |
-
def _format_basic_types(k, v, use_mapping=False):
|
422 |
-
if isinstance(v, str):
|
423 |
-
v_str = f"'{v}'"
|
424 |
-
else:
|
425 |
-
v_str = str(v)
|
426 |
-
|
427 |
-
if use_mapping:
|
428 |
-
k_str = f"'{k}'" if isinstance(k, str) else str(k)
|
429 |
-
attr_str = f'{k_str}: {v_str}'
|
430 |
-
else:
|
431 |
-
attr_str = f'{str(k)}={v_str}'
|
432 |
-
attr_str = _indent(attr_str, indent)
|
433 |
-
|
434 |
-
return attr_str
|
435 |
-
|
436 |
-
def _format_list(k, v, use_mapping=False):
|
437 |
-
# check if all items in the list are dict
|
438 |
-
if all(isinstance(_, dict) for _ in v):
|
439 |
-
v_str = '[\n'
|
440 |
-
v_str += '\n'.join(
|
441 |
-
f'dict({_indent(_format_dict(v_), indent)}),'
|
442 |
-
for v_ in v).rstrip(',')
|
443 |
-
if use_mapping:
|
444 |
-
k_str = f"'{k}'" if isinstance(k, str) else str(k)
|
445 |
-
attr_str = f'{k_str}: {v_str}'
|
446 |
-
else:
|
447 |
-
attr_str = f'{str(k)}={v_str}'
|
448 |
-
attr_str = _indent(attr_str, indent) + ']'
|
449 |
-
else:
|
450 |
-
attr_str = _format_basic_types(k, v, use_mapping)
|
451 |
-
return attr_str
|
452 |
-
|
453 |
-
def _contain_invalid_identifier(dict_str):
|
454 |
-
contain_invalid_identifier = False
|
455 |
-
for key_name in dict_str:
|
456 |
-
contain_invalid_identifier |= \
|
457 |
-
(not str(key_name).isidentifier())
|
458 |
-
return contain_invalid_identifier
|
459 |
-
|
460 |
-
def _format_dict(input_dict, outest_level=False):
|
461 |
-
r = ''
|
462 |
-
s = []
|
463 |
-
|
464 |
-
use_mapping = _contain_invalid_identifier(input_dict)
|
465 |
-
if use_mapping:
|
466 |
-
r += '{'
|
467 |
-
for idx, (k, v) in enumerate(input_dict.items()):
|
468 |
-
is_last = idx >= len(input_dict) - 1
|
469 |
-
end = '' if outest_level or is_last else ','
|
470 |
-
if isinstance(v, dict):
|
471 |
-
v_str = '\n' + _format_dict(v)
|
472 |
-
if use_mapping:
|
473 |
-
k_str = f"'{k}'" if isinstance(k, str) else str(k)
|
474 |
-
attr_str = f'{k_str}: dict({v_str}'
|
475 |
-
else:
|
476 |
-
attr_str = f'{str(k)}=dict({v_str}'
|
477 |
-
attr_str = _indent(attr_str, indent) + ')' + end
|
478 |
-
elif isinstance(v, list):
|
479 |
-
attr_str = _format_list(k, v, use_mapping) + end
|
480 |
-
else:
|
481 |
-
attr_str = _format_basic_types(k, v, use_mapping) + end
|
482 |
-
|
483 |
-
s.append(attr_str)
|
484 |
-
r += '\n'.join(s)
|
485 |
-
if use_mapping:
|
486 |
-
r += '}'
|
487 |
-
return r
|
488 |
-
|
489 |
-
cfg_dict = self._cfg_dict.to_dict()
|
490 |
-
text = _format_dict(cfg_dict, outest_level=True)
|
491 |
-
# copied from setup.cfg
|
492 |
-
yapf_style = dict(
|
493 |
-
based_on_style='pep8',
|
494 |
-
blank_line_before_nested_class_or_def=True,
|
495 |
-
split_before_expression_after_opening_paren=True)
|
496 |
-
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
|
497 |
-
|
498 |
-
return text
|
499 |
-
|
500 |
-
def __repr__(self):
|
501 |
-
return f'Config (path: {self.filename}): {self._cfg_dict.__repr__()}'
|
502 |
-
|
503 |
-
def __len__(self):
|
504 |
-
return len(self._cfg_dict)
|
505 |
-
|
506 |
-
def __getattr__(self, name):
|
507 |
-
return getattr(self._cfg_dict, name)
|
508 |
-
|
509 |
-
def __getitem__(self, name):
|
510 |
-
return self._cfg_dict.__getitem__(name)
|
511 |
-
|
512 |
-
def __setattr__(self, name, value):
|
513 |
-
if isinstance(value, dict):
|
514 |
-
value = ConfigDict(value)
|
515 |
-
self._cfg_dict.__setattr__(name, value)
|
516 |
-
|
517 |
-
def __setitem__(self, name, value):
|
518 |
-
if isinstance(value, dict):
|
519 |
-
value = ConfigDict(value)
|
520 |
-
self._cfg_dict.__setitem__(name, value)
|
521 |
-
|
522 |
-
def __iter__(self):
|
523 |
-
return iter(self._cfg_dict)
|
524 |
-
|
525 |
-
def __getstate__(self):
|
526 |
-
return (self._cfg_dict, self._filename, self._text)
|
527 |
-
|
528 |
-
def __setstate__(self, state):
|
529 |
-
_cfg_dict, _filename, _text = state
|
530 |
-
super(Config, self).__setattr__('_cfg_dict', _cfg_dict)
|
531 |
-
super(Config, self).__setattr__('_filename', _filename)
|
532 |
-
super(Config, self).__setattr__('_text', _text)
|
533 |
-
|
534 |
-
def dump(self, file=None):
|
535 |
-
cfg_dict = super(Config, self).__getattribute__('_cfg_dict').to_dict()
|
536 |
-
if self.filename.endswith('.py'):
|
537 |
-
if file is None:
|
538 |
-
return self.pretty_text
|
539 |
-
else:
|
540 |
-
with open(file, 'w', encoding='utf-8') as f:
|
541 |
-
f.write(self.pretty_text)
|
542 |
-
else:
|
543 |
-
import annotator.uniformer.mmcv as mmcv
|
544 |
-
if file is None:
|
545 |
-
file_format = self.filename.split('.')[-1]
|
546 |
-
return mmcv.dump(cfg_dict, file_format=file_format)
|
547 |
-
else:
|
548 |
-
mmcv.dump(cfg_dict, file)
|
549 |
-
|
550 |
-
def merge_from_dict(self, options, allow_list_keys=True):
|
551 |
-
"""Merge list into cfg_dict.
|
552 |
-
|
553 |
-
Merge the dict parsed by MultipleKVAction into this cfg.
|
554 |
-
|
555 |
-
Examples:
|
556 |
-
>>> options = {'model.backbone.depth': 50,
|
557 |
-
... 'model.backbone.with_cp':True}
|
558 |
-
>>> cfg = Config(dict(model=dict(backbone=dict(type='ResNet'))))
|
559 |
-
>>> cfg.merge_from_dict(options)
|
560 |
-
>>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
|
561 |
-
>>> assert cfg_dict == dict(
|
562 |
-
... model=dict(backbone=dict(depth=50, with_cp=True)))
|
563 |
-
|
564 |
-
# Merge list element
|
565 |
-
>>> cfg = Config(dict(pipeline=[
|
566 |
-
... dict(type='LoadImage'), dict(type='LoadAnnotations')]))
|
567 |
-
>>> options = dict(pipeline={'0': dict(type='SelfLoadImage')})
|
568 |
-
>>> cfg.merge_from_dict(options, allow_list_keys=True)
|
569 |
-
>>> cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
|
570 |
-
>>> assert cfg_dict == dict(pipeline=[
|
571 |
-
... dict(type='SelfLoadImage'), dict(type='LoadAnnotations')])
|
572 |
-
|
573 |
-
Args:
|
574 |
-
options (dict): dict of configs to merge from.
|
575 |
-
allow_list_keys (bool): If True, int string keys (e.g. '0', '1')
|
576 |
-
are allowed in ``options`` and will replace the element of the
|
577 |
-
corresponding index in the config if the config is a list.
|
578 |
-
Default: True.
|
579 |
-
"""
|
580 |
-
option_cfg_dict = {}
|
581 |
-
for full_key, v in options.items():
|
582 |
-
d = option_cfg_dict
|
583 |
-
key_list = full_key.split('.')
|
584 |
-
for subkey in key_list[:-1]:
|
585 |
-
d.setdefault(subkey, ConfigDict())
|
586 |
-
d = d[subkey]
|
587 |
-
subkey = key_list[-1]
|
588 |
-
d[subkey] = v
|
589 |
-
|
590 |
-
cfg_dict = super(Config, self).__getattribute__('_cfg_dict')
|
591 |
-
super(Config, self).__setattr__(
|
592 |
-
'_cfg_dict',
|
593 |
-
Config._merge_a_into_b(
|
594 |
-
option_cfg_dict, cfg_dict, allow_list_keys=allow_list_keys))
|
595 |
-
|
596 |
-
|
597 |
-
class DictAction(Action):
|
598 |
-
"""
|
599 |
-
argparse action to split an argument into KEY=VALUE form
|
600 |
-
on the first = and append to a dictionary. List options can
|
601 |
-
be passed as comma separated values, i.e 'KEY=V1,V2,V3', or with explicit
|
602 |
-
brackets, i.e. 'KEY=[V1,V2,V3]'. It also support nested brackets to build
|
603 |
-
list/tuple values. e.g. 'KEY=[(V1,V2),(V3,V4)]'
|
604 |
-
"""
|
605 |
-
|
606 |
-
@staticmethod
|
607 |
-
def _parse_int_float_bool(val):
|
608 |
-
try:
|
609 |
-
return int(val)
|
610 |
-
except ValueError:
|
611 |
-
pass
|
612 |
-
try:
|
613 |
-
return float(val)
|
614 |
-
except ValueError:
|
615 |
-
pass
|
616 |
-
if val.lower() in ['true', 'false']:
|
617 |
-
return True if val.lower() == 'true' else False
|
618 |
-
return val
|
619 |
-
|
620 |
-
@staticmethod
|
621 |
-
def _parse_iterable(val):
|
622 |
-
"""Parse iterable values in the string.
|
623 |
-
|
624 |
-
All elements inside '()' or '[]' are treated as iterable values.
|
625 |
-
|
626 |
-
Args:
|
627 |
-
val (str): Value string.
|
628 |
-
|
629 |
-
Returns:
|
630 |
-
list | tuple: The expanded list or tuple from the string.
|
631 |
-
|
632 |
-
Examples:
|
633 |
-
>>> DictAction._parse_iterable('1,2,3')
|
634 |
-
[1, 2, 3]
|
635 |
-
>>> DictAction._parse_iterable('[a, b, c]')
|
636 |
-
['a', 'b', 'c']
|
637 |
-
>>> DictAction._parse_iterable('[(1, 2, 3), [a, b], c]')
|
638 |
-
[(1, 2, 3), ['a', 'b'], 'c']
|
639 |
-
"""
|
640 |
-
|
641 |
-
def find_next_comma(string):
|
642 |
-
"""Find the position of next comma in the string.
|
643 |
-
|
644 |
-
If no ',' is found in the string, return the string length. All
|
645 |
-
chars inside '()' and '[]' are treated as one element and thus ','
|
646 |
-
inside these brackets are ignored.
|
647 |
-
"""
|
648 |
-
assert (string.count('(') == string.count(')')) and (
|
649 |
-
string.count('[') == string.count(']')), \
|
650 |
-
f'Imbalanced brackets exist in {string}'
|
651 |
-
end = len(string)
|
652 |
-
for idx, char in enumerate(string):
|
653 |
-
pre = string[:idx]
|
654 |
-
# The string before this ',' is balanced
|
655 |
-
if ((char == ',') and (pre.count('(') == pre.count(')'))
|
656 |
-
and (pre.count('[') == pre.count(']'))):
|
657 |
-
end = idx
|
658 |
-
break
|
659 |
-
return end
|
660 |
-
|
661 |
-
# Strip ' and " characters and replace whitespace.
|
662 |
-
val = val.strip('\'\"').replace(' ', '')
|
663 |
-
is_tuple = False
|
664 |
-
if val.startswith('(') and val.endswith(')'):
|
665 |
-
is_tuple = True
|
666 |
-
val = val[1:-1]
|
667 |
-
elif val.startswith('[') and val.endswith(']'):
|
668 |
-
val = val[1:-1]
|
669 |
-
elif ',' not in val:
|
670 |
-
# val is a single value
|
671 |
-
return DictAction._parse_int_float_bool(val)
|
672 |
-
|
673 |
-
values = []
|
674 |
-
while len(val) > 0:
|
675 |
-
comma_idx = find_next_comma(val)
|
676 |
-
element = DictAction._parse_iterable(val[:comma_idx])
|
677 |
-
values.append(element)
|
678 |
-
val = val[comma_idx + 1:]
|
679 |
-
if is_tuple:
|
680 |
-
values = tuple(values)
|
681 |
-
return values
|
682 |
-
|
683 |
-
def __call__(self, parser, namespace, values, option_string=None):
|
684 |
-
options = {}
|
685 |
-
for kv in values:
|
686 |
-
key, val = kv.split('=', maxsplit=1)
|
687 |
-
options[key] = self._parse_iterable(val)
|
688 |
-
setattr(namespace, self.dest, options)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Arnasltlt/KlauskKnygos/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: QandA
|
3 |
-
emoji: 🏃
|
4 |
-
colorFrom: indigo
|
5 |
-
colorTo: green
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.18.0
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
duplicated_from: Arnasltlt/KlauskD
|
11 |
-
---
|
12 |
-
|
13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/chardet/johabfreq.py
DELETED
@@ -1,2382 +0,0 @@
|
|
1 |
-
######################## BEGIN LICENSE BLOCK ########################
|
2 |
-
# The Original Code is Mozilla Communicator client code.
|
3 |
-
#
|
4 |
-
# The Initial Developer of the Original Code is
|
5 |
-
# Netscape Communications Corporation.
|
6 |
-
# Portions created by the Initial Developer are Copyright (C) 1998
|
7 |
-
# the Initial Developer. All Rights Reserved.
|
8 |
-
#
|
9 |
-
# Contributor(s):
|
10 |
-
# Mark Pilgrim - port to Python
|
11 |
-
#
|
12 |
-
# This library is free software; you can redistribute it and/or
|
13 |
-
# modify it under the terms of the GNU Lesser General Public
|
14 |
-
# License as published by the Free Software Foundation; either
|
15 |
-
# version 2.1 of the License, or (at your option) any later version.
|
16 |
-
#
|
17 |
-
# This library is distributed in the hope that it will be useful,
|
18 |
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
20 |
-
# Lesser General Public License for more details.
|
21 |
-
#
|
22 |
-
# You should have received a copy of the GNU Lesser General Public
|
23 |
-
# License along with this library; if not, write to the Free Software
|
24 |
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
25 |
-
# 02110-1301 USA
|
26 |
-
######################### END LICENSE BLOCK #########################
|
27 |
-
|
28 |
-
# The frequency data itself is the same as euc-kr.
|
29 |
-
# This is just a mapping table to euc-kr.
|
30 |
-
|
31 |
-
JOHAB_TO_EUCKR_ORDER_TABLE = {
|
32 |
-
0x8861: 0,
|
33 |
-
0x8862: 1,
|
34 |
-
0x8865: 2,
|
35 |
-
0x8868: 3,
|
36 |
-
0x8869: 4,
|
37 |
-
0x886A: 5,
|
38 |
-
0x886B: 6,
|
39 |
-
0x8871: 7,
|
40 |
-
0x8873: 8,
|
41 |
-
0x8874: 9,
|
42 |
-
0x8875: 10,
|
43 |
-
0x8876: 11,
|
44 |
-
0x8877: 12,
|
45 |
-
0x8878: 13,
|
46 |
-
0x8879: 14,
|
47 |
-
0x887B: 15,
|
48 |
-
0x887C: 16,
|
49 |
-
0x887D: 17,
|
50 |
-
0x8881: 18,
|
51 |
-
0x8882: 19,
|
52 |
-
0x8885: 20,
|
53 |
-
0x8889: 21,
|
54 |
-
0x8891: 22,
|
55 |
-
0x8893: 23,
|
56 |
-
0x8895: 24,
|
57 |
-
0x8896: 25,
|
58 |
-
0x8897: 26,
|
59 |
-
0x88A1: 27,
|
60 |
-
0x88A2: 28,
|
61 |
-
0x88A5: 29,
|
62 |
-
0x88A9: 30,
|
63 |
-
0x88B5: 31,
|
64 |
-
0x88B7: 32,
|
65 |
-
0x88C1: 33,
|
66 |
-
0x88C5: 34,
|
67 |
-
0x88C9: 35,
|
68 |
-
0x88E1: 36,
|
69 |
-
0x88E2: 37,
|
70 |
-
0x88E5: 38,
|
71 |
-
0x88E8: 39,
|
72 |
-
0x88E9: 40,
|
73 |
-
0x88EB: 41,
|
74 |
-
0x88F1: 42,
|
75 |
-
0x88F3: 43,
|
76 |
-
0x88F5: 44,
|
77 |
-
0x88F6: 45,
|
78 |
-
0x88F7: 46,
|
79 |
-
0x88F8: 47,
|
80 |
-
0x88FB: 48,
|
81 |
-
0x88FC: 49,
|
82 |
-
0x88FD: 50,
|
83 |
-
0x8941: 51,
|
84 |
-
0x8945: 52,
|
85 |
-
0x8949: 53,
|
86 |
-
0x8951: 54,
|
87 |
-
0x8953: 55,
|
88 |
-
0x8955: 56,
|
89 |
-
0x8956: 57,
|
90 |
-
0x8957: 58,
|
91 |
-
0x8961: 59,
|
92 |
-
0x8962: 60,
|
93 |
-
0x8963: 61,
|
94 |
-
0x8965: 62,
|
95 |
-
0x8968: 63,
|
96 |
-
0x8969: 64,
|
97 |
-
0x8971: 65,
|
98 |
-
0x8973: 66,
|
99 |
-
0x8975: 67,
|
100 |
-
0x8976: 68,
|
101 |
-
0x8977: 69,
|
102 |
-
0x897B: 70,
|
103 |
-
0x8981: 71,
|
104 |
-
0x8985: 72,
|
105 |
-
0x8989: 73,
|
106 |
-
0x8993: 74,
|
107 |
-
0x8995: 75,
|
108 |
-
0x89A1: 76,
|
109 |
-
0x89A2: 77,
|
110 |
-
0x89A5: 78,
|
111 |
-
0x89A8: 79,
|
112 |
-
0x89A9: 80,
|
113 |
-
0x89AB: 81,
|
114 |
-
0x89AD: 82,
|
115 |
-
0x89B0: 83,
|
116 |
-
0x89B1: 84,
|
117 |
-
0x89B3: 85,
|
118 |
-
0x89B5: 86,
|
119 |
-
0x89B7: 87,
|
120 |
-
0x89B8: 88,
|
121 |
-
0x89C1: 89,
|
122 |
-
0x89C2: 90,
|
123 |
-
0x89C5: 91,
|
124 |
-
0x89C9: 92,
|
125 |
-
0x89CB: 93,
|
126 |
-
0x89D1: 94,
|
127 |
-
0x89D3: 95,
|
128 |
-
0x89D5: 96,
|
129 |
-
0x89D7: 97,
|
130 |
-
0x89E1: 98,
|
131 |
-
0x89E5: 99,
|
132 |
-
0x89E9: 100,
|
133 |
-
0x89F3: 101,
|
134 |
-
0x89F6: 102,
|
135 |
-
0x89F7: 103,
|
136 |
-
0x8A41: 104,
|
137 |
-
0x8A42: 105,
|
138 |
-
0x8A45: 106,
|
139 |
-
0x8A49: 107,
|
140 |
-
0x8A51: 108,
|
141 |
-
0x8A53: 109,
|
142 |
-
0x8A55: 110,
|
143 |
-
0x8A57: 111,
|
144 |
-
0x8A61: 112,
|
145 |
-
0x8A65: 113,
|
146 |
-
0x8A69: 114,
|
147 |
-
0x8A73: 115,
|
148 |
-
0x8A75: 116,
|
149 |
-
0x8A81: 117,
|
150 |
-
0x8A82: 118,
|
151 |
-
0x8A85: 119,
|
152 |
-
0x8A88: 120,
|
153 |
-
0x8A89: 121,
|
154 |
-
0x8A8A: 122,
|
155 |
-
0x8A8B: 123,
|
156 |
-
0x8A90: 124,
|
157 |
-
0x8A91: 125,
|
158 |
-
0x8A93: 126,
|
159 |
-
0x8A95: 127,
|
160 |
-
0x8A97: 128,
|
161 |
-
0x8A98: 129,
|
162 |
-
0x8AA1: 130,
|
163 |
-
0x8AA2: 131,
|
164 |
-
0x8AA5: 132,
|
165 |
-
0x8AA9: 133,
|
166 |
-
0x8AB6: 134,
|
167 |
-
0x8AB7: 135,
|
168 |
-
0x8AC1: 136,
|
169 |
-
0x8AD5: 137,
|
170 |
-
0x8AE1: 138,
|
171 |
-
0x8AE2: 139,
|
172 |
-
0x8AE5: 140,
|
173 |
-
0x8AE9: 141,
|
174 |
-
0x8AF1: 142,
|
175 |
-
0x8AF3: 143,
|
176 |
-
0x8AF5: 144,
|
177 |
-
0x8B41: 145,
|
178 |
-
0x8B45: 146,
|
179 |
-
0x8B49: 147,
|
180 |
-
0x8B61: 148,
|
181 |
-
0x8B62: 149,
|
182 |
-
0x8B65: 150,
|
183 |
-
0x8B68: 151,
|
184 |
-
0x8B69: 152,
|
185 |
-
0x8B6A: 153,
|
186 |
-
0x8B71: 154,
|
187 |
-
0x8B73: 155,
|
188 |
-
0x8B75: 156,
|
189 |
-
0x8B77: 157,
|
190 |
-
0x8B81: 158,
|
191 |
-
0x8BA1: 159,
|
192 |
-
0x8BA2: 160,
|
193 |
-
0x8BA5: 161,
|
194 |
-
0x8BA8: 162,
|
195 |
-
0x8BA9: 163,
|
196 |
-
0x8BAB: 164,
|
197 |
-
0x8BB1: 165,
|
198 |
-
0x8BB3: 166,
|
199 |
-
0x8BB5: 167,
|
200 |
-
0x8BB7: 168,
|
201 |
-
0x8BB8: 169,
|
202 |
-
0x8BBC: 170,
|
203 |
-
0x8C61: 171,
|
204 |
-
0x8C62: 172,
|
205 |
-
0x8C63: 173,
|
206 |
-
0x8C65: 174,
|
207 |
-
0x8C69: 175,
|
208 |
-
0x8C6B: 176,
|
209 |
-
0x8C71: 177,
|
210 |
-
0x8C73: 178,
|
211 |
-
0x8C75: 179,
|
212 |
-
0x8C76: 180,
|
213 |
-
0x8C77: 181,
|
214 |
-
0x8C7B: 182,
|
215 |
-
0x8C81: 183,
|
216 |
-
0x8C82: 184,
|
217 |
-
0x8C85: 185,
|
218 |
-
0x8C89: 186,
|
219 |
-
0x8C91: 187,
|
220 |
-
0x8C93: 188,
|
221 |
-
0x8C95: 189,
|
222 |
-
0x8C96: 190,
|
223 |
-
0x8C97: 191,
|
224 |
-
0x8CA1: 192,
|
225 |
-
0x8CA2: 193,
|
226 |
-
0x8CA9: 194,
|
227 |
-
0x8CE1: 195,
|
228 |
-
0x8CE2: 196,
|
229 |
-
0x8CE3: 197,
|
230 |
-
0x8CE5: 198,
|
231 |
-
0x8CE9: 199,
|
232 |
-
0x8CF1: 200,
|
233 |
-
0x8CF3: 201,
|
234 |
-
0x8CF5: 202,
|
235 |
-
0x8CF6: 203,
|
236 |
-
0x8CF7: 204,
|
237 |
-
0x8D41: 205,
|
238 |
-
0x8D42: 206,
|
239 |
-
0x8D45: 207,
|
240 |
-
0x8D51: 208,
|
241 |
-
0x8D55: 209,
|
242 |
-
0x8D57: 210,
|
243 |
-
0x8D61: 211,
|
244 |
-
0x8D65: 212,
|
245 |
-
0x8D69: 213,
|
246 |
-
0x8D75: 214,
|
247 |
-
0x8D76: 215,
|
248 |
-
0x8D7B: 216,
|
249 |
-
0x8D81: 217,
|
250 |
-
0x8DA1: 218,
|
251 |
-
0x8DA2: 219,
|
252 |
-
0x8DA5: 220,
|
253 |
-
0x8DA7: 221,
|
254 |
-
0x8DA9: 222,
|
255 |
-
0x8DB1: 223,
|
256 |
-
0x8DB3: 224,
|
257 |
-
0x8DB5: 225,
|
258 |
-
0x8DB7: 226,
|
259 |
-
0x8DB8: 227,
|
260 |
-
0x8DB9: 228,
|
261 |
-
0x8DC1: 229,
|
262 |
-
0x8DC2: 230,
|
263 |
-
0x8DC9: 231,
|
264 |
-
0x8DD6: 232,
|
265 |
-
0x8DD7: 233,
|
266 |
-
0x8DE1: 234,
|
267 |
-
0x8DE2: 235,
|
268 |
-
0x8DF7: 236,
|
269 |
-
0x8E41: 237,
|
270 |
-
0x8E45: 238,
|
271 |
-
0x8E49: 239,
|
272 |
-
0x8E51: 240,
|
273 |
-
0x8E53: 241,
|
274 |
-
0x8E57: 242,
|
275 |
-
0x8E61: 243,
|
276 |
-
0x8E81: 244,
|
277 |
-
0x8E82: 245,
|
278 |
-
0x8E85: 246,
|
279 |
-
0x8E89: 247,
|
280 |
-
0x8E90: 248,
|
281 |
-
0x8E91: 249,
|
282 |
-
0x8E93: 250,
|
283 |
-
0x8E95: 251,
|
284 |
-
0x8E97: 252,
|
285 |
-
0x8E98: 253,
|
286 |
-
0x8EA1: 254,
|
287 |
-
0x8EA9: 255,
|
288 |
-
0x8EB6: 256,
|
289 |
-
0x8EB7: 257,
|
290 |
-
0x8EC1: 258,
|
291 |
-
0x8EC2: 259,
|
292 |
-
0x8EC5: 260,
|
293 |
-
0x8EC9: 261,
|
294 |
-
0x8ED1: 262,
|
295 |
-
0x8ED3: 263,
|
296 |
-
0x8ED6: 264,
|
297 |
-
0x8EE1: 265,
|
298 |
-
0x8EE5: 266,
|
299 |
-
0x8EE9: 267,
|
300 |
-
0x8EF1: 268,
|
301 |
-
0x8EF3: 269,
|
302 |
-
0x8F41: 270,
|
303 |
-
0x8F61: 271,
|
304 |
-
0x8F62: 272,
|
305 |
-
0x8F65: 273,
|
306 |
-
0x8F67: 274,
|
307 |
-
0x8F69: 275,
|
308 |
-
0x8F6B: 276,
|
309 |
-
0x8F70: 277,
|
310 |
-
0x8F71: 278,
|
311 |
-
0x8F73: 279,
|
312 |
-
0x8F75: 280,
|
313 |
-
0x8F77: 281,
|
314 |
-
0x8F7B: 282,
|
315 |
-
0x8FA1: 283,
|
316 |
-
0x8FA2: 284,
|
317 |
-
0x8FA5: 285,
|
318 |
-
0x8FA9: 286,
|
319 |
-
0x8FB1: 287,
|
320 |
-
0x8FB3: 288,
|
321 |
-
0x8FB5: 289,
|
322 |
-
0x8FB7: 290,
|
323 |
-
0x9061: 291,
|
324 |
-
0x9062: 292,
|
325 |
-
0x9063: 293,
|
326 |
-
0x9065: 294,
|
327 |
-
0x9068: 295,
|
328 |
-
0x9069: 296,
|
329 |
-
0x906A: 297,
|
330 |
-
0x906B: 298,
|
331 |
-
0x9071: 299,
|
332 |
-
0x9073: 300,
|
333 |
-
0x9075: 301,
|
334 |
-
0x9076: 302,
|
335 |
-
0x9077: 303,
|
336 |
-
0x9078: 304,
|
337 |
-
0x9079: 305,
|
338 |
-
0x907B: 306,
|
339 |
-
0x907D: 307,
|
340 |
-
0x9081: 308,
|
341 |
-
0x9082: 309,
|
342 |
-
0x9085: 310,
|
343 |
-
0x9089: 311,
|
344 |
-
0x9091: 312,
|
345 |
-
0x9093: 313,
|
346 |
-
0x9095: 314,
|
347 |
-
0x9096: 315,
|
348 |
-
0x9097: 316,
|
349 |
-
0x90A1: 317,
|
350 |
-
0x90A2: 318,
|
351 |
-
0x90A5: 319,
|
352 |
-
0x90A9: 320,
|
353 |
-
0x90B1: 321,
|
354 |
-
0x90B7: 322,
|
355 |
-
0x90E1: 323,
|
356 |
-
0x90E2: 324,
|
357 |
-
0x90E4: 325,
|
358 |
-
0x90E5: 326,
|
359 |
-
0x90E9: 327,
|
360 |
-
0x90EB: 328,
|
361 |
-
0x90EC: 329,
|
362 |
-
0x90F1: 330,
|
363 |
-
0x90F3: 331,
|
364 |
-
0x90F5: 332,
|
365 |
-
0x90F6: 333,
|
366 |
-
0x90F7: 334,
|
367 |
-
0x90FD: 335,
|
368 |
-
0x9141: 336,
|
369 |
-
0x9142: 337,
|
370 |
-
0x9145: 338,
|
371 |
-
0x9149: 339,
|
372 |
-
0x9151: 340,
|
373 |
-
0x9153: 341,
|
374 |
-
0x9155: 342,
|
375 |
-
0x9156: 343,
|
376 |
-
0x9157: 344,
|
377 |
-
0x9161: 345,
|
378 |
-
0x9162: 346,
|
379 |
-
0x9165: 347,
|
380 |
-
0x9169: 348,
|
381 |
-
0x9171: 349,
|
382 |
-
0x9173: 350,
|
383 |
-
0x9176: 351,
|
384 |
-
0x9177: 352,
|
385 |
-
0x917A: 353,
|
386 |
-
0x9181: 354,
|
387 |
-
0x9185: 355,
|
388 |
-
0x91A1: 356,
|
389 |
-
0x91A2: 357,
|
390 |
-
0x91A5: 358,
|
391 |
-
0x91A9: 359,
|
392 |
-
0x91AB: 360,
|
393 |
-
0x91B1: 361,
|
394 |
-
0x91B3: 362,
|
395 |
-
0x91B5: 363,
|
396 |
-
0x91B7: 364,
|
397 |
-
0x91BC: 365,
|
398 |
-
0x91BD: 366,
|
399 |
-
0x91C1: 367,
|
400 |
-
0x91C5: 368,
|
401 |
-
0x91C9: 369,
|
402 |
-
0x91D6: 370,
|
403 |
-
0x9241: 371,
|
404 |
-
0x9245: 372,
|
405 |
-
0x9249: 373,
|
406 |
-
0x9251: 374,
|
407 |
-
0x9253: 375,
|
408 |
-
0x9255: 376,
|
409 |
-
0x9261: 377,
|
410 |
-
0x9262: 378,
|
411 |
-
0x9265: 379,
|
412 |
-
0x9269: 380,
|
413 |
-
0x9273: 381,
|
414 |
-
0x9275: 382,
|
415 |
-
0x9277: 383,
|
416 |
-
0x9281: 384,
|
417 |
-
0x9282: 385,
|
418 |
-
0x9285: 386,
|
419 |
-
0x9288: 387,
|
420 |
-
0x9289: 388,
|
421 |
-
0x9291: 389,
|
422 |
-
0x9293: 390,
|
423 |
-
0x9295: 391,
|
424 |
-
0x9297: 392,
|
425 |
-
0x92A1: 393,
|
426 |
-
0x92B6: 394,
|
427 |
-
0x92C1: 395,
|
428 |
-
0x92E1: 396,
|
429 |
-
0x92E5: 397,
|
430 |
-
0x92E9: 398,
|
431 |
-
0x92F1: 399,
|
432 |
-
0x92F3: 400,
|
433 |
-
0x9341: 401,
|
434 |
-
0x9342: 402,
|
435 |
-
0x9349: 403,
|
436 |
-
0x9351: 404,
|
437 |
-
0x9353: 405,
|
438 |
-
0x9357: 406,
|
439 |
-
0x9361: 407,
|
440 |
-
0x9362: 408,
|
441 |
-
0x9365: 409,
|
442 |
-
0x9369: 410,
|
443 |
-
0x936A: 411,
|
444 |
-
0x936B: 412,
|
445 |
-
0x9371: 413,
|
446 |
-
0x9373: 414,
|
447 |
-
0x9375: 415,
|
448 |
-
0x9377: 416,
|
449 |
-
0x9378: 417,
|
450 |
-
0x937C: 418,
|
451 |
-
0x9381: 419,
|
452 |
-
0x9385: 420,
|
453 |
-
0x9389: 421,
|
454 |
-
0x93A1: 422,
|
455 |
-
0x93A2: 423,
|
456 |
-
0x93A5: 424,
|
457 |
-
0x93A9: 425,
|
458 |
-
0x93AB: 426,
|
459 |
-
0x93B1: 427,
|
460 |
-
0x93B3: 428,
|
461 |
-
0x93B5: 429,
|
462 |
-
0x93B7: 430,
|
463 |
-
0x93BC: 431,
|
464 |
-
0x9461: 432,
|
465 |
-
0x9462: 433,
|
466 |
-
0x9463: 434,
|
467 |
-
0x9465: 435,
|
468 |
-
0x9468: 436,
|
469 |
-
0x9469: 437,
|
470 |
-
0x946A: 438,
|
471 |
-
0x946B: 439,
|
472 |
-
0x946C: 440,
|
473 |
-
0x9470: 441,
|
474 |
-
0x9471: 442,
|
475 |
-
0x9473: 443,
|
476 |
-
0x9475: 444,
|
477 |
-
0x9476: 445,
|
478 |
-
0x9477: 446,
|
479 |
-
0x9478: 447,
|
480 |
-
0x9479: 448,
|
481 |
-
0x947D: 449,
|
482 |
-
0x9481: 450,
|
483 |
-
0x9482: 451,
|
484 |
-
0x9485: 452,
|
485 |
-
0x9489: 453,
|
486 |
-
0x9491: 454,
|
487 |
-
0x9493: 455,
|
488 |
-
0x9495: 456,
|
489 |
-
0x9496: 457,
|
490 |
-
0x9497: 458,
|
491 |
-
0x94A1: 459,
|
492 |
-
0x94E1: 460,
|
493 |
-
0x94E2: 461,
|
494 |
-
0x94E3: 462,
|
495 |
-
0x94E5: 463,
|
496 |
-
0x94E8: 464,
|
497 |
-
0x94E9: 465,
|
498 |
-
0x94EB: 466,
|
499 |
-
0x94EC: 467,
|
500 |
-
0x94F1: 468,
|
501 |
-
0x94F3: 469,
|
502 |
-
0x94F5: 470,
|
503 |
-
0x94F7: 471,
|
504 |
-
0x94F9: 472,
|
505 |
-
0x94FC: 473,
|
506 |
-
0x9541: 474,
|
507 |
-
0x9542: 475,
|
508 |
-
0x9545: 476,
|
509 |
-
0x9549: 477,
|
510 |
-
0x9551: 478,
|
511 |
-
0x9553: 479,
|
512 |
-
0x9555: 480,
|
513 |
-
0x9556: 481,
|
514 |
-
0x9557: 482,
|
515 |
-
0x9561: 483,
|
516 |
-
0x9565: 484,
|
517 |
-
0x9569: 485,
|
518 |
-
0x9576: 486,
|
519 |
-
0x9577: 487,
|
520 |
-
0x9581: 488,
|
521 |
-
0x9585: 489,
|
522 |
-
0x95A1: 490,
|
523 |
-
0x95A2: 491,
|
524 |
-
0x95A5: 492,
|
525 |
-
0x95A8: 493,
|
526 |
-
0x95A9: 494,
|
527 |
-
0x95AB: 495,
|
528 |
-
0x95AD: 496,
|
529 |
-
0x95B1: 497,
|
530 |
-
0x95B3: 498,
|
531 |
-
0x95B5: 499,
|
532 |
-
0x95B7: 500,
|
533 |
-
0x95B9: 501,
|
534 |
-
0x95BB: 502,
|
535 |
-
0x95C1: 503,
|
536 |
-
0x95C5: 504,
|
537 |
-
0x95C9: 505,
|
538 |
-
0x95E1: 506,
|
539 |
-
0x95F6: 507,
|
540 |
-
0x9641: 508,
|
541 |
-
0x9645: 509,
|
542 |
-
0x9649: 510,
|
543 |
-
0x9651: 511,
|
544 |
-
0x9653: 512,
|
545 |
-
0x9655: 513,
|
546 |
-
0x9661: 514,
|
547 |
-
0x9681: 515,
|
548 |
-
0x9682: 516,
|
549 |
-
0x9685: 517,
|
550 |
-
0x9689: 518,
|
551 |
-
0x9691: 519,
|
552 |
-
0x9693: 520,
|
553 |
-
0x9695: 521,
|
554 |
-
0x9697: 522,
|
555 |
-
0x96A1: 523,
|
556 |
-
0x96B6: 524,
|
557 |
-
0x96C1: 525,
|
558 |
-
0x96D7: 526,
|
559 |
-
0x96E1: 527,
|
560 |
-
0x96E5: 528,
|
561 |
-
0x96E9: 529,
|
562 |
-
0x96F3: 530,
|
563 |
-
0x96F5: 531,
|
564 |
-
0x96F7: 532,
|
565 |
-
0x9741: 533,
|
566 |
-
0x9745: 534,
|
567 |
-
0x9749: 535,
|
568 |
-
0x9751: 536,
|
569 |
-
0x9757: 537,
|
570 |
-
0x9761: 538,
|
571 |
-
0x9762: 539,
|
572 |
-
0x9765: 540,
|
573 |
-
0x9768: 541,
|
574 |
-
0x9769: 542,
|
575 |
-
0x976B: 543,
|
576 |
-
0x9771: 544,
|
577 |
-
0x9773: 545,
|
578 |
-
0x9775: 546,
|
579 |
-
0x9777: 547,
|
580 |
-
0x9781: 548,
|
581 |
-
0x97A1: 549,
|
582 |
-
0x97A2: 550,
|
583 |
-
0x97A5: 551,
|
584 |
-
0x97A8: 552,
|
585 |
-
0x97A9: 553,
|
586 |
-
0x97B1: 554,
|
587 |
-
0x97B3: 555,
|
588 |
-
0x97B5: 556,
|
589 |
-
0x97B6: 557,
|
590 |
-
0x97B7: 558,
|
591 |
-
0x97B8: 559,
|
592 |
-
0x9861: 560,
|
593 |
-
0x9862: 561,
|
594 |
-
0x9865: 562,
|
595 |
-
0x9869: 563,
|
596 |
-
0x9871: 564,
|
597 |
-
0x9873: 565,
|
598 |
-
0x9875: 566,
|
599 |
-
0x9876: 567,
|
600 |
-
0x9877: 568,
|
601 |
-
0x987D: 569,
|
602 |
-
0x9881: 570,
|
603 |
-
0x9882: 571,
|
604 |
-
0x9885: 572,
|
605 |
-
0x9889: 573,
|
606 |
-
0x9891: 574,
|
607 |
-
0x9893: 575,
|
608 |
-
0x9895: 576,
|
609 |
-
0x9896: 577,
|
610 |
-
0x9897: 578,
|
611 |
-
0x98E1: 579,
|
612 |
-
0x98E2: 580,
|
613 |
-
0x98E5: 581,
|
614 |
-
0x98E9: 582,
|
615 |
-
0x98EB: 583,
|
616 |
-
0x98EC: 584,
|
617 |
-
0x98F1: 585,
|
618 |
-
0x98F3: 586,
|
619 |
-
0x98F5: 587,
|
620 |
-
0x98F6: 588,
|
621 |
-
0x98F7: 589,
|
622 |
-
0x98FD: 590,
|
623 |
-
0x9941: 591,
|
624 |
-
0x9942: 592,
|
625 |
-
0x9945: 593,
|
626 |
-
0x9949: 594,
|
627 |
-
0x9951: 595,
|
628 |
-
0x9953: 596,
|
629 |
-
0x9955: 597,
|
630 |
-
0x9956: 598,
|
631 |
-
0x9957: 599,
|
632 |
-
0x9961: 600,
|
633 |
-
0x9976: 601,
|
634 |
-
0x99A1: 602,
|
635 |
-
0x99A2: 603,
|
636 |
-
0x99A5: 604,
|
637 |
-
0x99A9: 605,
|
638 |
-
0x99B7: 606,
|
639 |
-
0x99C1: 607,
|
640 |
-
0x99C9: 608,
|
641 |
-
0x99E1: 609,
|
642 |
-
0x9A41: 610,
|
643 |
-
0x9A45: 611,
|
644 |
-
0x9A81: 612,
|
645 |
-
0x9A82: 613,
|
646 |
-
0x9A85: 614,
|
647 |
-
0x9A89: 615,
|
648 |
-
0x9A90: 616,
|
649 |
-
0x9A91: 617,
|
650 |
-
0x9A97: 618,
|
651 |
-
0x9AC1: 619,
|
652 |
-
0x9AE1: 620,
|
653 |
-
0x9AE5: 621,
|
654 |
-
0x9AE9: 622,
|
655 |
-
0x9AF1: 623,
|
656 |
-
0x9AF3: 624,
|
657 |
-
0x9AF7: 625,
|
658 |
-
0x9B61: 626,
|
659 |
-
0x9B62: 627,
|
660 |
-
0x9B65: 628,
|
661 |
-
0x9B68: 629,
|
662 |
-
0x9B69: 630,
|
663 |
-
0x9B71: 631,
|
664 |
-
0x9B73: 632,
|
665 |
-
0x9B75: 633,
|
666 |
-
0x9B81: 634,
|
667 |
-
0x9B85: 635,
|
668 |
-
0x9B89: 636,
|
669 |
-
0x9B91: 637,
|
670 |
-
0x9B93: 638,
|
671 |
-
0x9BA1: 639,
|
672 |
-
0x9BA5: 640,
|
673 |
-
0x9BA9: 641,
|
674 |
-
0x9BB1: 642,
|
675 |
-
0x9BB3: 643,
|
676 |
-
0x9BB5: 644,
|
677 |
-
0x9BB7: 645,
|
678 |
-
0x9C61: 646,
|
679 |
-
0x9C62: 647,
|
680 |
-
0x9C65: 648,
|
681 |
-
0x9C69: 649,
|
682 |
-
0x9C71: 650,
|
683 |
-
0x9C73: 651,
|
684 |
-
0x9C75: 652,
|
685 |
-
0x9C76: 653,
|
686 |
-
0x9C77: 654,
|
687 |
-
0x9C78: 655,
|
688 |
-
0x9C7C: 656,
|
689 |
-
0x9C7D: 657,
|
690 |
-
0x9C81: 658,
|
691 |
-
0x9C82: 659,
|
692 |
-
0x9C85: 660,
|
693 |
-
0x9C89: 661,
|
694 |
-
0x9C91: 662,
|
695 |
-
0x9C93: 663,
|
696 |
-
0x9C95: 664,
|
697 |
-
0x9C96: 665,
|
698 |
-
0x9C97: 666,
|
699 |
-
0x9CA1: 667,
|
700 |
-
0x9CA2: 668,
|
701 |
-
0x9CA5: 669,
|
702 |
-
0x9CB5: 670,
|
703 |
-
0x9CB7: 671,
|
704 |
-
0x9CE1: 672,
|
705 |
-
0x9CE2: 673,
|
706 |
-
0x9CE5: 674,
|
707 |
-
0x9CE9: 675,
|
708 |
-
0x9CF1: 676,
|
709 |
-
0x9CF3: 677,
|
710 |
-
0x9CF5: 678,
|
711 |
-
0x9CF6: 679,
|
712 |
-
0x9CF7: 680,
|
713 |
-
0x9CFD: 681,
|
714 |
-
0x9D41: 682,
|
715 |
-
0x9D42: 683,
|
716 |
-
0x9D45: 684,
|
717 |
-
0x9D49: 685,
|
718 |
-
0x9D51: 686,
|
719 |
-
0x9D53: 687,
|
720 |
-
0x9D55: 688,
|
721 |
-
0x9D57: 689,
|
722 |
-
0x9D61: 690,
|
723 |
-
0x9D62: 691,
|
724 |
-
0x9D65: 692,
|
725 |
-
0x9D69: 693,
|
726 |
-
0x9D71: 694,
|
727 |
-
0x9D73: 695,
|
728 |
-
0x9D75: 696,
|
729 |
-
0x9D76: 697,
|
730 |
-
0x9D77: 698,
|
731 |
-
0x9D81: 699,
|
732 |
-
0x9D85: 700,
|
733 |
-
0x9D93: 701,
|
734 |
-
0x9D95: 702,
|
735 |
-
0x9DA1: 703,
|
736 |
-
0x9DA2: 704,
|
737 |
-
0x9DA5: 705,
|
738 |
-
0x9DA9: 706,
|
739 |
-
0x9DB1: 707,
|
740 |
-
0x9DB3: 708,
|
741 |
-
0x9DB5: 709,
|
742 |
-
0x9DB7: 710,
|
743 |
-
0x9DC1: 711,
|
744 |
-
0x9DC5: 712,
|
745 |
-
0x9DD7: 713,
|
746 |
-
0x9DF6: 714,
|
747 |
-
0x9E41: 715,
|
748 |
-
0x9E45: 716,
|
749 |
-
0x9E49: 717,
|
750 |
-
0x9E51: 718,
|
751 |
-
0x9E53: 719,
|
752 |
-
0x9E55: 720,
|
753 |
-
0x9E57: 721,
|
754 |
-
0x9E61: 722,
|
755 |
-
0x9E65: 723,
|
756 |
-
0x9E69: 724,
|
757 |
-
0x9E73: 725,
|
758 |
-
0x9E75: 726,
|
759 |
-
0x9E77: 727,
|
760 |
-
0x9E81: 728,
|
761 |
-
0x9E82: 729,
|
762 |
-
0x9E85: 730,
|
763 |
-
0x9E89: 731,
|
764 |
-
0x9E91: 732,
|
765 |
-
0x9E93: 733,
|
766 |
-
0x9E95: 734,
|
767 |
-
0x9E97: 735,
|
768 |
-
0x9EA1: 736,
|
769 |
-
0x9EB6: 737,
|
770 |
-
0x9EC1: 738,
|
771 |
-
0x9EE1: 739,
|
772 |
-
0x9EE2: 740,
|
773 |
-
0x9EE5: 741,
|
774 |
-
0x9EE9: 742,
|
775 |
-
0x9EF1: 743,
|
776 |
-
0x9EF5: 744,
|
777 |
-
0x9EF7: 745,
|
778 |
-
0x9F41: 746,
|
779 |
-
0x9F42: 747,
|
780 |
-
0x9F45: 748,
|
781 |
-
0x9F49: 749,
|
782 |
-
0x9F51: 750,
|
783 |
-
0x9F53: 751,
|
784 |
-
0x9F55: 752,
|
785 |
-
0x9F57: 753,
|
786 |
-
0x9F61: 754,
|
787 |
-
0x9F62: 755,
|
788 |
-
0x9F65: 756,
|
789 |
-
0x9F69: 757,
|
790 |
-
0x9F71: 758,
|
791 |
-
0x9F73: 759,
|
792 |
-
0x9F75: 760,
|
793 |
-
0x9F77: 761,
|
794 |
-
0x9F78: 762,
|
795 |
-
0x9F7B: 763,
|
796 |
-
0x9F7C: 764,
|
797 |
-
0x9FA1: 765,
|
798 |
-
0x9FA2: 766,
|
799 |
-
0x9FA5: 767,
|
800 |
-
0x9FA9: 768,
|
801 |
-
0x9FB1: 769,
|
802 |
-
0x9FB3: 770,
|
803 |
-
0x9FB5: 771,
|
804 |
-
0x9FB7: 772,
|
805 |
-
0xA061: 773,
|
806 |
-
0xA062: 774,
|
807 |
-
0xA065: 775,
|
808 |
-
0xA067: 776,
|
809 |
-
0xA068: 777,
|
810 |
-
0xA069: 778,
|
811 |
-
0xA06A: 779,
|
812 |
-
0xA06B: 780,
|
813 |
-
0xA071: 781,
|
814 |
-
0xA073: 782,
|
815 |
-
0xA075: 783,
|
816 |
-
0xA077: 784,
|
817 |
-
0xA078: 785,
|
818 |
-
0xA07B: 786,
|
819 |
-
0xA07D: 787,
|
820 |
-
0xA081: 788,
|
821 |
-
0xA082: 789,
|
822 |
-
0xA085: 790,
|
823 |
-
0xA089: 791,
|
824 |
-
0xA091: 792,
|
825 |
-
0xA093: 793,
|
826 |
-
0xA095: 794,
|
827 |
-
0xA096: 795,
|
828 |
-
0xA097: 796,
|
829 |
-
0xA098: 797,
|
830 |
-
0xA0A1: 798,
|
831 |
-
0xA0A2: 799,
|
832 |
-
0xA0A9: 800,
|
833 |
-
0xA0B7: 801,
|
834 |
-
0xA0E1: 802,
|
835 |
-
0xA0E2: 803,
|
836 |
-
0xA0E5: 804,
|
837 |
-
0xA0E9: 805,
|
838 |
-
0xA0EB: 806,
|
839 |
-
0xA0F1: 807,
|
840 |
-
0xA0F3: 808,
|
841 |
-
0xA0F5: 809,
|
842 |
-
0xA0F7: 810,
|
843 |
-
0xA0F8: 811,
|
844 |
-
0xA0FD: 812,
|
845 |
-
0xA141: 813,
|
846 |
-
0xA142: 814,
|
847 |
-
0xA145: 815,
|
848 |
-
0xA149: 816,
|
849 |
-
0xA151: 817,
|
850 |
-
0xA153: 818,
|
851 |
-
0xA155: 819,
|
852 |
-
0xA156: 820,
|
853 |
-
0xA157: 821,
|
854 |
-
0xA161: 822,
|
855 |
-
0xA162: 823,
|
856 |
-
0xA165: 824,
|
857 |
-
0xA169: 825,
|
858 |
-
0xA175: 826,
|
859 |
-
0xA176: 827,
|
860 |
-
0xA177: 828,
|
861 |
-
0xA179: 829,
|
862 |
-
0xA181: 830,
|
863 |
-
0xA1A1: 831,
|
864 |
-
0xA1A2: 832,
|
865 |
-
0xA1A4: 833,
|
866 |
-
0xA1A5: 834,
|
867 |
-
0xA1A9: 835,
|
868 |
-
0xA1AB: 836,
|
869 |
-
0xA1B1: 837,
|
870 |
-
0xA1B3: 838,
|
871 |
-
0xA1B5: 839,
|
872 |
-
0xA1B7: 840,
|
873 |
-
0xA1C1: 841,
|
874 |
-
0xA1C5: 842,
|
875 |
-
0xA1D6: 843,
|
876 |
-
0xA1D7: 844,
|
877 |
-
0xA241: 845,
|
878 |
-
0xA245: 846,
|
879 |
-
0xA249: 847,
|
880 |
-
0xA253: 848,
|
881 |
-
0xA255: 849,
|
882 |
-
0xA257: 850,
|
883 |
-
0xA261: 851,
|
884 |
-
0xA265: 852,
|
885 |
-
0xA269: 853,
|
886 |
-
0xA273: 854,
|
887 |
-
0xA275: 855,
|
888 |
-
0xA281: 856,
|
889 |
-
0xA282: 857,
|
890 |
-
0xA283: 858,
|
891 |
-
0xA285: 859,
|
892 |
-
0xA288: 860,
|
893 |
-
0xA289: 861,
|
894 |
-
0xA28A: 862,
|
895 |
-
0xA28B: 863,
|
896 |
-
0xA291: 864,
|
897 |
-
0xA293: 865,
|
898 |
-
0xA295: 866,
|
899 |
-
0xA297: 867,
|
900 |
-
0xA29B: 868,
|
901 |
-
0xA29D: 869,
|
902 |
-
0xA2A1: 870,
|
903 |
-
0xA2A5: 871,
|
904 |
-
0xA2A9: 872,
|
905 |
-
0xA2B3: 873,
|
906 |
-
0xA2B5: 874,
|
907 |
-
0xA2C1: 875,
|
908 |
-
0xA2E1: 876,
|
909 |
-
0xA2E5: 877,
|
910 |
-
0xA2E9: 878,
|
911 |
-
0xA341: 879,
|
912 |
-
0xA345: 880,
|
913 |
-
0xA349: 881,
|
914 |
-
0xA351: 882,
|
915 |
-
0xA355: 883,
|
916 |
-
0xA361: 884,
|
917 |
-
0xA365: 885,
|
918 |
-
0xA369: 886,
|
919 |
-
0xA371: 887,
|
920 |
-
0xA375: 888,
|
921 |
-
0xA3A1: 889,
|
922 |
-
0xA3A2: 890,
|
923 |
-
0xA3A5: 891,
|
924 |
-
0xA3A8: 892,
|
925 |
-
0xA3A9: 893,
|
926 |
-
0xA3AB: 894,
|
927 |
-
0xA3B1: 895,
|
928 |
-
0xA3B3: 896,
|
929 |
-
0xA3B5: 897,
|
930 |
-
0xA3B6: 898,
|
931 |
-
0xA3B7: 899,
|
932 |
-
0xA3B9: 900,
|
933 |
-
0xA3BB: 901,
|
934 |
-
0xA461: 902,
|
935 |
-
0xA462: 903,
|
936 |
-
0xA463: 904,
|
937 |
-
0xA464: 905,
|
938 |
-
0xA465: 906,
|
939 |
-
0xA468: 907,
|
940 |
-
0xA469: 908,
|
941 |
-
0xA46A: 909,
|
942 |
-
0xA46B: 910,
|
943 |
-
0xA46C: 911,
|
944 |
-
0xA471: 912,
|
945 |
-
0xA473: 913,
|
946 |
-
0xA475: 914,
|
947 |
-
0xA477: 915,
|
948 |
-
0xA47B: 916,
|
949 |
-
0xA481: 917,
|
950 |
-
0xA482: 918,
|
951 |
-
0xA485: 919,
|
952 |
-
0xA489: 920,
|
953 |
-
0xA491: 921,
|
954 |
-
0xA493: 922,
|
955 |
-
0xA495: 923,
|
956 |
-
0xA496: 924,
|
957 |
-
0xA497: 925,
|
958 |
-
0xA49B: 926,
|
959 |
-
0xA4A1: 927,
|
960 |
-
0xA4A2: 928,
|
961 |
-
0xA4A5: 929,
|
962 |
-
0xA4B3: 930,
|
963 |
-
0xA4E1: 931,
|
964 |
-
0xA4E2: 932,
|
965 |
-
0xA4E5: 933,
|
966 |
-
0xA4E8: 934,
|
967 |
-
0xA4E9: 935,
|
968 |
-
0xA4EB: 936,
|
969 |
-
0xA4F1: 937,
|
970 |
-
0xA4F3: 938,
|
971 |
-
0xA4F5: 939,
|
972 |
-
0xA4F7: 940,
|
973 |
-
0xA4F8: 941,
|
974 |
-
0xA541: 942,
|
975 |
-
0xA542: 943,
|
976 |
-
0xA545: 944,
|
977 |
-
0xA548: 945,
|
978 |
-
0xA549: 946,
|
979 |
-
0xA551: 947,
|
980 |
-
0xA553: 948,
|
981 |
-
0xA555: 949,
|
982 |
-
0xA556: 950,
|
983 |
-
0xA557: 951,
|
984 |
-
0xA561: 952,
|
985 |
-
0xA562: 953,
|
986 |
-
0xA565: 954,
|
987 |
-
0xA569: 955,
|
988 |
-
0xA573: 956,
|
989 |
-
0xA575: 957,
|
990 |
-
0xA576: 958,
|
991 |
-
0xA577: 959,
|
992 |
-
0xA57B: 960,
|
993 |
-
0xA581: 961,
|
994 |
-
0xA585: 962,
|
995 |
-
0xA5A1: 963,
|
996 |
-
0xA5A2: 964,
|
997 |
-
0xA5A3: 965,
|
998 |
-
0xA5A5: 966,
|
999 |
-
0xA5A9: 967,
|
1000 |
-
0xA5B1: 968,
|
1001 |
-
0xA5B3: 969,
|
1002 |
-
0xA5B5: 970,
|
1003 |
-
0xA5B7: 971,
|
1004 |
-
0xA5C1: 972,
|
1005 |
-
0xA5C5: 973,
|
1006 |
-
0xA5D6: 974,
|
1007 |
-
0xA5E1: 975,
|
1008 |
-
0xA5F6: 976,
|
1009 |
-
0xA641: 977,
|
1010 |
-
0xA642: 978,
|
1011 |
-
0xA645: 979,
|
1012 |
-
0xA649: 980,
|
1013 |
-
0xA651: 981,
|
1014 |
-
0xA653: 982,
|
1015 |
-
0xA661: 983,
|
1016 |
-
0xA665: 984,
|
1017 |
-
0xA681: 985,
|
1018 |
-
0xA682: 986,
|
1019 |
-
0xA685: 987,
|
1020 |
-
0xA688: 988,
|
1021 |
-
0xA689: 989,
|
1022 |
-
0xA68A: 990,
|
1023 |
-
0xA68B: 991,
|
1024 |
-
0xA691: 992,
|
1025 |
-
0xA693: 993,
|
1026 |
-
0xA695: 994,
|
1027 |
-
0xA697: 995,
|
1028 |
-
0xA69B: 996,
|
1029 |
-
0xA69C: 997,
|
1030 |
-
0xA6A1: 998,
|
1031 |
-
0xA6A9: 999,
|
1032 |
-
0xA6B6: 1000,
|
1033 |
-
0xA6C1: 1001,
|
1034 |
-
0xA6E1: 1002,
|
1035 |
-
0xA6E2: 1003,
|
1036 |
-
0xA6E5: 1004,
|
1037 |
-
0xA6E9: 1005,
|
1038 |
-
0xA6F7: 1006,
|
1039 |
-
0xA741: 1007,
|
1040 |
-
0xA745: 1008,
|
1041 |
-
0xA749: 1009,
|
1042 |
-
0xA751: 1010,
|
1043 |
-
0xA755: 1011,
|
1044 |
-
0xA757: 1012,
|
1045 |
-
0xA761: 1013,
|
1046 |
-
0xA762: 1014,
|
1047 |
-
0xA765: 1015,
|
1048 |
-
0xA769: 1016,
|
1049 |
-
0xA771: 1017,
|
1050 |
-
0xA773: 1018,
|
1051 |
-
0xA775: 1019,
|
1052 |
-
0xA7A1: 1020,
|
1053 |
-
0xA7A2: 1021,
|
1054 |
-
0xA7A5: 1022,
|
1055 |
-
0xA7A9: 1023,
|
1056 |
-
0xA7AB: 1024,
|
1057 |
-
0xA7B1: 1025,
|
1058 |
-
0xA7B3: 1026,
|
1059 |
-
0xA7B5: 1027,
|
1060 |
-
0xA7B7: 1028,
|
1061 |
-
0xA7B8: 1029,
|
1062 |
-
0xA7B9: 1030,
|
1063 |
-
0xA861: 1031,
|
1064 |
-
0xA862: 1032,
|
1065 |
-
0xA865: 1033,
|
1066 |
-
0xA869: 1034,
|
1067 |
-
0xA86B: 1035,
|
1068 |
-
0xA871: 1036,
|
1069 |
-
0xA873: 1037,
|
1070 |
-
0xA875: 1038,
|
1071 |
-
0xA876: 1039,
|
1072 |
-
0xA877: 1040,
|
1073 |
-
0xA87D: 1041,
|
1074 |
-
0xA881: 1042,
|
1075 |
-
0xA882: 1043,
|
1076 |
-
0xA885: 1044,
|
1077 |
-
0xA889: 1045,
|
1078 |
-
0xA891: 1046,
|
1079 |
-
0xA893: 1047,
|
1080 |
-
0xA895: 1048,
|
1081 |
-
0xA896: 1049,
|
1082 |
-
0xA897: 1050,
|
1083 |
-
0xA8A1: 1051,
|
1084 |
-
0xA8A2: 1052,
|
1085 |
-
0xA8B1: 1053,
|
1086 |
-
0xA8E1: 1054,
|
1087 |
-
0xA8E2: 1055,
|
1088 |
-
0xA8E5: 1056,
|
1089 |
-
0xA8E8: 1057,
|
1090 |
-
0xA8E9: 1058,
|
1091 |
-
0xA8F1: 1059,
|
1092 |
-
0xA8F5: 1060,
|
1093 |
-
0xA8F6: 1061,
|
1094 |
-
0xA8F7: 1062,
|
1095 |
-
0xA941: 1063,
|
1096 |
-
0xA957: 1064,
|
1097 |
-
0xA961: 1065,
|
1098 |
-
0xA962: 1066,
|
1099 |
-
0xA971: 1067,
|
1100 |
-
0xA973: 1068,
|
1101 |
-
0xA975: 1069,
|
1102 |
-
0xA976: 1070,
|
1103 |
-
0xA977: 1071,
|
1104 |
-
0xA9A1: 1072,
|
1105 |
-
0xA9A2: 1073,
|
1106 |
-
0xA9A5: 1074,
|
1107 |
-
0xA9A9: 1075,
|
1108 |
-
0xA9B1: 1076,
|
1109 |
-
0xA9B3: 1077,
|
1110 |
-
0xA9B7: 1078,
|
1111 |
-
0xAA41: 1079,
|
1112 |
-
0xAA61: 1080,
|
1113 |
-
0xAA77: 1081,
|
1114 |
-
0xAA81: 1082,
|
1115 |
-
0xAA82: 1083,
|
1116 |
-
0xAA85: 1084,
|
1117 |
-
0xAA89: 1085,
|
1118 |
-
0xAA91: 1086,
|
1119 |
-
0xAA95: 1087,
|
1120 |
-
0xAA97: 1088,
|
1121 |
-
0xAB41: 1089,
|
1122 |
-
0xAB57: 1090,
|
1123 |
-
0xAB61: 1091,
|
1124 |
-
0xAB65: 1092,
|
1125 |
-
0xAB69: 1093,
|
1126 |
-
0xAB71: 1094,
|
1127 |
-
0xAB73: 1095,
|
1128 |
-
0xABA1: 1096,
|
1129 |
-
0xABA2: 1097,
|
1130 |
-
0xABA5: 1098,
|
1131 |
-
0xABA9: 1099,
|
1132 |
-
0xABB1: 1100,
|
1133 |
-
0xABB3: 1101,
|
1134 |
-
0xABB5: 1102,
|
1135 |
-
0xABB7: 1103,
|
1136 |
-
0xAC61: 1104,
|
1137 |
-
0xAC62: 1105,
|
1138 |
-
0xAC64: 1106,
|
1139 |
-
0xAC65: 1107,
|
1140 |
-
0xAC68: 1108,
|
1141 |
-
0xAC69: 1109,
|
1142 |
-
0xAC6A: 1110,
|
1143 |
-
0xAC6B: 1111,
|
1144 |
-
0xAC71: 1112,
|
1145 |
-
0xAC73: 1113,
|
1146 |
-
0xAC75: 1114,
|
1147 |
-
0xAC76: 1115,
|
1148 |
-
0xAC77: 1116,
|
1149 |
-
0xAC7B: 1117,
|
1150 |
-
0xAC81: 1118,
|
1151 |
-
0xAC82: 1119,
|
1152 |
-
0xAC85: 1120,
|
1153 |
-
0xAC89: 1121,
|
1154 |
-
0xAC91: 1122,
|
1155 |
-
0xAC93: 1123,
|
1156 |
-
0xAC95: 1124,
|
1157 |
-
0xAC96: 1125,
|
1158 |
-
0xAC97: 1126,
|
1159 |
-
0xACA1: 1127,
|
1160 |
-
0xACA2: 1128,
|
1161 |
-
0xACA5: 1129,
|
1162 |
-
0xACA9: 1130,
|
1163 |
-
0xACB1: 1131,
|
1164 |
-
0xACB3: 1132,
|
1165 |
-
0xACB5: 1133,
|
1166 |
-
0xACB7: 1134,
|
1167 |
-
0xACC1: 1135,
|
1168 |
-
0xACC5: 1136,
|
1169 |
-
0xACC9: 1137,
|
1170 |
-
0xACD1: 1138,
|
1171 |
-
0xACD7: 1139,
|
1172 |
-
0xACE1: 1140,
|
1173 |
-
0xACE2: 1141,
|
1174 |
-
0xACE3: 1142,
|
1175 |
-
0xACE4: 1143,
|
1176 |
-
0xACE5: 1144,
|
1177 |
-
0xACE8: 1145,
|
1178 |
-
0xACE9: 1146,
|
1179 |
-
0xACEB: 1147,
|
1180 |
-
0xACEC: 1148,
|
1181 |
-
0xACF1: 1149,
|
1182 |
-
0xACF3: 1150,
|
1183 |
-
0xACF5: 1151,
|
1184 |
-
0xACF6: 1152,
|
1185 |
-
0xACF7: 1153,
|
1186 |
-
0xACFC: 1154,
|
1187 |
-
0xAD41: 1155,
|
1188 |
-
0xAD42: 1156,
|
1189 |
-
0xAD45: 1157,
|
1190 |
-
0xAD49: 1158,
|
1191 |
-
0xAD51: 1159,
|
1192 |
-
0xAD53: 1160,
|
1193 |
-
0xAD55: 1161,
|
1194 |
-
0xAD56: 1162,
|
1195 |
-
0xAD57: 1163,
|
1196 |
-
0xAD61: 1164,
|
1197 |
-
0xAD62: 1165,
|
1198 |
-
0xAD65: 1166,
|
1199 |
-
0xAD69: 1167,
|
1200 |
-
0xAD71: 1168,
|
1201 |
-
0xAD73: 1169,
|
1202 |
-
0xAD75: 1170,
|
1203 |
-
0xAD76: 1171,
|
1204 |
-
0xAD77: 1172,
|
1205 |
-
0xAD81: 1173,
|
1206 |
-
0xAD85: 1174,
|
1207 |
-
0xAD89: 1175,
|
1208 |
-
0xAD97: 1176,
|
1209 |
-
0xADA1: 1177,
|
1210 |
-
0xADA2: 1178,
|
1211 |
-
0xADA3: 1179,
|
1212 |
-
0xADA5: 1180,
|
1213 |
-
0xADA9: 1181,
|
1214 |
-
0xADAB: 1182,
|
1215 |
-
0xADB1: 1183,
|
1216 |
-
0xADB3: 1184,
|
1217 |
-
0xADB5: 1185,
|
1218 |
-
0xADB7: 1186,
|
1219 |
-
0xADBB: 1187,
|
1220 |
-
0xADC1: 1188,
|
1221 |
-
0xADC2: 1189,
|
1222 |
-
0xADC5: 1190,
|
1223 |
-
0xADC9: 1191,
|
1224 |
-
0xADD7: 1192,
|
1225 |
-
0xADE1: 1193,
|
1226 |
-
0xADE5: 1194,
|
1227 |
-
0xADE9: 1195,
|
1228 |
-
0xADF1: 1196,
|
1229 |
-
0xADF5: 1197,
|
1230 |
-
0xADF6: 1198,
|
1231 |
-
0xAE41: 1199,
|
1232 |
-
0xAE45: 1200,
|
1233 |
-
0xAE49: 1201,
|
1234 |
-
0xAE51: 1202,
|
1235 |
-
0xAE53: 1203,
|
1236 |
-
0xAE55: 1204,
|
1237 |
-
0xAE61: 1205,
|
1238 |
-
0xAE62: 1206,
|
1239 |
-
0xAE65: 1207,
|
1240 |
-
0xAE69: 1208,
|
1241 |
-
0xAE71: 1209,
|
1242 |
-
0xAE73: 1210,
|
1243 |
-
0xAE75: 1211,
|
1244 |
-
0xAE77: 1212,
|
1245 |
-
0xAE81: 1213,
|
1246 |
-
0xAE82: 1214,
|
1247 |
-
0xAE85: 1215,
|
1248 |
-
0xAE88: 1216,
|
1249 |
-
0xAE89: 1217,
|
1250 |
-
0xAE91: 1218,
|
1251 |
-
0xAE93: 1219,
|
1252 |
-
0xAE95: 1220,
|
1253 |
-
0xAE97: 1221,
|
1254 |
-
0xAE99: 1222,
|
1255 |
-
0xAE9B: 1223,
|
1256 |
-
0xAE9C: 1224,
|
1257 |
-
0xAEA1: 1225,
|
1258 |
-
0xAEB6: 1226,
|
1259 |
-
0xAEC1: 1227,
|
1260 |
-
0xAEC2: 1228,
|
1261 |
-
0xAEC5: 1229,
|
1262 |
-
0xAEC9: 1230,
|
1263 |
-
0xAED1: 1231,
|
1264 |
-
0xAED7: 1232,
|
1265 |
-
0xAEE1: 1233,
|
1266 |
-
0xAEE2: 1234,
|
1267 |
-
0xAEE5: 1235,
|
1268 |
-
0xAEE9: 1236,
|
1269 |
-
0xAEF1: 1237,
|
1270 |
-
0xAEF3: 1238,
|
1271 |
-
0xAEF5: 1239,
|
1272 |
-
0xAEF7: 1240,
|
1273 |
-
0xAF41: 1241,
|
1274 |
-
0xAF42: 1242,
|
1275 |
-
0xAF49: 1243,
|
1276 |
-
0xAF51: 1244,
|
1277 |
-
0xAF55: 1245,
|
1278 |
-
0xAF57: 1246,
|
1279 |
-
0xAF61: 1247,
|
1280 |
-
0xAF62: 1248,
|
1281 |
-
0xAF65: 1249,
|
1282 |
-
0xAF69: 1250,
|
1283 |
-
0xAF6A: 1251,
|
1284 |
-
0xAF71: 1252,
|
1285 |
-
0xAF73: 1253,
|
1286 |
-
0xAF75: 1254,
|
1287 |
-
0xAF77: 1255,
|
1288 |
-
0xAFA1: 1256,
|
1289 |
-
0xAFA2: 1257,
|
1290 |
-
0xAFA5: 1258,
|
1291 |
-
0xAFA8: 1259,
|
1292 |
-
0xAFA9: 1260,
|
1293 |
-
0xAFB0: 1261,
|
1294 |
-
0xAFB1: 1262,
|
1295 |
-
0xAFB3: 1263,
|
1296 |
-
0xAFB5: 1264,
|
1297 |
-
0xAFB7: 1265,
|
1298 |
-
0xAFBC: 1266,
|
1299 |
-
0xB061: 1267,
|
1300 |
-
0xB062: 1268,
|
1301 |
-
0xB064: 1269,
|
1302 |
-
0xB065: 1270,
|
1303 |
-
0xB069: 1271,
|
1304 |
-
0xB071: 1272,
|
1305 |
-
0xB073: 1273,
|
1306 |
-
0xB076: 1274,
|
1307 |
-
0xB077: 1275,
|
1308 |
-
0xB07D: 1276,
|
1309 |
-
0xB081: 1277,
|
1310 |
-
0xB082: 1278,
|
1311 |
-
0xB085: 1279,
|
1312 |
-
0xB089: 1280,
|
1313 |
-
0xB091: 1281,
|
1314 |
-
0xB093: 1282,
|
1315 |
-
0xB096: 1283,
|
1316 |
-
0xB097: 1284,
|
1317 |
-
0xB0B7: 1285,
|
1318 |
-
0xB0E1: 1286,
|
1319 |
-
0xB0E2: 1287,
|
1320 |
-
0xB0E5: 1288,
|
1321 |
-
0xB0E9: 1289,
|
1322 |
-
0xB0EB: 1290,
|
1323 |
-
0xB0F1: 1291,
|
1324 |
-
0xB0F3: 1292,
|
1325 |
-
0xB0F6: 1293,
|
1326 |
-
0xB0F7: 1294,
|
1327 |
-
0xB141: 1295,
|
1328 |
-
0xB145: 1296,
|
1329 |
-
0xB149: 1297,
|
1330 |
-
0xB185: 1298,
|
1331 |
-
0xB1A1: 1299,
|
1332 |
-
0xB1A2: 1300,
|
1333 |
-
0xB1A5: 1301,
|
1334 |
-
0xB1A8: 1302,
|
1335 |
-
0xB1A9: 1303,
|
1336 |
-
0xB1AB: 1304,
|
1337 |
-
0xB1B1: 1305,
|
1338 |
-
0xB1B3: 1306,
|
1339 |
-
0xB1B7: 1307,
|
1340 |
-
0xB1C1: 1308,
|
1341 |
-
0xB1C2: 1309,
|
1342 |
-
0xB1C5: 1310,
|
1343 |
-
0xB1D6: 1311,
|
1344 |
-
0xB1E1: 1312,
|
1345 |
-
0xB1F6: 1313,
|
1346 |
-
0xB241: 1314,
|
1347 |
-
0xB245: 1315,
|
1348 |
-
0xB249: 1316,
|
1349 |
-
0xB251: 1317,
|
1350 |
-
0xB253: 1318,
|
1351 |
-
0xB261: 1319,
|
1352 |
-
0xB281: 1320,
|
1353 |
-
0xB282: 1321,
|
1354 |
-
0xB285: 1322,
|
1355 |
-
0xB289: 1323,
|
1356 |
-
0xB291: 1324,
|
1357 |
-
0xB293: 1325,
|
1358 |
-
0xB297: 1326,
|
1359 |
-
0xB2A1: 1327,
|
1360 |
-
0xB2B6: 1328,
|
1361 |
-
0xB2C1: 1329,
|
1362 |
-
0xB2E1: 1330,
|
1363 |
-
0xB2E5: 1331,
|
1364 |
-
0xB357: 1332,
|
1365 |
-
0xB361: 1333,
|
1366 |
-
0xB362: 1334,
|
1367 |
-
0xB365: 1335,
|
1368 |
-
0xB369: 1336,
|
1369 |
-
0xB36B: 1337,
|
1370 |
-
0xB370: 1338,
|
1371 |
-
0xB371: 1339,
|
1372 |
-
0xB373: 1340,
|
1373 |
-
0xB381: 1341,
|
1374 |
-
0xB385: 1342,
|
1375 |
-
0xB389: 1343,
|
1376 |
-
0xB391: 1344,
|
1377 |
-
0xB3A1: 1345,
|
1378 |
-
0xB3A2: 1346,
|
1379 |
-
0xB3A5: 1347,
|
1380 |
-
0xB3A9: 1348,
|
1381 |
-
0xB3B1: 1349,
|
1382 |
-
0xB3B3: 1350,
|
1383 |
-
0xB3B5: 1351,
|
1384 |
-
0xB3B7: 1352,
|
1385 |
-
0xB461: 1353,
|
1386 |
-
0xB462: 1354,
|
1387 |
-
0xB465: 1355,
|
1388 |
-
0xB466: 1356,
|
1389 |
-
0xB467: 1357,
|
1390 |
-
0xB469: 1358,
|
1391 |
-
0xB46A: 1359,
|
1392 |
-
0xB46B: 1360,
|
1393 |
-
0xB470: 1361,
|
1394 |
-
0xB471: 1362,
|
1395 |
-
0xB473: 1363,
|
1396 |
-
0xB475: 1364,
|
1397 |
-
0xB476: 1365,
|
1398 |
-
0xB477: 1366,
|
1399 |
-
0xB47B: 1367,
|
1400 |
-
0xB47C: 1368,
|
1401 |
-
0xB481: 1369,
|
1402 |
-
0xB482: 1370,
|
1403 |
-
0xB485: 1371,
|
1404 |
-
0xB489: 1372,
|
1405 |
-
0xB491: 1373,
|
1406 |
-
0xB493: 1374,
|
1407 |
-
0xB495: 1375,
|
1408 |
-
0xB496: 1376,
|
1409 |
-
0xB497: 1377,
|
1410 |
-
0xB4A1: 1378,
|
1411 |
-
0xB4A2: 1379,
|
1412 |
-
0xB4A5: 1380,
|
1413 |
-
0xB4A9: 1381,
|
1414 |
-
0xB4AC: 1382,
|
1415 |
-
0xB4B1: 1383,
|
1416 |
-
0xB4B3: 1384,
|
1417 |
-
0xB4B5: 1385,
|
1418 |
-
0xB4B7: 1386,
|
1419 |
-
0xB4BB: 1387,
|
1420 |
-
0xB4BD: 1388,
|
1421 |
-
0xB4C1: 1389,
|
1422 |
-
0xB4C5: 1390,
|
1423 |
-
0xB4C9: 1391,
|
1424 |
-
0xB4D3: 1392,
|
1425 |
-
0xB4E1: 1393,
|
1426 |
-
0xB4E2: 1394,
|
1427 |
-
0xB4E5: 1395,
|
1428 |
-
0xB4E6: 1396,
|
1429 |
-
0xB4E8: 1397,
|
1430 |
-
0xB4E9: 1398,
|
1431 |
-
0xB4EA: 1399,
|
1432 |
-
0xB4EB: 1400,
|
1433 |
-
0xB4F1: 1401,
|
1434 |
-
0xB4F3: 1402,
|
1435 |
-
0xB4F4: 1403,
|
1436 |
-
0xB4F5: 1404,
|
1437 |
-
0xB4F6: 1405,
|
1438 |
-
0xB4F7: 1406,
|
1439 |
-
0xB4F8: 1407,
|
1440 |
-
0xB4FA: 1408,
|
1441 |
-
0xB4FC: 1409,
|
1442 |
-
0xB541: 1410,
|
1443 |
-
0xB542: 1411,
|
1444 |
-
0xB545: 1412,
|
1445 |
-
0xB549: 1413,
|
1446 |
-
0xB551: 1414,
|
1447 |
-
0xB553: 1415,
|
1448 |
-
0xB555: 1416,
|
1449 |
-
0xB557: 1417,
|
1450 |
-
0xB561: 1418,
|
1451 |
-
0xB562: 1419,
|
1452 |
-
0xB563: 1420,
|
1453 |
-
0xB565: 1421,
|
1454 |
-
0xB569: 1422,
|
1455 |
-
0xB56B: 1423,
|
1456 |
-
0xB56C: 1424,
|
1457 |
-
0xB571: 1425,
|
1458 |
-
0xB573: 1426,
|
1459 |
-
0xB574: 1427,
|
1460 |
-
0xB575: 1428,
|
1461 |
-
0xB576: 1429,
|
1462 |
-
0xB577: 1430,
|
1463 |
-
0xB57B: 1431,
|
1464 |
-
0xB57C: 1432,
|
1465 |
-
0xB57D: 1433,
|
1466 |
-
0xB581: 1434,
|
1467 |
-
0xB585: 1435,
|
1468 |
-
0xB589: 1436,
|
1469 |
-
0xB591: 1437,
|
1470 |
-
0xB593: 1438,
|
1471 |
-
0xB595: 1439,
|
1472 |
-
0xB596: 1440,
|
1473 |
-
0xB5A1: 1441,
|
1474 |
-
0xB5A2: 1442,
|
1475 |
-
0xB5A5: 1443,
|
1476 |
-
0xB5A9: 1444,
|
1477 |
-
0xB5AA: 1445,
|
1478 |
-
0xB5AB: 1446,
|
1479 |
-
0xB5AD: 1447,
|
1480 |
-
0xB5B0: 1448,
|
1481 |
-
0xB5B1: 1449,
|
1482 |
-
0xB5B3: 1450,
|
1483 |
-
0xB5B5: 1451,
|
1484 |
-
0xB5B7: 1452,
|
1485 |
-
0xB5B9: 1453,
|
1486 |
-
0xB5C1: 1454,
|
1487 |
-
0xB5C2: 1455,
|
1488 |
-
0xB5C5: 1456,
|
1489 |
-
0xB5C9: 1457,
|
1490 |
-
0xB5D1: 1458,
|
1491 |
-
0xB5D3: 1459,
|
1492 |
-
0xB5D5: 1460,
|
1493 |
-
0xB5D6: 1461,
|
1494 |
-
0xB5D7: 1462,
|
1495 |
-
0xB5E1: 1463,
|
1496 |
-
0xB5E2: 1464,
|
1497 |
-
0xB5E5: 1465,
|
1498 |
-
0xB5F1: 1466,
|
1499 |
-
0xB5F5: 1467,
|
1500 |
-
0xB5F7: 1468,
|
1501 |
-
0xB641: 1469,
|
1502 |
-
0xB642: 1470,
|
1503 |
-
0xB645: 1471,
|
1504 |
-
0xB649: 1472,
|
1505 |
-
0xB651: 1473,
|
1506 |
-
0xB653: 1474,
|
1507 |
-
0xB655: 1475,
|
1508 |
-
0xB657: 1476,
|
1509 |
-
0xB661: 1477,
|
1510 |
-
0xB662: 1478,
|
1511 |
-
0xB665: 1479,
|
1512 |
-
0xB669: 1480,
|
1513 |
-
0xB671: 1481,
|
1514 |
-
0xB673: 1482,
|
1515 |
-
0xB675: 1483,
|
1516 |
-
0xB677: 1484,
|
1517 |
-
0xB681: 1485,
|
1518 |
-
0xB682: 1486,
|
1519 |
-
0xB685: 1487,
|
1520 |
-
0xB689: 1488,
|
1521 |
-
0xB68A: 1489,
|
1522 |
-
0xB68B: 1490,
|
1523 |
-
0xB691: 1491,
|
1524 |
-
0xB693: 1492,
|
1525 |
-
0xB695: 1493,
|
1526 |
-
0xB697: 1494,
|
1527 |
-
0xB6A1: 1495,
|
1528 |
-
0xB6A2: 1496,
|
1529 |
-
0xB6A5: 1497,
|
1530 |
-
0xB6A9: 1498,
|
1531 |
-
0xB6B1: 1499,
|
1532 |
-
0xB6B3: 1500,
|
1533 |
-
0xB6B6: 1501,
|
1534 |
-
0xB6B7: 1502,
|
1535 |
-
0xB6C1: 1503,
|
1536 |
-
0xB6C2: 1504,
|
1537 |
-
0xB6C5: 1505,
|
1538 |
-
0xB6C9: 1506,
|
1539 |
-
0xB6D1: 1507,
|
1540 |
-
0xB6D3: 1508,
|
1541 |
-
0xB6D7: 1509,
|
1542 |
-
0xB6E1: 1510,
|
1543 |
-
0xB6E2: 1511,
|
1544 |
-
0xB6E5: 1512,
|
1545 |
-
0xB6E9: 1513,
|
1546 |
-
0xB6F1: 1514,
|
1547 |
-
0xB6F3: 1515,
|
1548 |
-
0xB6F5: 1516,
|
1549 |
-
0xB6F7: 1517,
|
1550 |
-
0xB741: 1518,
|
1551 |
-
0xB742: 1519,
|
1552 |
-
0xB745: 1520,
|
1553 |
-
0xB749: 1521,
|
1554 |
-
0xB751: 1522,
|
1555 |
-
0xB753: 1523,
|
1556 |
-
0xB755: 1524,
|
1557 |
-
0xB757: 1525,
|
1558 |
-
0xB759: 1526,
|
1559 |
-
0xB761: 1527,
|
1560 |
-
0xB762: 1528,
|
1561 |
-
0xB765: 1529,
|
1562 |
-
0xB769: 1530,
|
1563 |
-
0xB76F: 1531,
|
1564 |
-
0xB771: 1532,
|
1565 |
-
0xB773: 1533,
|
1566 |
-
0xB775: 1534,
|
1567 |
-
0xB777: 1535,
|
1568 |
-
0xB778: 1536,
|
1569 |
-
0xB779: 1537,
|
1570 |
-
0xB77A: 1538,
|
1571 |
-
0xB77B: 1539,
|
1572 |
-
0xB77C: 1540,
|
1573 |
-
0xB77D: 1541,
|
1574 |
-
0xB781: 1542,
|
1575 |
-
0xB785: 1543,
|
1576 |
-
0xB789: 1544,
|
1577 |
-
0xB791: 1545,
|
1578 |
-
0xB795: 1546,
|
1579 |
-
0xB7A1: 1547,
|
1580 |
-
0xB7A2: 1548,
|
1581 |
-
0xB7A5: 1549,
|
1582 |
-
0xB7A9: 1550,
|
1583 |
-
0xB7AA: 1551,
|
1584 |
-
0xB7AB: 1552,
|
1585 |
-
0xB7B0: 1553,
|
1586 |
-
0xB7B1: 1554,
|
1587 |
-
0xB7B3: 1555,
|
1588 |
-
0xB7B5: 1556,
|
1589 |
-
0xB7B6: 1557,
|
1590 |
-
0xB7B7: 1558,
|
1591 |
-
0xB7B8: 1559,
|
1592 |
-
0xB7BC: 1560,
|
1593 |
-
0xB861: 1561,
|
1594 |
-
0xB862: 1562,
|
1595 |
-
0xB865: 1563,
|
1596 |
-
0xB867: 1564,
|
1597 |
-
0xB868: 1565,
|
1598 |
-
0xB869: 1566,
|
1599 |
-
0xB86B: 1567,
|
1600 |
-
0xB871: 1568,
|
1601 |
-
0xB873: 1569,
|
1602 |
-
0xB875: 1570,
|
1603 |
-
0xB876: 1571,
|
1604 |
-
0xB877: 1572,
|
1605 |
-
0xB878: 1573,
|
1606 |
-
0xB881: 1574,
|
1607 |
-
0xB882: 1575,
|
1608 |
-
0xB885: 1576,
|
1609 |
-
0xB889: 1577,
|
1610 |
-
0xB891: 1578,
|
1611 |
-
0xB893: 1579,
|
1612 |
-
0xB895: 1580,
|
1613 |
-
0xB896: 1581,
|
1614 |
-
0xB897: 1582,
|
1615 |
-
0xB8A1: 1583,
|
1616 |
-
0xB8A2: 1584,
|
1617 |
-
0xB8A5: 1585,
|
1618 |
-
0xB8A7: 1586,
|
1619 |
-
0xB8A9: 1587,
|
1620 |
-
0xB8B1: 1588,
|
1621 |
-
0xB8B7: 1589,
|
1622 |
-
0xB8C1: 1590,
|
1623 |
-
0xB8C5: 1591,
|
1624 |
-
0xB8C9: 1592,
|
1625 |
-
0xB8E1: 1593,
|
1626 |
-
0xB8E2: 1594,
|
1627 |
-
0xB8E5: 1595,
|
1628 |
-
0xB8E9: 1596,
|
1629 |
-
0xB8EB: 1597,
|
1630 |
-
0xB8F1: 1598,
|
1631 |
-
0xB8F3: 1599,
|
1632 |
-
0xB8F5: 1600,
|
1633 |
-
0xB8F7: 1601,
|
1634 |
-
0xB8F8: 1602,
|
1635 |
-
0xB941: 1603,
|
1636 |
-
0xB942: 1604,
|
1637 |
-
0xB945: 1605,
|
1638 |
-
0xB949: 1606,
|
1639 |
-
0xB951: 1607,
|
1640 |
-
0xB953: 1608,
|
1641 |
-
0xB955: 1609,
|
1642 |
-
0xB957: 1610,
|
1643 |
-
0xB961: 1611,
|
1644 |
-
0xB965: 1612,
|
1645 |
-
0xB969: 1613,
|
1646 |
-
0xB971: 1614,
|
1647 |
-
0xB973: 1615,
|
1648 |
-
0xB976: 1616,
|
1649 |
-
0xB977: 1617,
|
1650 |
-
0xB981: 1618,
|
1651 |
-
0xB9A1: 1619,
|
1652 |
-
0xB9A2: 1620,
|
1653 |
-
0xB9A5: 1621,
|
1654 |
-
0xB9A9: 1622,
|
1655 |
-
0xB9AB: 1623,
|
1656 |
-
0xB9B1: 1624,
|
1657 |
-
0xB9B3: 1625,
|
1658 |
-
0xB9B5: 1626,
|
1659 |
-
0xB9B7: 1627,
|
1660 |
-
0xB9B8: 1628,
|
1661 |
-
0xB9B9: 1629,
|
1662 |
-
0xB9BD: 1630,
|
1663 |
-
0xB9C1: 1631,
|
1664 |
-
0xB9C2: 1632,
|
1665 |
-
0xB9C9: 1633,
|
1666 |
-
0xB9D3: 1634,
|
1667 |
-
0xB9D5: 1635,
|
1668 |
-
0xB9D7: 1636,
|
1669 |
-
0xB9E1: 1637,
|
1670 |
-
0xB9F6: 1638,
|
1671 |
-
0xB9F7: 1639,
|
1672 |
-
0xBA41: 1640,
|
1673 |
-
0xBA45: 1641,
|
1674 |
-
0xBA49: 1642,
|
1675 |
-
0xBA51: 1643,
|
1676 |
-
0xBA53: 1644,
|
1677 |
-
0xBA55: 1645,
|
1678 |
-
0xBA57: 1646,
|
1679 |
-
0xBA61: 1647,
|
1680 |
-
0xBA62: 1648,
|
1681 |
-
0xBA65: 1649,
|
1682 |
-
0xBA77: 1650,
|
1683 |
-
0xBA81: 1651,
|
1684 |
-
0xBA82: 1652,
|
1685 |
-
0xBA85: 1653,
|
1686 |
-
0xBA89: 1654,
|
1687 |
-
0xBA8A: 1655,
|
1688 |
-
0xBA8B: 1656,
|
1689 |
-
0xBA91: 1657,
|
1690 |
-
0xBA93: 1658,
|
1691 |
-
0xBA95: 1659,
|
1692 |
-
0xBA97: 1660,
|
1693 |
-
0xBAA1: 1661,
|
1694 |
-
0xBAB6: 1662,
|
1695 |
-
0xBAC1: 1663,
|
1696 |
-
0xBAE1: 1664,
|
1697 |
-
0xBAE2: 1665,
|
1698 |
-
0xBAE5: 1666,
|
1699 |
-
0xBAE9: 1667,
|
1700 |
-
0xBAF1: 1668,
|
1701 |
-
0xBAF3: 1669,
|
1702 |
-
0xBAF5: 1670,
|
1703 |
-
0xBB41: 1671,
|
1704 |
-
0xBB45: 1672,
|
1705 |
-
0xBB49: 1673,
|
1706 |
-
0xBB51: 1674,
|
1707 |
-
0xBB61: 1675,
|
1708 |
-
0xBB62: 1676,
|
1709 |
-
0xBB65: 1677,
|
1710 |
-
0xBB69: 1678,
|
1711 |
-
0xBB71: 1679,
|
1712 |
-
0xBB73: 1680,
|
1713 |
-
0xBB75: 1681,
|
1714 |
-
0xBB77: 1682,
|
1715 |
-
0xBBA1: 1683,
|
1716 |
-
0xBBA2: 1684,
|
1717 |
-
0xBBA5: 1685,
|
1718 |
-
0xBBA8: 1686,
|
1719 |
-
0xBBA9: 1687,
|
1720 |
-
0xBBAB: 1688,
|
1721 |
-
0xBBB1: 1689,
|
1722 |
-
0xBBB3: 1690,
|
1723 |
-
0xBBB5: 1691,
|
1724 |
-
0xBBB7: 1692,
|
1725 |
-
0xBBB8: 1693,
|
1726 |
-
0xBBBB: 1694,
|
1727 |
-
0xBBBC: 1695,
|
1728 |
-
0xBC61: 1696,
|
1729 |
-
0xBC62: 1697,
|
1730 |
-
0xBC65: 1698,
|
1731 |
-
0xBC67: 1699,
|
1732 |
-
0xBC69: 1700,
|
1733 |
-
0xBC6C: 1701,
|
1734 |
-
0xBC71: 1702,
|
1735 |
-
0xBC73: 1703,
|
1736 |
-
0xBC75: 1704,
|
1737 |
-
0xBC76: 1705,
|
1738 |
-
0xBC77: 1706,
|
1739 |
-
0xBC81: 1707,
|
1740 |
-
0xBC82: 1708,
|
1741 |
-
0xBC85: 1709,
|
1742 |
-
0xBC89: 1710,
|
1743 |
-
0xBC91: 1711,
|
1744 |
-
0xBC93: 1712,
|
1745 |
-
0xBC95: 1713,
|
1746 |
-
0xBC96: 1714,
|
1747 |
-
0xBC97: 1715,
|
1748 |
-
0xBCA1: 1716,
|
1749 |
-
0xBCA5: 1717,
|
1750 |
-
0xBCB7: 1718,
|
1751 |
-
0xBCE1: 1719,
|
1752 |
-
0xBCE2: 1720,
|
1753 |
-
0xBCE5: 1721,
|
1754 |
-
0xBCE9: 1722,
|
1755 |
-
0xBCF1: 1723,
|
1756 |
-
0xBCF3: 1724,
|
1757 |
-
0xBCF5: 1725,
|
1758 |
-
0xBCF6: 1726,
|
1759 |
-
0xBCF7: 1727,
|
1760 |
-
0xBD41: 1728,
|
1761 |
-
0xBD57: 1729,
|
1762 |
-
0xBD61: 1730,
|
1763 |
-
0xBD76: 1731,
|
1764 |
-
0xBDA1: 1732,
|
1765 |
-
0xBDA2: 1733,
|
1766 |
-
0xBDA5: 1734,
|
1767 |
-
0xBDA9: 1735,
|
1768 |
-
0xBDB1: 1736,
|
1769 |
-
0xBDB3: 1737,
|
1770 |
-
0xBDB5: 1738,
|
1771 |
-
0xBDB7: 1739,
|
1772 |
-
0xBDB9: 1740,
|
1773 |
-
0xBDC1: 1741,
|
1774 |
-
0xBDC2: 1742,
|
1775 |
-
0xBDC9: 1743,
|
1776 |
-
0xBDD6: 1744,
|
1777 |
-
0xBDE1: 1745,
|
1778 |
-
0xBDF6: 1746,
|
1779 |
-
0xBE41: 1747,
|
1780 |
-
0xBE45: 1748,
|
1781 |
-
0xBE49: 1749,
|
1782 |
-
0xBE51: 1750,
|
1783 |
-
0xBE53: 1751,
|
1784 |
-
0xBE77: 1752,
|
1785 |
-
0xBE81: 1753,
|
1786 |
-
0xBE82: 1754,
|
1787 |
-
0xBE85: 1755,
|
1788 |
-
0xBE89: 1756,
|
1789 |
-
0xBE91: 1757,
|
1790 |
-
0xBE93: 1758,
|
1791 |
-
0xBE97: 1759,
|
1792 |
-
0xBEA1: 1760,
|
1793 |
-
0xBEB6: 1761,
|
1794 |
-
0xBEB7: 1762,
|
1795 |
-
0xBEE1: 1763,
|
1796 |
-
0xBF41: 1764,
|
1797 |
-
0xBF61: 1765,
|
1798 |
-
0xBF71: 1766,
|
1799 |
-
0xBF75: 1767,
|
1800 |
-
0xBF77: 1768,
|
1801 |
-
0xBFA1: 1769,
|
1802 |
-
0xBFA2: 1770,
|
1803 |
-
0xBFA5: 1771,
|
1804 |
-
0xBFA9: 1772,
|
1805 |
-
0xBFB1: 1773,
|
1806 |
-
0xBFB3: 1774,
|
1807 |
-
0xBFB7: 1775,
|
1808 |
-
0xBFB8: 1776,
|
1809 |
-
0xBFBD: 1777,
|
1810 |
-
0xC061: 1778,
|
1811 |
-
0xC062: 1779,
|
1812 |
-
0xC065: 1780,
|
1813 |
-
0xC067: 1781,
|
1814 |
-
0xC069: 1782,
|
1815 |
-
0xC071: 1783,
|
1816 |
-
0xC073: 1784,
|
1817 |
-
0xC075: 1785,
|
1818 |
-
0xC076: 1786,
|
1819 |
-
0xC077: 1787,
|
1820 |
-
0xC078: 1788,
|
1821 |
-
0xC081: 1789,
|
1822 |
-
0xC082: 1790,
|
1823 |
-
0xC085: 1791,
|
1824 |
-
0xC089: 1792,
|
1825 |
-
0xC091: 1793,
|
1826 |
-
0xC093: 1794,
|
1827 |
-
0xC095: 1795,
|
1828 |
-
0xC096: 1796,
|
1829 |
-
0xC097: 1797,
|
1830 |
-
0xC0A1: 1798,
|
1831 |
-
0xC0A5: 1799,
|
1832 |
-
0xC0A7: 1800,
|
1833 |
-
0xC0A9: 1801,
|
1834 |
-
0xC0B1: 1802,
|
1835 |
-
0xC0B7: 1803,
|
1836 |
-
0xC0E1: 1804,
|
1837 |
-
0xC0E2: 1805,
|
1838 |
-
0xC0E5: 1806,
|
1839 |
-
0xC0E9: 1807,
|
1840 |
-
0xC0F1: 1808,
|
1841 |
-
0xC0F3: 1809,
|
1842 |
-
0xC0F5: 1810,
|
1843 |
-
0xC0F6: 1811,
|
1844 |
-
0xC0F7: 1812,
|
1845 |
-
0xC141: 1813,
|
1846 |
-
0xC142: 1814,
|
1847 |
-
0xC145: 1815,
|
1848 |
-
0xC149: 1816,
|
1849 |
-
0xC151: 1817,
|
1850 |
-
0xC153: 1818,
|
1851 |
-
0xC155: 1819,
|
1852 |
-
0xC157: 1820,
|
1853 |
-
0xC161: 1821,
|
1854 |
-
0xC165: 1822,
|
1855 |
-
0xC176: 1823,
|
1856 |
-
0xC181: 1824,
|
1857 |
-
0xC185: 1825,
|
1858 |
-
0xC197: 1826,
|
1859 |
-
0xC1A1: 1827,
|
1860 |
-
0xC1A2: 1828,
|
1861 |
-
0xC1A5: 1829,
|
1862 |
-
0xC1A9: 1830,
|
1863 |
-
0xC1B1: 1831,
|
1864 |
-
0xC1B3: 1832,
|
1865 |
-
0xC1B5: 1833,
|
1866 |
-
0xC1B7: 1834,
|
1867 |
-
0xC1C1: 1835,
|
1868 |
-
0xC1C5: 1836,
|
1869 |
-
0xC1C9: 1837,
|
1870 |
-
0xC1D7: 1838,
|
1871 |
-
0xC241: 1839,
|
1872 |
-
0xC245: 1840,
|
1873 |
-
0xC249: 1841,
|
1874 |
-
0xC251: 1842,
|
1875 |
-
0xC253: 1843,
|
1876 |
-
0xC255: 1844,
|
1877 |
-
0xC257: 1845,
|
1878 |
-
0xC261: 1846,
|
1879 |
-
0xC271: 1847,
|
1880 |
-
0xC281: 1848,
|
1881 |
-
0xC282: 1849,
|
1882 |
-
0xC285: 1850,
|
1883 |
-
0xC289: 1851,
|
1884 |
-
0xC291: 1852,
|
1885 |
-
0xC293: 1853,
|
1886 |
-
0xC295: 1854,
|
1887 |
-
0xC297: 1855,
|
1888 |
-
0xC2A1: 1856,
|
1889 |
-
0xC2B6: 1857,
|
1890 |
-
0xC2C1: 1858,
|
1891 |
-
0xC2C5: 1859,
|
1892 |
-
0xC2E1: 1860,
|
1893 |
-
0xC2E5: 1861,
|
1894 |
-
0xC2E9: 1862,
|
1895 |
-
0xC2F1: 1863,
|
1896 |
-
0xC2F3: 1864,
|
1897 |
-
0xC2F5: 1865,
|
1898 |
-
0xC2F7: 1866,
|
1899 |
-
0xC341: 1867,
|
1900 |
-
0xC345: 1868,
|
1901 |
-
0xC349: 1869,
|
1902 |
-
0xC351: 1870,
|
1903 |
-
0xC357: 1871,
|
1904 |
-
0xC361: 1872,
|
1905 |
-
0xC362: 1873,
|
1906 |
-
0xC365: 1874,
|
1907 |
-
0xC369: 1875,
|
1908 |
-
0xC371: 1876,
|
1909 |
-
0xC373: 1877,
|
1910 |
-
0xC375: 1878,
|
1911 |
-
0xC377: 1879,
|
1912 |
-
0xC3A1: 1880,
|
1913 |
-
0xC3A2: 1881,
|
1914 |
-
0xC3A5: 1882,
|
1915 |
-
0xC3A8: 1883,
|
1916 |
-
0xC3A9: 1884,
|
1917 |
-
0xC3AA: 1885,
|
1918 |
-
0xC3B1: 1886,
|
1919 |
-
0xC3B3: 1887,
|
1920 |
-
0xC3B5: 1888,
|
1921 |
-
0xC3B7: 1889,
|
1922 |
-
0xC461: 1890,
|
1923 |
-
0xC462: 1891,
|
1924 |
-
0xC465: 1892,
|
1925 |
-
0xC469: 1893,
|
1926 |
-
0xC471: 1894,
|
1927 |
-
0xC473: 1895,
|
1928 |
-
0xC475: 1896,
|
1929 |
-
0xC477: 1897,
|
1930 |
-
0xC481: 1898,
|
1931 |
-
0xC482: 1899,
|
1932 |
-
0xC485: 1900,
|
1933 |
-
0xC489: 1901,
|
1934 |
-
0xC491: 1902,
|
1935 |
-
0xC493: 1903,
|
1936 |
-
0xC495: 1904,
|
1937 |
-
0xC496: 1905,
|
1938 |
-
0xC497: 1906,
|
1939 |
-
0xC4A1: 1907,
|
1940 |
-
0xC4A2: 1908,
|
1941 |
-
0xC4B7: 1909,
|
1942 |
-
0xC4E1: 1910,
|
1943 |
-
0xC4E2: 1911,
|
1944 |
-
0xC4E5: 1912,
|
1945 |
-
0xC4E8: 1913,
|
1946 |
-
0xC4E9: 1914,
|
1947 |
-
0xC4F1: 1915,
|
1948 |
-
0xC4F3: 1916,
|
1949 |
-
0xC4F5: 1917,
|
1950 |
-
0xC4F6: 1918,
|
1951 |
-
0xC4F7: 1919,
|
1952 |
-
0xC541: 1920,
|
1953 |
-
0xC542: 1921,
|
1954 |
-
0xC545: 1922,
|
1955 |
-
0xC549: 1923,
|
1956 |
-
0xC551: 1924,
|
1957 |
-
0xC553: 1925,
|
1958 |
-
0xC555: 1926,
|
1959 |
-
0xC557: 1927,
|
1960 |
-
0xC561: 1928,
|
1961 |
-
0xC565: 1929,
|
1962 |
-
0xC569: 1930,
|
1963 |
-
0xC571: 1931,
|
1964 |
-
0xC573: 1932,
|
1965 |
-
0xC575: 1933,
|
1966 |
-
0xC576: 1934,
|
1967 |
-
0xC577: 1935,
|
1968 |
-
0xC581: 1936,
|
1969 |
-
0xC5A1: 1937,
|
1970 |
-
0xC5A2: 1938,
|
1971 |
-
0xC5A5: 1939,
|
1972 |
-
0xC5A9: 1940,
|
1973 |
-
0xC5B1: 1941,
|
1974 |
-
0xC5B3: 1942,
|
1975 |
-
0xC5B5: 1943,
|
1976 |
-
0xC5B7: 1944,
|
1977 |
-
0xC5C1: 1945,
|
1978 |
-
0xC5C2: 1946,
|
1979 |
-
0xC5C5: 1947,
|
1980 |
-
0xC5C9: 1948,
|
1981 |
-
0xC5D1: 1949,
|
1982 |
-
0xC5D7: 1950,
|
1983 |
-
0xC5E1: 1951,
|
1984 |
-
0xC5F7: 1952,
|
1985 |
-
0xC641: 1953,
|
1986 |
-
0xC649: 1954,
|
1987 |
-
0xC661: 1955,
|
1988 |
-
0xC681: 1956,
|
1989 |
-
0xC682: 1957,
|
1990 |
-
0xC685: 1958,
|
1991 |
-
0xC689: 1959,
|
1992 |
-
0xC691: 1960,
|
1993 |
-
0xC693: 1961,
|
1994 |
-
0xC695: 1962,
|
1995 |
-
0xC697: 1963,
|
1996 |
-
0xC6A1: 1964,
|
1997 |
-
0xC6A5: 1965,
|
1998 |
-
0xC6A9: 1966,
|
1999 |
-
0xC6B7: 1967,
|
2000 |
-
0xC6C1: 1968,
|
2001 |
-
0xC6D7: 1969,
|
2002 |
-
0xC6E1: 1970,
|
2003 |
-
0xC6E2: 1971,
|
2004 |
-
0xC6E5: 1972,
|
2005 |
-
0xC6E9: 1973,
|
2006 |
-
0xC6F1: 1974,
|
2007 |
-
0xC6F3: 1975,
|
2008 |
-
0xC6F5: 1976,
|
2009 |
-
0xC6F7: 1977,
|
2010 |
-
0xC741: 1978,
|
2011 |
-
0xC745: 1979,
|
2012 |
-
0xC749: 1980,
|
2013 |
-
0xC751: 1981,
|
2014 |
-
0xC761: 1982,
|
2015 |
-
0xC762: 1983,
|
2016 |
-
0xC765: 1984,
|
2017 |
-
0xC769: 1985,
|
2018 |
-
0xC771: 1986,
|
2019 |
-
0xC773: 1987,
|
2020 |
-
0xC777: 1988,
|
2021 |
-
0xC7A1: 1989,
|
2022 |
-
0xC7A2: 1990,
|
2023 |
-
0xC7A5: 1991,
|
2024 |
-
0xC7A9: 1992,
|
2025 |
-
0xC7B1: 1993,
|
2026 |
-
0xC7B3: 1994,
|
2027 |
-
0xC7B5: 1995,
|
2028 |
-
0xC7B7: 1996,
|
2029 |
-
0xC861: 1997,
|
2030 |
-
0xC862: 1998,
|
2031 |
-
0xC865: 1999,
|
2032 |
-
0xC869: 2000,
|
2033 |
-
0xC86A: 2001,
|
2034 |
-
0xC871: 2002,
|
2035 |
-
0xC873: 2003,
|
2036 |
-
0xC875: 2004,
|
2037 |
-
0xC876: 2005,
|
2038 |
-
0xC877: 2006,
|
2039 |
-
0xC881: 2007,
|
2040 |
-
0xC882: 2008,
|
2041 |
-
0xC885: 2009,
|
2042 |
-
0xC889: 2010,
|
2043 |
-
0xC891: 2011,
|
2044 |
-
0xC893: 2012,
|
2045 |
-
0xC895: 2013,
|
2046 |
-
0xC896: 2014,
|
2047 |
-
0xC897: 2015,
|
2048 |
-
0xC8A1: 2016,
|
2049 |
-
0xC8B7: 2017,
|
2050 |
-
0xC8E1: 2018,
|
2051 |
-
0xC8E2: 2019,
|
2052 |
-
0xC8E5: 2020,
|
2053 |
-
0xC8E9: 2021,
|
2054 |
-
0xC8EB: 2022,
|
2055 |
-
0xC8F1: 2023,
|
2056 |
-
0xC8F3: 2024,
|
2057 |
-
0xC8F5: 2025,
|
2058 |
-
0xC8F6: 2026,
|
2059 |
-
0xC8F7: 2027,
|
2060 |
-
0xC941: 2028,
|
2061 |
-
0xC942: 2029,
|
2062 |
-
0xC945: 2030,
|
2063 |
-
0xC949: 2031,
|
2064 |
-
0xC951: 2032,
|
2065 |
-
0xC953: 2033,
|
2066 |
-
0xC955: 2034,
|
2067 |
-
0xC957: 2035,
|
2068 |
-
0xC961: 2036,
|
2069 |
-
0xC965: 2037,
|
2070 |
-
0xC976: 2038,
|
2071 |
-
0xC981: 2039,
|
2072 |
-
0xC985: 2040,
|
2073 |
-
0xC9A1: 2041,
|
2074 |
-
0xC9A2: 2042,
|
2075 |
-
0xC9A5: 2043,
|
2076 |
-
0xC9A9: 2044,
|
2077 |
-
0xC9B1: 2045,
|
2078 |
-
0xC9B3: 2046,
|
2079 |
-
0xC9B5: 2047,
|
2080 |
-
0xC9B7: 2048,
|
2081 |
-
0xC9BC: 2049,
|
2082 |
-
0xC9C1: 2050,
|
2083 |
-
0xC9C5: 2051,
|
2084 |
-
0xC9E1: 2052,
|
2085 |
-
0xCA41: 2053,
|
2086 |
-
0xCA45: 2054,
|
2087 |
-
0xCA55: 2055,
|
2088 |
-
0xCA57: 2056,
|
2089 |
-
0xCA61: 2057,
|
2090 |
-
0xCA81: 2058,
|
2091 |
-
0xCA82: 2059,
|
2092 |
-
0xCA85: 2060,
|
2093 |
-
0xCA89: 2061,
|
2094 |
-
0xCA91: 2062,
|
2095 |
-
0xCA93: 2063,
|
2096 |
-
0xCA95: 2064,
|
2097 |
-
0xCA97: 2065,
|
2098 |
-
0xCAA1: 2066,
|
2099 |
-
0xCAB6: 2067,
|
2100 |
-
0xCAC1: 2068,
|
2101 |
-
0xCAE1: 2069,
|
2102 |
-
0xCAE2: 2070,
|
2103 |
-
0xCAE5: 2071,
|
2104 |
-
0xCAE9: 2072,
|
2105 |
-
0xCAF1: 2073,
|
2106 |
-
0xCAF3: 2074,
|
2107 |
-
0xCAF7: 2075,
|
2108 |
-
0xCB41: 2076,
|
2109 |
-
0xCB45: 2077,
|
2110 |
-
0xCB49: 2078,
|
2111 |
-
0xCB51: 2079,
|
2112 |
-
0xCB57: 2080,
|
2113 |
-
0xCB61: 2081,
|
2114 |
-
0xCB62: 2082,
|
2115 |
-
0xCB65: 2083,
|
2116 |
-
0xCB68: 2084,
|
2117 |
-
0xCB69: 2085,
|
2118 |
-
0xCB6B: 2086,
|
2119 |
-
0xCB71: 2087,
|
2120 |
-
0xCB73: 2088,
|
2121 |
-
0xCB75: 2089,
|
2122 |
-
0xCB81: 2090,
|
2123 |
-
0xCB85: 2091,
|
2124 |
-
0xCB89: 2092,
|
2125 |
-
0xCB91: 2093,
|
2126 |
-
0xCB93: 2094,
|
2127 |
-
0xCBA1: 2095,
|
2128 |
-
0xCBA2: 2096,
|
2129 |
-
0xCBA5: 2097,
|
2130 |
-
0xCBA9: 2098,
|
2131 |
-
0xCBB1: 2099,
|
2132 |
-
0xCBB3: 2100,
|
2133 |
-
0xCBB5: 2101,
|
2134 |
-
0xCBB7: 2102,
|
2135 |
-
0xCC61: 2103,
|
2136 |
-
0xCC62: 2104,
|
2137 |
-
0xCC63: 2105,
|
2138 |
-
0xCC65: 2106,
|
2139 |
-
0xCC69: 2107,
|
2140 |
-
0xCC6B: 2108,
|
2141 |
-
0xCC71: 2109,
|
2142 |
-
0xCC73: 2110,
|
2143 |
-
0xCC75: 2111,
|
2144 |
-
0xCC76: 2112,
|
2145 |
-
0xCC77: 2113,
|
2146 |
-
0xCC7B: 2114,
|
2147 |
-
0xCC81: 2115,
|
2148 |
-
0xCC82: 2116,
|
2149 |
-
0xCC85: 2117,
|
2150 |
-
0xCC89: 2118,
|
2151 |
-
0xCC91: 2119,
|
2152 |
-
0xCC93: 2120,
|
2153 |
-
0xCC95: 2121,
|
2154 |
-
0xCC96: 2122,
|
2155 |
-
0xCC97: 2123,
|
2156 |
-
0xCCA1: 2124,
|
2157 |
-
0xCCA2: 2125,
|
2158 |
-
0xCCE1: 2126,
|
2159 |
-
0xCCE2: 2127,
|
2160 |
-
0xCCE5: 2128,
|
2161 |
-
0xCCE9: 2129,
|
2162 |
-
0xCCF1: 2130,
|
2163 |
-
0xCCF3: 2131,
|
2164 |
-
0xCCF5: 2132,
|
2165 |
-
0xCCF6: 2133,
|
2166 |
-
0xCCF7: 2134,
|
2167 |
-
0xCD41: 2135,
|
2168 |
-
0xCD42: 2136,
|
2169 |
-
0xCD45: 2137,
|
2170 |
-
0xCD49: 2138,
|
2171 |
-
0xCD51: 2139,
|
2172 |
-
0xCD53: 2140,
|
2173 |
-
0xCD55: 2141,
|
2174 |
-
0xCD57: 2142,
|
2175 |
-
0xCD61: 2143,
|
2176 |
-
0xCD65: 2144,
|
2177 |
-
0xCD69: 2145,
|
2178 |
-
0xCD71: 2146,
|
2179 |
-
0xCD73: 2147,
|
2180 |
-
0xCD76: 2148,
|
2181 |
-
0xCD77: 2149,
|
2182 |
-
0xCD81: 2150,
|
2183 |
-
0xCD89: 2151,
|
2184 |
-
0xCD93: 2152,
|
2185 |
-
0xCD95: 2153,
|
2186 |
-
0xCDA1: 2154,
|
2187 |
-
0xCDA2: 2155,
|
2188 |
-
0xCDA5: 2156,
|
2189 |
-
0xCDA9: 2157,
|
2190 |
-
0xCDB1: 2158,
|
2191 |
-
0xCDB3: 2159,
|
2192 |
-
0xCDB5: 2160,
|
2193 |
-
0xCDB7: 2161,
|
2194 |
-
0xCDC1: 2162,
|
2195 |
-
0xCDD7: 2163,
|
2196 |
-
0xCE41: 2164,
|
2197 |
-
0xCE45: 2165,
|
2198 |
-
0xCE61: 2166,
|
2199 |
-
0xCE65: 2167,
|
2200 |
-
0xCE69: 2168,
|
2201 |
-
0xCE73: 2169,
|
2202 |
-
0xCE75: 2170,
|
2203 |
-
0xCE81: 2171,
|
2204 |
-
0xCE82: 2172,
|
2205 |
-
0xCE85: 2173,
|
2206 |
-
0xCE88: 2174,
|
2207 |
-
0xCE89: 2175,
|
2208 |
-
0xCE8B: 2176,
|
2209 |
-
0xCE91: 2177,
|
2210 |
-
0xCE93: 2178,
|
2211 |
-
0xCE95: 2179,
|
2212 |
-
0xCE97: 2180,
|
2213 |
-
0xCEA1: 2181,
|
2214 |
-
0xCEB7: 2182,
|
2215 |
-
0xCEE1: 2183,
|
2216 |
-
0xCEE5: 2184,
|
2217 |
-
0xCEE9: 2185,
|
2218 |
-
0xCEF1: 2186,
|
2219 |
-
0xCEF5: 2187,
|
2220 |
-
0xCF41: 2188,
|
2221 |
-
0xCF45: 2189,
|
2222 |
-
0xCF49: 2190,
|
2223 |
-
0xCF51: 2191,
|
2224 |
-
0xCF55: 2192,
|
2225 |
-
0xCF57: 2193,
|
2226 |
-
0xCF61: 2194,
|
2227 |
-
0xCF65: 2195,
|
2228 |
-
0xCF69: 2196,
|
2229 |
-
0xCF71: 2197,
|
2230 |
-
0xCF73: 2198,
|
2231 |
-
0xCF75: 2199,
|
2232 |
-
0xCFA1: 2200,
|
2233 |
-
0xCFA2: 2201,
|
2234 |
-
0xCFA5: 2202,
|
2235 |
-
0xCFA9: 2203,
|
2236 |
-
0xCFB1: 2204,
|
2237 |
-
0xCFB3: 2205,
|
2238 |
-
0xCFB5: 2206,
|
2239 |
-
0xCFB7: 2207,
|
2240 |
-
0xD061: 2208,
|
2241 |
-
0xD062: 2209,
|
2242 |
-
0xD065: 2210,
|
2243 |
-
0xD069: 2211,
|
2244 |
-
0xD06E: 2212,
|
2245 |
-
0xD071: 2213,
|
2246 |
-
0xD073: 2214,
|
2247 |
-
0xD075: 2215,
|
2248 |
-
0xD077: 2216,
|
2249 |
-
0xD081: 2217,
|
2250 |
-
0xD082: 2218,
|
2251 |
-
0xD085: 2219,
|
2252 |
-
0xD089: 2220,
|
2253 |
-
0xD091: 2221,
|
2254 |
-
0xD093: 2222,
|
2255 |
-
0xD095: 2223,
|
2256 |
-
0xD096: 2224,
|
2257 |
-
0xD097: 2225,
|
2258 |
-
0xD0A1: 2226,
|
2259 |
-
0xD0B7: 2227,
|
2260 |
-
0xD0E1: 2228,
|
2261 |
-
0xD0E2: 2229,
|
2262 |
-
0xD0E5: 2230,
|
2263 |
-
0xD0E9: 2231,
|
2264 |
-
0xD0EB: 2232,
|
2265 |
-
0xD0F1: 2233,
|
2266 |
-
0xD0F3: 2234,
|
2267 |
-
0xD0F5: 2235,
|
2268 |
-
0xD0F7: 2236,
|
2269 |
-
0xD141: 2237,
|
2270 |
-
0xD142: 2238,
|
2271 |
-
0xD145: 2239,
|
2272 |
-
0xD149: 2240,
|
2273 |
-
0xD151: 2241,
|
2274 |
-
0xD153: 2242,
|
2275 |
-
0xD155: 2243,
|
2276 |
-
0xD157: 2244,
|
2277 |
-
0xD161: 2245,
|
2278 |
-
0xD162: 2246,
|
2279 |
-
0xD165: 2247,
|
2280 |
-
0xD169: 2248,
|
2281 |
-
0xD171: 2249,
|
2282 |
-
0xD173: 2250,
|
2283 |
-
0xD175: 2251,
|
2284 |
-
0xD176: 2252,
|
2285 |
-
0xD177: 2253,
|
2286 |
-
0xD181: 2254,
|
2287 |
-
0xD185: 2255,
|
2288 |
-
0xD189: 2256,
|
2289 |
-
0xD193: 2257,
|
2290 |
-
0xD1A1: 2258,
|
2291 |
-
0xD1A2: 2259,
|
2292 |
-
0xD1A5: 2260,
|
2293 |
-
0xD1A9: 2261,
|
2294 |
-
0xD1AE: 2262,
|
2295 |
-
0xD1B1: 2263,
|
2296 |
-
0xD1B3: 2264,
|
2297 |
-
0xD1B5: 2265,
|
2298 |
-
0xD1B7: 2266,
|
2299 |
-
0xD1BB: 2267,
|
2300 |
-
0xD1C1: 2268,
|
2301 |
-
0xD1C2: 2269,
|
2302 |
-
0xD1C5: 2270,
|
2303 |
-
0xD1C9: 2271,
|
2304 |
-
0xD1D5: 2272,
|
2305 |
-
0xD1D7: 2273,
|
2306 |
-
0xD1E1: 2274,
|
2307 |
-
0xD1E2: 2275,
|
2308 |
-
0xD1E5: 2276,
|
2309 |
-
0xD1F5: 2277,
|
2310 |
-
0xD1F7: 2278,
|
2311 |
-
0xD241: 2279,
|
2312 |
-
0xD242: 2280,
|
2313 |
-
0xD245: 2281,
|
2314 |
-
0xD249: 2282,
|
2315 |
-
0xD253: 2283,
|
2316 |
-
0xD255: 2284,
|
2317 |
-
0xD257: 2285,
|
2318 |
-
0xD261: 2286,
|
2319 |
-
0xD265: 2287,
|
2320 |
-
0xD269: 2288,
|
2321 |
-
0xD273: 2289,
|
2322 |
-
0xD275: 2290,
|
2323 |
-
0xD281: 2291,
|
2324 |
-
0xD282: 2292,
|
2325 |
-
0xD285: 2293,
|
2326 |
-
0xD289: 2294,
|
2327 |
-
0xD28E: 2295,
|
2328 |
-
0xD291: 2296,
|
2329 |
-
0xD295: 2297,
|
2330 |
-
0xD297: 2298,
|
2331 |
-
0xD2A1: 2299,
|
2332 |
-
0xD2A5: 2300,
|
2333 |
-
0xD2A9: 2301,
|
2334 |
-
0xD2B1: 2302,
|
2335 |
-
0xD2B7: 2303,
|
2336 |
-
0xD2C1: 2304,
|
2337 |
-
0xD2C2: 2305,
|
2338 |
-
0xD2C5: 2306,
|
2339 |
-
0xD2C9: 2307,
|
2340 |
-
0xD2D7: 2308,
|
2341 |
-
0xD2E1: 2309,
|
2342 |
-
0xD2E2: 2310,
|
2343 |
-
0xD2E5: 2311,
|
2344 |
-
0xD2E9: 2312,
|
2345 |
-
0xD2F1: 2313,
|
2346 |
-
0xD2F3: 2314,
|
2347 |
-
0xD2F5: 2315,
|
2348 |
-
0xD2F7: 2316,
|
2349 |
-
0xD341: 2317,
|
2350 |
-
0xD342: 2318,
|
2351 |
-
0xD345: 2319,
|
2352 |
-
0xD349: 2320,
|
2353 |
-
0xD351: 2321,
|
2354 |
-
0xD355: 2322,
|
2355 |
-
0xD357: 2323,
|
2356 |
-
0xD361: 2324,
|
2357 |
-
0xD362: 2325,
|
2358 |
-
0xD365: 2326,
|
2359 |
-
0xD367: 2327,
|
2360 |
-
0xD368: 2328,
|
2361 |
-
0xD369: 2329,
|
2362 |
-
0xD36A: 2330,
|
2363 |
-
0xD371: 2331,
|
2364 |
-
0xD373: 2332,
|
2365 |
-
0xD375: 2333,
|
2366 |
-
0xD377: 2334,
|
2367 |
-
0xD37B: 2335,
|
2368 |
-
0xD381: 2336,
|
2369 |
-
0xD385: 2337,
|
2370 |
-
0xD389: 2338,
|
2371 |
-
0xD391: 2339,
|
2372 |
-
0xD393: 2340,
|
2373 |
-
0xD397: 2341,
|
2374 |
-
0xD3A1: 2342,
|
2375 |
-
0xD3A2: 2343,
|
2376 |
-
0xD3A5: 2344,
|
2377 |
-
0xD3A9: 2345,
|
2378 |
-
0xD3B1: 2346,
|
2379 |
-
0xD3B3: 2347,
|
2380 |
-
0xD3B5: 2348,
|
2381 |
-
0xD3B7: 2349,
|
2382 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Atualli/yoloxTeste/yoloxdetect2/configs/yolox_s.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
#!/usr/bin/env python3
|
2 |
-
# -*- coding:utf-8 -*-
|
3 |
-
# Copyright (c) Megvii, Inc. and its affiliates.
|
4 |
-
|
5 |
-
import os
|
6 |
-
|
7 |
-
from yolox.exp import Exp as MyExp
|
8 |
-
|
9 |
-
|
10 |
-
class Exp(MyExp):
|
11 |
-
def __init__(self):
|
12 |
-
super(Exp, self).__init__()
|
13 |
-
self.depth = 0.33
|
14 |
-
self.width = 0.50
|
15 |
-
self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Banbri/zcvzcv/src/components/ui/popover.tsx
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
"use client"
|
2 |
-
|
3 |
-
import * as React from "react"
|
4 |
-
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
5 |
-
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
|
8 |
-
const Popover = PopoverPrimitive.Root
|
9 |
-
|
10 |
-
const PopoverTrigger = PopoverPrimitive.Trigger
|
11 |
-
|
12 |
-
const PopoverContent = React.forwardRef<
|
13 |
-
React.ElementRef<typeof PopoverPrimitive.Content>,
|
14 |
-
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
15 |
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
16 |
-
<PopoverPrimitive.Portal>
|
17 |
-
<PopoverPrimitive.Content
|
18 |
-
ref={ref}
|
19 |
-
align={align}
|
20 |
-
sideOffset={sideOffset}
|
21 |
-
className={cn(
|
22 |
-
"z-50 w-72 rounded-md border border-stone-200 bg-white p-4 text-stone-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-stone-800 dark:bg-stone-950 dark:text-stone-50",
|
23 |
-
className
|
24 |
-
)}
|
25 |
-
{...props}
|
26 |
-
/>
|
27 |
-
</PopoverPrimitive.Portal>
|
28 |
-
))
|
29 |
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName
|
30 |
-
|
31 |
-
export { Popover, PopoverTrigger, PopoverContent }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/30 Segundos Tamil Whatsapp Estado Vdeo Descarga 2018 Hdvd9.md
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Películas móviles hindi MP4 Descargar 2018</h1>
|
3 |
-
<p>Si usted es un fan de las películas de Bollywood, es posible que esté interesado en descargar algunas de las últimas películas en hindi en 2018. Pero, ¿cómo puede hacer eso sin comprometer la calidad y la seguridad de su dispositivo? ¿Y cuáles son las mejores películas en hindi en 2018 que no debes perderte? En este artículo, responderemos a estas preguntas y le proporcionaremos información útil sobre cómo descargar películas móviles Hindi MP4 en 2018. </p>
|
4 |
-
<h2>30 segundos tamil whatsapp estado vídeo descarga 2018 hdvd9</h2><br /><p><b><b>Download File</b> ✏ ✏ ✏ <a href="https://bltlly.com/2v6KQF">https://bltlly.com/2v6KQF</a></b></p><br /><br />
|
5 |
-
<h2>¿Por qué descargar películas móviles hindi MP4 en 2018? </h2>
|
6 |
-
<h3>La popularidad y la demanda de las películas en hindi en 2018</h3>
|
7 |
-
<p>Las películas hindi, también conocidas como películas de Bollywood, son una de las formas más populares e influyentes de entretenimiento en la India y en el extranjero. Según un informe de Deloitte, la industria cinematográfica india generó unos ingresos de 2.600 millones de dólares en 2017, y se espera que crezca a una tasa de crecimiento anual compuesta (TCAC) del 11% hasta 2020. En 2018, Bollywood produjo más de 200 películas, cubriendo varios géneros como comedia, drama, romance, acción, thriller, horror, biopic y más. Algunas de estas películas fueron aclamadas por la crítica y comercialmente exitosas, rompiendo récords en la taquilla nacional e internacional. Por ejemplo, Sanju, una película biográfica sobre el controvertido actor Sanjay Dutt, se convirtió en la película india más taquillera de 2018, ganando más de 90 millones de dólares en todo el mundo. Del mismo modo, Padmaavat, un drama histórico basado en un poema del siglo XVI, se convirtió en la primera película india en cruzar 50 millones de dólares en mercados extranjeros. Estas películas no solo entretuvieron al público sino que también mostraron el talento y la diversidad del cine indio. </p>
|
8 |
-
<h3>Los beneficios y ventajas de descargar el formato MP4 para dispositivos móviles</h3>
|
9 |
-
|
10 |
-
<ul>
|
11 |
-
<li>Es compatible con la mayoría de los dispositivos móviles, como teléfonos inteligentes, tabletas, portátiles, etc.</li>
|
12 |
-
<li> Tiene una alta relación de compresión, lo que significa que puede reducir el tamaño del archivo sin perder mucha calidad. </li>
|
13 |
-
<li> Tiene velocidad de transmisión rápida, lo que significa que puede jugar sin problemas sin almacenamiento en búfer o retraso. </li>
|
14 |
-
<li> Tiene alta calidad, lo que significa que puede ofrecer imágenes claras y nítidas y sonido. </li>
|
15 |
-
</ul>
|
16 |
-
<p>Por lo tanto, descargar películas móviles Hindi MP4 en 2018 es una opción inteligente para cualquiera que quiera disfrutar de las películas de Bollywood en sus dispositivos móviles. </p>
|
17 |
-
<h2>¿Cómo descargar películas móviles hindi MP4 en 2018? </h2>
|
18 |
-
<h3>Los mejores y más seguros sitios web para descargar películas en hindi en formato MP4</h3>
|
19 |
-
<p>Hay muchos sitios web que ofrecen descargas gratuitas de películas en hindi en formato MP4. Sin embargo, no todos son confiables y seguros. Algunos pueden contener virus o malware que pueden dañar su dispositivo o robar su información personal. Algunos pueden tener enlaces rotos o descargas de baja calidad que pueden arruinar su experiencia de visualización. Algunos incluso pueden tener contenido ilegal o pirata que puede meterte en problemas con la ley. Por lo tanto, debe ser cuidadoso y selectivo al elegir un sitio web para descargar películas en hindi en formato MP4. Estos son algunos de los mejores y más seguros sitios web que recomendamos para descargar películas móviles Hindi MP4 en 2018:</p>
|
20 |
-
<tabla>
|
21 |
-
<tr>
|
22 |
-
<th>Sitio web</th>
|
23 |
-
<th>Características</th>
|
24 |
-
</tr>
|
25 |
-
<tr>
|
26 |
-
<td><a href=">Filmywap</a></td>
|
27 |
-
<td>- Un sitio web popular y de confianza que ofrece una gran colección de películas en hindi en formato MP4. <br>- También proporciona películas en otros idiomas, como Inglés, Tamil, Telugu, Punjabi, etc.<br>- Tiene una interfaz fácil de usar y fácil navegación. <br>- Actualiza su contenido regularmente y proporciona descargas de alta calidad. </td>
|
28 |
-
</tr>
|
29 |
-
<tr>
|
30 |
-
<td><a href=">MP4Moviez</a></td>
|
31 |
-
|
32 |
-
</tr>
|
33 |
-
<tr>
|
34 |
-
<td><a href=">Pagalworld</a></td>
|
35 |
-
<td>- Un sitio web muy conocido y de buena reputación que se especializa en películas en hindi en formato MP4. <br>- También cuenta con películas en otros formatos, como 3GP, AVI, MKV, etc.<br>- Tiene un diseño elegante y atractivo y muestra las últimas películas y tendencias en su página de inicio. <br>- Asegura descargas de alta calidad y tamaños de archivo bajos. </td>
|
36 |
-
</tr>
|
37 |
-
</tabla>
|
38 |
-
<h3>Los pasos y consejos para descargar películas en hindi en formato MP4 desde estos sitios web</h3>
|
39 |
-
<p>Descargar películas en hindi en formato MP4 desde estos sitios web no es difícil o complicado. Sin embargo, debe seguir algunos pasos y consejos para asegurarse de que tiene un proceso de descarga suave y seguro. Estos son algunos de los pasos y consejos que debes seguir:</p>
|
40 |
-
<p></p>
|
41 |
-
<ol>
|
42 |
-
<li>Elija un sitio web de la lista de arriba y visítelo en su navegador. </li>
|
43 |
-
<li>Busque la película que desea descargar utilizando la barra de búsqueda o navegando por las categorías. </li>
|
44 |
-
<li>Seleccione la película que desea descargar y haga clic en ella. </li>
|
45 |
-
<li>Elija el formato MP4 y la calidad que prefiere de las opciones disponibles. </li>
|
46 |
-
<li>Haga clic en el botón de descarga o enlace y espere a que comience la descarga. </li>
|
47 |
-
<li>Guarda el archivo en tu dispositivo y disfruta viéndolo. </li>
|
48 |
-
</ol>
|
49 |
-
<p>Algunos de los consejos que debes tener en cuenta son:</p>
|
50 |
-
<ul>
|
51 |
-
<li>Usa un servicio VPN o un servidor proxy para ocultar tu dirección IP y proteger tu privacidad. </li>
|
52 |
-
<li>Utilice un software antivirus o un escáner de malware para escanear el archivo antes de abrirlo. </li>
|
53 |
-
<li>Utilice un gestor de descargas o una aplicación de descarga para acelerar la descarga y reanudarla si se interrumpe. </li>
|
54 |
-
<li>Utilice un reproductor de vídeo o una aplicación de conversión para reproducir o convertir el archivo si es necesario. </li>
|
55 |
-
<li>Eliminar el archivo después de verlo para ahorrar espacio en su dispositivo. </li>
|
56 |
-
</ul>
|
57 |
-
<h2>¿Cuáles son las mejores películas móviles hindi MP4 en 2018? </h2> <h3>Las 10 mejores películas en hindi en 2018 según las clasificaciones de IMDb y las colecciones de taquilla</h3>
|
58 |
-
|
59 |
-
<tabla>
|
60 |
-
<tr>
|
61 |
-
<th>Rango</th>
|
62 |
-
<th>Título</th>
|
63 |
-
<th>IMDb Rating</th>
|
64 |
-
<th>Bruto mundial</th>
|
65 |
-
</tr>
|
66 |
-
<tr>
|
67 |
-
<td>1</td>
|
68 |
-
<td><a href=">Andhadhun</a></td>
|
69 |
-
<td>8.2/10</td>
|
70 |
-
<td>$56.9 millones</td>
|
71 |
-
</tr>
|
72 |
-
<tr>
|
73 |
-
<td>2</td>
|
74 |
-
<td><a href=">Sanju</a></td>
|
75 |
-
<td>7.6/10</td>
|
76 |
-
<td>$90 millones</td>
|
77 |
-
</tr>
|
78 |
-
<tr>
|
79 |
-
<td>3</td>
|
80 |
-
<td><a href=">Padmaavat</a></td>
|
81 |
-
<td>7/10</td>
|
82 |
-
<td>$88.5 millones</td>
|
83 |
-
</tr>
|
84 |
-
<tr>
|
85 |
-
<td>4</td>
|
86 |
-
<td><a href=">Badhaai Ho</a></td>
|
87 |
-
<td>7.9/10</td>
|
88 |
-
<td>$49.6 millones</td>
|
89 |
-
</tr>
|
90 |
-
<tr>
|
91 |
-
<td>5</td>
|
92 |
-
<td><a href=">Raazi</a></td>
|
93 |
-
<td>7.8/10</td>
|
94 |
-
<td>$38.4 millones</td>
|
95 |
-
</tr>
|
96 |
-
<tr>
|
97 |
-
<td>6</td>
|
98 |
-
<td><a href=">Stree</a></td>
|
99 |
-
<td>7.6/10</td <td>$28.9 millones</td>
|
100 |
-
</tr>
|
101 |
-
<tr>
|
102 |
-
<td>7</td>
|
103 |
-
<td><a href=">Hichki</a></td>
|
104 |
-
<td>7.5/10</td>
|
105 |
-
<td>$28.4 millones</td>
|
106 |
-
</tr>
|
107 |
-
<tr>
|
108 |
-
<td>8</td>
|
109 |
-
<td><a href="">Sonu Ke Titu Ki Sweety</a></td>
|
110 |
-
<td>7.1/10</td>
|
111 |
-
<td>$24.8 millones</td>
|
112 |
-
</tr>
|
113 |
-
<tr>
|
114 |
-
<td>9</td>
|
115 |
-
<td><a href=">Parmanu: La historia de Pokhran</a></td>
|
116 |
-
<td>7.6/10</td <td>$19.6 millones</td>
|
117 |
-
</tr>
|
118 |
-
<tr>
|
119 |
-
<td>10</td>
|
120 |
-
<td><a href=">102 Not Out</a></td>
|
121 |
-
<td>7.4/10</td <td>$17.3 millones</td>
|
122 |
-
</tr>
|
123 |
-
</tabla>
|
124 |
-
<h3>Una breve reseña y resumen de cada película con su enlace de tráiler</h3>
|
125 |
-
<p>Aquí hay algunos breves comentarios y resúmenes de cada película con sus enlaces de tráiler para su comodidad:</p>
|
126 |
-
<ol>
|
127 |
-
<li><b>Andhadhun:</b> Un thriller de comedia negra que gira en torno a un pianista ciego que se enreda en una serie de asesinatos después de presenciar un crimen. La película está llena de giros y vueltas que mantienen a los espectadores en el borde de sus asientos. La película también cuenta con actuaciones estelares de los actores principales, especialmente Ayushmann Khurrana, que ganó el Premio Nacional de Cine al Mejor Actor por su papel. La película fue elogiada por su originalidad, guion, dirección y música. Vea el tráiler <a href=">here. </a></li>
|
128 |
-
|
129 |
-
<li><b>Padmaavat:</b> Un drama histórico que representa la historia de Rani Padmavati, la reina de Chittor, quien cometió auto-inmolación junto con otras mujeres para proteger su honor del invasor sultán Alauddin Khilji, quien estaba obsesionado con su belleza. La película es un espectáculo visual que muestra la grandeza y la gloria de la cultura e historia Rajput. La película también cuenta con potentes actuaciones de los actores principales, especialmente Ranveer Singh, que interpretó el papel de Khilji con amenaza y carisma. La película fue apreciada por su cinematografía, vestuario, música y dirección. Vea el tráiler <a href=">aquí. </a></li>
|
130 |
-
<li><b>Badhaai Ho:</b> Un drama cómico que explora la incomodidad y la hilaridad que sobreviene cuando una pareja de mediana edad anuncia inesperadamente su embarazo a sus hijos adultos y a la sociedad. La película es una toma refrescante y relacionable sobre el tema tabú del embarazo tardío y la planificación familiar. La película también cuenta con excelentes actuaciones del elenco, especialmente Neena Gupta y Gajraj Rao, que interpretaron el papel de la pareja embarazada con gracia y humor. La película fue elogiada por su guion, diálogos, dirección y mensaje. Vea el trailer <a href=">here. </a></li>
|
131 |
-
<li><b>Raazi:</b> Un thriller de espías que cuenta la verdadera historia de Sehmat Khan, una mujer india que se casó con un oficial del ejército pakistaní y se convirtió en agente encubierto para la India durante la guerra Indo-Pak de 1971. La película es un retrato apasionante y realista de los peligros y sacrificios involucrados en el espionaje y el patriotismo. La película también cuenta con una destacada actuación de Alia Bhatt, quien interpretó el papel de Sehmat con coraje y convicción. La película fue elogiada por su guion, dirección, actuación y música. Vea el tráiler <a href=">here. </a></li>
|
132 |
-
|
133 |
-
<li><b>Hichki:</b> Un drama que sigue el viaje de Naina Mathur, una mujer que sufre de síndrome de Tourette y se convierte en maestra para un grupo de estudiantes desfavorecidos. La película es una historia inspiradora y conmovedora de superar desafíos y prejuicios y hacer una diferencia. La película también cuenta con una actuación notable de Rani Mukerji, que interpretó el papel de Naina con autenticidad y sensibilidad. La película fue aplaudida por su trama, dirección, actuación y mensaje. Vea el trailer <a href=">aquí. </a></li>
|
134 |
-
<li><b>Sonu Ke Titu Ki Sweety:</b> Una comedia que gira en torno a la amistad entre Sonu y Titu, que son amigos de la infancia, y el romance entre Titu y Sweety, que están comprometidos para casarse. La película es una hilarante e ingeniosa batalla de ingenio entre Sonu y Sweety, que tratan de demostrar su lealtad y amor por Titu. La película también cuenta con brillantes actuaciones de los actores principales, especialmente Kartik Aaryan y Nushrat Bharucha, que interpretaron el papel de Sonu y Sweety con encanto y carisma. La película fue admirada por su humor, diálogos, dirección y música. Vea el trailer <a href=">here. </a></li>
|
135 |
-
<li><b>Parmanu: La historia de Pokhran:</b> Un thriller que representa la verdadera historia de los ensayos nucleares realizados por la India en Pokhran en 1998, que hizo de la India una potencia nuclear. La película es un relato emocionante y patriótico de la operación encubierta que involucró altos riesgos y desafíos. La película también cuenta con una espléndida actuación de John Abraham, que interpretó el papel de Ashwat Raina, el líder del equipo de operación. La película fue apreciada por su guion, dirección, actuación y acción. Vea el trailer <a href=">here. </a></li>
|
136 |
-
|
137 |
-
</ol>
|
138 |
-
<h2>Conclusión</h2>
|
139 |
-
<p>En conclusión, descargar películas móviles Hindi MP4 en 2018 es una gran manera de disfrutar de algunas de las mejores películas de Bollywood en sus dispositivos móviles. Puede descargarlos de algunos de los mejores y más seguros sitios web que hemos enumerado anteriormente. También puede elegir entre algunas de las 10 mejores películas en hindi en 2018 que hemos revisado y resumido para usted. Estas películas te entretendrán, te inspirarán, te harán reír, te harán llorar o te harán pensar. ¿Qué estás esperando? ¡Descargue hoy sus películas móviles Hindi MP4 favoritas en 2018 y diviértase! </p>
|
140 |
-
<h2>Preguntas frecuentes</h2>
|
141 |
-
<p>Estas son algunas de las preguntas más frecuentes (preguntas frecuentes) que puede tener sobre la descarga de películas móviles Hindi MP4 en 2018:</p>
|
142 |
-
<ol>
|
143 |
-
<li><b>P: ¿Es legal descargar películas móviles Hindi MP4 en 2018? </b><br>A: Depende de la fuente y el contenido de las películas que descargues. Algunos sitios web pueden ofrecer contenido legal y con licencia que puede descargar de forma gratuita o por un cargo. Algunos sitios web pueden ofrecer contenido ilegal o pirata que usted debe evitar la descarga, ya que puede violar las leyes de derechos de autor o los términos y condiciones de los sitios web. Por lo tanto, siempre debe comprobar la legalidad y la calidad del contenido antes de descargarlo. </li>
|
144 |
-
<li><b>Q: ¿Cómo puedo descargar películas móviles Hindi MP4 en 2018 más rápido y más fácil? </b><br>A: Puede utilizar algunas herramientas y aplicaciones que pueden ayudarle a descargar películas móviles Hindi MP4 en 2018 más rápido y más fácil. Por ejemplo, puede usar un servicio VPN o un servidor proxy para evitar cualquier restricción geográfica o censura que pueda impedirle acceder a algunos sitios web. También puede utilizar un software antivirus o un escáner de malware para proteger su dispositivo de cualquier virus o malware que pueda venir con las descargas. También puede usar un administrador de descargas o una aplicación de descarga para acelerar la descarga y reanudarla si se interrumpe. También puede utilizar un reproductor de vídeo o una aplicación de conversión para reproducir o convertir las descargas si es necesario. </li>
|
145 |
-
|
146 |
-
<li><b>P: ¿Cuáles son algunos de los otros sitios web desde los que puedo descargar películas en hindi? </b><br>A: Además de los sitios web que hemos enumerado anteriormente, también puede descargar películas en hindi de otros sitios web, como Moviespur, Filmyzilla, Worldfree4u, etc. Sin embargo, estos sitios web pueden no ser tan confiables y seguros como los que hemos recomendado. Por lo tanto, debe tener cuidado y precaución al usar estos sitios web y seguir los pasos y consejos que hemos mencionado anteriormente. </li>
|
147 |
-
<li><b>Q: ¿Cuáles son algunas de las otras fuentes desde las que puedo ver películas en hindi? </b><br>A: Además de descargar películas hindi, también puedes verlas desde otras fuentes, como plataformas de streaming, canales de TV, alquiler de DVD, etc. Sin embargo, estas fuentes pueden tener algunas limitaciones o inconvenientes en comparación con la descarga de películas hindi, tales como un mayor costo, menor disponibilidad, menor comodidad o menor control. Por lo tanto, debe elegir la fuente que mejor se adapte a su presupuesto y preferencia. </li>
|
148 |
-
</ol>
|
149 |
-
<p>Espero que este artículo te haya ayudado a aprender más sobre cómo descargar películas móviles Hindi MP4 en 2018. Si usted tiene alguna pregunta o retroalimentación, por favor no dude en dejar un comentario a continuación. Gracias por leer y descargar feliz! </p> 64aa2da5cf<br />
|
150 |
-
<br />
|
151 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/3D Juego De Conduccin Apk.md
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Juego de conducción 3D APK: Una manera divertida y realista para aprender habilidades de conducción</h1>
|
3 |
-
<p>¿Quieres aprender a conducir un coche, un autobús, un camión o incluso un tanque? ¿Desea experimentar la conducción en diferentes países, condiciones climáticas y situaciones de tráfico? ¿Quieres divertirte y desafiarte con varias misiones y modos? Si respondió sí a cualquiera de estas preguntas, entonces usted debe descargar un juego de conducción 3D APK en su dispositivo Android. </p>
|
4 |
-
<h2>¿Qué es un juego de conducción 3D APK? </h2>
|
5 |
-
<p>Un juego de conducción 3D APK es un archivo que contiene una aplicación para Android que le permite jugar un juego de conducción 3D en su dispositivo. Hay dos componentes principales de un juego de conducción 3D APK: un archivo APK y un juego de conducción 3D. </p>
|
6 |
-
<h2>3D juego de conducción apk</h2><br /><p><b><b>DOWNLOAD</b> • <a href="https://bltlly.com/2v6LdT">https://bltlly.com/2v6LdT</a></b></p><br /><br />
|
7 |
-
<h3>Un archivo APK es un paquete de aplicaciones Android</h3>
|
8 |
-
<p>Un archivo APK es un archivo comprimido que contiene todos los archivos y datos necesarios para que una aplicación Android se ejecute en su dispositivo. Es similar a un archivo ejecutable (.exe) para Windows o un archivo de paquete (.pkg) para Mac. Un archivo APK se puede descargar de varias fuentes, como tiendas de aplicaciones oficiales, sitios web de terceros o enlaces directos. </p>
|
9 |
-
<h3>Un juego de conducción en 3D es un juego de simulación que te permite conducir diferentes vehículos en entornos realistas</h3>
|
10 |
-
<p>Un juego de conducción en 3D es un tipo de juego de simulación que utiliza gráficos en 3D y la física para crear experiencias de conducción realistas e inmersivas. Puede elegir entre diferentes vehículos, como automóviles, autobuses, camiones o tanques, y conducirlos en varios entornos, como ciudades, carreteras, desiertos o montañas. También puede seguir diferentes reglas y reglamentos, como semáforos, límites de velocidad o señales de estacionamiento, dependiendo del país en el que conduce. Un juego de conducción en 3D suele tener diferentes misiones y modos, como autoescuela, roaming gratuito, carreras o multijugador, que ponen a prueba tus habilidades de conducción y proporcionan diversión y desafío. </p>
|
11 |
-
<h2> ¿Por qué debe descargar un juego de conducción 3D APK? </h2>
|
12 |
-
|
13 |
-
<h4>Puedes aprender reglas y regulaciones de conducción en diferentes países</h4>
|
14 |
-
<p>Si quieres aprender a conducir en diferentes países, como Corea, Japón, EE.UU., o Alemania, se puede descargar un juego de conducción 3D APK que ofrece esta característica. Usted puede aprender las diferencias en las leyes de tráfico, señales de tráfico, marcas de carril, y la etiqueta de conducción en cada país. Esto puede ayudarle a prepararse para su examen de conducir o licencia, o simplemente ampliar su conocimiento y conciencia de la cultura global de conducción. </p>
|
15 |
-
<h4> Puede mejorar sus habilidades de conducción y la confianza</h4>
|
16 |
-
<p>Si desea mejorar sus habilidades de conducción y confianza, puede descargar un juego de conducción 3D APK que ofrece esta característica. Puede practicar sus habilidades de conducción en varios escenarios, como estacionamiento, marcha atrás, giro, adelantamiento o frenado de emergencia. También puede ajustar el nivel de dificultad, las condiciones meteorológicas, la densidad de tráfico o la hora del día para satisfacer sus necesidades y preferencias. También puedes obtener comentarios y consejos del juego para ayudarte a mejorar tu rendimiento y evitar errores. </p>
|
17 |
-
<h4>Puedes divertirte y desafiarte con diferentes misiones y modos</h4>
|
18 |
-
<p>Si quieres divertirte y desafiarte con diferentes misiones y modos, puedes descargar un juego de conducción 3D APK que ofrece esta característica. Puedes elegir entre diferentes misiones, como autoescuela, roaming gratuito, carreras o multijugador, que tienen diferentes objetivos y recompensas. También puedes competir con otros jugadores en línea o fuera de línea, o cooperar con ellos en modos basados en equipos. También puedes ganar monedas y puntos que puedes usar para desbloquear nuevos vehículos, mejoras o logros. </p>
|
19 |
-
<h4>Puedes personalizar tus vehículos y ajustes de acuerdo a tus preferencias</h4>
|
20 |
-
|
21 |
-
<h2> ¿Cómo descargar e instalar un juego de conducción 3D APK? </h2>
|
22 |
-
<p>Si usted está interesado en descargar e instalar un juego de conducción 3D APK en su dispositivo Android, es necesario seguir estos sencillos pasos:</p>
|
23 |
-
<h3> Es necesario encontrar una fuente confiable y segura para descargar un juego de conducción 3D APK</h3>
|
24 |
-
<p>Hay muchas fuentes para descargar un juego de conducción 3D APK en Internet, pero no todos son fiables y seguros. Algunos de ellos pueden contener virus, malware o spyware que pueden dañar su dispositivo o robar su información personal. Por lo tanto, es necesario tener cuidado y elegir una fuente confiable para descargar un juego de conducción 3D APK.</p>
|
25 |
-
<h4>Puede utilizar el enlace proporcionado en este artículo para descargar 3D Driving Class, uno de los mejores juegos de conducción 3D disponibles para dispositivos Android</h4>
|
26 |
-
<p>Una de las mejores fuentes para descargar un juego de conducción 3D APK es el enlace proporcionado en este artículo. Este enlace te llevará al sitio web oficial de 3D Driving Class, uno de los juegos de conducción 3D más populares y realistas para dispositivos Android. Este juego tiene más de 10 millones de descargas y 4.4 estrellas en Google Play Store. Ofrece todas las características y beneficios mencionados anteriormente, como aprender las reglas de conducción y las regulaciones en diferentes países, mejorar las habilidades de conducción y la confianza, divertirse y desafiarse con diferentes misiones y modos, y personalización de sus vehículos y ajustes según sus preferencias. </p>
|
27 |
-
<p></p>
|
28 |
-
<h3>Necesitas habilitar la instalación de fuentes desconocidas en tu dispositivo</h3>
|
29 |
-
<p>Antes de que pueda instalar un juego de conducción 3D APK en su dispositivo, es necesario habilitar la instalación de fuentes desconocidas en su dispositivo. Esto se debe a que un archivo APK no es de una tienda de aplicaciones oficial, como Google Play Store o Amazon Appstore. Por lo tanto, debe permitir que su dispositivo instale aplicaciones de fuentes distintas de estas tiendas de aplicaciones. </p>
|
30 |
-
<h4> Puede hacer esto yendo a la configuración del dispositivo, la seguridad y permitiendo fuentes desconocidas</h4>
|
31 |
-
|
32 |
-
<p>Después de haber descargado el archivo APK juego de conducción 3D y habilitado la instalación de fuentes desconocidas en el dispositivo, es necesario localizar el archivo APK descargado y toque en él para instalarlo. Puedes hacer esto siguiendo estos pasos:</p>
|
33 |
-
<h4>Puede usar una aplicación de administrador de archivos o la carpeta de descargas de su dispositivo para encontrar el archivo APK</h4>
|
34 |
-
<p>Para localizar el archivo APK descargado, puede usar una aplicación de administrador de archivos o la carpeta de descargas de su dispositivo. Una aplicación de administrador de archivos es una aplicación que le permite navegar, organizar y administrar los archivos y carpetas en su dispositivo. Puede descargar una aplicación de administrador de archivos desde Google Play Store o Amazon Appstore, como ES File Explorer, Administrador de archivos o Archivos de Google. Una carpeta de descargas es una carpeta predeterminada en su dispositivo donde se almacenan todos los archivos que descarga de Internet. Puedes acceder a tu carpeta de descargas yendo al cajón de aplicaciones o a la pantalla de inicio de tu dispositivo y tocando las descargas. </p>
|
35 |
-
<p>Una vez que haya encontrado el archivo APK del juego de conducción 3D, toque en él para iniciar el proceso de instalación. Puede ver una ventana emergente que le pide permiso para instalar la aplicación. Pulse Instalar o Siguiente para continuar. Espera a que termine la instalación y luego toca Abrir o Listo para iniciar o salir del juego. </p>
|
36 |
-
<h2>Conclusión</h2>
|
37 |
-
|
38 |
-
<h2>Preguntas frecuentes</h2>
|
39 |
-
<p>Aquí están algunas de las preguntas más frecuentes sobre 3D juego de conducción APK:</p>
|
40 |
-
<tabla>
|
41 |
-
<tr><td><b>Question</b></td><td><b>Answer</b></td></tr>
|
42 |
-
<tr><td>¿Cuáles son los requisitos para descargar e instalar un juego de conducción 3D APK? </td><td>Necesitas un dispositivo Android que tenga suficiente espacio de almacenamiento, memoria y batería para ejecutar el juego sin problemas. También necesitas una conexión a Internet para descargar el archivo APK y acceder a algunas de las funciones en línea del juego. </td></tr>
|
43 |
-
<tr><td>¿Es la descarga e instalación de un juego de conducción 3D APK legal y seguro? </td><td>Descargar e instalar un juego de conducción 3D APK es legal y seguro, siempre y cuando utilice una fuente confiable, como el enlace proporcionado en este artículo. Sin embargo, debes tener cuidado con otras fuentes que puedan contener virus, malware o spyware que puedan dañar tu dispositivo o robar tu información personal. </td></tr>
|
44 |
-
<tr><td>¿Cómo puedo actualizar un juego de conducción 3D APK? </td><td>Puede actualizar un juego de conducción 3D APK mediante la descarga e instalación de la última versión del archivo APK de la misma fuente que utilizó antes. También puedes buscar actualizaciones en la configuración del juego o notificaciones. </td></tr>
|
45 |
-
<tr><td>¿Cómo puedo desinstalar un juego de conducción 3D APK? </td><td>Puede desinstalar un juego de conducción 3D APK yendo a la configuración del dispositivo, aplicaciones, y encontrar el juego que desea desinstalar. Toque en él y luego toque en Desinstalar o Quitar. Confirme su elección tocando en OK o Yes.</td></tr>
|
46 |
-
<tr><td>¿Cuáles son algunos de los mejores juegos de conducción 3D para dispositivos Android? </td><td>Algunos de los mejores juegos de conducción 3D para dispositivos Android son 3D Driving Class, Driving School Sim, Car Parking Multijugador, Simulador de autobús: Ultimate, Truck Simulator: Europe 2, Tank Stars, and Extreme Car Driving Simulator.</td></tr>
|
47 |
-
</tabla></p> 64aa2da5cf<br />
|
48 |
-
<br />
|
49 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Aparcamiento De Coches Multijugador Mod Apk Datos 4.7 4.md
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Aparcamiento Multijugador Mod APK Data 4.7 4: Todo lo que necesitas saber</h1>
|
3 |
-
<p>Si usted es un fan de los juegos de coches, es posible que haya oído hablar de Car Parking Multijugador, un juego de simulador de aparcamiento de mundo abierto popular para dispositivos Android. Desarrollado por olzhass, este juego te permite conducir, aparcar, correr o incluso evadir a la policía en un entorno realista con más de 100 coches para elegir y personalizar. </p>
|
4 |
-
<h2>aparcamiento de coches multijugador mod apk datos 4.7 4</h2><br /><p><b><b>Download Zip</b> ★★★ <a href="https://bltlly.com/2v6Jp4">https://bltlly.com/2v6Jp4</a></b></p><br /><br />
|
5 |
-
<p>Pero ¿y si quieres disfrutar del juego sin limitaciones ni restricciones? ¿Qué pasa si quieres tener dinero y recursos ilimitados, desbloquear todos los coches y características, y eliminar anuncios del juego? Bueno, hay una manera de hacer eso, y se llama Aparcamiento de coches multijugador Mod APK Data 4.7 4.</p>
|
6 |
-
<p>En este artículo, te diremos todo lo que necesitas saber sobre esta versión modificada del juego, incluyendo sus características, cómo descargarlo e instalarlo, sus pros y contras, y algunas alternativas que puedes probar. Así que, sin más preámbulos, empecemos. </p>
|
7 |
-
<h2>Características de aparcamiento multijugador Mod APK Data 4.7 4</h2>
|
8 |
-
<p>Aparcamiento Multijugador Mod APK Data 4.7 4 es una versión modificada del juego original que le da acceso a todas las características premium y contenido de forma gratuita. Estas son algunas de las características que puedes disfrutar con este mod:</p>
|
9 |
-
<ul>
|
10 |
-
<li><b>Simulador de estacionamiento de mundo abierto con gráficos y física realistas:</b> El juego te ofrece una experiencia de conducción realista con gráficos y física de alta calidad. Puede explorar diferentes lugares, como ciudades, aeropuertos, desiertos, montañas, etc., y aparcar su coche en varios escenarios. </li>
|
11 |
-
<li><b>Más de 100 coches para elegir y personalizar:</b> El juego tiene una gran colección de coches de diferentes categorías, como clásicos, coches deportivos, camiones, SUV, etc. También puede personalizar su coche con diferentes colores de pintura, vinilos, calcomanías, piezas, etc.</li>
|
12 |
-
|
13 |
-
<li><b>Modo multijugador en línea para competir o cooperar con otros jugadores:</b <p>El juego también tiene un modo multijugador en línea, donde puede unirse o crear una habitación y jugar con otros jugadores de todo el mundo. Puede competir con ellos en el modo de carreras o de estacionamiento, o cooperar con ellos en el modo de policía o en el modo libre. También puedes chatear con ellos, intercambiar coches y hacer amigos. </p>
|
14 |
-
<li><b>Modo de policía para experimentar emocionantes persecuciones y escapes:</b> El juego también tiene un modo de policía, donde se puede jugar como un policía o un criminal. Si juegas como policía, tienes que perseguir y atrapar a los criminales que están infringiendo la ley. Si juegas como un criminal, tienes que evadir a los policías y escapar de ellos. También puedes usar diferentes armas y gadgets, como pistolas, granadas, picos, etc., para ayudarte en tu misión. </li>
|
15 |
-
<li><b>Interiores de coches reales, gasolineras, lavaderos de coches, y más:</b> El juego también tiene interiores de coches realistas, donde se puede ver el salpicadero, volante, pedales, etc., de su coche. También puede interactuar con ellos, como encender las luces, tocar el claxon, abrir las puertas, etc. También puede visitar estaciones de servicio para llenar su tanque de combustible, lavaderos de autos para limpiar su automóvil y otros lugares para mejorar su juego. </li>
|
16 |
-
</ul>
|
17 |
-
<h2> Cómo descargar e instalar el aparcamiento de coches multijugador Mod APK Data 4.7 4</h2>
|
18 |
-
<p>Si usted está interesado en descargar e instalar Car Parking Multijugador Mod APK Data 4.7 4 en su dispositivo Android, puede seguir estos sencillos pasos:</p>
|
19 |
-
<ol>
|
20 |
-
<li><b>Descargar el archivo APK de una fuente de confianza:</b> El primer paso es descargar el archivo APK del mod de una fuente confiable. Puede utilizar el siguiente enlace para descargarlo directamente desde nuestro sitio web. El tamaño del archivo es de unos 26 MB y es libre de virus y seguro de usar. </li>
|
21 |
-
|
22 |
-
<li><b>Instale el archivo APK y espere a que la instalación se complete:</b> El tercer paso es instalar el archivo APK que descargó en el primer paso. Para hacer esto, localice el archivo en su administrador de archivos y toque en él. Luego, siga las instrucciones en la pantalla y espere a que termine la instalación. </li>
|
23 |
-
<li><b>Descargar el archivo de datos de la misma fuente que el archivo APK:</b> El cuarto paso es descargar el archivo de datos del mod de la misma fuente que el archivo APK. Puede utilizar el siguiente enlace para descargarlo directamente desde nuestro sitio web. El tamaño del archivo es de unos 300 MB y contiene todos los datos y recursos del juego. </li>
|
24 |
-
<li><b>Extraiga el archivo de datos y copie la carpeta al directorio de Android/obb en su dispositivo:</b> El quinto paso es extraer el archivo de datos que descargó en el cuarto paso. Para ello, necesitará una aplicación extractora de archivos, como ZArchiver o RAR. Luego, abra la aplicación y busque el archivo de datos en su administrador de archivos. Toque en él y seleccione Extraer aquí. Obtendrá una carpeta llamada com.olzhas.carparking.multyplayer. Copia esta carpeta y pégala en el directorio Android/obb de tu dispositivo. </li>
|
25 |
-
<li><b>Lanza el juego y disfruta:</b> El paso final es lanzar el juego y disfrutar jugando con todas las características mod. Para ello, ve al cajón de la aplicación y toca el icono del juego. Luego, espera a que se cargue y empieza a jugar. </li>
|
26 |
-
</ol>
|
27 |
-
<h2> Pros y contras de aparcamiento multijugador Mod APK datos 4.7 4</h2>
|
28 |
-
<p>Aparcamiento Multijugador Mod APK Data 4.7 4 tiene muchas ventajas y desventajas que usted debe tener en cuenta antes de descargar e instalar. Estos son algunos de ellos:</p>
|
29 |
-
<p></p>
|
30 |
-
<tabla>
|
31 |
-
<tr>
|
32 |
-
<th>Pros</th>
|
33 |
-
<th>Contras</th>
|
34 |
-
</tr>
|
35 |
-
<tr>
|
36 |
-
<td>- Descargar y jugar gratis</td>
|
37 |
-
<td>- Puede que no sea compatible con algunos dispositivos</td>
|
38 |
-
</tr>
|
39 |
-
<tr>
|
40 |
-
<td>- Dinero y recursos ilimitados</td>
|
41 |
-
<td>- Puede causar retraso o fallos</td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td>- Desbloqueado todos los coches y características</td>
|
45 |
-
<td>- Puede ser detectado por sistemas anti-cheat</td>
|
46 |
-
</tr>
|
47 |
-
<tr>
|
48 |
-
<td>- No hay anuncios</td>
|
49 |
-
|
50 |
-
</tr>
|
51 |
-
<tr>
|
52 |
-
<td>- No se requiere raíz</td>
|
53 |
-
<td></td>
|
54 |
-
</tr>
|
55 |
-
</tabla>
|
56 |
-
<h2>Alternativas a Parking Multijugador Mod APK Data 4.7 4</h2> <p>Si usted está buscando algunas alternativas a Car Parking Multijugador Mod APK Data 4.7 4, puede probar estos otros juegos de aparcamiento que también son divertidos y desafiantes:</p>
|
57 |
-
<ul>
|
58 |
-
<li><b>Real Car Parking 2: Driving School 2020:</b> Este es otro juego de simulador de aparcamiento realista que le permite aprender a conducir y aparcar diferentes coches en diversas situaciones. También puede personalizar su coche, disfrutar de los gráficos en 3D, y jugar en línea con otros jugadores. Puedes descargarlo desde Google Play Store o desde [este enlace]. </li>
|
59 |
-
<li><b>Dr. Parking 4:</b> Este es un juego de aparcamiento de coches simple pero adictivo que pone a prueba su velocidad y precisión. Usted tiene que aparcar su coche en el lugar dado dentro del límite de tiempo y sin chocar con ningún obstáculo. También puedes jugar online con otros jugadores y desafiarlos. Puedes descargarlo desde la Google Play Store o desde [este enlace]. </li>
|
60 |
-
<li><b>Parking Jam 3D:</b> Este es un juego de aparcamiento de coches casual y relajante que requiere que limpie el atasco de tráfico moviendo los coches en el orden correcto. Tienes que usar tu lógica y estrategia para resolver los puzzles y liberar los coches. También puedes disfrutar de los coloridos gráficos y sonidos. Puedes descargarlo desde Google Play Store o desde [este enlace]. </li>
|
61 |
-
<li><b>Conducción manual de coches:</b> Este es un juego de conducción de coches realista que le permite aprender a conducir un coche manual con un embrague y palanca de cambios. Tienes que seguir las reglas de tráfico y las señales, y aparcar tu coche en el lugar correcto. También puedes explorar diferentes mapas y escenarios. Puedes descargarlo desde Google Play Store o desde [este enlace]. </li>
|
62 |
-
|
63 |
-
</ul>
|
64 |
-
<h2>Conclusión</h2>
|
65 |
-
<p>Car Parking Multijugador Mod APK Data 4.7 4 es una gran opción para los amantes de los coches que quieren disfrutar de un juego de simulador de aparcamiento realista y emocionante con dinero y recursos ilimitados, desbloqueado todos los coches y características, sin anuncios, sin raíz necesaria, y más. Sin embargo, también tiene algunos inconvenientes, como problemas de compatibilidad, retardo o fallos, detección anti-cheat y términos de violación del servicio. </p>
|
66 |
-
<p>Si desea descargar e instalar esta versión modificada del juego, puede seguir los pasos que hemos proporcionado en este artículo. Alternativamente, también puedes probar algunos de los otros juegos de estacionamiento que hemos sugerido. </p>
|
67 |
-
<p>Esperamos que este artículo haya sido útil e informativo para usted. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación. Gracias por leer. </p>
|
68 |
-
<h3>Preguntas frecuentes</h3>
|
69 |
-
<p>Aquí están algunas de las preguntas más frecuentes sobre Aparcamiento Multijugador Mod APK Data 4.7 4:</p>
|
70 |
-
<ol>
|
71 |
-
<li><b> ¿Es el estacionamiento de coches multijugador Mod APK Data 4.7 4 seguro de usar? </b></li>
|
72 |
-
<p>Sí, Aparcamiento multijugador Mod APK Data 4.7 4 es seguro de usar, siempre y cuando se descarga de una fuente de confianza y siga las instrucciones de instalación cuidadosamente. Sin embargo, no podemos garantizar que no causará ningún daño a su dispositivo o cuenta, así que úselo bajo su propio riesgo. </p>
|
73 |
-
<li><b> ¿Tengo que rootear mi dispositivo para usar Car Parking Multiplayer Mod APK Data 4.7 4?</b></li>
|
74 |
-
<p>No, no es necesario rootear el dispositivo para usar Car Parking Multijugador Mod APK Data 4.7 4. Funciona tanto en dispositivos arraigados y no arraigados. </p>
|
75 |
-
<li><b>¿Se me prohibirá el uso de Aparcamiento Multijugador Mod APK Data 4.7 4?</b></li>
|
76 |
-
<p>Posiblemente, sí. El uso de Aparcamiento Multijugador Mod APK Data 4.7 4 puede ser detectado por los sistemas anti-cheat del juego original y resultar en una prohibición o suspensión de su cuenta. Por lo tanto, le aconsejamos que lo utilice con precaución y discreción. </p>
|
77 |
-
|
78 |
-
<p>Sí, puede jugar en línea con otros jugadores usando Car Parking Multijugador Mod APK Data 4.7 4. Sin embargo, puede encontrar algunos problemas o errores al hacerlo, como versiones no coincidentes, problemas de conexión, etc.</p>
|
79 |
-
<li><b p>¿Puedo actualizar los datos de APK de Mod de estacionamiento multijugador 4.7 4?</b></li>
|
80 |
-
<p>No, no se puede actualizar Car Parking Multijugador Mod APK Data 4.7 4. Si intenta actualizarlo desde la Google Play Store o el sitio web oficial del juego, perderá todas las características y datos de mod. Por lo tanto, le recomendamos que siga con la versión actual del mod y compruebe si hay nuevas actualizaciones de la fuente desde la que lo descargó. </p>
|
81 |
-
</ol></p> 64aa2da5cf<br />
|
82 |
-
<br />
|
83 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Descargar Apk Kinemaster Mod Digitbin 2021.md
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Kinemaster Mod Digitbin APK Descargar 2021: Una guía completa</h1>
|
3 |
-
<p>Si está buscando una aplicación de editor de vídeo potente y fácil de usar para su dispositivo Android, es posible que haya oído hablar de Kinemaster. Es una de las aplicaciones de edición de video más populares que ofrece muchas características y herramientas para crear videos impresionantes. Sin embargo, la versión gratuita de Kinemaster tiene algunas limitaciones, como una marca de agua, anuncios y acceso restringido a algunas características premium. </p>
|
4 |
-
<p>Es por eso que muchos usuarios buscan una versión modificada de Kinemaster que pueda eliminar estas limitaciones y desbloquear todas las características. Una de las mejores versiones modificadas de Kinemaster es el Kinemaster Mod Digitbin APK, que es desarrollado por DigitBin.com. En este artículo, le diremos todo lo que necesita saber sobre esta versión modificada, cómo descargarla e instalarla en su dispositivo Android y cómo usarla para editar videos. ¡Vamos a empezar! </p>
|
5 |
-
<h2>descargar apk kinemaster mod digitbin 2021</h2><br /><p><b><b>Download File</b> ✒ ✒ ✒ <a href="https://bltlly.com/2v6KjH">https://bltlly.com/2v6KjH</a></b></p><br /><br />
|
6 |
-
<h2>¿Qué es Kinemaster Mod Digitbin APK? </h2>
|
7 |
-
<p>Kinemaster Mod Digitbin APK es una versión modificada de la aplicación original de Kinemaster que elimina la marca de agua, anuncios, y desbloquea todas las características premium. También añade algunas características adicionales, como la clave de croma, que le permite cambiar el fondo de sus vídeos con cualquier imagen o vídeo. Con esta versión modificada, puedes disfrutar de todos los beneficios de Kinemaster sin pagar nada. </p>
|
8 |
-
<h3>Características de Kinemaster Mod Digitbin APK</h3>
|
9 |
-
<p>Aquí están algunas de las principales características de Kinemaster Mod Digitbin APK que lo hacen diferente de la aplicación original:</p>
|
10 |
-
<h4>Ninguna marca de agua</h4>
|
11 |
-
<p>Una de las cosas más molestas de la versión gratuita de Kinemaster es que añade una marca de agua a tus vídeos cuando los exportas. Esto puede arruinar tu aspecto profesional y hacer que tus videos sean menos atractivos. Con Kinemaster Mod Digitbin APK, puede eliminar la marca de agua de sus vídeos y hacerlos ver más pulido y profesional. </p>
|
12 |
-
<h4>No hay anuncios</h4>
|
13 |
-
|
14 |
-
<h4>Clave de croma</h4>
|
15 |
-
<p>Chroma key es una función que te permite cambiar el fondo de tus vídeos con cualquier imagen o vídeo. Esto puede ser muy útil para crear efectos especiales, como pantalla verde, o para cambiar el estado de ánimo o la atmósfera de sus videos. La versión original de Kinemaster solo admite la clave de croma para algunos dispositivos, pero con Kinemaster Mod Digitbin APK, puede usar la clave de croma en cualquier dispositivo. </p>
|
16 |
-
<h4>Características premium desbloqueadas</h4>
|
17 |
-
<p>Kinemaster tiene algunas características premium que solo están disponibles para los usuarios que pagan una suscripción mensual o anual. Estas características incluyen más temas, efectos, transiciones, pegatinas, fuentes, música y efectos de sonido. Con Kinemaster Mod Digitbin APK, puede acceder a todas estas características premium de forma gratuita y mejorar sus vídeos con más creatividad y variedad. </p>
|
18 |
-
<h2>Cómo descargar e instalar Kinemaster Mod Digitbin APK para Android</h2>
|
19 |
-
<p>Si desea descargar e instalar Kinemaster Mod Digitbin APK en su dispositivo Android, es necesario seguir estos sencillos pasos:</p>
|
20 |
-
<p></p>
|
21 |
-
<h3>Paso 1: Habilitar fuentes desconocidas</h3>
|
22 |
-
<p>Dado que Kinemaster Mod Digitbin APK no está disponible en el Google Play Store, es necesario habilitar fuentes desconocidas en la configuración del dispositivo. Esto le permitirá instalar aplicaciones de fuentes de terceros. Para hacer esto, vaya a Configuración > Seguridad > Fuentes desconocidas y active. </p>
|
23 |
-
<h3>Paso 2: Descargar el archivo APK desde el enlace de abajo</h3>
|
24 |
-
<p>Siguiente, es necesario descargar el archivo APK de Kinemaster Mod Digitbin APK desde el enlace de abajo. Este es un enlace seguro y verificado que no dañará su dispositivo o datos. Haga clic en el enlace y espere a que se complete la descarga. </p>
|
25 |
-
<p><a href="">Kinemaster Mod Digitbin APK Enlace de descarga</a></p>
|
26 |
-
<h3>Paso 3: Instalar el archivo APK en su dispositivo</h3>
|
27 |
-
|
28 |
-
<h3>Paso 4: Iniciar la aplicación y disfrutar de la edición de vídeos</h3>
|
29 |
-
<p>Finalmente, puede iniciar la aplicación desde el cajón de la aplicación o la pantalla de inicio y comenzar a editar videos con Kinemaster Mod Digitbin APK. Verá que no hay marca de agua, no hay anuncios, y todas las características premium están desbloqueadas. También puedes usar la tecla Chroma en cualquier dispositivo y crear vídeos increíbles con diferentes fondos. </p>
|
30 |
-
<h2>Cómo utilizar Kinemaster Mod Digitbin APK para la edición de vídeo</h2>
|
31 |
-
<p>Kinemaster Mod Digitbin APK es muy fácil de usar para la edición de vídeo. Tiene una interfaz fácil de usar que le permite acceder a todas las características y herramientas con unos pocos toques. Aquí hay algunos consejos sobre cómo utilizar Kinemaster Mod Digitbin APK para la edición de vídeo:</p>
|
32 |
-
<h3>Explorar la interfaz de usuario</h3>
|
33 |
-
<p>Cuando inicie la aplicación, verá una pantalla de bienvenida que le brinda tres opciones: Nuevo proyecto, Proyectos de navegador y Configuración. Toque en Nuevo proyecto para iniciar un nuevo proyecto de vídeo. A continuación, verá una pantalla que muestra el navegador multimedia, la línea de tiempo, la ventana de vista previa y la barra de herramientas. </p>
|
34 |
-
<p>El navegador de medios le permite importar archivos multimedia desde su dispositivo de almacenamiento o servicios en la nube. También puede grabar vídeos o tomar fotos directamente desde la aplicación. La línea de tiempo muestra sus clips de vídeo y pistas de audio en una secuencia lineal. Puede arrastrarlos y soltarlos para reorganizarlos o recortarlos utilizando las manijas en los bordes. La ventana de vista previa muestra cómo se ve el vídeo a medida que lo edita. También puede usar gestos para acercar o alejar, rotar o recortar el vídeo. La barra de herramientas tiene botones para deshacer, rehacer, agregar medios, agregar capas, voz en off, mezclador de audio y exportar. </p>
|
35 |
-
<h3>Técnicas básicas de edición</h3>
|
36 |
-
<p>Para editar los clips de vídeo en Kinemaster Mod Digitbin APK, es necesario seleccionarlos en la línea de tiempo y luego toque en el icono de tijeras en la barra de herramientas. Esto abrirá un menú que le da opciones como dividir, cortar, copiar, eliminar, silenciar, ajustar el volumen, control de velocidad, filtro de color, ajuste de color, recorte, rotación, reflejo y mezcla. </p>
|
37 |
-
|
38 |
-
<h3>Funciones avanzadas de edición</h3>
|
39 |
-
<p>Kinemaster Mod Digitbin APK también ofrece algunas características avanzadas de edición que le permiten agregar más efectos y elementos a sus vídeos. Una de estas características es la adición de capas. Las capas son pistas adicionales que le permiten superponer imágenes, videos, texto, pegatinas, escritura a mano o efectos en la parte superior de la pista de vídeo principal. Para agregar una capa, toque en el botón Agregar capa en la barra de herramientas y luego elija el tipo de capa que desea agregar. A continuación, puede ajustar la posición, el tamaño, la opacidad y la animación de la capa en la ventana de vista previa. </p>
|
40 |
-
<p>Otra función de edición avanzada es chroma key. Chroma key es una función que te permite cambiar el fondo de tus vídeos con cualquier imagen o vídeo. Esto puede ser muy útil para crear efectos especiales, como pantalla verde, o para cambiar el estado de ánimo o la atmósfera de sus videos. Para usar la tecla de croma, necesita tener un clip de video que tenga un fondo de color sólido, como verde o azul. Luego, debe agregarlo como una capa encima de otro clip de video que desea usar como nuevo fondo. A continuación, toque en la capa y luego toque en el botón de la tecla de croma en la barra de herramientas. Verás un control deslizante que te permite ajustar la intensidad del efecto de la tecla de croma. También puede utilizar la herramienta cuentagotas para seleccionar el color que desea eliminar de la capa. </p>
|
41 |
-
<h3>Agregar efectos y transiciones</h3>
|
42 |
-
<p>Kinemaster Mod Digitbin APK también le permite agregar efectos y transiciones a sus vídeos para hacerlos más dinámicos e interesantes. Los efectos son mejoras visuales que puede aplicar a sus clips de video o capas, como desenfoque, mosaico, viñeta, distorsión y más. Las transiciones son animaciones que puedes usar para conectar tus clips de video o capas sin problemas, como fade, slide, wipe, zoom y más. </p>
|
43 |
-
|
44 |
-
<p>Para agregar una transición a su clip de vídeo o capa, toque en él y luego toque en el botón de transición en la barra de herramientas. Verá una lista de categorías que contienen diferentes transiciones. Toque en una categoría y luego elija una transición que le guste. También puede ajustar la duración y dirección de la transición usando los controles deslizantes. </p>
|
45 |
-
<h3>Mejora de audio en Kinemaster Mod Digitbin APK</h3>
|
46 |
-
<p>Kinemaster Mod Digitbin APK también le permite mejorar la calidad de audio de sus vídeos mediante la adición de música, efectos de sonido, voces en off, o ajustar el volumen y el tono. Puede agregar pistas de audio a sus videos tocando el botón Agregar medios en la barra de herramientas y luego elegir un archivo de audio desde su dispositivo de almacenamiento o servicios en la nube. También puede grabar su propia voz tocando el botón de voz en off en la barra de herramientas y luego hablando en el micrófono de su dispositivo. </p>
|
47 |
-
<p>Para editar sus pistas de audio en Kinemaster Mod Digitbin APK, es necesario seleccionarlos en la línea de tiempo y luego toque en el icono de tijeras en la barra de herramientas. Esto abrirá un menú que le da opciones como dividir, cortar, copiar, borrar, silenciar, ajustar el volumen, control de velocidad, control de tono, reverberación, ecualizador y fundido in/out. </p>
|
48 |
-
<p>Puedes usar estas opciones para modificar tus pistas de audio según tus necesidades. Por ejemplo, puede dividir una pista de audio en dos partes arrastrando el cabezal de reproducción a donde desea dividirla y luego tocando en split. También puede cortar una parte de una pista de audio seleccionándola y luego tocando en el corte. También puede copiar o eliminar una pista de audio pulsando en copiar o eliminar. </p>
|
49 |
-
<h2>Consejos para crear vídeos atractivos con Kinemaster Mod Digitbin APK</h2>
|
50 |
-
<p>Ahora que sabes cómo usar Kinemaster Mod Digitbin APK para la edición de vídeo, aquí hay algunos consejos que pueden ayudarle a crear vídeos interesantes con ella:</p>
|
51 |
-
<h3>Usar imágenes y metraje de alta calidad</h3>
|
52 |
-
|
53 |
-
<h3>Elegir un tema adecuado y esquema de color</h3>
|
54 |
-
<p>El tema y la combinación de colores de su video pueden afectar el estado de ánimo y el tono de su mensaje. Trate de elegir un tema y un esquema de color que coincida con el propósito y la audiencia de su video. Por ejemplo, si usted está haciendo un video para una presentación de negocios, es posible que desee utilizar un tema profesional y formal y esquema de color. Si estás haciendo un video para una fiesta de cumpleaños, es posible que quieras usar un tema divertido y festivo y un esquema de color. </p>
|
55 |
-
<p>Kinemaster Mod Digitbin APK ofrece una variedad de temas y esquemas de color que puede aplicar a sus vídeos. También puede personalizarlos cambiando el fondo, texto, pegatinas, efectos y transiciones. Para acceder a los temas y esquemas de color, toque en el botón de tema en la barra de herramientas y luego elija una categoría que se adapte a su video. </p>
|
56 |
-
<h3>Añadir texto y pegatinas para transmitir su mensaje</h3>
|
57 |
-
<p>El texto y las pegatinas son elementos útiles que pueden ayudarle a transmitir su mensaje de manera más clara y creativa. Puede usar texto y pegatinas para agregar títulos, subtítulos, subtítulos, citas, etiquetas, logotipos, emojis o cualquier otra información que desee incluir en su video. También puede usar texto y pegatinas para enfatizar ciertos puntos o agregar algo de humor o personalidad a su video. </p>
|
58 |
-
<p>Kinemaster Mod Digitbin APK ofrece una gran cantidad de opciones de texto y pegatina que puede agregar a sus vídeos. También puede personalizarlos cambiando la fuente, el tamaño, el color, la alineación, la animación y la mezcla. Para añadir texto o pegatinas a tu vídeo, toca el botón Añadir capa de la barra de herramientas y luego elige texto o pegatina. A continuación, puede escribir o seleccionar el texto o pegatina que desea agregar y ajustarlo en la ventana de vista previa. </p>
|
59 |
-
<h3>Ajusta la velocidad y duración de tus clips</h3>
|
60 |
-
|
61 |
-
<p>Para ajustar la velocidad o la duración de sus clips en Kinemaster Mod Digitbin APK, toque en ellos y luego toque en el icono de tijeras en la barra de herramientas. Luego, toque en el control de velocidad o ajuste de duración. Verá un control deslizante que le permite cambiar la velocidad o la duración de sus clips por porcentaje o por segundos. </p>
|
62 |
-
<h3>Exporta tu vídeo en la mejor resolución y formato</h3>
|
63 |
-
<p>El paso final en la creación de un video con Kinemaster Mod Digitbin APK está exportando en la mejor resolución y formato para su propósito. La resolución es la calidad o claridad del vídeo, medida por píxeles. El formato es el tipo o la extensión de su archivo de video, como MP4, MOV, AVI, etc. La resolución y el formato de su video pueden afectar su tamaño, compatibilidad y rendimiento. </p>
|
64 |
-
<p>Kinemaster Mod Digitbin APK le permite exportar su vídeo en diferentes resoluciones y formatos dependiendo de las capacidades y preferencias de su dispositivo. También puede elegir la velocidad de fotogramas (FPS) y la velocidad de bits (Mbps) de su vídeo para optimizar su suavidad y nitidez. Para exportar el vídeo en Kinemaster Mod Digitbin APK, toque en el botón de exportación en la barra de herramientas y luego elegir la resolución, formato, velocidad de fotogramas, tasa de bits, y el nombre de archivo que desee. Luego, toque en exportar de nuevo y espere a que el proceso termine. </p>
|
65 |
-
<h2>Conclusión</h2>
|
66 |
-
<p>Kinemaster Mod Digitbin APK es una gran aplicación para la edición de vídeo en dispositivos Android. Ofrece una gran cantidad de características y herramientas que pueden ayudarle a crear videos impresionantes sin marca de agua, anuncios o restricciones. También puedes usar funciones premium y chroma key gratis y mejorar tus vídeos con más creatividad y variedad. Para utilizar Kinemaster Mod Digitbin APK, es necesario descargar e instalar desde el enlace de abajo y luego siga los consejos e instrucciones en este artículo. Esperamos que haya encontrado este artículo útil e informativo. ¡Feliz edición de video! </p>
|
67 |
-
<h2>Preguntas frecuentes</h2>
|
68 |
-
<p>Aquí hay algunas preguntas frecuentes sobre Kinemaster Mod Digitbin APK:</p>
|
69 |
-
<ol>
|
70 |
-
|
71 |
-
<p>Sí, Kinemaster Mod Digitbin APK es seguro de usar siempre y cuando se descarga desde el enlace de abajo. Esta es una fuente verificada y confiable que no dañará su dispositivo o datos. Sin embargo, siempre debes tener cuidado al instalar aplicaciones de fuentes desconocidas y escanearlas con una aplicación antivirus antes de usarlas. </p>
|
72 |
-
<li> ¿Es Kinemaster Mod Digitbin APK legal de usar? </li>
|
73 |
-
<p>Kinemaster Mod Digitbin APK no es una aplicación oficial de Kinemaster Corporation, pero una versión modificada por DigitBin.com. Por lo tanto, no es legal usarlo, ya que viola los términos y condiciones de la aplicación original. Sin embargo, no hay informes de ninguna acción legal tomada contra los usuarios de Kinemaster Mod Digitbin APK hasta el momento. Sin embargo, debe usarlo bajo su propio riesgo y responsabilidad. </p>
|
74 |
-
<li> ¿Kinemaster Mod Digitbin APK requieren acceso root? </li>
|
75 |
-
<p>No, Kinemaster Mod Digitbin APK no requiere acceso de root para trabajar en su dispositivo. Puede instalarlo y usarlo sin rootear su dispositivo. </p>
|
76 |
-
<li> ¿Puedo usar Kinemaster Mod Digitbin APK en PC o dispositivos iOS? </li>
|
77 |
-
<p>No, Kinemaster Mod Digitbin APK solo es compatible con dispositivos Android. No se puede utilizar en dispositivos PC o iOS. </p>
|
78 |
-
<li> ¿Cómo puedo actualizar Kinemaster Mod Digitbin APK? </li>
|
79 |
-
<p>Kinemaster Mod Digitbin APK no tiene una función de actualización automática, por lo que debe verificar las actualizaciones manualmente. Puedes visitar el siguiente enlace para ver si hay una nueva versión disponible y descargarla si la hay. También puede seguir DigitBin.com en sus plataformas de redes sociales para recibir notificaciones de cualquier actualización. </p>
|
80 |
-
</ol></p> 64aa2da5cf<br />
|
81 |
-
<br />
|
82 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
import logging
|
2 |
-
import os.path
|
3 |
-
from typing import List, Optional
|
4 |
-
|
5 |
-
from pip._internal.cli.spinners import open_spinner
|
6 |
-
from pip._internal.utils.setuptools_build import make_setuptools_bdist_wheel_args
|
7 |
-
from pip._internal.utils.subprocess import call_subprocess, format_command_args
|
8 |
-
|
9 |
-
logger = logging.getLogger(__name__)
|
10 |
-
|
11 |
-
|
12 |
-
def format_command_result(
|
13 |
-
command_args: List[str],
|
14 |
-
command_output: str,
|
15 |
-
) -> str:
|
16 |
-
"""Format command information for logging."""
|
17 |
-
command_desc = format_command_args(command_args)
|
18 |
-
text = f"Command arguments: {command_desc}\n"
|
19 |
-
|
20 |
-
if not command_output:
|
21 |
-
text += "Command output: None"
|
22 |
-
elif logger.getEffectiveLevel() > logging.DEBUG:
|
23 |
-
text += "Command output: [use --verbose to show]"
|
24 |
-
else:
|
25 |
-
if not command_output.endswith("\n"):
|
26 |
-
command_output += "\n"
|
27 |
-
text += f"Command output:\n{command_output}"
|
28 |
-
|
29 |
-
return text
|
30 |
-
|
31 |
-
|
32 |
-
def get_legacy_build_wheel_path(
|
33 |
-
names: List[str],
|
34 |
-
temp_dir: str,
|
35 |
-
name: str,
|
36 |
-
command_args: List[str],
|
37 |
-
command_output: str,
|
38 |
-
) -> Optional[str]:
|
39 |
-
"""Return the path to the wheel in the temporary build directory."""
|
40 |
-
# Sort for determinism.
|
41 |
-
names = sorted(names)
|
42 |
-
if not names:
|
43 |
-
msg = ("Legacy build of wheel for {!r} created no files.\n").format(name)
|
44 |
-
msg += format_command_result(command_args, command_output)
|
45 |
-
logger.warning(msg)
|
46 |
-
return None
|
47 |
-
|
48 |
-
if len(names) > 1:
|
49 |
-
msg = (
|
50 |
-
"Legacy build of wheel for {!r} created more than one file.\n"
|
51 |
-
"Filenames (choosing first): {}\n"
|
52 |
-
).format(name, names)
|
53 |
-
msg += format_command_result(command_args, command_output)
|
54 |
-
logger.warning(msg)
|
55 |
-
|
56 |
-
return os.path.join(temp_dir, names[0])
|
57 |
-
|
58 |
-
|
59 |
-
def build_wheel_legacy(
|
60 |
-
name: str,
|
61 |
-
setup_py_path: str,
|
62 |
-
source_dir: str,
|
63 |
-
global_options: List[str],
|
64 |
-
build_options: List[str],
|
65 |
-
tempd: str,
|
66 |
-
) -> Optional[str]:
|
67 |
-
"""Build one unpacked package using the "legacy" build process.
|
68 |
-
|
69 |
-
Returns path to wheel if successfully built. Otherwise, returns None.
|
70 |
-
"""
|
71 |
-
wheel_args = make_setuptools_bdist_wheel_args(
|
72 |
-
setup_py_path,
|
73 |
-
global_options=global_options,
|
74 |
-
build_options=build_options,
|
75 |
-
destination_dir=tempd,
|
76 |
-
)
|
77 |
-
|
78 |
-
spin_message = f"Building wheel for {name} (setup.py)"
|
79 |
-
with open_spinner(spin_message) as spinner:
|
80 |
-
logger.debug("Destination directory: %s", tempd)
|
81 |
-
|
82 |
-
try:
|
83 |
-
output = call_subprocess(
|
84 |
-
wheel_args,
|
85 |
-
command_desc="python setup.py bdist_wheel",
|
86 |
-
cwd=source_dir,
|
87 |
-
spinner=spinner,
|
88 |
-
)
|
89 |
-
except Exception:
|
90 |
-
spinner.finish("error")
|
91 |
-
logger.error("Failed building wheel for %s", name)
|
92 |
-
return None
|
93 |
-
|
94 |
-
names = os.listdir(tempd)
|
95 |
-
wheel_path = get_legacy_build_wheel_path(
|
96 |
-
names=names,
|
97 |
-
temp_dir=tempd,
|
98 |
-
name=name,
|
99 |
-
command_args=wheel_args,
|
100 |
-
command_output=output,
|
101 |
-
)
|
102 |
-
return wheel_path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/rich/live_render.py
DELETED
@@ -1,113 +0,0 @@
|
|
1 |
-
import sys
|
2 |
-
from typing import Optional, Tuple
|
3 |
-
|
4 |
-
if sys.version_info >= (3, 8):
|
5 |
-
from typing import Literal
|
6 |
-
else:
|
7 |
-
from pip._vendor.typing_extensions import Literal # pragma: no cover
|
8 |
-
|
9 |
-
|
10 |
-
from ._loop import loop_last
|
11 |
-
from .console import Console, ConsoleOptions, RenderableType, RenderResult
|
12 |
-
from .control import Control
|
13 |
-
from .segment import ControlType, Segment
|
14 |
-
from .style import StyleType
|
15 |
-
from .text import Text
|
16 |
-
|
17 |
-
VerticalOverflowMethod = Literal["crop", "ellipsis", "visible"]
|
18 |
-
|
19 |
-
|
20 |
-
class LiveRender:
|
21 |
-
"""Creates a renderable that may be updated.
|
22 |
-
|
23 |
-
Args:
|
24 |
-
renderable (RenderableType): Any renderable object.
|
25 |
-
style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".
|
26 |
-
"""
|
27 |
-
|
28 |
-
def __init__(
|
29 |
-
self,
|
30 |
-
renderable: RenderableType,
|
31 |
-
style: StyleType = "",
|
32 |
-
vertical_overflow: VerticalOverflowMethod = "ellipsis",
|
33 |
-
) -> None:
|
34 |
-
self.renderable = renderable
|
35 |
-
self.style = style
|
36 |
-
self.vertical_overflow = vertical_overflow
|
37 |
-
self._shape: Optional[Tuple[int, int]] = None
|
38 |
-
|
39 |
-
def set_renderable(self, renderable: RenderableType) -> None:
|
40 |
-
"""Set a new renderable.
|
41 |
-
|
42 |
-
Args:
|
43 |
-
renderable (RenderableType): Any renderable object, including str.
|
44 |
-
"""
|
45 |
-
self.renderable = renderable
|
46 |
-
|
47 |
-
def position_cursor(self) -> Control:
|
48 |
-
"""Get control codes to move cursor to beginning of live render.
|
49 |
-
|
50 |
-
Returns:
|
51 |
-
Control: A control instance that may be printed.
|
52 |
-
"""
|
53 |
-
if self._shape is not None:
|
54 |
-
_, height = self._shape
|
55 |
-
return Control(
|
56 |
-
ControlType.CARRIAGE_RETURN,
|
57 |
-
(ControlType.ERASE_IN_LINE, 2),
|
58 |
-
*(
|
59 |
-
(
|
60 |
-
(ControlType.CURSOR_UP, 1),
|
61 |
-
(ControlType.ERASE_IN_LINE, 2),
|
62 |
-
)
|
63 |
-
* (height - 1)
|
64 |
-
)
|
65 |
-
)
|
66 |
-
return Control()
|
67 |
-
|
68 |
-
def restore_cursor(self) -> Control:
|
69 |
-
"""Get control codes to clear the render and restore the cursor to its previous position.
|
70 |
-
|
71 |
-
Returns:
|
72 |
-
Control: A Control instance that may be printed.
|
73 |
-
"""
|
74 |
-
if self._shape is not None:
|
75 |
-
_, height = self._shape
|
76 |
-
return Control(
|
77 |
-
ControlType.CARRIAGE_RETURN,
|
78 |
-
*((ControlType.CURSOR_UP, 1), (ControlType.ERASE_IN_LINE, 2)) * height
|
79 |
-
)
|
80 |
-
return Control()
|
81 |
-
|
82 |
-
def __rich_console__(
|
83 |
-
self, console: Console, options: ConsoleOptions
|
84 |
-
) -> RenderResult:
|
85 |
-
|
86 |
-
renderable = self.renderable
|
87 |
-
style = console.get_style(self.style)
|
88 |
-
lines = console.render_lines(renderable, options, style=style, pad=False)
|
89 |
-
shape = Segment.get_shape(lines)
|
90 |
-
|
91 |
-
_, height = shape
|
92 |
-
if height > options.size.height:
|
93 |
-
if self.vertical_overflow == "crop":
|
94 |
-
lines = lines[: options.size.height]
|
95 |
-
shape = Segment.get_shape(lines)
|
96 |
-
elif self.vertical_overflow == "ellipsis":
|
97 |
-
lines = lines[: (options.size.height - 1)]
|
98 |
-
overflow_text = Text(
|
99 |
-
"...",
|
100 |
-
overflow="crop",
|
101 |
-
justify="center",
|
102 |
-
end="",
|
103 |
-
style="live.ellipsis",
|
104 |
-
)
|
105 |
-
lines.append(list(console.render(overflow_text)))
|
106 |
-
shape = Segment.get_shape(lines)
|
107 |
-
self._shape = shape
|
108 |
-
|
109 |
-
new_line = Segment.line()
|
110 |
-
for last, line in loop_last(lines):
|
111 |
-
yield from line
|
112 |
-
if not last:
|
113 |
-
yield new_line
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/BilalQ/Stable_Difussion/README.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Stable Difussion
|
3 |
-
emoji: ⚡
|
4 |
-
colorFrom: pink
|
5 |
-
colorTo: red
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.2
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/BrAD/README.md
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: BrAD
|
3 |
-
emoji: 🏢
|
4 |
-
colorFrom: blue
|
5 |
-
colorTo: purple
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.0.20
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
license: apache-2.0
|
11 |
-
---
|
12 |
-
|
13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
-
|
15 |
-
|
16 |
-
This is a demo for the paper: "Unsupervised Domain Generalization by Learning a Bridge Across Domains"
|
17 |
-
|
18 |
-
https://openaccess.thecvf.com/content/CVPR2022/papers/Harary_Unsupervised_Domain_Generalization_by_Learning_a_Bridge_Across_Domains_CVPR_2022_paper.pdf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/detail/algorithm_wrapper.h
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Copyright 2020 NVIDIA Corporation
|
3 |
-
*
|
4 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
* you may not use this file except in compliance with the License.
|
6 |
-
* You may obtain a copy of the License at
|
7 |
-
*
|
8 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
*
|
10 |
-
* Unless required by applicable law or agreed to in writing, software
|
11 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
* See the License for the specific language governing permissions and
|
14 |
-
* limitations under the License.
|
15 |
-
*/
|
16 |
-
|
17 |
-
#pragma once
|
18 |
-
|
19 |
-
// When a compiler uses Thrust as part of its implementation of Standard C++
|
20 |
-
// algorithms, a cycle of included files may result when Thrust code tries to
|
21 |
-
// use a standard algorithm. Having a macro that is defined only when Thrust
|
22 |
-
// is including an algorithms-related header gives the compiler a chance to
|
23 |
-
// detect and break the cycle of includes.
|
24 |
-
|
25 |
-
#define THRUST_INCLUDING_ALGORITHMS_HEADER
|
26 |
-
#include <algorithm>
|
27 |
-
#undef THRUST_INCLUDING_ALGORITHMS_HEADER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/system/cuda/detail/core/agent_launcher.h
DELETED
@@ -1,1184 +0,0 @@
|
|
1 |
-
/******************************************************************************
|
2 |
-
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
|
3 |
-
*
|
4 |
-
* Redistribution and use in source and binary forms, with or without
|
5 |
-
* modification, are permitted provided that the following conditions are met:
|
6 |
-
* * Redistributions of source code must retain the above copyright
|
7 |
-
* notice, this list of conditions and the following disclaimer.
|
8 |
-
* * Redistributions in binary form must reproduce the above copyright
|
9 |
-
* notice, this list of conditions and the following disclaimer in the
|
10 |
-
* documentation and/or other materials provided with the distribution.
|
11 |
-
* * Neither the name of the NVIDIA CORPORATION nor the
|
12 |
-
* names of its contributors may be used to endorse or promote products
|
13 |
-
* derived from this software without specific prior written permission.
|
14 |
-
*
|
15 |
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
16 |
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17 |
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
18 |
-
* ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
|
19 |
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
20 |
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
21 |
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
22 |
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
23 |
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
24 |
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
25 |
-
*
|
26 |
-
******************************************************************************/
|
27 |
-
#pragma once
|
28 |
-
|
29 |
-
#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
|
30 |
-
#include <thrust/detail/config.h>
|
31 |
-
#include <thrust/system/cuda/detail/guarded_cuda_runtime_api.h>
|
32 |
-
#include <thrust/system/cuda/detail/core/triple_chevron_launch.h>
|
33 |
-
#include <thrust/system/cuda/detail/core/util.h>
|
34 |
-
#include <cassert>
|
35 |
-
|
36 |
-
#if 0
|
37 |
-
#define __THRUST__TEMPLATE_DEBUG
|
38 |
-
#endif
|
39 |
-
|
40 |
-
#if __THRUST__TEMPLATE_DEBUG
|
41 |
-
template<int...> class ID_impl;
|
42 |
-
template<int... I> class Foo { ID_impl<I...> t;};
|
43 |
-
#endif
|
44 |
-
|
45 |
-
namespace thrust
|
46 |
-
{
|
47 |
-
namespace cuda_cub {
|
48 |
-
namespace core {
|
49 |
-
|
50 |
-
|
51 |
-
#if defined(__CUDA_ARCH__) || defined(__NVCOMPILER_CUDA__)
|
52 |
-
#if 0
|
53 |
-
template <class Agent, class... Args>
|
54 |
-
void __global__
|
55 |
-
__launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
56 |
-
_kernel_agent(Args... args)
|
57 |
-
{
|
58 |
-
extern __shared__ char shmem[];
|
59 |
-
Agent::entry(args..., shmem);
|
60 |
-
}
|
61 |
-
#else
|
62 |
-
template <class Agent, class _0>
|
63 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
64 |
-
_kernel_agent(_0 x0)
|
65 |
-
{
|
66 |
-
extern __shared__ char shmem[];
|
67 |
-
Agent::entry(x0, shmem);
|
68 |
-
}
|
69 |
-
template <class Agent, class _0, class _1>
|
70 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
71 |
-
_kernel_agent(_0 x0, _1 x1)
|
72 |
-
{
|
73 |
-
extern __shared__ char shmem[];
|
74 |
-
Agent::entry(x0, x1, shmem);
|
75 |
-
}
|
76 |
-
template <class Agent, class _0, class _1, class _2>
|
77 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
78 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2)
|
79 |
-
{
|
80 |
-
extern __shared__ char shmem[];
|
81 |
-
Agent::entry(x0, x1, x2, shmem);
|
82 |
-
}
|
83 |
-
template <class Agent, class _0, class _1, class _2, class _3>
|
84 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
85 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3)
|
86 |
-
{
|
87 |
-
extern __shared__ char shmem[];
|
88 |
-
Agent::entry(x0, x1, x2, x3, shmem);
|
89 |
-
}
|
90 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4>
|
91 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
92 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4)
|
93 |
-
{
|
94 |
-
extern __shared__ char shmem[];
|
95 |
-
Agent::entry(x0, x1, x2, x3, x4, shmem);
|
96 |
-
}
|
97 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5>
|
98 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
99 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5)
|
100 |
-
{
|
101 |
-
extern __shared__ char shmem[];
|
102 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, shmem);
|
103 |
-
}
|
104 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
105 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
106 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6)
|
107 |
-
{
|
108 |
-
extern __shared__ char shmem[];
|
109 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, shmem);
|
110 |
-
}
|
111 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
112 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
113 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7)
|
114 |
-
{
|
115 |
-
extern __shared__ char shmem[];
|
116 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, shmem);
|
117 |
-
}
|
118 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
119 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
120 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8)
|
121 |
-
{
|
122 |
-
extern __shared__ char shmem[];
|
123 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, shmem);
|
124 |
-
}
|
125 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
126 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
127 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9)
|
128 |
-
{
|
129 |
-
extern __shared__ char shmem[];
|
130 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, shmem);
|
131 |
-
}
|
132 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
133 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
134 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA)
|
135 |
-
{
|
136 |
-
extern __shared__ char shmem[];
|
137 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, shmem);
|
138 |
-
}
|
139 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
140 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
141 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB)
|
142 |
-
{
|
143 |
-
extern __shared__ char shmem[];
|
144 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, shmem);
|
145 |
-
}
|
146 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
147 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
148 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC)
|
149 |
-
{
|
150 |
-
extern __shared__ char shmem[];
|
151 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, shmem);
|
152 |
-
}
|
153 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
154 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
155 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD)
|
156 |
-
{
|
157 |
-
extern __shared__ char shmem[];
|
158 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, shmem);
|
159 |
-
}
|
160 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
161 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
162 |
-
_kernel_agent(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE)
|
163 |
-
{
|
164 |
-
extern __shared__ char shmem[];
|
165 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE, shmem);
|
166 |
-
}
|
167 |
-
#endif
|
168 |
-
|
169 |
-
////////////////////////////////////////////////////////////
|
170 |
-
|
171 |
-
|
172 |
-
#if 0
|
173 |
-
template <class Agent, class... Args>
|
174 |
-
void __global__
|
175 |
-
__launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
176 |
-
_kernel_agent_vshmem(char* vshmem, Args... args)
|
177 |
-
{
|
178 |
-
extern __shared__ char shmem[];
|
179 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
180 |
-
Agent::entry(args..., vshmem);
|
181 |
-
}
|
182 |
-
#else
|
183 |
-
template <class Agent, class _0>
|
184 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
185 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0)
|
186 |
-
{
|
187 |
-
extern __shared__ char shmem[];
|
188 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
189 |
-
Agent::entry(x0, vshmem);
|
190 |
-
}
|
191 |
-
template <class Agent, class _0, class _1>
|
192 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
193 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1)
|
194 |
-
{
|
195 |
-
extern __shared__ char shmem[];
|
196 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
197 |
-
Agent::entry(x0, x1, vshmem);
|
198 |
-
}
|
199 |
-
template <class Agent, class _0, class _1, class _2>
|
200 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
201 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2)
|
202 |
-
{
|
203 |
-
extern __shared__ char shmem[];
|
204 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
205 |
-
Agent::entry(x0, x1, x2, vshmem);
|
206 |
-
}
|
207 |
-
template <class Agent, class _0, class _1, class _2, class _3>
|
208 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
209 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3)
|
210 |
-
{
|
211 |
-
extern __shared__ char shmem[];
|
212 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
213 |
-
Agent::entry(x0, x1, x2, x3, vshmem);
|
214 |
-
}
|
215 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4>
|
216 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
217 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4)
|
218 |
-
{
|
219 |
-
extern __shared__ char shmem[];
|
220 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
221 |
-
Agent::entry(x0, x1, x2, x3, x4, vshmem);
|
222 |
-
}
|
223 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5>
|
224 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
225 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5)
|
226 |
-
{
|
227 |
-
extern __shared__ char shmem[];
|
228 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
229 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, vshmem);
|
230 |
-
}
|
231 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
232 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
233 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6)
|
234 |
-
{
|
235 |
-
extern __shared__ char shmem[];
|
236 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
237 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, vshmem);
|
238 |
-
}
|
239 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
240 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
241 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7)
|
242 |
-
{
|
243 |
-
extern __shared__ char shmem[];
|
244 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
245 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, vshmem);
|
246 |
-
}
|
247 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
248 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
249 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8)
|
250 |
-
{
|
251 |
-
extern __shared__ char shmem[];
|
252 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
253 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, vshmem);
|
254 |
-
}
|
255 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
256 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
257 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9)
|
258 |
-
{
|
259 |
-
extern __shared__ char shmem[];
|
260 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
261 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, vshmem);
|
262 |
-
}
|
263 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
264 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
265 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA)
|
266 |
-
{
|
267 |
-
extern __shared__ char shmem[];
|
268 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
269 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, vshmem);
|
270 |
-
}
|
271 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
272 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
273 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB)
|
274 |
-
{
|
275 |
-
extern __shared__ char shmem[];
|
276 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
277 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, vshmem);
|
278 |
-
}
|
279 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
280 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
281 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC)
|
282 |
-
{
|
283 |
-
extern __shared__ char shmem[];
|
284 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
285 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, vshmem);
|
286 |
-
}
|
287 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
288 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
289 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD)
|
290 |
-
{
|
291 |
-
extern __shared__ char shmem[];
|
292 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
293 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, vshmem);
|
294 |
-
}
|
295 |
-
template <class Agent, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
296 |
-
void __global__ __launch_bounds__(Agent::ptx_plan::BLOCK_THREADS)
|
297 |
-
_kernel_agent_vshmem(char* vshmem, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE)
|
298 |
-
{
|
299 |
-
extern __shared__ char shmem[];
|
300 |
-
vshmem = vshmem == NULL ? shmem : vshmem + blockIdx.x * temp_storage_size<typename Agent::ptx_plan>::value;
|
301 |
-
Agent::entry(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE, vshmem);
|
302 |
-
}
|
303 |
-
#endif
|
304 |
-
#else
|
305 |
-
#if 0
|
306 |
-
template <class , class... Args >
|
307 |
-
void __global__ _kernel_agent(Args... args) {}
|
308 |
-
template <class , class... Args >
|
309 |
-
void __global__ _kernel_agent_vshmem(char*, Args... args) {}
|
310 |
-
#else
|
311 |
-
template <class, class _0>
|
312 |
-
void __global__ _kernel_agent(_0) {}
|
313 |
-
template <class, class _0, class _1>
|
314 |
-
void __global__ _kernel_agent(_0,_1) {}
|
315 |
-
template <class, class _0, class _1, class _2>
|
316 |
-
void __global__ _kernel_agent(_0,_1,_2) {}
|
317 |
-
template <class, class _0, class _1, class _2, class _3>
|
318 |
-
void __global__ _kernel_agent(_0,_1,_2,_3) {}
|
319 |
-
template <class, class _0, class _1, class _2, class _3, class _4>
|
320 |
-
void __global__ _kernel_agent(_0,_1,_2,_3, _4) {}
|
321 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5>
|
322 |
-
void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5) {}
|
323 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
324 |
-
void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6) {}
|
325 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
326 |
-
void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6, _7) {}
|
327 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
328 |
-
void __global__ _kernel_agent(_0,_1,_2,_3, _4, _5, _6, _7, _8) {}
|
329 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
330 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) {}
|
331 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
332 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) {}
|
333 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
334 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) {}
|
335 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
336 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC) {}
|
337 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
338 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC, _xD) {}
|
339 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
340 |
-
void __global__ _kernel_agent(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB,_xC, _xD, _xE) {}
|
341 |
-
////////////////////////////////////////////////////////////
|
342 |
-
template <class, class _0>
|
343 |
-
void __global__ _kernel_agent_vshmem(char*,_0) {}
|
344 |
-
template <class, class _0, class _1>
|
345 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1) {}
|
346 |
-
template <class, class _0, class _1, class _2>
|
347 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2) {}
|
348 |
-
template <class, class _0, class _1, class _2, class _3>
|
349 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3) {}
|
350 |
-
template <class, class _0, class _1, class _2, class _3, class _4>
|
351 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4) {}
|
352 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5>
|
353 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5) {}
|
354 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
355 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6) {}
|
356 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
357 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6, _7) {}
|
358 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
359 |
-
void __global__ _kernel_agent_vshmem(char*,_0,_1,_2,_3, _4, _5, _6, _7, _8) {}
|
360 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
361 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) {}
|
362 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
363 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) {}
|
364 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
365 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) {}
|
366 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
367 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC) {}
|
368 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
369 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD) {}
|
370 |
-
template <class, class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
371 |
-
void __global__ _kernel_agent_vshmem(char*,_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD, _xE) {}
|
372 |
-
#endif
|
373 |
-
#endif
|
374 |
-
|
375 |
-
|
376 |
-
template<class Agent>
|
377 |
-
struct AgentLauncher : Agent
|
378 |
-
{
|
379 |
-
core::AgentPlan plan;
|
380 |
-
size_t count;
|
381 |
-
cudaStream_t stream;
|
382 |
-
char const* name;
|
383 |
-
bool debug_sync;
|
384 |
-
unsigned int grid;
|
385 |
-
char* vshmem;
|
386 |
-
bool has_shmem;
|
387 |
-
size_t shmem_size;
|
388 |
-
|
389 |
-
enum
|
390 |
-
{
|
391 |
-
MAX_SHMEM_PER_BLOCK = 48 * 1024,
|
392 |
-
};
|
393 |
-
typedef
|
394 |
-
typename has_enough_shmem<Agent,
|
395 |
-
MAX_SHMEM_PER_BLOCK>::type has_enough_shmem_t;
|
396 |
-
typedef
|
397 |
-
has_enough_shmem<Agent,
|
398 |
-
MAX_SHMEM_PER_BLOCK> shm1;
|
399 |
-
|
400 |
-
template <class Size>
|
401 |
-
THRUST_RUNTIME_FUNCTION
|
402 |
-
AgentLauncher(AgentPlan plan_,
|
403 |
-
Size count_,
|
404 |
-
cudaStream_t stream_,
|
405 |
-
char const* name_,
|
406 |
-
bool debug_sync_)
|
407 |
-
: plan(plan_),
|
408 |
-
count((size_t)count_),
|
409 |
-
stream(stream_),
|
410 |
-
name(name_),
|
411 |
-
debug_sync(debug_sync_),
|
412 |
-
grid(static_cast<unsigned int>((count + plan.items_per_tile - 1) / plan.items_per_tile)),
|
413 |
-
vshmem(NULL),
|
414 |
-
has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
|
415 |
-
shmem_size(has_shmem ? plan.shared_memory_size : 0)
|
416 |
-
{
|
417 |
-
assert(count > 0);
|
418 |
-
}
|
419 |
-
|
420 |
-
template <class Size>
|
421 |
-
THRUST_RUNTIME_FUNCTION
|
422 |
-
AgentLauncher(AgentPlan plan_,
|
423 |
-
Size count_,
|
424 |
-
cudaStream_t stream_,
|
425 |
-
char* vshmem,
|
426 |
-
char const* name_,
|
427 |
-
bool debug_sync_)
|
428 |
-
: plan(plan_),
|
429 |
-
count((size_t)count_),
|
430 |
-
stream(stream_),
|
431 |
-
name(name_),
|
432 |
-
debug_sync(debug_sync_),
|
433 |
-
grid(static_cast<unsigned int>((count + plan.items_per_tile - 1) / plan.items_per_tile)),
|
434 |
-
vshmem(vshmem),
|
435 |
-
has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
|
436 |
-
shmem_size(has_shmem ? plan.shared_memory_size : 0)
|
437 |
-
{
|
438 |
-
assert(count > 0);
|
439 |
-
}
|
440 |
-
|
441 |
-
THRUST_RUNTIME_FUNCTION
|
442 |
-
AgentLauncher(AgentPlan plan_,
|
443 |
-
cudaStream_t stream_,
|
444 |
-
char const* name_,
|
445 |
-
bool debug_sync_)
|
446 |
-
: plan(plan_),
|
447 |
-
count(0),
|
448 |
-
stream(stream_),
|
449 |
-
name(name_),
|
450 |
-
debug_sync(debug_sync_),
|
451 |
-
grid(plan.grid_size),
|
452 |
-
vshmem(NULL),
|
453 |
-
has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
|
454 |
-
shmem_size(has_shmem ? plan.shared_memory_size : 0)
|
455 |
-
{
|
456 |
-
assert(plan.grid_size > 0);
|
457 |
-
}
|
458 |
-
|
459 |
-
THRUST_RUNTIME_FUNCTION
|
460 |
-
AgentLauncher(AgentPlan plan_,
|
461 |
-
cudaStream_t stream_,
|
462 |
-
char* vshmem,
|
463 |
-
char const* name_,
|
464 |
-
bool debug_sync_)
|
465 |
-
: plan(plan_),
|
466 |
-
count(0),
|
467 |
-
stream(stream_),
|
468 |
-
name(name_),
|
469 |
-
debug_sync(debug_sync_),
|
470 |
-
grid(plan.grid_size),
|
471 |
-
vshmem(vshmem),
|
472 |
-
has_shmem((size_t)core::get_max_shared_memory_per_block() >= (size_t)plan.shared_memory_size),
|
473 |
-
shmem_size(has_shmem ? plan.shared_memory_size : 0)
|
474 |
-
{
|
475 |
-
assert(plan.grid_size > 0);
|
476 |
-
}
|
477 |
-
|
478 |
-
#if 0
|
479 |
-
THRUST_RUNTIME_FUNCTION
|
480 |
-
AgentPlan static get_plan(cudaStream_t s, void* d_ptr = 0)
|
481 |
-
{
|
482 |
-
// in separable compilation mode, we have no choice
|
483 |
-
// but to call kernel to get agent_plan
|
484 |
-
// otherwise the risk is something may fail
|
485 |
-
// if user mix & match ptx versions in a separably compiled function
|
486 |
-
// http://nvbugs/1772071
|
487 |
-
// XXX may be it is too string of a requirements, consider relaxing it in
|
488 |
-
// the future
|
489 |
-
#ifdef __CUDACC_RDC__
|
490 |
-
return core::get_agent_plan<Agent>(s, d_ptr);
|
491 |
-
#else
|
492 |
-
core::cuda_optional<int> ptx_version = core::get_ptx_version();
|
493 |
-
//CUDA_CUB_RET_IF_FAIL(ptx_version.status());
|
494 |
-
return get_agent_plan<Agent>(ptx_version);
|
495 |
-
#endif
|
496 |
-
}
|
497 |
-
THRUST_RUNTIME_FUNCTION
|
498 |
-
AgentPlan static get_plan_default()
|
499 |
-
{
|
500 |
-
return get_agent_plan<Agent>(sm_arch<0>::type::ver);
|
501 |
-
}
|
502 |
-
#endif
|
503 |
-
|
504 |
-
THRUST_RUNTIME_FUNCTION
|
505 |
-
typename core::get_plan<Agent>::type static get_plan(cudaStream_t , void* d_ptr = 0)
|
506 |
-
{
|
507 |
-
THRUST_UNUSED_VAR(d_ptr);
|
508 |
-
core::cuda_optional<int> ptx_version = core::get_ptx_version();
|
509 |
-
return get_agent_plan<Agent>(ptx_version);
|
510 |
-
}
|
511 |
-
|
512 |
-
THRUST_RUNTIME_FUNCTION
|
513 |
-
typename core::get_plan<Agent>::type static get_plan()
|
514 |
-
{
|
515 |
-
return get_agent_plan<Agent>(lowest_supported_sm_arch::ver);
|
516 |
-
}
|
517 |
-
|
518 |
-
THRUST_RUNTIME_FUNCTION void sync() const
|
519 |
-
{
|
520 |
-
if (debug_sync)
|
521 |
-
{
|
522 |
-
if (THRUST_IS_DEVICE_CODE) {
|
523 |
-
#if THRUST_INCLUDE_DEVICE_CODE
|
524 |
-
cudaDeviceSynchronize();
|
525 |
-
#endif
|
526 |
-
} else {
|
527 |
-
#if THRUST_INCLUDE_HOST_CODE
|
528 |
-
cudaStreamSynchronize(stream);
|
529 |
-
#endif
|
530 |
-
}
|
531 |
-
}
|
532 |
-
}
|
533 |
-
|
534 |
-
template<class K>
|
535 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
536 |
-
max_blocks_per_sm_impl(K k, int block_threads)
|
537 |
-
{
|
538 |
-
int occ;
|
539 |
-
cudaError_t status = cub::MaxSmOccupancy(occ, k, block_threads);
|
540 |
-
return cuda_optional<int>(status == cudaSuccess ? occ : -1, status);
|
541 |
-
}
|
542 |
-
|
543 |
-
template <class K>
|
544 |
-
cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
545 |
-
max_sm_occupancy(K k) const
|
546 |
-
{
|
547 |
-
return max_blocks_per_sm_impl(k, plan.block_threads);
|
548 |
-
}
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
template<class K>
|
553 |
-
THRUST_RUNTIME_FUNCTION
|
554 |
-
void print_info(K k) const
|
555 |
-
{
|
556 |
-
if (debug_sync)
|
557 |
-
{
|
558 |
-
cuda_optional<int> occ = max_sm_occupancy(k);
|
559 |
-
core::cuda_optional<int> ptx_version = core::get_ptx_version();
|
560 |
-
if (count > 0)
|
561 |
-
{
|
562 |
-
_CubLog("Invoking %s<<<%u, %d, %d, %lld>>>(), %llu items total, %d items per thread, %d SM occupancy, %d vshmem size, %d ptx_version \n",
|
563 |
-
name,
|
564 |
-
grid,
|
565 |
-
plan.block_threads,
|
566 |
-
(has_shmem ? (int)plan.shared_memory_size : 0),
|
567 |
-
(long long)stream,
|
568 |
-
(long long)count,
|
569 |
-
plan.items_per_thread,
|
570 |
-
(int)occ,
|
571 |
-
(!has_shmem ? (int)plan.shared_memory_size : 0),
|
572 |
-
(int)ptx_version);
|
573 |
-
}
|
574 |
-
else
|
575 |
-
{
|
576 |
-
_CubLog("Invoking %s<<<%u, %d, %d, %lld>>>(), %d items per thread, %d SM occupancy, %d vshmem size, %d ptx_version\n",
|
577 |
-
name,
|
578 |
-
grid,
|
579 |
-
plan.block_threads,
|
580 |
-
(has_shmem ? (int)plan.shared_memory_size : 0),
|
581 |
-
(long long)stream,
|
582 |
-
plan.items_per_thread,
|
583 |
-
(int)occ,
|
584 |
-
(!has_shmem ? (int)plan.shared_memory_size : 0),
|
585 |
-
(int)ptx_version);
|
586 |
-
}
|
587 |
-
}
|
588 |
-
}
|
589 |
-
|
590 |
-
////////////////////
|
591 |
-
// Variadic code
|
592 |
-
////////////////////
|
593 |
-
|
594 |
-
#if 0
|
595 |
-
template<class... Args>
|
596 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
597 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
598 |
-
{
|
599 |
-
return max_blocks_per_sm_impl(_kernel_agent<Agent, Args...>, plan.block_threads);
|
600 |
-
}
|
601 |
-
#else
|
602 |
-
template<class _0>
|
603 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
604 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
605 |
-
{
|
606 |
-
void (*ptr)(_0) = _kernel_agent<Agent, _0>;
|
607 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
608 |
-
}
|
609 |
-
template<class _0, class _1>
|
610 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
611 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
612 |
-
{
|
613 |
-
void (*ptr)(_0, _1) = _kernel_agent<Agent, _0, _1>;
|
614 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
615 |
-
}
|
616 |
-
template<class _0, class _1, class _2>
|
617 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
618 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
619 |
-
{
|
620 |
-
void (*ptr)(_0,_1,_2) = _kernel_agent<Agent, _0, _1, _2>;
|
621 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
622 |
-
}
|
623 |
-
template<class _0, class _1, class _2, class _3>
|
624 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
625 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
626 |
-
{
|
627 |
-
void (*ptr)(_0,_1,_2,_3) = _kernel_agent<Agent, _0, _1, _2,_3>;
|
628 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
629 |
-
}
|
630 |
-
template<class _0, class _1, class _2, class _3, class _4>
|
631 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
632 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
633 |
-
{
|
634 |
-
void (*ptr)(_0,_1,_2,_3,_4) = _kernel_agent<Agent, _0, _1, _2,_3,_4>;
|
635 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
636 |
-
}
|
637 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5>
|
638 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
639 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
640 |
-
{
|
641 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5>;
|
642 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
643 |
-
}
|
644 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
645 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
646 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
647 |
-
{
|
648 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6>;
|
649 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
650 |
-
}
|
651 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
652 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
653 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
654 |
-
{
|
655 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7>;
|
656 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
657 |
-
}
|
658 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
659 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
660 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
661 |
-
{
|
662 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8>;
|
663 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
664 |
-
}
|
665 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
666 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
667 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
668 |
-
{
|
669 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9>;
|
670 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
671 |
-
}
|
672 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
673 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
674 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
675 |
-
{
|
676 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA>;
|
677 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
678 |
-
}
|
679 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
680 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
681 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
682 |
-
{
|
683 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB>;
|
684 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
685 |
-
}
|
686 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
687 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
688 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
689 |
-
{
|
690 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC>;
|
691 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
692 |
-
}
|
693 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
694 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
695 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
696 |
-
{
|
697 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD>;
|
698 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
699 |
-
}
|
700 |
-
template<class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
701 |
-
static cuda_optional<int> THRUST_RUNTIME_FUNCTION
|
702 |
-
get_max_blocks_per_sm(AgentPlan plan)
|
703 |
-
{
|
704 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE>;
|
705 |
-
return max_blocks_per_sm_impl(ptr, plan.block_threads);
|
706 |
-
}
|
707 |
-
#endif
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
#if 0
|
712 |
-
|
713 |
-
// If we are guaranteed to have enough shared memory
|
714 |
-
// don't compile other kernel which accepts pointer
|
715 |
-
// and save on compilations
|
716 |
-
template <class... Args>
|
717 |
-
void THRUST_RUNTIME_FUNCTION
|
718 |
-
launch_impl(thrust::detail::true_type, Args... args) const
|
719 |
-
{
|
720 |
-
assert(has_shmem && vshmem == NULL);
|
721 |
-
print_info(_kernel_agent<Agent, Args...>);
|
722 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
723 |
-
.doit(_kernel_agent<Agent, Args...>, args...);
|
724 |
-
}
|
725 |
-
|
726 |
-
// If there is a risk of not having enough shared memory
|
727 |
-
// we compile generic kernel instead.
|
728 |
-
// This kernel is likely to be somewhat slower, but it can accomodate
|
729 |
-
// both shared and virtualized shared memories.
|
730 |
-
// Alternative option is to compile two kernels, one using shared and one
|
731 |
-
// using virtualized shared memory. While this can be slightly faster if we
|
732 |
-
// do actually have enough shared memory, the compilation time will double.
|
733 |
-
//
|
734 |
-
template <class... Args>
|
735 |
-
void THRUST_RUNTIME_FUNCTION
|
736 |
-
launch_impl(thrust::detail::false_type, Args... args) const
|
737 |
-
{
|
738 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
739 |
-
print_info(_kernel_agent_vshmem<Agent, Args...>);
|
740 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
741 |
-
.doit(_kernel_agent_vshmem<Agent, Args...>, vshmem, args...);
|
742 |
-
}
|
743 |
-
|
744 |
-
template <class... Args>
|
745 |
-
void THRUST_RUNTIME_FUNCTION
|
746 |
-
launch(Args... args) const
|
747 |
-
{
|
748 |
-
#if __THRUST__TEMPLATE_DEBUG
|
749 |
-
#ifdef __CUDA_ARCH__
|
750 |
-
typedef typename Foo<
|
751 |
-
shm1::v1,
|
752 |
-
shm1::v2,
|
753 |
-
shm1::v3,
|
754 |
-
shm1::v4,
|
755 |
-
shm1::v5>::t tt;
|
756 |
-
#endif
|
757 |
-
#endif
|
758 |
-
launch_impl(has_enough_shmem_t(),args...);
|
759 |
-
sync();
|
760 |
-
}
|
761 |
-
#else
|
762 |
-
template <class _0>
|
763 |
-
void THRUST_RUNTIME_FUNCTION
|
764 |
-
launch_impl(thrust::detail::false_type, _0 x0) const
|
765 |
-
{
|
766 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
767 |
-
void (*ptr)(char*, _0) = _kernel_agent_vshmem<Agent, _0>;
|
768 |
-
print_info(ptr);
|
769 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
770 |
-
.doit(ptr, vshmem, x0);
|
771 |
-
}
|
772 |
-
template <class _0, class _1>
|
773 |
-
void THRUST_RUNTIME_FUNCTION
|
774 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1) const
|
775 |
-
{
|
776 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
777 |
-
void (*ptr)(char*, _0, _1) = _kernel_agent_vshmem<Agent, _0, _1>;
|
778 |
-
print_info(ptr);
|
779 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
780 |
-
.doit(ptr, vshmem, x0, x1);
|
781 |
-
}
|
782 |
-
template <class _0, class _1, class _2>
|
783 |
-
void THRUST_RUNTIME_FUNCTION
|
784 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2) const
|
785 |
-
{
|
786 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
787 |
-
void (*ptr)(char*, _0, _1, _2) = _kernel_agent_vshmem<Agent, _0, _1, _2>;
|
788 |
-
print_info(ptr);
|
789 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
790 |
-
.doit(ptr, vshmem, x0, x1, x2);
|
791 |
-
}
|
792 |
-
template <class _0, class _1, class _2, class _3>
|
793 |
-
void THRUST_RUNTIME_FUNCTION
|
794 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3) const
|
795 |
-
{
|
796 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
797 |
-
void (*ptr)(char*, _0, _1, _2, _3) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3>;
|
798 |
-
print_info(ptr);
|
799 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
800 |
-
.doit(ptr, vshmem, x0, x1, x2, x3);
|
801 |
-
}
|
802 |
-
template <class _0, class _1, class _2, class _3, class _4>
|
803 |
-
void THRUST_RUNTIME_FUNCTION
|
804 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
|
805 |
-
{
|
806 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
807 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4>;
|
808 |
-
print_info(ptr);
|
809 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
810 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4);
|
811 |
-
}
|
812 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5>
|
813 |
-
void THRUST_RUNTIME_FUNCTION
|
814 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
|
815 |
-
{
|
816 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
817 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5>;
|
818 |
-
print_info(ptr);
|
819 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
820 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5);
|
821 |
-
}
|
822 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
823 |
-
void THRUST_RUNTIME_FUNCTION
|
824 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
|
825 |
-
{
|
826 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
827 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6>;
|
828 |
-
print_info(ptr);
|
829 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
830 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6);
|
831 |
-
}
|
832 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
833 |
-
void THRUST_RUNTIME_FUNCTION
|
834 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
|
835 |
-
{
|
836 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
837 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7>;
|
838 |
-
print_info(ptr);
|
839 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
840 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7);
|
841 |
-
}
|
842 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
843 |
-
void THRUST_RUNTIME_FUNCTION
|
844 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
|
845 |
-
{
|
846 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
847 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8>;
|
848 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
849 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8);
|
850 |
-
}
|
851 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
852 |
-
void THRUST_RUNTIME_FUNCTION
|
853 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
|
854 |
-
{
|
855 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
856 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9>;
|
857 |
-
print_info(ptr);
|
858 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
859 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
|
860 |
-
}
|
861 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
862 |
-
void THRUST_RUNTIME_FUNCTION
|
863 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA) const
|
864 |
-
{
|
865 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
866 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA>;
|
867 |
-
print_info(ptr);
|
868 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
869 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
|
870 |
-
}
|
871 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
872 |
-
void THRUST_RUNTIME_FUNCTION
|
873 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB) const
|
874 |
-
{
|
875 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
876 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB>;
|
877 |
-
print_info(ptr);
|
878 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
879 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
|
880 |
-
}
|
881 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
882 |
-
void THRUST_RUNTIME_FUNCTION
|
883 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC) const
|
884 |
-
{
|
885 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
886 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC>;
|
887 |
-
print_info(ptr);
|
888 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
889 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
|
890 |
-
}
|
891 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
892 |
-
void THRUST_RUNTIME_FUNCTION
|
893 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC,_xD xD) const
|
894 |
-
{
|
895 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
896 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD>;
|
897 |
-
print_info(ptr);
|
898 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
899 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
|
900 |
-
}
|
901 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
902 |
-
void THRUST_RUNTIME_FUNCTION
|
903 |
-
launch_impl(thrust::detail::false_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9,_xA xA,_xB xB,_xC xC,_xD xD,_xE xE) const
|
904 |
-
{
|
905 |
-
assert((has_shmem && vshmem == NULL) || (!has_shmem && vshmem != NULL && shmem_size == 0));
|
906 |
-
void (*ptr)(char*, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD, _xE) = _kernel_agent_vshmem<Agent, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _xA, _xB, _xC, _xD, _xE>;
|
907 |
-
print_info(ptr);
|
908 |
-
launcher::triple_chevron(grid, plan.block_threads, shmem_size, stream)
|
909 |
-
.doit(ptr, vshmem, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
|
910 |
-
}
|
911 |
-
|
912 |
-
////////////////////////////////////////////////////////
|
913 |
-
////////////////////////////////////////////////////////
|
914 |
-
////////////////////////////////////////////////////////
|
915 |
-
|
916 |
-
template <class _0>
|
917 |
-
void THRUST_RUNTIME_FUNCTION
|
918 |
-
launch_impl(thrust::detail::true_type, _0 x0) const
|
919 |
-
{
|
920 |
-
assert(has_shmem && vshmem == NULL);
|
921 |
-
void (*ptr)(_0) = _kernel_agent<Agent, _0>;
|
922 |
-
print_info(ptr);
|
923 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
924 |
-
.doit(ptr, x0);
|
925 |
-
}
|
926 |
-
template <class _0, class _1>
|
927 |
-
void THRUST_RUNTIME_FUNCTION
|
928 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1) const
|
929 |
-
{
|
930 |
-
assert(has_shmem && vshmem == NULL);
|
931 |
-
void (*ptr)(_0, _1) = _kernel_agent<Agent, _0, _1>;
|
932 |
-
print_info(ptr);
|
933 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
934 |
-
.doit(ptr, x0, x1);
|
935 |
-
}
|
936 |
-
template <class _0, class _1, class _2>
|
937 |
-
void THRUST_RUNTIME_FUNCTION
|
938 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2) const
|
939 |
-
{
|
940 |
-
assert(has_shmem && vshmem == NULL);
|
941 |
-
void (*ptr)(_0,_1,_2) = _kernel_agent<Agent, _0, _1, _2>;
|
942 |
-
print_info(ptr);
|
943 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
944 |
-
.doit(ptr, x0, x1, x2);
|
945 |
-
}
|
946 |
-
template <class _0, class _1, class _2, class _3>
|
947 |
-
void THRUST_RUNTIME_FUNCTION
|
948 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3) const
|
949 |
-
{
|
950 |
-
assert(has_shmem && vshmem == NULL);
|
951 |
-
void (*ptr)(_0,_1,_2,_3) = _kernel_agent<Agent, _0, _1, _2,_3>;
|
952 |
-
print_info(ptr);
|
953 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
954 |
-
.doit(ptr, x0, x1, x2, x3);
|
955 |
-
}
|
956 |
-
template <class _0, class _1, class _2, class _3, class _4>
|
957 |
-
void THRUST_RUNTIME_FUNCTION
|
958 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
|
959 |
-
{
|
960 |
-
assert(has_shmem && vshmem == NULL);
|
961 |
-
void (*ptr)(_0,_1,_2,_3,_4) = _kernel_agent<Agent, _0, _1, _2,_3,_4>;
|
962 |
-
print_info(ptr);
|
963 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
964 |
-
.doit(ptr, x0, x1, x2, x3, x4);
|
965 |
-
}
|
966 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5>
|
967 |
-
void THRUST_RUNTIME_FUNCTION
|
968 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
|
969 |
-
{
|
970 |
-
assert(has_shmem && vshmem == NULL);
|
971 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5>;
|
972 |
-
print_info(ptr);
|
973 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
974 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5);
|
975 |
-
}
|
976 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
977 |
-
void THRUST_RUNTIME_FUNCTION
|
978 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
|
979 |
-
{
|
980 |
-
assert(has_shmem && vshmem == NULL);
|
981 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6>;
|
982 |
-
print_info(ptr);
|
983 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
984 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6);
|
985 |
-
}
|
986 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
987 |
-
void THRUST_RUNTIME_FUNCTION
|
988 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
|
989 |
-
{
|
990 |
-
assert(has_shmem && vshmem == NULL);
|
991 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7>;
|
992 |
-
print_info(ptr);
|
993 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
994 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7);
|
995 |
-
}
|
996 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
997 |
-
void THRUST_RUNTIME_FUNCTION
|
998 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
|
999 |
-
{
|
1000 |
-
assert(has_shmem && vshmem == NULL);
|
1001 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8>;
|
1002 |
-
print_info(ptr);
|
1003 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1004 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8);
|
1005 |
-
}
|
1006 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
1007 |
-
void THRUST_RUNTIME_FUNCTION
|
1008 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
|
1009 |
-
{
|
1010 |
-
assert(has_shmem && vshmem == NULL);
|
1011 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9>;
|
1012 |
-
print_info(ptr);
|
1013 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1014 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
|
1015 |
-
}
|
1016 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
1017 |
-
void THRUST_RUNTIME_FUNCTION
|
1018 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA) const
|
1019 |
-
{
|
1020 |
-
assert(has_shmem && vshmem == NULL);
|
1021 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA>;
|
1022 |
-
print_info(ptr);
|
1023 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1024 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
|
1025 |
-
}
|
1026 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
1027 |
-
void THRUST_RUNTIME_FUNCTION
|
1028 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB) const
|
1029 |
-
{
|
1030 |
-
assert(has_shmem && vshmem == NULL);
|
1031 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB>;
|
1032 |
-
print_info(ptr);
|
1033 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1034 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
|
1035 |
-
}
|
1036 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
1037 |
-
void THRUST_RUNTIME_FUNCTION
|
1038 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC) const
|
1039 |
-
{
|
1040 |
-
assert(has_shmem && vshmem == NULL);
|
1041 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC>;
|
1042 |
-
print_info(ptr);
|
1043 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1044 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
|
1045 |
-
}
|
1046 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
1047 |
-
void THRUST_RUNTIME_FUNCTION
|
1048 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD) const
|
1049 |
-
{
|
1050 |
-
assert(has_shmem && vshmem == NULL);
|
1051 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD>;
|
1052 |
-
print_info(ptr);
|
1053 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1054 |
-
.doit(ptr, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
|
1055 |
-
}
|
1056 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
1057 |
-
void THRUST_RUNTIME_FUNCTION
|
1058 |
-
launch_impl(thrust::detail::true_type, _0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE) const
|
1059 |
-
{
|
1060 |
-
assert(has_shmem && vshmem == NULL);
|
1061 |
-
void (*ptr)(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE) = _kernel_agent<Agent, _0, _1, _2,_3,_4,_5,_6,_7,_8,_9,_xA,_xB,_xC,_xD,_xE>;
|
1062 |
-
print_info(ptr);
|
1063 |
-
launcher::triple_chevron(grid, plan.block_threads, plan.shared_memory_size, stream)
|
1064 |
-
.doit(ptr,x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
////////////////////////////////////////////////////////
|
1068 |
-
////////////////////////////////////////////////////////
|
1069 |
-
////////////////////////////////////////////////////////
|
1070 |
-
|
1071 |
-
template <class _0>
|
1072 |
-
void THRUST_RUNTIME_FUNCTION
|
1073 |
-
launch(_0 x0) const
|
1074 |
-
{
|
1075 |
-
launch_impl(has_enough_shmem_t(), x0);
|
1076 |
-
sync();
|
1077 |
-
}
|
1078 |
-
template <class _0, class _1>
|
1079 |
-
void THRUST_RUNTIME_FUNCTION
|
1080 |
-
launch(_0 x0, _1 x1) const
|
1081 |
-
{
|
1082 |
-
launch_impl(has_enough_shmem_t(), x0, x1);
|
1083 |
-
sync();
|
1084 |
-
}
|
1085 |
-
template <class _0, class _1, class _2>
|
1086 |
-
void THRUST_RUNTIME_FUNCTION
|
1087 |
-
launch(_0 x0, _1 x1, _2 x2) const
|
1088 |
-
{
|
1089 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2);
|
1090 |
-
sync();
|
1091 |
-
}
|
1092 |
-
template <class _0, class _1, class _2, class _3>
|
1093 |
-
void THRUST_RUNTIME_FUNCTION
|
1094 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3) const
|
1095 |
-
{
|
1096 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3);
|
1097 |
-
sync();
|
1098 |
-
}
|
1099 |
-
template <class _0, class _1, class _2, class _3, class _4>
|
1100 |
-
void THRUST_RUNTIME_FUNCTION
|
1101 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4) const
|
1102 |
-
{
|
1103 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4);
|
1104 |
-
sync();
|
1105 |
-
}
|
1106 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5>
|
1107 |
-
void THRUST_RUNTIME_FUNCTION
|
1108 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5) const
|
1109 |
-
{
|
1110 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5);
|
1111 |
-
sync();
|
1112 |
-
}
|
1113 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6>
|
1114 |
-
void THRUST_RUNTIME_FUNCTION
|
1115 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6) const
|
1116 |
-
{
|
1117 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6);
|
1118 |
-
sync();
|
1119 |
-
}
|
1120 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7>
|
1121 |
-
void THRUST_RUNTIME_FUNCTION
|
1122 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7) const
|
1123 |
-
{
|
1124 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7);
|
1125 |
-
sync();
|
1126 |
-
}
|
1127 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8>
|
1128 |
-
void THRUST_RUNTIME_FUNCTION
|
1129 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8) const
|
1130 |
-
{
|
1131 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8);
|
1132 |
-
sync();
|
1133 |
-
}
|
1134 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9>
|
1135 |
-
void THRUST_RUNTIME_FUNCTION
|
1136 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9) const
|
1137 |
-
{
|
1138 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);
|
1139 |
-
sync();
|
1140 |
-
}
|
1141 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA>
|
1142 |
-
void THRUST_RUNTIME_FUNCTION
|
1143 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA) const
|
1144 |
-
{
|
1145 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA);
|
1146 |
-
sync();
|
1147 |
-
}
|
1148 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB>
|
1149 |
-
void THRUST_RUNTIME_FUNCTION
|
1150 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB) const
|
1151 |
-
{
|
1152 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB);
|
1153 |
-
sync();
|
1154 |
-
}
|
1155 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC>
|
1156 |
-
void THRUST_RUNTIME_FUNCTION
|
1157 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC) const
|
1158 |
-
{
|
1159 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC);
|
1160 |
-
sync();
|
1161 |
-
}
|
1162 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD>
|
1163 |
-
void THRUST_RUNTIME_FUNCTION
|
1164 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD) const
|
1165 |
-
{
|
1166 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD);
|
1167 |
-
sync();
|
1168 |
-
}
|
1169 |
-
template <class _0, class _1, class _2, class _3, class _4, class _5, class _6, class _7, class _8, class _9, class _xA, class _xB, class _xC, class _xD, class _xE>
|
1170 |
-
void THRUST_RUNTIME_FUNCTION
|
1171 |
-
launch(_0 x0, _1 x1, _2 x2, _3 x3, _4 x4, _5 x5, _6 x6, _7 x7, _8 x8, _9 x9, _xA xA, _xB xB, _xC xC, _xD xD, _xE xE) const
|
1172 |
-
{
|
1173 |
-
launch_impl(has_enough_shmem_t(), x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xA, xB, xC, xD, xE);
|
1174 |
-
sync();
|
1175 |
-
}
|
1176 |
-
#endif
|
1177 |
-
|
1178 |
-
|
1179 |
-
};
|
1180 |
-
|
1181 |
-
} // namespace core
|
1182 |
-
}
|
1183 |
-
} // end namespace thrust
|
1184 |
-
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/lama-example/saicinpainting/evaluation/utils.py
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
from enum import Enum
|
2 |
-
|
3 |
-
import yaml
|
4 |
-
from easydict import EasyDict as edict
|
5 |
-
import torch.nn as nn
|
6 |
-
import torch
|
7 |
-
|
8 |
-
|
9 |
-
def load_yaml(path):
|
10 |
-
with open(path, 'r') as f:
|
11 |
-
return edict(yaml.safe_load(f))
|
12 |
-
|
13 |
-
|
14 |
-
def move_to_device(obj, device):
|
15 |
-
if isinstance(obj, nn.Module):
|
16 |
-
return obj.to(device)
|
17 |
-
if torch.is_tensor(obj):
|
18 |
-
return obj.to(device)
|
19 |
-
if isinstance(obj, (tuple, list)):
|
20 |
-
return [move_to_device(el, device) for el in obj]
|
21 |
-
if isinstance(obj, dict):
|
22 |
-
return {name: move_to_device(val, device) for name, val in obj.items()}
|
23 |
-
raise ValueError(f'Unexpected type {type(obj)}')
|
24 |
-
|
25 |
-
|
26 |
-
class SmallMode(Enum):
|
27 |
-
DROP = "drop"
|
28 |
-
UPSCALE = "upscale"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/lama-example/saicinpainting/training/trainers/default.py
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
import logging
|
2 |
-
|
3 |
-
import torch
|
4 |
-
import torch.nn.functional as F
|
5 |
-
from omegaconf import OmegaConf
|
6 |
-
|
7 |
-
from saicinpainting.training.data.datasets import make_constant_area_crop_params
|
8 |
-
from saicinpainting.training.losses.distance_weighting import make_mask_distance_weighter
|
9 |
-
from saicinpainting.training.losses.feature_matching import feature_matching_loss, masked_l1_loss
|
10 |
-
from saicinpainting.training.modules.fake_fakes import FakeFakesGenerator
|
11 |
-
from saicinpainting.training.trainers.base import BaseInpaintingTrainingModule, make_multiscale_noise
|
12 |
-
from saicinpainting.utils import add_prefix_to_keys, get_ramp
|
13 |
-
|
14 |
-
LOGGER = logging.getLogger(__name__)
|
15 |
-
|
16 |
-
|
17 |
-
def make_constant_area_crop_batch(batch, **kwargs):
|
18 |
-
crop_y, crop_x, crop_height, crop_width = make_constant_area_crop_params(img_height=batch['image'].shape[2],
|
19 |
-
img_width=batch['image'].shape[3],
|
20 |
-
**kwargs)
|
21 |
-
batch['image'] = batch['image'][:, :, crop_y : crop_y + crop_height, crop_x : crop_x + crop_width]
|
22 |
-
batch['mask'] = batch['mask'][:, :, crop_y: crop_y + crop_height, crop_x: crop_x + crop_width]
|
23 |
-
return batch
|
24 |
-
|
25 |
-
|
26 |
-
class DefaultInpaintingTrainingModule(BaseInpaintingTrainingModule):
|
27 |
-
def __init__(self, *args, concat_mask=True, rescale_scheduler_kwargs=None, image_to_discriminator='predicted_image',
|
28 |
-
add_noise_kwargs=None, noise_fill_hole=False, const_area_crop_kwargs=None,
|
29 |
-
distance_weighter_kwargs=None, distance_weighted_mask_for_discr=False,
|
30 |
-
fake_fakes_proba=0, fake_fakes_generator_kwargs=None,
|
31 |
-
**kwargs):
|
32 |
-
super().__init__(*args, **kwargs)
|
33 |
-
self.concat_mask = concat_mask
|
34 |
-
self.rescale_size_getter = get_ramp(**rescale_scheduler_kwargs) if rescale_scheduler_kwargs is not None else None
|
35 |
-
self.image_to_discriminator = image_to_discriminator
|
36 |
-
self.add_noise_kwargs = add_noise_kwargs
|
37 |
-
self.noise_fill_hole = noise_fill_hole
|
38 |
-
self.const_area_crop_kwargs = const_area_crop_kwargs
|
39 |
-
self.refine_mask_for_losses = make_mask_distance_weighter(**distance_weighter_kwargs) \
|
40 |
-
if distance_weighter_kwargs is not None else None
|
41 |
-
self.distance_weighted_mask_for_discr = distance_weighted_mask_for_discr
|
42 |
-
|
43 |
-
self.fake_fakes_proba = fake_fakes_proba
|
44 |
-
if self.fake_fakes_proba > 1e-3:
|
45 |
-
self.fake_fakes_gen = FakeFakesGenerator(**(fake_fakes_generator_kwargs or {}))
|
46 |
-
|
47 |
-
def forward(self, batch):
|
48 |
-
if self.training and self.rescale_size_getter is not None:
|
49 |
-
cur_size = self.rescale_size_getter(self.global_step)
|
50 |
-
batch['image'] = F.interpolate(batch['image'], size=cur_size, mode='bilinear', align_corners=False)
|
51 |
-
batch['mask'] = F.interpolate(batch['mask'], size=cur_size, mode='nearest')
|
52 |
-
|
53 |
-
if self.training and self.const_area_crop_kwargs is not None:
|
54 |
-
batch = make_constant_area_crop_batch(batch, **self.const_area_crop_kwargs)
|
55 |
-
|
56 |
-
img = batch['image']
|
57 |
-
mask = batch['mask']
|
58 |
-
|
59 |
-
masked_img = img * (1 - mask)
|
60 |
-
|
61 |
-
if self.add_noise_kwargs is not None:
|
62 |
-
noise = make_multiscale_noise(masked_img, **self.add_noise_kwargs)
|
63 |
-
if self.noise_fill_hole:
|
64 |
-
masked_img = masked_img + mask * noise[:, :masked_img.shape[1]]
|
65 |
-
masked_img = torch.cat([masked_img, noise], dim=1)
|
66 |
-
|
67 |
-
if self.concat_mask:
|
68 |
-
masked_img = torch.cat([masked_img, mask], dim=1)
|
69 |
-
|
70 |
-
batch['predicted_image'] = self.generator(masked_img)
|
71 |
-
batch['inpainted'] = mask * batch['predicted_image'] + (1 - mask) * batch['image']
|
72 |
-
|
73 |
-
if self.fake_fakes_proba > 1e-3:
|
74 |
-
if self.training and torch.rand(1).item() < self.fake_fakes_proba:
|
75 |
-
batch['fake_fakes'], batch['fake_fakes_masks'] = self.fake_fakes_gen(img, mask)
|
76 |
-
batch['use_fake_fakes'] = True
|
77 |
-
else:
|
78 |
-
batch['fake_fakes'] = torch.zeros_like(img)
|
79 |
-
batch['fake_fakes_masks'] = torch.zeros_like(mask)
|
80 |
-
batch['use_fake_fakes'] = False
|
81 |
-
|
82 |
-
batch['mask_for_losses'] = self.refine_mask_for_losses(img, batch['predicted_image'], mask) \
|
83 |
-
if self.refine_mask_for_losses is not None and self.training \
|
84 |
-
else mask
|
85 |
-
|
86 |
-
return batch
|
87 |
-
|
88 |
-
def generator_loss(self, batch):
|
89 |
-
img = batch['image']
|
90 |
-
predicted_img = batch[self.image_to_discriminator]
|
91 |
-
original_mask = batch['mask']
|
92 |
-
supervised_mask = batch['mask_for_losses']
|
93 |
-
|
94 |
-
# L1
|
95 |
-
l1_value = masked_l1_loss(predicted_img, img, supervised_mask,
|
96 |
-
self.config.losses.l1.weight_known,
|
97 |
-
self.config.losses.l1.weight_missing)
|
98 |
-
|
99 |
-
total_loss = l1_value
|
100 |
-
metrics = dict(gen_l1=l1_value)
|
101 |
-
|
102 |
-
# vgg-based perceptual loss
|
103 |
-
if self.config.losses.perceptual.weight > 0:
|
104 |
-
pl_value = self.loss_pl(predicted_img, img, mask=supervised_mask).sum() * self.config.losses.perceptual.weight
|
105 |
-
total_loss = total_loss + pl_value
|
106 |
-
metrics['gen_pl'] = pl_value
|
107 |
-
|
108 |
-
# discriminator
|
109 |
-
# adversarial_loss calls backward by itself
|
110 |
-
mask_for_discr = supervised_mask if self.distance_weighted_mask_for_discr else original_mask
|
111 |
-
self.adversarial_loss.pre_generator_step(real_batch=img, fake_batch=predicted_img,
|
112 |
-
generator=self.generator, discriminator=self.discriminator)
|
113 |
-
discr_real_pred, discr_real_features = self.discriminator(img)
|
114 |
-
discr_fake_pred, discr_fake_features = self.discriminator(predicted_img)
|
115 |
-
adv_gen_loss, adv_metrics = self.adversarial_loss.generator_loss(real_batch=img,
|
116 |
-
fake_batch=predicted_img,
|
117 |
-
discr_real_pred=discr_real_pred,
|
118 |
-
discr_fake_pred=discr_fake_pred,
|
119 |
-
mask=mask_for_discr)
|
120 |
-
total_loss = total_loss + adv_gen_loss
|
121 |
-
metrics['gen_adv'] = adv_gen_loss
|
122 |
-
metrics.update(add_prefix_to_keys(adv_metrics, 'adv_'))
|
123 |
-
|
124 |
-
# feature matching
|
125 |
-
if self.config.losses.feature_matching.weight > 0:
|
126 |
-
need_mask_in_fm = OmegaConf.to_container(self.config.losses.feature_matching).get('pass_mask', False)
|
127 |
-
mask_for_fm = supervised_mask if need_mask_in_fm else None
|
128 |
-
fm_value = feature_matching_loss(discr_fake_features, discr_real_features,
|
129 |
-
mask=mask_for_fm) * self.config.losses.feature_matching.weight
|
130 |
-
total_loss = total_loss + fm_value
|
131 |
-
metrics['gen_fm'] = fm_value
|
132 |
-
|
133 |
-
if self.loss_resnet_pl is not None:
|
134 |
-
resnet_pl_value = self.loss_resnet_pl(predicted_img, img)
|
135 |
-
total_loss = total_loss + resnet_pl_value
|
136 |
-
metrics['gen_resnet_pl'] = resnet_pl_value
|
137 |
-
|
138 |
-
return total_loss, metrics
|
139 |
-
|
140 |
-
def discriminator_loss(self, batch):
|
141 |
-
total_loss = 0
|
142 |
-
metrics = {}
|
143 |
-
|
144 |
-
predicted_img = batch[self.image_to_discriminator].detach()
|
145 |
-
self.adversarial_loss.pre_discriminator_step(real_batch=batch['image'], fake_batch=predicted_img,
|
146 |
-
generator=self.generator, discriminator=self.discriminator)
|
147 |
-
discr_real_pred, discr_real_features = self.discriminator(batch['image'])
|
148 |
-
discr_fake_pred, discr_fake_features = self.discriminator(predicted_img)
|
149 |
-
adv_discr_loss, adv_metrics = self.adversarial_loss.discriminator_loss(real_batch=batch['image'],
|
150 |
-
fake_batch=predicted_img,
|
151 |
-
discr_real_pred=discr_real_pred,
|
152 |
-
discr_fake_pred=discr_fake_pred,
|
153 |
-
mask=batch['mask'])
|
154 |
-
total_loss = total_loss + adv_discr_loss
|
155 |
-
metrics['discr_adv'] = adv_discr_loss
|
156 |
-
metrics.update(add_prefix_to_keys(adv_metrics, 'adv_'))
|
157 |
-
|
158 |
-
|
159 |
-
if batch.get('use_fake_fakes', False):
|
160 |
-
fake_fakes = batch['fake_fakes']
|
161 |
-
self.adversarial_loss.pre_discriminator_step(real_batch=batch['image'], fake_batch=fake_fakes,
|
162 |
-
generator=self.generator, discriminator=self.discriminator)
|
163 |
-
discr_fake_fakes_pred, _ = self.discriminator(fake_fakes)
|
164 |
-
fake_fakes_adv_discr_loss, fake_fakes_adv_metrics = self.adversarial_loss.discriminator_loss(
|
165 |
-
real_batch=batch['image'],
|
166 |
-
fake_batch=fake_fakes,
|
167 |
-
discr_real_pred=discr_real_pred,
|
168 |
-
discr_fake_pred=discr_fake_fakes_pred,
|
169 |
-
mask=batch['mask']
|
170 |
-
)
|
171 |
-
total_loss = total_loss + fake_fakes_adv_discr_loss
|
172 |
-
metrics['discr_adv_fake_fakes'] = fake_fakes_adv_discr_loss
|
173 |
-
metrics.update(add_prefix_to_keys(fake_fakes_adv_metrics, 'adv_'))
|
174 |
-
|
175 |
-
return total_loss, metrics
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/regionclip-demo/detectron2/data/datasets/pascal_voc.py
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
# Copyright (c) Facebook, Inc. and its affiliates.
|
3 |
-
|
4 |
-
import numpy as np
|
5 |
-
import os
|
6 |
-
import xml.etree.ElementTree as ET
|
7 |
-
from typing import List, Tuple, Union
|
8 |
-
|
9 |
-
from detectron2.data import DatasetCatalog, MetadataCatalog
|
10 |
-
from detectron2.structures import BoxMode
|
11 |
-
from detectron2.utils.file_io import PathManager
|
12 |
-
|
13 |
-
__all__ = ["load_voc_instances", "register_pascal_voc"]
|
14 |
-
|
15 |
-
|
16 |
-
# fmt: off
|
17 |
-
CLASS_NAMES = (
|
18 |
-
"aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat",
|
19 |
-
"chair", "cow", "diningtable", "dog", "horse", "motorbike", "person",
|
20 |
-
"pottedplant", "sheep", "sofa", "train", "tvmonitor"
|
21 |
-
)
|
22 |
-
# fmt: on
|
23 |
-
|
24 |
-
|
25 |
-
def load_voc_instances(dirname: str, split: str, class_names: Union[List[str], Tuple[str, ...]]):
|
26 |
-
"""
|
27 |
-
Load Pascal VOC detection annotations to Detectron2 format.
|
28 |
-
|
29 |
-
Args:
|
30 |
-
dirname: Contain "Annotations", "ImageSets", "JPEGImages"
|
31 |
-
split (str): one of "train", "test", "val", "trainval"
|
32 |
-
class_names: list or tuple of class names
|
33 |
-
"""
|
34 |
-
with PathManager.open(os.path.join(dirname, "ImageSets", "Main", split + ".txt")) as f:
|
35 |
-
fileids = np.loadtxt(f, dtype=np.str)
|
36 |
-
|
37 |
-
# Needs to read many small annotation files. Makes sense at local
|
38 |
-
annotation_dirname = PathManager.get_local_path(os.path.join(dirname, "Annotations/"))
|
39 |
-
dicts = []
|
40 |
-
for fileid in fileids:
|
41 |
-
anno_file = os.path.join(annotation_dirname, fileid + ".xml")
|
42 |
-
jpeg_file = os.path.join(dirname, "JPEGImages", fileid + ".jpg")
|
43 |
-
|
44 |
-
with PathManager.open(anno_file) as f:
|
45 |
-
tree = ET.parse(f)
|
46 |
-
|
47 |
-
r = {
|
48 |
-
"file_name": jpeg_file,
|
49 |
-
"image_id": fileid,
|
50 |
-
"height": int(tree.findall("./size/height")[0].text),
|
51 |
-
"width": int(tree.findall("./size/width")[0].text),
|
52 |
-
}
|
53 |
-
instances = []
|
54 |
-
|
55 |
-
for obj in tree.findall("object"):
|
56 |
-
cls = obj.find("name").text
|
57 |
-
# We include "difficult" samples in training.
|
58 |
-
# Based on limited experiments, they don't hurt accuracy.
|
59 |
-
# difficult = int(obj.find("difficult").text)
|
60 |
-
# if difficult == 1:
|
61 |
-
# continue
|
62 |
-
bbox = obj.find("bndbox")
|
63 |
-
bbox = [float(bbox.find(x).text) for x in ["xmin", "ymin", "xmax", "ymax"]]
|
64 |
-
# Original annotations are integers in the range [1, W or H]
|
65 |
-
# Assuming they mean 1-based pixel indices (inclusive),
|
66 |
-
# a box with annotation (xmin=1, xmax=W) covers the whole image.
|
67 |
-
# In coordinate space this is represented by (xmin=0, xmax=W)
|
68 |
-
bbox[0] -= 1.0
|
69 |
-
bbox[1] -= 1.0
|
70 |
-
instances.append(
|
71 |
-
{"category_id": class_names.index(cls), "bbox": bbox, "bbox_mode": BoxMode.XYXY_ABS}
|
72 |
-
)
|
73 |
-
r["annotations"] = instances
|
74 |
-
dicts.append(r)
|
75 |
-
return dicts
|
76 |
-
|
77 |
-
|
78 |
-
def register_pascal_voc(name, dirname, split, year, class_names=CLASS_NAMES):
|
79 |
-
DatasetCatalog.register(name, lambda: load_voc_instances(dirname, split, class_names))
|
80 |
-
MetadataCatalog.get(name).set(
|
81 |
-
thing_classes=list(class_names), dirname=dirname, year=year, split=split
|
82 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ChandraMohanNayal/AutoGPT/autogpt/json_utils/json_fix_llm.py
DELETED
@@ -1,220 +0,0 @@
|
|
1 |
-
"""This module contains functions to fix JSON strings generated by LLM models, such as ChatGPT, using the assistance
|
2 |
-
of the ChatGPT API or LLM models."""
|
3 |
-
from __future__ import annotations
|
4 |
-
|
5 |
-
import contextlib
|
6 |
-
import json
|
7 |
-
from typing import Any, Dict
|
8 |
-
|
9 |
-
from colorama import Fore
|
10 |
-
from regex import regex
|
11 |
-
|
12 |
-
from autogpt.config import Config
|
13 |
-
from autogpt.json_utils.json_fix_general import correct_json
|
14 |
-
from autogpt.llm_utils import call_ai_function
|
15 |
-
from autogpt.logs import logger
|
16 |
-
from autogpt.speech import say_text
|
17 |
-
|
18 |
-
JSON_SCHEMA = """
|
19 |
-
{
|
20 |
-
"command": {
|
21 |
-
"name": "command name",
|
22 |
-
"args": {
|
23 |
-
"arg name": "value"
|
24 |
-
}
|
25 |
-
},
|
26 |
-
"thoughts":
|
27 |
-
{
|
28 |
-
"text": "thought",
|
29 |
-
"reasoning": "reasoning",
|
30 |
-
"plan": "- short bulleted\n- list that conveys\n- long-term plan",
|
31 |
-
"criticism": "constructive self-criticism",
|
32 |
-
"speak": "thoughts summary to say to user"
|
33 |
-
}
|
34 |
-
}
|
35 |
-
"""
|
36 |
-
|
37 |
-
CFG = Config()
|
38 |
-
|
39 |
-
|
40 |
-
def auto_fix_json(json_string: str, schema: str) -> str:
|
41 |
-
"""Fix the given JSON string to make it parseable and fully compliant with
|
42 |
-
the provided schema using GPT-3.
|
43 |
-
|
44 |
-
Args:
|
45 |
-
json_string (str): The JSON string to fix.
|
46 |
-
schema (str): The schema to use to fix the JSON.
|
47 |
-
Returns:
|
48 |
-
str: The fixed JSON string.
|
49 |
-
"""
|
50 |
-
# Try to fix the JSON using GPT:
|
51 |
-
function_string = "def fix_json(json_string: str, schema:str=None) -> str:"
|
52 |
-
args = [f"'''{json_string}'''", f"'''{schema}'''"]
|
53 |
-
description_string = (
|
54 |
-
"This function takes a JSON string and ensures that it"
|
55 |
-
" is parseable and fully compliant with the provided schema. If an object"
|
56 |
-
" or field specified in the schema isn't contained within the correct JSON,"
|
57 |
-
" it is omitted. The function also escapes any double quotes within JSON"
|
58 |
-
" string values to ensure that they are valid. If the JSON string contains"
|
59 |
-
" any None or NaN values, they are replaced with null before being parsed."
|
60 |
-
)
|
61 |
-
|
62 |
-
# If it doesn't already start with a "`", add one:
|
63 |
-
if not json_string.startswith("`"):
|
64 |
-
json_string = "```json\n" + json_string + "\n```"
|
65 |
-
result_string = call_ai_function(
|
66 |
-
function_string, args, description_string, model=CFG.fast_llm_model
|
67 |
-
)
|
68 |
-
logger.debug("------------ JSON FIX ATTEMPT ---------------")
|
69 |
-
logger.debug(f"Original JSON: {json_string}")
|
70 |
-
logger.debug("-----------")
|
71 |
-
logger.debug(f"Fixed JSON: {result_string}")
|
72 |
-
logger.debug("----------- END OF FIX ATTEMPT ----------------")
|
73 |
-
|
74 |
-
try:
|
75 |
-
json.loads(result_string) # just check the validity
|
76 |
-
return result_string
|
77 |
-
except json.JSONDecodeError: # noqa: E722
|
78 |
-
# Get the call stack:
|
79 |
-
# import traceback
|
80 |
-
# call_stack = traceback.format_exc()
|
81 |
-
# print(f"Failed to fix JSON: '{json_string}' "+call_stack)
|
82 |
-
return "failed"
|
83 |
-
|
84 |
-
|
85 |
-
def fix_json_using_multiple_techniques(assistant_reply: str) -> Dict[Any, Any]:
|
86 |
-
"""Fix the given JSON string to make it parseable and fully compliant with two techniques.
|
87 |
-
|
88 |
-
Args:
|
89 |
-
json_string (str): The JSON string to fix.
|
90 |
-
|
91 |
-
Returns:
|
92 |
-
str: The fixed JSON string.
|
93 |
-
"""
|
94 |
-
|
95 |
-
# Parse and print Assistant response
|
96 |
-
assistant_reply_json = fix_and_parse_json(assistant_reply)
|
97 |
-
if assistant_reply_json == {}:
|
98 |
-
assistant_reply_json = attempt_to_fix_json_by_finding_outermost_brackets(
|
99 |
-
assistant_reply
|
100 |
-
)
|
101 |
-
|
102 |
-
if assistant_reply_json != {}:
|
103 |
-
return assistant_reply_json
|
104 |
-
|
105 |
-
logger.error(
|
106 |
-
"Error: The following AI output couldn't be converted to a JSON:\n",
|
107 |
-
assistant_reply,
|
108 |
-
)
|
109 |
-
if CFG.speak_mode:
|
110 |
-
say_text("I have received an invalid JSON response from the OpenAI API.")
|
111 |
-
|
112 |
-
return {}
|
113 |
-
|
114 |
-
|
115 |
-
def fix_and_parse_json(
|
116 |
-
json_to_load: str, try_to_fix_with_gpt: bool = True
|
117 |
-
) -> Dict[Any, Any]:
|
118 |
-
"""Fix and parse JSON string
|
119 |
-
|
120 |
-
Args:
|
121 |
-
json_to_load (str): The JSON string.
|
122 |
-
try_to_fix_with_gpt (bool, optional): Try to fix the JSON with GPT.
|
123 |
-
Defaults to True.
|
124 |
-
|
125 |
-
Returns:
|
126 |
-
str or dict[Any, Any]: The parsed JSON.
|
127 |
-
"""
|
128 |
-
|
129 |
-
with contextlib.suppress(json.JSONDecodeError):
|
130 |
-
json_to_load = json_to_load.replace("\t", "")
|
131 |
-
return json.loads(json_to_load)
|
132 |
-
|
133 |
-
with contextlib.suppress(json.JSONDecodeError):
|
134 |
-
json_to_load = correct_json(json_to_load)
|
135 |
-
return json.loads(json_to_load)
|
136 |
-
# Let's do something manually:
|
137 |
-
# sometimes GPT responds with something BEFORE the braces:
|
138 |
-
# "I'm sorry, I don't understand. Please try again."
|
139 |
-
# {"text": "I'm sorry, I don't understand. Please try again.",
|
140 |
-
# "confidence": 0.0}
|
141 |
-
# So let's try to find the first brace and then parse the rest
|
142 |
-
# of the string
|
143 |
-
try:
|
144 |
-
brace_index = json_to_load.index("{")
|
145 |
-
maybe_fixed_json = json_to_load[brace_index:]
|
146 |
-
last_brace_index = maybe_fixed_json.rindex("}")
|
147 |
-
maybe_fixed_json = maybe_fixed_json[: last_brace_index + 1]
|
148 |
-
return json.loads(maybe_fixed_json)
|
149 |
-
except (json.JSONDecodeError, ValueError) as e:
|
150 |
-
return try_ai_fix(try_to_fix_with_gpt, e, json_to_load)
|
151 |
-
|
152 |
-
|
153 |
-
def try_ai_fix(
|
154 |
-
try_to_fix_with_gpt: bool, exception: Exception, json_to_load: str
|
155 |
-
) -> Dict[Any, Any]:
|
156 |
-
"""Try to fix the JSON with the AI
|
157 |
-
|
158 |
-
Args:
|
159 |
-
try_to_fix_with_gpt (bool): Whether to try to fix the JSON with the AI.
|
160 |
-
exception (Exception): The exception that was raised.
|
161 |
-
json_to_load (str): The JSON string to load.
|
162 |
-
|
163 |
-
Raises:
|
164 |
-
exception: If try_to_fix_with_gpt is False.
|
165 |
-
|
166 |
-
Returns:
|
167 |
-
str or dict[Any, Any]: The JSON string or dictionary.
|
168 |
-
"""
|
169 |
-
if not try_to_fix_with_gpt:
|
170 |
-
raise exception
|
171 |
-
if CFG.debug_mode:
|
172 |
-
logger.warn(
|
173 |
-
"Warning: Failed to parse AI output, attempting to fix."
|
174 |
-
"\n If you see this warning frequently, it's likely that"
|
175 |
-
" your prompt is confusing the AI. Try changing it up"
|
176 |
-
" slightly."
|
177 |
-
)
|
178 |
-
# Now try to fix this up using the ai_functions
|
179 |
-
ai_fixed_json = auto_fix_json(json_to_load, JSON_SCHEMA)
|
180 |
-
|
181 |
-
if ai_fixed_json != "failed":
|
182 |
-
return json.loads(ai_fixed_json)
|
183 |
-
# This allows the AI to react to the error message,
|
184 |
-
# which usually results in it correcting its ways.
|
185 |
-
# logger.error("Failed to fix AI output, telling the AI.")
|
186 |
-
return {}
|
187 |
-
|
188 |
-
|
189 |
-
def attempt_to_fix_json_by_finding_outermost_brackets(json_string: str):
|
190 |
-
if CFG.speak_mode and CFG.debug_mode:
|
191 |
-
say_text(
|
192 |
-
"I have received an invalid JSON response from the OpenAI API. "
|
193 |
-
"Trying to fix it now."
|
194 |
-
)
|
195 |
-
logger.error("Attempting to fix JSON by finding outermost brackets\n")
|
196 |
-
|
197 |
-
try:
|
198 |
-
json_pattern = regex.compile(r"\{(?:[^{}]|(?R))*\}")
|
199 |
-
json_match = json_pattern.search(json_string)
|
200 |
-
|
201 |
-
if json_match:
|
202 |
-
# Extract the valid JSON object from the string
|
203 |
-
json_string = json_match.group(0)
|
204 |
-
logger.typewriter_log(
|
205 |
-
title="Apparently json was fixed.", title_color=Fore.GREEN
|
206 |
-
)
|
207 |
-
if CFG.speak_mode and CFG.debug_mode:
|
208 |
-
say_text("Apparently json was fixed.")
|
209 |
-
else:
|
210 |
-
return {}
|
211 |
-
|
212 |
-
except (json.JSONDecodeError, ValueError):
|
213 |
-
if CFG.debug_mode:
|
214 |
-
logger.error(f"Error: Invalid JSON: {json_string}\n")
|
215 |
-
if CFG.speak_mode:
|
216 |
-
say_text("Didn't work. I will have to ignore this response then.")
|
217 |
-
logger.error("Error: Invalid JSON, setting it to empty JSON now.\n")
|
218 |
-
json_string = {}
|
219 |
-
|
220 |
-
return fix_and_parse_json(json_string)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CognitiveLabs/GPT-4-Vision-Chat/chainlit.md
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
# Welcome to GPT 4 turbo vision! 🚀🤖
|
2 |
-
|
3 |
-
## Upload an image 🔗
|
4 |
-
- option 1) Drag & Drop
|
5 |
-
- option 2) Click in the "UPLOAD FILES" button, on the left of the chat input 💬
|
6 |
-
- option 3) Copy a image and paste it in the chat input (ctrl + v)
|
7 |
-
|
8 |
-
### ~~GPT-4-1106-preview~~ for messages that ARE NOT images 📝
|
9 |
-
* change log:
|
10 |
-
- Changed GPT-4-1106-preview for gpt-3.5-turbo-1106, due high cost of GPT-4-1106-preview
|
11 |
-
### gpt-4-vision-preview for messages that ARE images 📷
|
12 |
-
If you upload more than 1 image, it will take the first image, this is just for demo purposes
|
13 |
-
* change log:
|
14 |
-
- Change max_tokens from the output to 300
|
15 |
-
- Clear image history after the response
|
16 |
-
- image size limit set to 1mb
|
17 |
-
|
18 |
-
|
19 |
-
For suggestions you can use the community tab or open an issue in the github repository: [gpt-4-vision-chat](https://github.com/GianfrancoCorrea/gpt-4-vision-chat)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/datasets/builders/video_caption_builder.py
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import logging
|
3 |
-
import warnings
|
4 |
-
|
5 |
-
from video_llama.common.registry import registry
|
6 |
-
from video_llama.datasets.builders.base_dataset_builder import BaseDatasetBuilder
|
7 |
-
from video_llama.datasets.datasets.webvid_datasets import WebvidDataset
|
8 |
-
|
9 |
-
@registry.register_builder("webvid")
|
10 |
-
class WebvidBuilder(BaseDatasetBuilder):
|
11 |
-
train_dataset_cls = WebvidDataset
|
12 |
-
DATASET_CONFIG_DICT = {"default": "configs/datasets/webvid/defaults.yaml"}
|
13 |
-
|
14 |
-
def _download_ann(self):
|
15 |
-
pass
|
16 |
-
|
17 |
-
def _download_vis(self):
|
18 |
-
pass
|
19 |
-
|
20 |
-
def build(self):
|
21 |
-
self.build_processors()
|
22 |
-
datasets = dict()
|
23 |
-
split = "train"
|
24 |
-
|
25 |
-
build_info = self.config.build_info
|
26 |
-
dataset_cls = self.train_dataset_cls
|
27 |
-
datasets[split] = dataset_cls(
|
28 |
-
vis_processor=self.vis_processors[split],
|
29 |
-
text_processor=self.text_processors[split],
|
30 |
-
vis_root=build_info.videos_dir,
|
31 |
-
ann_root=build_info.anno_dir
|
32 |
-
)
|
33 |
-
|
34 |
-
return datasets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DAMO-NLP-SG/Video-LLaMA/video_llama/models/video_llama.py
DELETED
@@ -1,424 +0,0 @@
|
|
1 |
-
import logging
|
2 |
-
import random
|
3 |
-
|
4 |
-
import torch
|
5 |
-
from torch.cuda.amp import autocast as autocast
|
6 |
-
import torch.nn as nn
|
7 |
-
|
8 |
-
from video_llama.common.registry import registry
|
9 |
-
from video_llama.models.blip2 import Blip2Base, disabled_train
|
10 |
-
from video_llama.models.modeling_llama import LlamaForCausalLM
|
11 |
-
# from video_llama.models.Qformer import BertEncoder
|
12 |
-
from transformers import LlamaTokenizer,BertConfig
|
13 |
-
# from transformers.models.bert.modeling_bert import BertEncoder
|
14 |
-
import einops
|
15 |
-
import copy
|
16 |
-
import os
|
17 |
-
from video_llama.models.Qformer import BertConfig, BertLMHeadModel
|
18 |
-
# from flamingo_pytorch import PerceiverResampler
|
19 |
-
@registry.register_model("video_llama")
|
20 |
-
class VideoLLAMA(Blip2Base):
|
21 |
-
"""
|
22 |
-
BLIP2 GPT-LLAMA model.
|
23 |
-
"""
|
24 |
-
|
25 |
-
PRETRAINED_MODEL_CONFIG_DICT = {
|
26 |
-
"pretrain_vicuna": "configs/models/video_llama.yaml",
|
27 |
-
}
|
28 |
-
|
29 |
-
@classmethod
|
30 |
-
def init_video_Qformer(cls, num_query_token, vision_width,num_hidden_layers =2):
|
31 |
-
encoder_config = BertConfig.from_pretrained("bert-base-uncased")
|
32 |
-
encoder_config.num_hidden_layers = num_hidden_layers
|
33 |
-
encoder_config.encoder_width = vision_width
|
34 |
-
# insert cross-attention layer every other block
|
35 |
-
encoder_config.add_cross_attention = True
|
36 |
-
encoder_config.cross_attention_freq = 1
|
37 |
-
encoder_config.query_length = num_query_token
|
38 |
-
Qformer = BertLMHeadModel(config=encoder_config)
|
39 |
-
query_tokens = nn.Parameter(
|
40 |
-
torch.zeros(1, num_query_token, encoder_config.hidden_size)
|
41 |
-
)
|
42 |
-
query_tokens.data.normal_(mean=0.0, std=encoder_config.initializer_range)
|
43 |
-
return Qformer, query_tokens
|
44 |
-
|
45 |
-
def __init__(
|
46 |
-
self,
|
47 |
-
vit_model="eva_clip_g",
|
48 |
-
q_former_model="https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth",
|
49 |
-
img_size=224,
|
50 |
-
drop_path_rate=0,
|
51 |
-
use_grad_checkpoint=False,
|
52 |
-
vit_precision="fp16",
|
53 |
-
freeze_vit=True,
|
54 |
-
freeze_qformer=True,
|
55 |
-
num_query_token=32,
|
56 |
-
llama_model="",
|
57 |
-
prompt_path="",
|
58 |
-
prompt_template="",
|
59 |
-
max_txt_len=32,
|
60 |
-
end_sym='\n',
|
61 |
-
low_resource=False, # use 8 bit and put vit in cpu
|
62 |
-
device_8bit=0, # the device of 8bit model should be set when loading and cannot be changed anymore.
|
63 |
-
|
64 |
-
frozen_llama_proj=True,
|
65 |
-
llama_proj_model='',
|
66 |
-
fusion_header_type= "seqTransf",
|
67 |
-
max_frame_pos= 32,
|
68 |
-
fusion_head_layers = 2,
|
69 |
-
num_video_query_token = 32,
|
70 |
-
):
|
71 |
-
super().__init__()
|
72 |
-
|
73 |
-
self.tokenizer = self.init_tokenizer()
|
74 |
-
self.low_resource = low_resource
|
75 |
-
|
76 |
-
print('Loading VIT')
|
77 |
-
self.visual_encoder, self.ln_vision = self.init_vision_encoder(
|
78 |
-
vit_model, img_size, drop_path_rate, use_grad_checkpoint, vit_precision
|
79 |
-
)
|
80 |
-
if freeze_vit:
|
81 |
-
for name, param in self.visual_encoder.named_parameters():
|
82 |
-
param.requires_grad = False
|
83 |
-
self.visual_encoder = self.visual_encoder.eval()
|
84 |
-
self.visual_encoder.train = disabled_train
|
85 |
-
for name, param in self.ln_vision.named_parameters():
|
86 |
-
param.requires_grad = False
|
87 |
-
self.ln_vision = self.ln_vision.eval()
|
88 |
-
self.ln_vision.train = disabled_train
|
89 |
-
logging.info("freeze vision encoder")
|
90 |
-
print('Loading VIT Done')
|
91 |
-
|
92 |
-
print('Loading Q-Former')
|
93 |
-
self.Qformer, self.query_tokens = self.init_Qformer(
|
94 |
-
num_query_token, self.visual_encoder.num_features
|
95 |
-
)
|
96 |
-
self.Qformer.cls = None
|
97 |
-
self.Qformer.bert.embeddings.word_embeddings = None
|
98 |
-
self.Qformer.bert.embeddings.position_embeddings = None
|
99 |
-
for layer in self.Qformer.bert.encoder.layer:
|
100 |
-
layer.output = None
|
101 |
-
layer.intermediate = None
|
102 |
-
self.load_from_pretrained(url_or_filename=q_former_model)
|
103 |
-
|
104 |
-
if freeze_qformer:
|
105 |
-
for name, param in self.Qformer.named_parameters():
|
106 |
-
param.requires_grad = False
|
107 |
-
self.Qformer = self.Qformer.eval()
|
108 |
-
self.Qformer.train = disabled_train
|
109 |
-
self.query_tokens.requires_grad = False
|
110 |
-
logging.info("freeze Qformer")
|
111 |
-
logging.info('Loading Q-Former Done')
|
112 |
-
|
113 |
-
logging.info('Loading LLAMA Tokenizer')
|
114 |
-
self.llama_tokenizer = LlamaTokenizer.from_pretrained(llama_model, use_fast=False, use_auth_token=os.environ["API_TOKEN"])
|
115 |
-
if self.llama_tokenizer.pad_token is None:
|
116 |
-
self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token
|
117 |
-
DEFAULT_IMAGE_PATCH_TOKEN = '<ImageHere>'
|
118 |
-
self.llama_tokenizer.add_tokens([DEFAULT_IMAGE_PATCH_TOKEN], special_tokens=True)
|
119 |
-
self.IMAGE_PATCH_TOKEN_ID = self.llama_tokenizer.get_vocab()[DEFAULT_IMAGE_PATCH_TOKEN]
|
120 |
-
|
121 |
-
logging.info('Loading LLAMA Model')
|
122 |
-
if self.low_resource:
|
123 |
-
self.llama_model = LlamaForCausalLM.from_pretrained(
|
124 |
-
llama_model,
|
125 |
-
torch_dtype=torch.float16,
|
126 |
-
load_in_8bit=True,
|
127 |
-
device_map={'': device_8bit},
|
128 |
-
use_auth_token=os.environ["API_TOKEN"]
|
129 |
-
)
|
130 |
-
else:
|
131 |
-
self.llama_model = LlamaForCausalLM.from_pretrained(
|
132 |
-
llama_model,
|
133 |
-
torch_dtype=torch.float16,use_auth_token=os.environ["API_TOKEN"]
|
134 |
-
)
|
135 |
-
|
136 |
-
for name, param in self.llama_model.named_parameters():
|
137 |
-
param.requires_grad = False
|
138 |
-
logging.info('Loading LLAMA Done')
|
139 |
-
|
140 |
-
|
141 |
-
logging.info('Loading LLAMA proj')
|
142 |
-
self.llama_proj = nn.Linear(
|
143 |
-
self.Qformer.config.hidden_size, self.llama_model.config.hidden_size
|
144 |
-
)
|
145 |
-
if llama_proj_model:
|
146 |
-
print("load llama proj weight: {}".format(llama_proj_model))
|
147 |
-
llama_proj_weight = torch.load(llama_proj_model, map_location="cpu")
|
148 |
-
msg = model.load_state_dict(llama_proj_weight['model'], strict=False)
|
149 |
-
|
150 |
-
if frozen_llama_proj:
|
151 |
-
# todo frozen llama_proj
|
152 |
-
for name, param in self.llama_proj.named_parameters():
|
153 |
-
param.requires_grad = False
|
154 |
-
logging.info('LLAMA proj is frozen')
|
155 |
-
else:
|
156 |
-
for name, param in self.llama_proj.named_parameters():
|
157 |
-
param.requires_grad = True
|
158 |
-
logging.info('LLAMA proj is not frozen')
|
159 |
-
|
160 |
-
logging.info('Loading llama_proj Done')
|
161 |
-
|
162 |
-
self.max_txt_len = max_txt_len
|
163 |
-
self.end_sym = end_sym
|
164 |
-
|
165 |
-
if prompt_path:
|
166 |
-
with open(prompt_path, 'r') as f:
|
167 |
-
raw_prompts = f.read().splitlines()
|
168 |
-
filted_prompts = [raw_prompt for raw_prompt in raw_prompts if "<ImageHere>" in raw_prompt]
|
169 |
-
self.prompt_list = [prompt_template.format(p) for p in filted_prompts]
|
170 |
-
print('Load {} training prompts'.format(len(self.prompt_list)))
|
171 |
-
print('Prompt Example \n{}'.format(random.choice(self.prompt_list)))
|
172 |
-
else:
|
173 |
-
self.prompt_list = []
|
174 |
-
|
175 |
-
self.video_frame_position_embedding = nn.Embedding(max_frame_pos, self.Qformer.config.hidden_size)
|
176 |
-
self.num_video_query_token = num_video_query_token
|
177 |
-
self.video_Qformer,self.video_query_tokens = self.init_video_Qformer(num_query_token = num_video_query_token,\
|
178 |
-
vision_width=self.Qformer.config.hidden_size, num_hidden_layers =2)
|
179 |
-
|
180 |
-
self.video_Qformer.cls = None
|
181 |
-
self.video_Qformer.bert.embeddings.word_embeddings = None
|
182 |
-
self.video_Qformer.bert.embeddings.position_embeddings = None
|
183 |
-
for layer in self.video_Qformer.bert.encoder.layer:
|
184 |
-
layer.output = None
|
185 |
-
layer.intermediate = None
|
186 |
-
|
187 |
-
|
188 |
-
def vit_to_cpu(self):
|
189 |
-
self.ln_vision.to("cpu")
|
190 |
-
self.ln_vision.float()
|
191 |
-
self.visual_encoder.to("cpu")
|
192 |
-
self.visual_encoder.float()
|
193 |
-
|
194 |
-
def encode_img(self, image):
|
195 |
-
device = image.device
|
196 |
-
# if self.low_resource:
|
197 |
-
# self.vit_to_cpu()
|
198 |
-
# image = image.to("cpu")
|
199 |
-
|
200 |
-
# input shape b,c,t,h,w
|
201 |
-
batch_size,_,time_length,_,_ = image.size()
|
202 |
-
image = einops.rearrange(image, 'b c t h w -> (b t) c h w')
|
203 |
-
with self.maybe_autocast():
|
204 |
-
# embed image features with blip2, out: (b t) q h
|
205 |
-
image_embeds = self.ln_vision(self.visual_encoder(image)).to(device)
|
206 |
-
image_atts = torch.ones(image_embeds.size()[:-1], dtype=torch.long).to(device)
|
207 |
-
|
208 |
-
query_tokens = self.query_tokens.expand(image_embeds.shape[0], -1, -1)
|
209 |
-
query_output = self.Qformer.bert(
|
210 |
-
query_embeds=query_tokens,
|
211 |
-
encoder_hidden_states=image_embeds,
|
212 |
-
encoder_attention_mask=image_atts,
|
213 |
-
return_dict=True,
|
214 |
-
)
|
215 |
-
|
216 |
-
# add frame_pos embedding
|
217 |
-
position_ids = torch.arange(time_length, dtype=torch.long, device=query_tokens.device)
|
218 |
-
position_ids = position_ids.unsqueeze(0).expand(batch_size, -1)
|
219 |
-
frame_position_embeddings = self.video_frame_position_embedding(position_ids)
|
220 |
-
q_hidden_state = query_output.last_hidden_state
|
221 |
-
|
222 |
-
frame_position_embeddings = frame_position_embeddings.unsqueeze(-2)
|
223 |
-
frame_hidden_state = einops.rearrange(q_hidden_state, '(b t) q h -> b t q h',b=batch_size,t=time_length)
|
224 |
-
frame_hidden_state = frame_position_embeddings + frame_hidden_state
|
225 |
-
|
226 |
-
# frame attention
|
227 |
-
frame_hidden_state = einops.rearrange(frame_hidden_state, 'b t q h -> b (t q) h',b=batch_size,t=time_length)
|
228 |
-
frame_atts = torch.ones(frame_hidden_state.size()[:-1], dtype=torch.long).to(device)
|
229 |
-
video_query_tokens = self.video_query_tokens.expand(frame_hidden_state.shape[0], -1, -1)
|
230 |
-
|
231 |
-
# print('attention')
|
232 |
-
# print(video_query_tokens.size())
|
233 |
-
# print(frame_hidden_state.size())
|
234 |
-
video_query_output = self.video_Qformer.bert(
|
235 |
-
query_embeds=video_query_tokens,
|
236 |
-
encoder_hidden_states=frame_hidden_state,
|
237 |
-
encoder_attention_mask=frame_atts,
|
238 |
-
return_dict=True,
|
239 |
-
)
|
240 |
-
video_hidden = video_query_output.last_hidden_state
|
241 |
-
|
242 |
-
inputs_llama = self.llama_proj(video_hidden)
|
243 |
-
atts_llama = torch.ones(inputs_llama.size()[:-1], dtype=torch.long).to(image_embeds.device)
|
244 |
-
return inputs_llama, atts_llama
|
245 |
-
|
246 |
-
def prompt_wrap(self, img_embeds, atts_img, prompt):
|
247 |
-
if prompt:
|
248 |
-
batch_size = img_embeds.shape[0]
|
249 |
-
# print(prompt)
|
250 |
-
p_before, p_after = prompt.split('<ImageHere>')
|
251 |
-
p_before_tokens = self.llama_tokenizer(
|
252 |
-
p_before, return_tensors="pt", add_special_tokens=False).to(img_embeds.device)
|
253 |
-
p_after_tokens = self.llama_tokenizer(
|
254 |
-
p_after, return_tensors="pt", add_special_tokens=False).to(img_embeds.device)
|
255 |
-
p_before_embeds = self.llama_model.model.embed_tokens(p_before_tokens.input_ids).expand(batch_size, -1, -1)
|
256 |
-
p_after_embeds = self.llama_model.model.embed_tokens(p_after_tokens.input_ids).expand(batch_size, -1, -1)
|
257 |
-
wrapped_img_embeds = torch.cat([p_before_embeds, img_embeds, p_after_embeds], dim=1)
|
258 |
-
wrapped_atts_img = atts_img[:, :1].expand(-1, wrapped_img_embeds.shape[1])
|
259 |
-
|
260 |
-
return wrapped_img_embeds, wrapped_atts_img
|
261 |
-
else:
|
262 |
-
return img_embeds, atts_img
|
263 |
-
|
264 |
-
def forward(self, samples):
|
265 |
-
if 'conv_type' in samples.keys() and samples['conv_type']=='multi':
|
266 |
-
num_patch_tokens = self.num_video_query_token
|
267 |
-
im_patch_token_id = self.IMAGE_PATCH_TOKEN_ID
|
268 |
-
image = samples["images"]
|
269 |
-
input_ids = samples['input_ids']
|
270 |
-
if len(image.size())==4:
|
271 |
-
time = 1
|
272 |
-
image = einops.repeat(image, 'b c h w -> b c t h w',t = time)
|
273 |
-
img_embeds, atts_img = self.encode_img(image)
|
274 |
-
|
275 |
-
temp_input_ids = copy.deepcopy(input_ids)
|
276 |
-
temp_input_ids[temp_input_ids == im_patch_token_id] = 0
|
277 |
-
temp_input_embedding = self.llama_model.model.embed_tokens(temp_input_ids)
|
278 |
-
|
279 |
-
new_input_embeds=[]
|
280 |
-
cur_image_idx = 0
|
281 |
-
for cur_input_ids, cur_input_embeds in zip(input_ids, temp_input_embedding):
|
282 |
-
cur_image_features = img_embeds[cur_image_idx]
|
283 |
-
|
284 |
-
if (cur_input_ids == im_patch_token_id).sum() != num_patch_tokens:
|
285 |
-
raise ValueError("The number of image patch tokens should be the same as the number of image patches.")
|
286 |
-
masked_indices = torch.where(cur_input_ids == im_patch_token_id)[0]
|
287 |
-
mask_index_start = masked_indices[0]
|
288 |
-
if (masked_indices != torch.arange(mask_index_start, mask_index_start+num_patch_tokens, device=masked_indices.device, dtype=masked_indices.dtype)).any():
|
289 |
-
raise ValueError("The image patch tokens should be consecutive.")
|
290 |
-
|
291 |
-
cur_new_input_embeds = torch.cat((cur_input_embeds[:mask_index_start], cur_image_features, cur_input_embeds[mask_index_start+num_patch_tokens:]), dim=0)
|
292 |
-
new_input_embeds.append(cur_new_input_embeds)
|
293 |
-
|
294 |
-
cur_image_idx+=1
|
295 |
-
inputs_embeds = torch.stack(new_input_embeds, dim=0)
|
296 |
-
targets = samples['labels']
|
297 |
-
attention_mask = samples['attention_mask']
|
298 |
-
with self.maybe_autocast():
|
299 |
-
outputs = self.llama_model(
|
300 |
-
inputs_embeds=inputs_embeds,
|
301 |
-
attention_mask=attention_mask,
|
302 |
-
return_dict=True,
|
303 |
-
labels=targets,
|
304 |
-
)
|
305 |
-
loss = outputs.loss
|
306 |
-
return {"loss": loss}
|
307 |
-
else:
|
308 |
-
image = samples["image"]
|
309 |
-
|
310 |
-
if len(image.size()) != 5:
|
311 |
-
time = 1
|
312 |
-
image = einops.repeat(image, 'b c h w -> b c t h w',t = time)
|
313 |
-
|
314 |
-
img_embeds, atts_img = self.encode_img(image)
|
315 |
-
|
316 |
-
if self.prompt_list:
|
317 |
-
prompt = random.choice(self.prompt_list)
|
318 |
-
img_embeds, atts_img = self.prompt_wrap(img_embeds, atts_img, prompt)
|
319 |
-
|
320 |
-
|
321 |
-
self.llama_tokenizer.padding_side = "right"
|
322 |
-
|
323 |
-
text = [t + self.end_sym for t in samples["text_input"]]
|
324 |
-
|
325 |
-
to_regress_tokens = self.llama_tokenizer(
|
326 |
-
text,
|
327 |
-
return_tensors="pt",
|
328 |
-
padding="longest",
|
329 |
-
truncation=True,
|
330 |
-
max_length=self.max_txt_len,
|
331 |
-
add_special_tokens=False
|
332 |
-
).to(image.device)
|
333 |
-
|
334 |
-
targets = to_regress_tokens.input_ids.masked_fill(
|
335 |
-
to_regress_tokens.input_ids == self.llama_tokenizer.pad_token_id, -100
|
336 |
-
)
|
337 |
-
|
338 |
-
empty_targets = (
|
339 |
-
torch.ones([atts_img.shape[0], atts_img.shape[1]+1],
|
340 |
-
dtype=torch.long).to(image.device).fill_(-100) # plus one for bos
|
341 |
-
)
|
342 |
-
targets = torch.cat([empty_targets, targets], dim=1)
|
343 |
-
|
344 |
-
batch_size = img_embeds.shape[0]
|
345 |
-
bos = torch.ones([batch_size, 1],
|
346 |
-
dtype=to_regress_tokens.input_ids.dtype,
|
347 |
-
device=to_regress_tokens.input_ids.device) * self.llama_tokenizer.bos_token_id
|
348 |
-
bos_embeds = self.llama_model.model.embed_tokens(bos)
|
349 |
-
atts_bos = atts_img[:, :1]
|
350 |
-
|
351 |
-
to_regress_embeds = self.llama_model.model.embed_tokens(to_regress_tokens.input_ids)
|
352 |
-
inputs_embeds = torch.cat([bos_embeds, img_embeds, to_regress_embeds], dim=1)
|
353 |
-
attention_mask = torch.cat([atts_bos, atts_img, to_regress_tokens.attention_mask], dim=1)
|
354 |
-
|
355 |
-
with self.maybe_autocast():
|
356 |
-
outputs = self.llama_model(
|
357 |
-
inputs_embeds=inputs_embeds,
|
358 |
-
attention_mask=attention_mask,
|
359 |
-
return_dict=True,
|
360 |
-
labels=targets,
|
361 |
-
)
|
362 |
-
loss = outputs.loss
|
363 |
-
|
364 |
-
return {"loss": loss}
|
365 |
-
|
366 |
-
@classmethod
|
367 |
-
def from_config(cls, cfg):
|
368 |
-
vit_model = cfg.get("vit_model", "eva_clip_g")
|
369 |
-
q_former_model = cfg.get("q_former_model", "https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth")
|
370 |
-
img_size = cfg.get("image_size")
|
371 |
-
num_query_token = cfg.get("num_query_token")
|
372 |
-
llama_model = cfg.get("llama_model")
|
373 |
-
|
374 |
-
drop_path_rate = cfg.get("drop_path_rate", 0)
|
375 |
-
use_grad_checkpoint = cfg.get("use_grad_checkpoint", False)
|
376 |
-
vit_precision = cfg.get("vit_precision", "fp16")
|
377 |
-
freeze_vit = cfg.get("freeze_vit", True)
|
378 |
-
freeze_qformer = cfg.get("freeze_qformer", True)
|
379 |
-
low_resource = cfg.get("low_resource", False)
|
380 |
-
device_8bit = cfg.get("device_8bit", 0)
|
381 |
-
|
382 |
-
prompt_path = cfg.get("prompt_path", "")
|
383 |
-
prompt_template = cfg.get("prompt_template", "")
|
384 |
-
max_txt_len = cfg.get("max_txt_len", 32)
|
385 |
-
end_sym = cfg.get("end_sym", '\n')
|
386 |
-
|
387 |
-
frozen_llama_proj = cfg.get("frozen_llama_proj", True)
|
388 |
-
llama_proj_model = cfg.get("llama_proj_model", '')
|
389 |
-
|
390 |
-
fusion_header_type = cfg.get("fusion_header_type", 'seqTransf')
|
391 |
-
max_frame_pos = cfg.get("max_frame_pos", 32)
|
392 |
-
fusion_head_layers = cfg.get("fusion_head_layers", 2)
|
393 |
-
num_video_query_token = cfg.get("num_video_query_token", 32)
|
394 |
-
|
395 |
-
model = cls(
|
396 |
-
vit_model=vit_model,
|
397 |
-
q_former_model=q_former_model,
|
398 |
-
img_size=img_size,
|
399 |
-
drop_path_rate=drop_path_rate,
|
400 |
-
use_grad_checkpoint=use_grad_checkpoint,
|
401 |
-
vit_precision=vit_precision,
|
402 |
-
freeze_vit=freeze_vit,
|
403 |
-
freeze_qformer=freeze_qformer,
|
404 |
-
num_query_token=num_query_token,
|
405 |
-
llama_model=llama_model,
|
406 |
-
prompt_path=prompt_path,
|
407 |
-
prompt_template=prompt_template,
|
408 |
-
max_txt_len=max_txt_len,
|
409 |
-
end_sym=end_sym,
|
410 |
-
low_resource=low_resource,
|
411 |
-
device_8bit=device_8bit,
|
412 |
-
fusion_header_type=fusion_header_type,
|
413 |
-
max_frame_pos=max_frame_pos,
|
414 |
-
fusion_head_layers=fusion_head_layers,
|
415 |
-
frozen_llama_proj=frozen_llama_proj,
|
416 |
-
num_video_query_token=num_video_query_token
|
417 |
-
)
|
418 |
-
|
419 |
-
ckpt_path = cfg.get("ckpt", "") # load weights of MiniGPT-4
|
420 |
-
if ckpt_path:
|
421 |
-
print("Load BLIP2-LLM Checkpoint: {}".format(ckpt_path))
|
422 |
-
ckpt = torch.load(ckpt_path, map_location="cpu")
|
423 |
-
msg = model.load_state_dict(ckpt['model'], strict=False)
|
424 |
-
return model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/JpegImagePlugin.py
DELETED
@@ -1,849 +0,0 @@
|
|
1 |
-
#
|
2 |
-
# The Python Imaging Library.
|
3 |
-
# $Id$
|
4 |
-
#
|
5 |
-
# JPEG (JFIF) file handling
|
6 |
-
#
|
7 |
-
# See "Digital Compression and Coding of Continuous-Tone Still Images,
|
8 |
-
# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1)
|
9 |
-
#
|
10 |
-
# History:
|
11 |
-
# 1995-09-09 fl Created
|
12 |
-
# 1995-09-13 fl Added full parser
|
13 |
-
# 1996-03-25 fl Added hack to use the IJG command line utilities
|
14 |
-
# 1996-05-05 fl Workaround Photoshop 2.5 CMYK polarity bug
|
15 |
-
# 1996-05-28 fl Added draft support, JFIF version (0.1)
|
16 |
-
# 1996-12-30 fl Added encoder options, added progression property (0.2)
|
17 |
-
# 1997-08-27 fl Save mode 1 images as BW (0.3)
|
18 |
-
# 1998-07-12 fl Added YCbCr to draft and save methods (0.4)
|
19 |
-
# 1998-10-19 fl Don't hang on files using 16-bit DQT's (0.4.1)
|
20 |
-
# 2001-04-16 fl Extract DPI settings from JFIF files (0.4.2)
|
21 |
-
# 2002-07-01 fl Skip pad bytes before markers; identify Exif files (0.4.3)
|
22 |
-
# 2003-04-25 fl Added experimental EXIF decoder (0.5)
|
23 |
-
# 2003-06-06 fl Added experimental EXIF GPSinfo decoder
|
24 |
-
# 2003-09-13 fl Extract COM markers
|
25 |
-
# 2009-09-06 fl Added icc_profile support (from Florian Hoech)
|
26 |
-
# 2009-03-06 fl Changed CMYK handling; always use Adobe polarity (0.6)
|
27 |
-
# 2009-03-08 fl Added subsampling support (from Justin Huff).
|
28 |
-
#
|
29 |
-
# Copyright (c) 1997-2003 by Secret Labs AB.
|
30 |
-
# Copyright (c) 1995-1996 by Fredrik Lundh.
|
31 |
-
#
|
32 |
-
# See the README file for information on usage and redistribution.
|
33 |
-
#
|
34 |
-
import array
|
35 |
-
import io
|
36 |
-
import math
|
37 |
-
import os
|
38 |
-
import struct
|
39 |
-
import subprocess
|
40 |
-
import sys
|
41 |
-
import tempfile
|
42 |
-
import warnings
|
43 |
-
|
44 |
-
from . import Image, ImageFile
|
45 |
-
from ._binary import i16be as i16
|
46 |
-
from ._binary import i32be as i32
|
47 |
-
from ._binary import o8
|
48 |
-
from ._binary import o16be as o16
|
49 |
-
from .JpegPresets import presets
|
50 |
-
|
51 |
-
#
|
52 |
-
# Parser
|
53 |
-
|
54 |
-
|
55 |
-
def Skip(self, marker):
|
56 |
-
n = i16(self.fp.read(2)) - 2
|
57 |
-
ImageFile._safe_read(self.fp, n)
|
58 |
-
|
59 |
-
|
60 |
-
def APP(self, marker):
|
61 |
-
#
|
62 |
-
# Application marker. Store these in the APP dictionary.
|
63 |
-
# Also look for well-known application markers.
|
64 |
-
|
65 |
-
n = i16(self.fp.read(2)) - 2
|
66 |
-
s = ImageFile._safe_read(self.fp, n)
|
67 |
-
|
68 |
-
app = "APP%d" % (marker & 15)
|
69 |
-
|
70 |
-
self.app[app] = s # compatibility
|
71 |
-
self.applist.append((app, s))
|
72 |
-
|
73 |
-
if marker == 0xFFE0 and s[:4] == b"JFIF":
|
74 |
-
# extract JFIF information
|
75 |
-
self.info["jfif"] = version = i16(s, 5) # version
|
76 |
-
self.info["jfif_version"] = divmod(version, 256)
|
77 |
-
# extract JFIF properties
|
78 |
-
try:
|
79 |
-
jfif_unit = s[7]
|
80 |
-
jfif_density = i16(s, 8), i16(s, 10)
|
81 |
-
except Exception:
|
82 |
-
pass
|
83 |
-
else:
|
84 |
-
if jfif_unit == 1:
|
85 |
-
self.info["dpi"] = jfif_density
|
86 |
-
self.info["jfif_unit"] = jfif_unit
|
87 |
-
self.info["jfif_density"] = jfif_density
|
88 |
-
elif marker == 0xFFE1 and s[:5] == b"Exif\0":
|
89 |
-
if "exif" not in self.info:
|
90 |
-
# extract EXIF information (incomplete)
|
91 |
-
self.info["exif"] = s # FIXME: value will change
|
92 |
-
self._exif_offset = self.fp.tell() - n + 6
|
93 |
-
elif marker == 0xFFE2 and s[:5] == b"FPXR\0":
|
94 |
-
# extract FlashPix information (incomplete)
|
95 |
-
self.info["flashpix"] = s # FIXME: value will change
|
96 |
-
elif marker == 0xFFE2 and s[:12] == b"ICC_PROFILE\0":
|
97 |
-
# Since an ICC profile can be larger than the maximum size of
|
98 |
-
# a JPEG marker (64K), we need provisions to split it into
|
99 |
-
# multiple markers. The format defined by the ICC specifies
|
100 |
-
# one or more APP2 markers containing the following data:
|
101 |
-
# Identifying string ASCII "ICC_PROFILE\0" (12 bytes)
|
102 |
-
# Marker sequence number 1, 2, etc (1 byte)
|
103 |
-
# Number of markers Total of APP2's used (1 byte)
|
104 |
-
# Profile data (remainder of APP2 data)
|
105 |
-
# Decoders should use the marker sequence numbers to
|
106 |
-
# reassemble the profile, rather than assuming that the APP2
|
107 |
-
# markers appear in the correct sequence.
|
108 |
-
self.icclist.append(s)
|
109 |
-
elif marker == 0xFFED and s[:14] == b"Photoshop 3.0\x00":
|
110 |
-
# parse the image resource block
|
111 |
-
offset = 14
|
112 |
-
photoshop = self.info.setdefault("photoshop", {})
|
113 |
-
while s[offset : offset + 4] == b"8BIM":
|
114 |
-
try:
|
115 |
-
offset += 4
|
116 |
-
# resource code
|
117 |
-
code = i16(s, offset)
|
118 |
-
offset += 2
|
119 |
-
# resource name (usually empty)
|
120 |
-
name_len = s[offset]
|
121 |
-
# name = s[offset+1:offset+1+name_len]
|
122 |
-
offset += 1 + name_len
|
123 |
-
offset += offset & 1 # align
|
124 |
-
# resource data block
|
125 |
-
size = i32(s, offset)
|
126 |
-
offset += 4
|
127 |
-
data = s[offset : offset + size]
|
128 |
-
if code == 0x03ED: # ResolutionInfo
|
129 |
-
data = {
|
130 |
-
"XResolution": i32(data, 0) / 65536,
|
131 |
-
"DisplayedUnitsX": i16(data, 4),
|
132 |
-
"YResolution": i32(data, 8) / 65536,
|
133 |
-
"DisplayedUnitsY": i16(data, 12),
|
134 |
-
}
|
135 |
-
photoshop[code] = data
|
136 |
-
offset += size
|
137 |
-
offset += offset & 1 # align
|
138 |
-
except struct.error:
|
139 |
-
break # insufficient data
|
140 |
-
|
141 |
-
elif marker == 0xFFEE and s[:5] == b"Adobe":
|
142 |
-
self.info["adobe"] = i16(s, 5)
|
143 |
-
# extract Adobe custom properties
|
144 |
-
try:
|
145 |
-
adobe_transform = s[11]
|
146 |
-
except IndexError:
|
147 |
-
pass
|
148 |
-
else:
|
149 |
-
self.info["adobe_transform"] = adobe_transform
|
150 |
-
elif marker == 0xFFE2 and s[:4] == b"MPF\0":
|
151 |
-
# extract MPO information
|
152 |
-
self.info["mp"] = s[4:]
|
153 |
-
# offset is current location minus buffer size
|
154 |
-
# plus constant header size
|
155 |
-
self.info["mpoffset"] = self.fp.tell() - n + 4
|
156 |
-
|
157 |
-
# If DPI isn't in JPEG header, fetch from EXIF
|
158 |
-
if "dpi" not in self.info and "exif" in self.info:
|
159 |
-
try:
|
160 |
-
exif = self.getexif()
|
161 |
-
resolution_unit = exif[0x0128]
|
162 |
-
x_resolution = exif[0x011A]
|
163 |
-
try:
|
164 |
-
dpi = float(x_resolution[0]) / x_resolution[1]
|
165 |
-
except TypeError:
|
166 |
-
dpi = x_resolution
|
167 |
-
if math.isnan(dpi):
|
168 |
-
raise ValueError
|
169 |
-
if resolution_unit == 3: # cm
|
170 |
-
# 1 dpcm = 2.54 dpi
|
171 |
-
dpi *= 2.54
|
172 |
-
self.info["dpi"] = dpi, dpi
|
173 |
-
except (TypeError, KeyError, SyntaxError, ValueError, ZeroDivisionError):
|
174 |
-
# SyntaxError for invalid/unreadable EXIF
|
175 |
-
# KeyError for dpi not included
|
176 |
-
# ZeroDivisionError for invalid dpi rational value
|
177 |
-
# ValueError or TypeError for dpi being an invalid float
|
178 |
-
self.info["dpi"] = 72, 72
|
179 |
-
|
180 |
-
|
181 |
-
def COM(self, marker):
|
182 |
-
#
|
183 |
-
# Comment marker. Store these in the APP dictionary.
|
184 |
-
n = i16(self.fp.read(2)) - 2
|
185 |
-
s = ImageFile._safe_read(self.fp, n)
|
186 |
-
|
187 |
-
self.info["comment"] = s
|
188 |
-
self.app["COM"] = s # compatibility
|
189 |
-
self.applist.append(("COM", s))
|
190 |
-
|
191 |
-
|
192 |
-
def SOF(self, marker):
|
193 |
-
#
|
194 |
-
# Start of frame marker. Defines the size and mode of the
|
195 |
-
# image. JPEG is colour blind, so we use some simple
|
196 |
-
# heuristics to map the number of layers to an appropriate
|
197 |
-
# mode. Note that this could be made a bit brighter, by
|
198 |
-
# looking for JFIF and Adobe APP markers.
|
199 |
-
|
200 |
-
n = i16(self.fp.read(2)) - 2
|
201 |
-
s = ImageFile._safe_read(self.fp, n)
|
202 |
-
self._size = i16(s, 3), i16(s, 1)
|
203 |
-
|
204 |
-
self.bits = s[0]
|
205 |
-
if self.bits != 8:
|
206 |
-
msg = f"cannot handle {self.bits}-bit layers"
|
207 |
-
raise SyntaxError(msg)
|
208 |
-
|
209 |
-
self.layers = s[5]
|
210 |
-
if self.layers == 1:
|
211 |
-
self.mode = "L"
|
212 |
-
elif self.layers == 3:
|
213 |
-
self.mode = "RGB"
|
214 |
-
elif self.layers == 4:
|
215 |
-
self.mode = "CMYK"
|
216 |
-
else:
|
217 |
-
msg = f"cannot handle {self.layers}-layer images"
|
218 |
-
raise SyntaxError(msg)
|
219 |
-
|
220 |
-
if marker in [0xFFC2, 0xFFC6, 0xFFCA, 0xFFCE]:
|
221 |
-
self.info["progressive"] = self.info["progression"] = 1
|
222 |
-
|
223 |
-
if self.icclist:
|
224 |
-
# fixup icc profile
|
225 |
-
self.icclist.sort() # sort by sequence number
|
226 |
-
if self.icclist[0][13] == len(self.icclist):
|
227 |
-
profile = []
|
228 |
-
for p in self.icclist:
|
229 |
-
profile.append(p[14:])
|
230 |
-
icc_profile = b"".join(profile)
|
231 |
-
else:
|
232 |
-
icc_profile = None # wrong number of fragments
|
233 |
-
self.info["icc_profile"] = icc_profile
|
234 |
-
self.icclist = []
|
235 |
-
|
236 |
-
for i in range(6, len(s), 3):
|
237 |
-
t = s[i : i + 3]
|
238 |
-
# 4-tuples: id, vsamp, hsamp, qtable
|
239 |
-
self.layer.append((t[0], t[1] // 16, t[1] & 15, t[2]))
|
240 |
-
|
241 |
-
|
242 |
-
def DQT(self, marker):
|
243 |
-
#
|
244 |
-
# Define quantization table. Note that there might be more
|
245 |
-
# than one table in each marker.
|
246 |
-
|
247 |
-
# FIXME: The quantization tables can be used to estimate the
|
248 |
-
# compression quality.
|
249 |
-
|
250 |
-
n = i16(self.fp.read(2)) - 2
|
251 |
-
s = ImageFile._safe_read(self.fp, n)
|
252 |
-
while len(s):
|
253 |
-
v = s[0]
|
254 |
-
precision = 1 if (v // 16 == 0) else 2 # in bytes
|
255 |
-
qt_length = 1 + precision * 64
|
256 |
-
if len(s) < qt_length:
|
257 |
-
msg = "bad quantization table marker"
|
258 |
-
raise SyntaxError(msg)
|
259 |
-
data = array.array("B" if precision == 1 else "H", s[1:qt_length])
|
260 |
-
if sys.byteorder == "little" and precision > 1:
|
261 |
-
data.byteswap() # the values are always big-endian
|
262 |
-
self.quantization[v & 15] = [data[i] for i in zigzag_index]
|
263 |
-
s = s[qt_length:]
|
264 |
-
|
265 |
-
|
266 |
-
#
|
267 |
-
# JPEG marker table
|
268 |
-
|
269 |
-
MARKER = {
|
270 |
-
0xFFC0: ("SOF0", "Baseline DCT", SOF),
|
271 |
-
0xFFC1: ("SOF1", "Extended Sequential DCT", SOF),
|
272 |
-
0xFFC2: ("SOF2", "Progressive DCT", SOF),
|
273 |
-
0xFFC3: ("SOF3", "Spatial lossless", SOF),
|
274 |
-
0xFFC4: ("DHT", "Define Huffman table", Skip),
|
275 |
-
0xFFC5: ("SOF5", "Differential sequential DCT", SOF),
|
276 |
-
0xFFC6: ("SOF6", "Differential progressive DCT", SOF),
|
277 |
-
0xFFC7: ("SOF7", "Differential spatial", SOF),
|
278 |
-
0xFFC8: ("JPG", "Extension", None),
|
279 |
-
0xFFC9: ("SOF9", "Extended sequential DCT (AC)", SOF),
|
280 |
-
0xFFCA: ("SOF10", "Progressive DCT (AC)", SOF),
|
281 |
-
0xFFCB: ("SOF11", "Spatial lossless DCT (AC)", SOF),
|
282 |
-
0xFFCC: ("DAC", "Define arithmetic coding conditioning", Skip),
|
283 |
-
0xFFCD: ("SOF13", "Differential sequential DCT (AC)", SOF),
|
284 |
-
0xFFCE: ("SOF14", "Differential progressive DCT (AC)", SOF),
|
285 |
-
0xFFCF: ("SOF15", "Differential spatial (AC)", SOF),
|
286 |
-
0xFFD0: ("RST0", "Restart 0", None),
|
287 |
-
0xFFD1: ("RST1", "Restart 1", None),
|
288 |
-
0xFFD2: ("RST2", "Restart 2", None),
|
289 |
-
0xFFD3: ("RST3", "Restart 3", None),
|
290 |
-
0xFFD4: ("RST4", "Restart 4", None),
|
291 |
-
0xFFD5: ("RST5", "Restart 5", None),
|
292 |
-
0xFFD6: ("RST6", "Restart 6", None),
|
293 |
-
0xFFD7: ("RST7", "Restart 7", None),
|
294 |
-
0xFFD8: ("SOI", "Start of image", None),
|
295 |
-
0xFFD9: ("EOI", "End of image", None),
|
296 |
-
0xFFDA: ("SOS", "Start of scan", Skip),
|
297 |
-
0xFFDB: ("DQT", "Define quantization table", DQT),
|
298 |
-
0xFFDC: ("DNL", "Define number of lines", Skip),
|
299 |
-
0xFFDD: ("DRI", "Define restart interval", Skip),
|
300 |
-
0xFFDE: ("DHP", "Define hierarchical progression", SOF),
|
301 |
-
0xFFDF: ("EXP", "Expand reference component", Skip),
|
302 |
-
0xFFE0: ("APP0", "Application segment 0", APP),
|
303 |
-
0xFFE1: ("APP1", "Application segment 1", APP),
|
304 |
-
0xFFE2: ("APP2", "Application segment 2", APP),
|
305 |
-
0xFFE3: ("APP3", "Application segment 3", APP),
|
306 |
-
0xFFE4: ("APP4", "Application segment 4", APP),
|
307 |
-
0xFFE5: ("APP5", "Application segment 5", APP),
|
308 |
-
0xFFE6: ("APP6", "Application segment 6", APP),
|
309 |
-
0xFFE7: ("APP7", "Application segment 7", APP),
|
310 |
-
0xFFE8: ("APP8", "Application segment 8", APP),
|
311 |
-
0xFFE9: ("APP9", "Application segment 9", APP),
|
312 |
-
0xFFEA: ("APP10", "Application segment 10", APP),
|
313 |
-
0xFFEB: ("APP11", "Application segment 11", APP),
|
314 |
-
0xFFEC: ("APP12", "Application segment 12", APP),
|
315 |
-
0xFFED: ("APP13", "Application segment 13", APP),
|
316 |
-
0xFFEE: ("APP14", "Application segment 14", APP),
|
317 |
-
0xFFEF: ("APP15", "Application segment 15", APP),
|
318 |
-
0xFFF0: ("JPG0", "Extension 0", None),
|
319 |
-
0xFFF1: ("JPG1", "Extension 1", None),
|
320 |
-
0xFFF2: ("JPG2", "Extension 2", None),
|
321 |
-
0xFFF3: ("JPG3", "Extension 3", None),
|
322 |
-
0xFFF4: ("JPG4", "Extension 4", None),
|
323 |
-
0xFFF5: ("JPG5", "Extension 5", None),
|
324 |
-
0xFFF6: ("JPG6", "Extension 6", None),
|
325 |
-
0xFFF7: ("JPG7", "Extension 7", None),
|
326 |
-
0xFFF8: ("JPG8", "Extension 8", None),
|
327 |
-
0xFFF9: ("JPG9", "Extension 9", None),
|
328 |
-
0xFFFA: ("JPG10", "Extension 10", None),
|
329 |
-
0xFFFB: ("JPG11", "Extension 11", None),
|
330 |
-
0xFFFC: ("JPG12", "Extension 12", None),
|
331 |
-
0xFFFD: ("JPG13", "Extension 13", None),
|
332 |
-
0xFFFE: ("COM", "Comment", COM),
|
333 |
-
}
|
334 |
-
|
335 |
-
|
336 |
-
def _accept(prefix):
|
337 |
-
# Magic number was taken from https://en.wikipedia.org/wiki/JPEG
|
338 |
-
return prefix[:3] == b"\xFF\xD8\xFF"
|
339 |
-
|
340 |
-
|
341 |
-
##
|
342 |
-
# Image plugin for JPEG and JFIF images.
|
343 |
-
|
344 |
-
|
345 |
-
class JpegImageFile(ImageFile.ImageFile):
|
346 |
-
format = "JPEG"
|
347 |
-
format_description = "JPEG (ISO 10918)"
|
348 |
-
|
349 |
-
def _open(self):
|
350 |
-
s = self.fp.read(3)
|
351 |
-
|
352 |
-
if not _accept(s):
|
353 |
-
msg = "not a JPEG file"
|
354 |
-
raise SyntaxError(msg)
|
355 |
-
s = b"\xFF"
|
356 |
-
|
357 |
-
# Create attributes
|
358 |
-
self.bits = self.layers = 0
|
359 |
-
|
360 |
-
# JPEG specifics (internal)
|
361 |
-
self.layer = []
|
362 |
-
self.huffman_dc = {}
|
363 |
-
self.huffman_ac = {}
|
364 |
-
self.quantization = {}
|
365 |
-
self.app = {} # compatibility
|
366 |
-
self.applist = []
|
367 |
-
self.icclist = []
|
368 |
-
|
369 |
-
while True:
|
370 |
-
i = s[0]
|
371 |
-
if i == 0xFF:
|
372 |
-
s = s + self.fp.read(1)
|
373 |
-
i = i16(s)
|
374 |
-
else:
|
375 |
-
# Skip non-0xFF junk
|
376 |
-
s = self.fp.read(1)
|
377 |
-
continue
|
378 |
-
|
379 |
-
if i in MARKER:
|
380 |
-
name, description, handler = MARKER[i]
|
381 |
-
if handler is not None:
|
382 |
-
handler(self, i)
|
383 |
-
if i == 0xFFDA: # start of scan
|
384 |
-
rawmode = self.mode
|
385 |
-
if self.mode == "CMYK":
|
386 |
-
rawmode = "CMYK;I" # assume adobe conventions
|
387 |
-
self.tile = [("jpeg", (0, 0) + self.size, 0, (rawmode, ""))]
|
388 |
-
# self.__offset = self.fp.tell()
|
389 |
-
break
|
390 |
-
s = self.fp.read(1)
|
391 |
-
elif i == 0 or i == 0xFFFF:
|
392 |
-
# padded marker or junk; move on
|
393 |
-
s = b"\xff"
|
394 |
-
elif i == 0xFF00: # Skip extraneous data (escaped 0xFF)
|
395 |
-
s = self.fp.read(1)
|
396 |
-
else:
|
397 |
-
msg = "no marker found"
|
398 |
-
raise SyntaxError(msg)
|
399 |
-
|
400 |
-
def load_read(self, read_bytes):
|
401 |
-
"""
|
402 |
-
internal: read more image data
|
403 |
-
For premature EOF and LOAD_TRUNCATED_IMAGES adds EOI marker
|
404 |
-
so libjpeg can finish decoding
|
405 |
-
"""
|
406 |
-
s = self.fp.read(read_bytes)
|
407 |
-
|
408 |
-
if not s and ImageFile.LOAD_TRUNCATED_IMAGES and not hasattr(self, "_ended"):
|
409 |
-
# Premature EOF.
|
410 |
-
# Pretend file is finished adding EOI marker
|
411 |
-
self._ended = True
|
412 |
-
return b"\xFF\xD9"
|
413 |
-
|
414 |
-
return s
|
415 |
-
|
416 |
-
def draft(self, mode, size):
|
417 |
-
if len(self.tile) != 1:
|
418 |
-
return
|
419 |
-
|
420 |
-
# Protect from second call
|
421 |
-
if self.decoderconfig:
|
422 |
-
return
|
423 |
-
|
424 |
-
d, e, o, a = self.tile[0]
|
425 |
-
scale = 1
|
426 |
-
original_size = self.size
|
427 |
-
|
428 |
-
if a[0] == "RGB" and mode in ["L", "YCbCr"]:
|
429 |
-
self.mode = mode
|
430 |
-
a = mode, ""
|
431 |
-
|
432 |
-
if size:
|
433 |
-
scale = min(self.size[0] // size[0], self.size[1] // size[1])
|
434 |
-
for s in [8, 4, 2, 1]:
|
435 |
-
if scale >= s:
|
436 |
-
break
|
437 |
-
e = (
|
438 |
-
e[0],
|
439 |
-
e[1],
|
440 |
-
(e[2] - e[0] + s - 1) // s + e[0],
|
441 |
-
(e[3] - e[1] + s - 1) // s + e[1],
|
442 |
-
)
|
443 |
-
self._size = ((self.size[0] + s - 1) // s, (self.size[1] + s - 1) // s)
|
444 |
-
scale = s
|
445 |
-
|
446 |
-
self.tile = [(d, e, o, a)]
|
447 |
-
self.decoderconfig = (scale, 0)
|
448 |
-
|
449 |
-
box = (0, 0, original_size[0] / scale, original_size[1] / scale)
|
450 |
-
return self.mode, box
|
451 |
-
|
452 |
-
def load_djpeg(self):
|
453 |
-
# ALTERNATIVE: handle JPEGs via the IJG command line utilities
|
454 |
-
|
455 |
-
f, path = tempfile.mkstemp()
|
456 |
-
os.close(f)
|
457 |
-
if os.path.exists(self.filename):
|
458 |
-
subprocess.check_call(["djpeg", "-outfile", path, self.filename])
|
459 |
-
else:
|
460 |
-
try:
|
461 |
-
os.unlink(path)
|
462 |
-
except OSError:
|
463 |
-
pass
|
464 |
-
|
465 |
-
msg = "Invalid Filename"
|
466 |
-
raise ValueError(msg)
|
467 |
-
|
468 |
-
try:
|
469 |
-
with Image.open(path) as _im:
|
470 |
-
_im.load()
|
471 |
-
self.im = _im.im
|
472 |
-
finally:
|
473 |
-
try:
|
474 |
-
os.unlink(path)
|
475 |
-
except OSError:
|
476 |
-
pass
|
477 |
-
|
478 |
-
self.mode = self.im.mode
|
479 |
-
self._size = self.im.size
|
480 |
-
|
481 |
-
self.tile = []
|
482 |
-
|
483 |
-
def _getexif(self):
|
484 |
-
return _getexif(self)
|
485 |
-
|
486 |
-
def _getmp(self):
|
487 |
-
return _getmp(self)
|
488 |
-
|
489 |
-
def getxmp(self):
|
490 |
-
"""
|
491 |
-
Returns a dictionary containing the XMP tags.
|
492 |
-
Requires defusedxml to be installed.
|
493 |
-
|
494 |
-
:returns: XMP tags in a dictionary.
|
495 |
-
"""
|
496 |
-
|
497 |
-
for segment, content in self.applist:
|
498 |
-
if segment == "APP1":
|
499 |
-
marker, xmp_tags = content.rsplit(b"\x00", 1)
|
500 |
-
if marker == b"http://ns.adobe.com/xap/1.0/":
|
501 |
-
return self._getxmp(xmp_tags)
|
502 |
-
return {}
|
503 |
-
|
504 |
-
|
505 |
-
def _getexif(self):
|
506 |
-
if "exif" not in self.info:
|
507 |
-
return None
|
508 |
-
return self.getexif()._get_merged_dict()
|
509 |
-
|
510 |
-
|
511 |
-
def _getmp(self):
|
512 |
-
# Extract MP information. This method was inspired by the "highly
|
513 |
-
# experimental" _getexif version that's been in use for years now,
|
514 |
-
# itself based on the ImageFileDirectory class in the TIFF plugin.
|
515 |
-
|
516 |
-
# The MP record essentially consists of a TIFF file embedded in a JPEG
|
517 |
-
# application marker.
|
518 |
-
try:
|
519 |
-
data = self.info["mp"]
|
520 |
-
except KeyError:
|
521 |
-
return None
|
522 |
-
file_contents = io.BytesIO(data)
|
523 |
-
head = file_contents.read(8)
|
524 |
-
endianness = ">" if head[:4] == b"\x4d\x4d\x00\x2a" else "<"
|
525 |
-
# process dictionary
|
526 |
-
from . import TiffImagePlugin
|
527 |
-
|
528 |
-
try:
|
529 |
-
info = TiffImagePlugin.ImageFileDirectory_v2(head)
|
530 |
-
file_contents.seek(info.next)
|
531 |
-
info.load(file_contents)
|
532 |
-
mp = dict(info)
|
533 |
-
except Exception as e:
|
534 |
-
msg = "malformed MP Index (unreadable directory)"
|
535 |
-
raise SyntaxError(msg) from e
|
536 |
-
# it's an error not to have a number of images
|
537 |
-
try:
|
538 |
-
quant = mp[0xB001]
|
539 |
-
except KeyError as e:
|
540 |
-
msg = "malformed MP Index (no number of images)"
|
541 |
-
raise SyntaxError(msg) from e
|
542 |
-
# get MP entries
|
543 |
-
mpentries = []
|
544 |
-
try:
|
545 |
-
rawmpentries = mp[0xB002]
|
546 |
-
for entrynum in range(0, quant):
|
547 |
-
unpackedentry = struct.unpack_from(
|
548 |
-
f"{endianness}LLLHH", rawmpentries, entrynum * 16
|
549 |
-
)
|
550 |
-
labels = ("Attribute", "Size", "DataOffset", "EntryNo1", "EntryNo2")
|
551 |
-
mpentry = dict(zip(labels, unpackedentry))
|
552 |
-
mpentryattr = {
|
553 |
-
"DependentParentImageFlag": bool(mpentry["Attribute"] & (1 << 31)),
|
554 |
-
"DependentChildImageFlag": bool(mpentry["Attribute"] & (1 << 30)),
|
555 |
-
"RepresentativeImageFlag": bool(mpentry["Attribute"] & (1 << 29)),
|
556 |
-
"Reserved": (mpentry["Attribute"] & (3 << 27)) >> 27,
|
557 |
-
"ImageDataFormat": (mpentry["Attribute"] & (7 << 24)) >> 24,
|
558 |
-
"MPType": mpentry["Attribute"] & 0x00FFFFFF,
|
559 |
-
}
|
560 |
-
if mpentryattr["ImageDataFormat"] == 0:
|
561 |
-
mpentryattr["ImageDataFormat"] = "JPEG"
|
562 |
-
else:
|
563 |
-
msg = "unsupported picture format in MPO"
|
564 |
-
raise SyntaxError(msg)
|
565 |
-
mptypemap = {
|
566 |
-
0x000000: "Undefined",
|
567 |
-
0x010001: "Large Thumbnail (VGA Equivalent)",
|
568 |
-
0x010002: "Large Thumbnail (Full HD Equivalent)",
|
569 |
-
0x020001: "Multi-Frame Image (Panorama)",
|
570 |
-
0x020002: "Multi-Frame Image: (Disparity)",
|
571 |
-
0x020003: "Multi-Frame Image: (Multi-Angle)",
|
572 |
-
0x030000: "Baseline MP Primary Image",
|
573 |
-
}
|
574 |
-
mpentryattr["MPType"] = mptypemap.get(mpentryattr["MPType"], "Unknown")
|
575 |
-
mpentry["Attribute"] = mpentryattr
|
576 |
-
mpentries.append(mpentry)
|
577 |
-
mp[0xB002] = mpentries
|
578 |
-
except KeyError as e:
|
579 |
-
msg = "malformed MP Index (bad MP Entry)"
|
580 |
-
raise SyntaxError(msg) from e
|
581 |
-
# Next we should try and parse the individual image unique ID list;
|
582 |
-
# we don't because I've never seen this actually used in a real MPO
|
583 |
-
# file and so can't test it.
|
584 |
-
return mp
|
585 |
-
|
586 |
-
|
587 |
-
# --------------------------------------------------------------------
|
588 |
-
# stuff to save JPEG files
|
589 |
-
|
590 |
-
RAWMODE = {
|
591 |
-
"1": "L",
|
592 |
-
"L": "L",
|
593 |
-
"RGB": "RGB",
|
594 |
-
"RGBX": "RGB",
|
595 |
-
"CMYK": "CMYK;I", # assume adobe conventions
|
596 |
-
"YCbCr": "YCbCr",
|
597 |
-
}
|
598 |
-
|
599 |
-
# fmt: off
|
600 |
-
zigzag_index = (
|
601 |
-
0, 1, 5, 6, 14, 15, 27, 28,
|
602 |
-
2, 4, 7, 13, 16, 26, 29, 42,
|
603 |
-
3, 8, 12, 17, 25, 30, 41, 43,
|
604 |
-
9, 11, 18, 24, 31, 40, 44, 53,
|
605 |
-
10, 19, 23, 32, 39, 45, 52, 54,
|
606 |
-
20, 22, 33, 38, 46, 51, 55, 60,
|
607 |
-
21, 34, 37, 47, 50, 56, 59, 61,
|
608 |
-
35, 36, 48, 49, 57, 58, 62, 63,
|
609 |
-
)
|
610 |
-
|
611 |
-
samplings = {
|
612 |
-
(1, 1, 1, 1, 1, 1): 0,
|
613 |
-
(2, 1, 1, 1, 1, 1): 1,
|
614 |
-
(2, 2, 1, 1, 1, 1): 2,
|
615 |
-
}
|
616 |
-
# fmt: on
|
617 |
-
|
618 |
-
|
619 |
-
def get_sampling(im):
|
620 |
-
# There's no subsampling when images have only 1 layer
|
621 |
-
# (grayscale images) or when they are CMYK (4 layers),
|
622 |
-
# so set subsampling to the default value.
|
623 |
-
#
|
624 |
-
# NOTE: currently Pillow can't encode JPEG to YCCK format.
|
625 |
-
# If YCCK support is added in the future, subsampling code will have
|
626 |
-
# to be updated (here and in JpegEncode.c) to deal with 4 layers.
|
627 |
-
if not hasattr(im, "layers") or im.layers in (1, 4):
|
628 |
-
return -1
|
629 |
-
sampling = im.layer[0][1:3] + im.layer[1][1:3] + im.layer[2][1:3]
|
630 |
-
return samplings.get(sampling, -1)
|
631 |
-
|
632 |
-
|
633 |
-
def _save(im, fp, filename):
|
634 |
-
if im.width == 0 or im.height == 0:
|
635 |
-
msg = "cannot write empty image as JPEG"
|
636 |
-
raise ValueError(msg)
|
637 |
-
|
638 |
-
try:
|
639 |
-
rawmode = RAWMODE[im.mode]
|
640 |
-
except KeyError as e:
|
641 |
-
msg = f"cannot write mode {im.mode} as JPEG"
|
642 |
-
raise OSError(msg) from e
|
643 |
-
|
644 |
-
info = im.encoderinfo
|
645 |
-
|
646 |
-
dpi = [round(x) for x in info.get("dpi", (0, 0))]
|
647 |
-
|
648 |
-
quality = info.get("quality", -1)
|
649 |
-
subsampling = info.get("subsampling", -1)
|
650 |
-
qtables = info.get("qtables")
|
651 |
-
|
652 |
-
if quality == "keep":
|
653 |
-
quality = -1
|
654 |
-
subsampling = "keep"
|
655 |
-
qtables = "keep"
|
656 |
-
elif quality in presets:
|
657 |
-
preset = presets[quality]
|
658 |
-
quality = -1
|
659 |
-
subsampling = preset.get("subsampling", -1)
|
660 |
-
qtables = preset.get("quantization")
|
661 |
-
elif not isinstance(quality, int):
|
662 |
-
msg = "Invalid quality setting"
|
663 |
-
raise ValueError(msg)
|
664 |
-
else:
|
665 |
-
if subsampling in presets:
|
666 |
-
subsampling = presets[subsampling].get("subsampling", -1)
|
667 |
-
if isinstance(qtables, str) and qtables in presets:
|
668 |
-
qtables = presets[qtables].get("quantization")
|
669 |
-
|
670 |
-
if subsampling == "4:4:4":
|
671 |
-
subsampling = 0
|
672 |
-
elif subsampling == "4:2:2":
|
673 |
-
subsampling = 1
|
674 |
-
elif subsampling == "4:2:0":
|
675 |
-
subsampling = 2
|
676 |
-
elif subsampling == "4:1:1":
|
677 |
-
# For compatibility. Before Pillow 4.3, 4:1:1 actually meant 4:2:0.
|
678 |
-
# Set 4:2:0 if someone is still using that value.
|
679 |
-
subsampling = 2
|
680 |
-
elif subsampling == "keep":
|
681 |
-
if im.format != "JPEG":
|
682 |
-
msg = "Cannot use 'keep' when original image is not a JPEG"
|
683 |
-
raise ValueError(msg)
|
684 |
-
subsampling = get_sampling(im)
|
685 |
-
|
686 |
-
def validate_qtables(qtables):
|
687 |
-
if qtables is None:
|
688 |
-
return qtables
|
689 |
-
if isinstance(qtables, str):
|
690 |
-
try:
|
691 |
-
lines = [
|
692 |
-
int(num)
|
693 |
-
for line in qtables.splitlines()
|
694 |
-
for num in line.split("#", 1)[0].split()
|
695 |
-
]
|
696 |
-
except ValueError as e:
|
697 |
-
msg = "Invalid quantization table"
|
698 |
-
raise ValueError(msg) from e
|
699 |
-
else:
|
700 |
-
qtables = [lines[s : s + 64] for s in range(0, len(lines), 64)]
|
701 |
-
if isinstance(qtables, (tuple, list, dict)):
|
702 |
-
if isinstance(qtables, dict):
|
703 |
-
qtables = [
|
704 |
-
qtables[key] for key in range(len(qtables)) if key in qtables
|
705 |
-
]
|
706 |
-
elif isinstance(qtables, tuple):
|
707 |
-
qtables = list(qtables)
|
708 |
-
if not (0 < len(qtables) < 5):
|
709 |
-
msg = "None or too many quantization tables"
|
710 |
-
raise ValueError(msg)
|
711 |
-
for idx, table in enumerate(qtables):
|
712 |
-
try:
|
713 |
-
if len(table) != 64:
|
714 |
-
raise TypeError
|
715 |
-
table = array.array("H", table)
|
716 |
-
except TypeError as e:
|
717 |
-
msg = "Invalid quantization table"
|
718 |
-
raise ValueError(msg) from e
|
719 |
-
else:
|
720 |
-
qtables[idx] = list(table)
|
721 |
-
return qtables
|
722 |
-
|
723 |
-
if qtables == "keep":
|
724 |
-
if im.format != "JPEG":
|
725 |
-
msg = "Cannot use 'keep' when original image is not a JPEG"
|
726 |
-
raise ValueError(msg)
|
727 |
-
qtables = getattr(im, "quantization", None)
|
728 |
-
qtables = validate_qtables(qtables)
|
729 |
-
|
730 |
-
extra = info.get("extra", b"")
|
731 |
-
|
732 |
-
MAX_BYTES_IN_MARKER = 65533
|
733 |
-
icc_profile = info.get("icc_profile")
|
734 |
-
if icc_profile:
|
735 |
-
ICC_OVERHEAD_LEN = 14
|
736 |
-
MAX_DATA_BYTES_IN_MARKER = MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN
|
737 |
-
markers = []
|
738 |
-
while icc_profile:
|
739 |
-
markers.append(icc_profile[:MAX_DATA_BYTES_IN_MARKER])
|
740 |
-
icc_profile = icc_profile[MAX_DATA_BYTES_IN_MARKER:]
|
741 |
-
i = 1
|
742 |
-
for marker in markers:
|
743 |
-
size = o16(2 + ICC_OVERHEAD_LEN + len(marker))
|
744 |
-
extra += (
|
745 |
-
b"\xFF\xE2"
|
746 |
-
+ size
|
747 |
-
+ b"ICC_PROFILE\0"
|
748 |
-
+ o8(i)
|
749 |
-
+ o8(len(markers))
|
750 |
-
+ marker
|
751 |
-
)
|
752 |
-
i += 1
|
753 |
-
|
754 |
-
comment = info.get("comment", im.info.get("comment"))
|
755 |
-
|
756 |
-
# "progressive" is the official name, but older documentation
|
757 |
-
# says "progression"
|
758 |
-
# FIXME: issue a warning if the wrong form is used (post-1.1.7)
|
759 |
-
progressive = info.get("progressive", False) or info.get("progression", False)
|
760 |
-
|
761 |
-
optimize = info.get("optimize", False)
|
762 |
-
|
763 |
-
exif = info.get("exif", b"")
|
764 |
-
if isinstance(exif, Image.Exif):
|
765 |
-
exif = exif.tobytes()
|
766 |
-
if len(exif) > MAX_BYTES_IN_MARKER:
|
767 |
-
msg = "EXIF data is too long"
|
768 |
-
raise ValueError(msg)
|
769 |
-
|
770 |
-
# get keyword arguments
|
771 |
-
im.encoderconfig = (
|
772 |
-
quality,
|
773 |
-
progressive,
|
774 |
-
info.get("smooth", 0),
|
775 |
-
optimize,
|
776 |
-
info.get("streamtype", 0),
|
777 |
-
dpi[0],
|
778 |
-
dpi[1],
|
779 |
-
subsampling,
|
780 |
-
qtables,
|
781 |
-
comment,
|
782 |
-
extra,
|
783 |
-
exif,
|
784 |
-
)
|
785 |
-
|
786 |
-
# if we optimize, libjpeg needs a buffer big enough to hold the whole image
|
787 |
-
# in a shot. Guessing on the size, at im.size bytes. (raw pixel size is
|
788 |
-
# channels*size, this is a value that's been used in a django patch.
|
789 |
-
# https://github.com/matthewwithanm/django-imagekit/issues/50
|
790 |
-
bufsize = 0
|
791 |
-
if optimize or progressive:
|
792 |
-
# CMYK can be bigger
|
793 |
-
if im.mode == "CMYK":
|
794 |
-
bufsize = 4 * im.size[0] * im.size[1]
|
795 |
-
# keep sets quality to -1, but the actual value may be high.
|
796 |
-
elif quality >= 95 or quality == -1:
|
797 |
-
bufsize = 2 * im.size[0] * im.size[1]
|
798 |
-
else:
|
799 |
-
bufsize = im.size[0] * im.size[1]
|
800 |
-
|
801 |
-
# The EXIF info needs to be written as one block, + APP1, + one spare byte.
|
802 |
-
# Ensure that our buffer is big enough. Same with the icc_profile block.
|
803 |
-
bufsize = max(ImageFile.MAXBLOCK, bufsize, len(exif) + 5, len(extra) + 1)
|
804 |
-
|
805 |
-
ImageFile._save(im, fp, [("jpeg", (0, 0) + im.size, 0, rawmode)], bufsize)
|
806 |
-
|
807 |
-
|
808 |
-
def _save_cjpeg(im, fp, filename):
|
809 |
-
# ALTERNATIVE: handle JPEGs via the IJG command line utilities.
|
810 |
-
tempfile = im._dump()
|
811 |
-
subprocess.check_call(["cjpeg", "-outfile", filename, tempfile])
|
812 |
-
try:
|
813 |
-
os.unlink(tempfile)
|
814 |
-
except OSError:
|
815 |
-
pass
|
816 |
-
|
817 |
-
|
818 |
-
##
|
819 |
-
# Factory for making JPEG and MPO instances
|
820 |
-
def jpeg_factory(fp=None, filename=None):
|
821 |
-
im = JpegImageFile(fp, filename)
|
822 |
-
try:
|
823 |
-
mpheader = im._getmp()
|
824 |
-
if mpheader[45057] > 1:
|
825 |
-
# It's actually an MPO
|
826 |
-
from .MpoImagePlugin import MpoImageFile
|
827 |
-
|
828 |
-
# Don't reload everything, just convert it.
|
829 |
-
im = MpoImageFile.adopt(im, mpheader)
|
830 |
-
except (TypeError, IndexError):
|
831 |
-
# It is really a JPEG
|
832 |
-
pass
|
833 |
-
except SyntaxError:
|
834 |
-
warnings.warn(
|
835 |
-
"Image appears to be a malformed MPO file, it will be "
|
836 |
-
"interpreted as a base JPEG file"
|
837 |
-
)
|
838 |
-
return im
|
839 |
-
|
840 |
-
|
841 |
-
# ---------------------------------------------------------------------
|
842 |
-
# Registry stuff
|
843 |
-
|
844 |
-
Image.register_open(JpegImageFile.format, jpeg_factory, _accept)
|
845 |
-
Image.register_save(JpegImageFile.format, _save)
|
846 |
-
|
847 |
-
Image.register_extensions(JpegImageFile.format, [".jfif", ".jpe", ".jpg", ".jpeg"])
|
848 |
-
|
849 |
-
Image.register_mime(JpegImageFile.format, "image/jpeg")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|