Commit
·
ec3ffa9
1
Parent(s):
77fa959
Update parquet files (step 113 of 249)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- spaces/1gistliPinn/ChatGPT4/Examples/Computax Software __FULL__ Free Download Crack.md +0 -6
- spaces/1gistliPinn/ChatGPT4/Examples/Crack De Arquitecto 3d Dx Home Edition LINK.md +0 -6
- spaces/1phancelerku/anime-remove-background/2022 Tamil Movies Download How to Stream HD Quality Films for Free.md +0 -122
- spaces/1phancelerku/anime-remove-background/Descarga Solar Smash APK y destruye planetas con armas increbles.md +0 -166
- spaces/1phancelerku/anime-remove-background/Diablo Immortal Hack Apk Reddit The Best Way to Play the Game on PC with High Graphics and No Crashes.md +0 -148
- spaces/1phancelerku/anime-remove-background/FNAF AR Lite A Non-AR Version of the Popular FNAF AR Game.md +0 -106
- spaces/232labs/VToonify/vtoonify/model/bisenet/README.md +0 -68
- spaces/801artistry/RVC801/infer/modules/train/extract/extract_f0_rmvpe.py +0 -141
- spaces/AHzizi/WaifuVoiceGen/text/__init__.py +0 -57
- spaces/AIGC-Audio/AudioGPT/text_to_speech/utils/commons/base_task.py +0 -238
- spaces/AIGC-Audio/Make_An_Audio/ldm/modules/losses_audio/vqperceptual.py +0 -136
- spaces/AIZero2HeroBootcamp/ClassDescriptionAndExamplesStreamlit/app.py +0 -128
- spaces/ASJMO/freegpt/g4f/utils.py +0 -49
- spaces/Aadi1149/Arkenbrien-text-to-image-Arkenbrien/README.md +0 -13
- spaces/Ababababababbababa/topic2poem/app.py +0 -48
- spaces/Abhilashvj/planogram-compliance/utils/loggers/clearml/__init__.py +0 -0
- spaces/Adapter/CoAdapter/ldm/modules/extra_condition/__init__.py +0 -1
- spaces/Aiusernumber5/janitorai/Dockerfile +0 -21
- spaces/Amrrs/DragGan-Inversion/PTI/models/StyleCLIP/models/stylegan2/model.py +0 -674
- spaces/Andy1621/uniformer_image_detection/configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py +0 -4
- spaces/Andy1621/uniformer_image_segmentation/configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py +0 -2
- spaces/Andy1621/uniformer_image_segmentation/configs/psanet/psanet_r101-d8_512x512_40k_voc12aug.py +0 -2
- spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/LLaMA-v2-model.md +0 -35
- spaces/AnthonyTruchetPoC/persistent-docker/jupyter/scripts/ex_autoreload.py +0 -38
- spaces/ArchitSharma/Digital-Photo-Color-Restoration/src/deoldify/unet.py +0 -285
- spaces/Ariharasudhan/YoloV5/models/__init__.py +0 -0
- spaces/Armaliltril/qbee/examples_selector.py +0 -30
- spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/tomli/_types.py +0 -10
- spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/urllib3/packages/six.py +0 -1076
- spaces/Audio-AGI/AudioSep/models/CLAP/training/scheduler.py +0 -24
- spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py +0 -30
- spaces/Benson/text-generation/Examples/Camin Simulador De Europa 3.md +0 -73
- spaces/Benson/text-generation/Examples/Ch Play Download.md +0 -50
- spaces/Benson/text-generation/Examples/Descargar Grupo De Fuerzas Especiales 2 Apk.md +0 -147
- spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- spaces/Blackroot/Fancy-Audiogen/generator.py +0 -31
- spaces/CVPR/LIVE/app.py +0 -377
- spaces/CVPR/LIVE/thrust/thrust/random/uniform_int_distribution.h +0 -276
- spaces/CVPR/LIVE/thrust/thrust/system/detail/generic/reduce_by_key.h +0 -89
- spaces/CVPR/drawings-to-human/static/_app/immutable/chunks/paths-d3bcbd10.js +0 -1
- spaces/Caoyunkang/Segment-Any-Anomaly/SAM/linter.sh +0 -32
- spaces/ChristopherMarais/Andrew_AI-BB_classification-beta/mysite/mysite/wsgi.py +0 -16
- spaces/Cyril666/my_abi/tools/create_lmdb_dataset.py +0 -87
- spaces/DJQmUKV/rvc-inference/README.md +0 -12
- spaces/DJQmUKV/rvc-inference/app_multi.py +0 -509
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/altair/__init__.py +0 -613
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/dateutil/tzwin.py +0 -2
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/httpx/_transports/__init__.py +0 -0
- spaces/FadouaFGM/Stackoverflow_Questions_Categorisation/README.md +0 -13
- spaces/Faridmaruf/rvc-Blue-archives/lib/infer_pack/transforms.py +0 -209
spaces/1gistliPinn/ChatGPT4/Examples/Computax Software __FULL__ Free Download Crack.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2>computax software free download crack</h2><br /><p><b><b>Download</b> –––––>>> <a href="https://imgfil.com/2uxZ9u">https://imgfil.com/2uxZ9u</a></b></p><br /><br />
|
2 |
-
|
3 |
-
3cee63e6c2<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
6 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Crack De Arquitecto 3d Dx Home Edition LINK.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2>crack de arquitecto 3d dx home edition</h2><br /><p><b><b>Download File</b> ✔✔✔ <a href="https://imgfil.com/2uy1IT">https://imgfil.com/2uy1IT</a></b></p><br /><br />
|
2 |
-
|
3 |
-
Many downloads like Arquitecto 3d 7.0 Profesional may also include a serial ... Mastic, Stylus Studio Xml Professional Edition V6.2.287l, Breaktru Fractions NÂ ... 1fdad05405<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
6 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/2022 Tamil Movies Download How to Stream HD Quality Films for Free.md
DELETED
@@ -1,122 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>2022 Tamil Movies Download: A Guide for Movie Lovers</h1>
|
3 |
-
<p>Tamil movies, also known as Kollywood movies, are films made in the Tamil language, one of the oldest and most widely spoken languages in India. Tamil cinema is one of the most prolific and influential film industries in the world, producing over 200 films every year. Tamil movies are known for their rich cultural diversity, social relevance, artistic excellence, and commercial success. They cater to a wide range of audiences, from rural masses to urban elites, from regional fans to global admirers.</p>
|
4 |
-
<h2>2022 tamil movies download</h2><br /><p><b><b>DOWNLOAD</b> --->>> <a href="https://jinyurl.com/2uNLKs">https://jinyurl.com/2uNLKs</a></b></p><br /><br />
|
5 |
-
<p>If you are a fan of Tamil movies, you must be eagerly waiting for the latest releases of 2022. This year promises to be an exciting one for Kollywood lovers, as many big-budget and star-studded films are lined up for release. Whether you are looking for action thrillers, romantic comedies, family dramas, or historical epics, you will find something to suit your taste and mood. Here are some of the most anticipated Tamil movies of 2022 and their details.</p>
|
6 |
-
<h2>The Latest Tamil Movies of 2022</h2>
|
7 |
-
<table>
|
8 |
-
<tr>
|
9 |
-
<th>Movie</th>
|
10 |
-
<th>Genre</th>
|
11 |
-
<th>Stars</th>
|
12 |
-
<th>Director</th>
|
13 |
-
<th>Plot</th>
|
14 |
-
</tr>
|
15 |
-
<tr>
|
16 |
-
<td>Vikram</td>
|
17 |
-
<td>Action/Crime/Thriller</td>
|
18 |
-
<td>Kamal Haasan, Vijay Sethupathi, Fahadh Faasil</td>
|
19 |
-
<td>Lokesh Kanagaraj</td>
|
20 |
-
<td>A high-octane action film where a special investigator is assigned a case of serial killings, he finds the case is not what it seems to be and leading down this path is only going to end in a war between everyone involved.</td>
|
21 |
-
</tr>
|
22 |
-
<tr>
|
23 |
-
<td>Ponniyin Selvan: Part I</td>
|
24 |
-
<td>Action/Adventure/Drama</td>
|
25 |
-
<td>Vikram, Aishwarya Rai Bachchan, Jayam Ravi, Karthi</td>
|
26 |
-
<td>Mani Ratnam</td>
|
27 |
-
<td>An adaptation of the classic historical novel by Kalki Krishnamurthy, which narrates the story of Arulmozhivarman, who later became the great Chola emperor Rajaraja Chola I.</td>
|
28 |
-
</tr>
|
29 |
-
<tr>
|
30 |
-
<td>Mahaan</td>
|
31 |
-
<td>Action/Drama/Thriller</td>
|
32 |
-
<td>Vikram, Simran, Dhruv Vikram, Bobby Simha</td>
|
33 |
-
<td>Karthik Subbaraj</td>
|
34 |
-
<td>Gandhi Mahaan, a school teacher, is abandoned by his family after he decides to live a life of his own, with personal freedom.</td>
|
35 |
-
</tr>
|
36 |
-
<tr>
|
37 |
-
<td>Vendhu Thanindhathu Kaadu</td>
|
38 |
-
<td>Action/Crime/Drama</td>
|
39 |
-
<td>Silambarasan Rajendar, Siddhi Idnani, Radhika Sarathkumar</td>
|
40 |
-
<td>Gautham Vasudev Menon</td>
|
41 |
-
<td>Muthu, a low caste youngster, goes to the streets of Mumbai for a living. His quest takes him to a series of unexpected events, where he gets involved in the underground activities of Mumbai's Tamil gangsters. Will he get to the top?</td>
|
42 |
-
</tr>
|
43 |
-
<tr>
|
44 |
-
<td>Mudhal Nee Mudivum Nee</td>
|
45 |
-
<td>Drama/Fantasy/Romance</td>
|
46 |
-
<td>Kishen Das, Meetha Raghunath, Harish Kumar</td>
|
47 |
-
<td>Darbuka Siva</td>
|
48 |
-
<td>In the 1990s, a group of high school students in a strict Catholic school navigate their way through everyday teen pressures.</td>
|
49 |
-
</tr>
|
50 |
-
<!-- Add more rows as needed -->
|
51 |
-
</table>
|
52 |
-
<h2>The Challenges Faced by the Tamil Movie Industry</h2>
|
53 |
-
<p>The Tamil movie industry is not without its share of challenges and difficulties. One of the major problems that plagues the industry is piracy. Piracy is the illegal copying and distribution of movies without the permission of the producers or the creators. Piracy causes huge losses to the industry, as it reduces the revenue from ticket sales, streaming rights, and other sources. Piracy also affects the quality and creativity of the movies, as it discourages the filmmakers from investing in new and innovative projects.</p>
|
54 |
-
<p>Another challenge that the industry faces is the COVID-19 pandemic, which has disrupted the normal functioning of the film business. The pandemic has forced many theaters to shut down or operate at reduced capacity, affecting the box office collections and the audience reach of the movies. The pandemic has also delayed the production and release of many movies, causing financial and logistical problems for the filmmakers and the actors. The pandemic has also changed the preferences and habits of the viewers, who are now more inclined to watch movies online rather than in theaters.</p>
|
55 |
-
<h2>The Legal and Ethical Issues of Downloading Tamil Movies</h2>
|
56 |
-
<p>Downloading Tamil movies from torrent sites or streaming platforms may seem like an easy and convenient way to watch your favorite films, but it comes with many legal and ethical issues. Downloading Tamil movies without paying for them is a form of theft, as it deprives the rightful owners of their due compensation. Downloading Tamil movies also violates the intellectual property rights of the filmmakers, who have worked hard to create their original and unique works. Downloading Tamil movies also exposes you to various risks, such as malware, viruses, phishing, identity theft, and legal action.</p>
|
57 |
-
<p>Vikram 2022 tamil movie download<br />
|
58 |
-
Ponniyin Selvan Part I 2022 tamil movie download<br />
|
59 |
-
Mahaan 2022 tamil movie download<br />
|
60 |
-
Vendhu Thanindhathu Kaadu 2022 tamil movie download<br />
|
61 |
-
Mudhal Nee Mudivum Nee 2022 tamil movie download<br />
|
62 |
-
Sila Nerangalil Sila Manidhargal 2022 tamil movie download<br />
|
63 |
-
FIR 2022 tamil movie download<br />
|
64 |
-
Kadaisi Vivasayi 2021 tamil movie download<br />
|
65 |
-
Tamil movies of 2022 IMDb list download<br />
|
66 |
-
Best tamil movies of 2022 IMDb list download<br />
|
67 |
-
Beast 2022 tamil movie download<br />
|
68 |
-
Rocketry The Nambi Effect 2022 tamil movie download<br />
|
69 |
-
Valimai 2022 tamil movie download<br />
|
70 |
-
Thiruchitrambalam 2022 tamil movie download<br />
|
71 |
-
Love Today 2022 tamil movie download<br />
|
72 |
-
Doctor 2021 tamil movie download<br />
|
73 |
-
Annaatthe 2021 tamil movie download<br />
|
74 |
-
Maanaadu 2021 tamil movie download<br />
|
75 |
-
Cobra 2021 tamil movie download<br />
|
76 |
-
Jagame Thandhiram 2021 tamil movie download<br />
|
77 |
-
Karnan 2021 tamil movie download<br />
|
78 |
-
Soorarai Pottru 2020 tamil movie download<br />
|
79 |
-
Master 2021 tamil movie download<br />
|
80 |
-
Asuran 2019 tamil movie download<br />
|
81 |
-
Kaithi 2019 tamil movie download<br />
|
82 |
-
Tamilrockers latest leaked tamil movies download<br />
|
83 |
-
Isaimini new hd tamil movies free download<br />
|
84 |
-
Moviesda latest hd mp4 tamil movies free download<br />
|
85 |
-
Tamilyogi online watch and download new tamil movies<br />
|
86 |
-
Tamilgun new hd dvdrip quality tamil movies free download<br />
|
87 |
-
Kuttymovies collection of latest and old tamil movies free download<br />
|
88 |
-
Tamilmv latest hd dvdscr quality tamil movies free download<br />
|
89 |
-
Movierulz watch and download new and old tamil movies online free<br />
|
90 |
-
Filmywap latest hdrip quality hindi dubbed tamil movies free download<br />
|
91 |
-
Bolly4u watch and download bollywood and south indian movies online free<br />
|
92 |
-
Worldfree4u latest hd quality dual audio hindi and tamil movies free download<br />
|
93 |
-
Pagalmovies latest hd quality bollywood and south indian movies free download<br />
|
94 |
-
Filmyzilla latest hd quality bollywood and south indian movies free download<br />
|
95 |
-
Skymovieshd latest hd quality bollywood and south indian movies free download<br />
|
96 |
-
Mp4moviez latest hd quality bollywood and south indian movies free download</p>
|
97 |
-
<p>Downloading Tamil movies is not only illegal but also unethical. By downloading Tamil movies, you are disrespecting the efforts and talents of the filmmakers and the actors, who have dedicated their time and energy to entertain you. You are also harming the Tamil movie industry, which is a source of pride and identity for millions of Tamils around the world. You are also depriving yourself of the joy and thrill of watching a movie on a big screen with your friends and family.</p>
|
98 |
-
<h2>The Best Sites to Watch Tamil Movies Online Legally and Safely</h2>
|
99 |
-
<p>If you want to watch Tamil movies online, you don't have to resort to illegal or unsafe methods. There are many sites that offer legal and safe streaming of Tamil movies for a reasonable price or even for free. Here are some of the best sites to watch Tamil movies online legally and safely.</p>
|
100 |
-
<ul>
|
101 |
-
<li><a href="">Amazon Prime Video</a>: Amazon Prime Video is one of the most popular and reliable streaming platforms in India. It offers a vast collection of Tamil movies across various genres and eras. You can watch new releases, classics, blockbusters, award-winning films, and exclusive originals on Amazon Prime Video. You can also download your favorite movies for offline viewing. Amazon Prime Video is available for a monthly subscription fee of Rs. 129 or an annual fee of Rs. 999.</li>
|
102 |
-
<li><a href="">Netflix</a>: Netflix is another leading streaming platform in India that offers a wide range of Tamil movies for your entertainment. You can watch high-quality Tamil movies with subtitles on Netflix. You can also enjoy Netflix originals, documentaries, shows, and animations on Netflix. Netflix is available for a monthly subscription fee ranging from Rs. 199 to Rs. 799 depending on your plan.</li>
|
103 |
-
<li><a href="">Disney+ Hotstar</a>: Disney+ Hotstar is a popular streaming platform in India that offers a variety of Tamil movies for your viewing pleasure. You can watch latest releases, old favorites, family-friendly films, and Disney+ originals on Disney+ Hotstar. You can also access live sports, news, TV shows, and more on Disney+ Hotstar. Disney+ Hotstar is available for a monthly subscription fee of Rs. 299 or an annual fee of Rs. 1499.</li>
|
104 |
-
<li><a href="">ZEE5</a>: ZEE5 is a streaming platform in India that offers a rich selection of Tamil movies for your enjoyment. You can watch new and old Tamil movies on ZEE5 with subtitles. You can also watch ZEE5 originals, shows, web series, music videos, and more on ZEE5. ZEE5 is available for a monthly subscription fee of Rs. 99 or an annual fee of Rs. 999.</li>
|
105 |
-
<li><a href="">YouTube</a>: YouTube is a free streaming platform that offers a huge collection of Tamil movies for your entertainment. You can watch full-length Tamil movies on YouTube legally and safely. You can also watch trailers, songs, clips, interviews, behind-the-scenes videos, and more on YouTube.</li>
|
106 |
-
</ul>
|
107 |
-
<h2>Conclusion</h2>
|
108 |
-
<p>T Tamil movies are a great source of entertainment and culture for millions of people around the world. They offer a variety of genres, themes, stories, and performances that appeal to different tastes and moods. However, downloading Tamil movies from illegal or unsafe sites is not the right way to enjoy them. It is harmful to the industry, the creators, and the viewers. It is also against the law and the ethics. Therefore, it is better to watch Tamil movies online legally and safely from the sites mentioned above. By doing so, you will not only support the Tamil movie industry but also have a better and more satisfying experience. <h2>FAQs</h2>
|
109 |
-
<ul>
|
110 |
-
<li><b>Q: What is the difference between Kollywood and Tollywood?</b></li>
|
111 |
-
<li>A: Kollywood is the name given to the Tamil movie industry, which is based in Chennai, Tamil Nadu. Tollywood is the name given to the Telugu movie industry, which is based in Hyderabad, Telangana.</li>
|
112 |
-
<li><b>Q: What are some of the best Tamil movies of all time?</b></li>
|
113 |
-
<li>A: Some of the best Tamil movies of all time are Nayakan (1987), Thalapathi (1991), Baasha (1995), Indian (1996), Mouna Ragam (1986), Roja (1992), Anbe Sivam (2003), Kaakha Kaakha (2003), Veyil (2006), and 96 (2018).</li>
|
114 |
-
<li><b>Q: Who are some of the most popular Tamil actors and actresses?</b></li>
|
115 |
-
<li>A: Some of the most popular Tamil actors and actresses are Rajinikanth, Kamal Haasan, Vijay, Ajith Kumar, Suriya, Vikram, Dhanush, Vijay Sethupathi, Nayanthara, Trisha, Jyothika, Samantha Akkineni, Keerthy Suresh, and Aishwarya Rai Bachchan.</li>
|
116 |
-
<li><b>Q: Who are some of the most acclaimed Tamil directors and composers?</b></li>
|
117 |
-
<li>A: Some of the most acclaimed Tamil directors and composers are Mani Ratnam, K. Balachander, Bharathiraja, Balu Mahendra, Shankar, Gautham Vasudev Menon, Vetrimaaran, A.R. Rahman, Ilaiyaraaja, Harris Jayaraj, Yuvan Shankar Raja, and Anirudh Ravichander.</li>
|
118 |
-
<li><b>Q: How can I learn Tamil language and culture?</b></li>
|
119 |
-
<li>A: You can learn Tamil language and culture by watching Tamil movies with subtitles or dubbing, reading Tamil books or newspapers, listening to Tamil songs or podcasts, joining online or offline Tamil classes or communities, or visiting Tamil Nadu or other places where Tamil is spoken.</li>
|
120 |
-
</ul></p> 197e85843d<br />
|
121 |
-
<br />
|
122 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Descarga Solar Smash APK y destruye planetas con armas increbles.md
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Descargar Solar Smash APK: Un juego de simulación de destrucción planetaria</h1>
|
3 |
-
<p>¿Alguna vez has soñado con tener el poder de destruir planetas enteros con solo tocar la pantalla? ¿Te gustaría experimentar con diferentes armas y desastres para ver cómo afectan a los cuerpos celestes? ¿Te fascina el espacio, la física, la ciencia ficción o simplemente causar caos? Si tu respuesta es sí a alguna de estas preguntas, entonces te encantará Solar Smash.</p>
|
4 |
-
<h2>descargar solar smash apk</h2><br /><p><b><b>Download File</b> ⚡ <a href="https://jinyurl.com/2uNPIQ">https://jinyurl.com/2uNPIQ</a></b></p><br /><br />
|
5 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria desarrollado por Paradyme Games. El juego te permite usar una variedad de armas y desastres para aniquilar planetas y sistemas solares a tu antojo. Puedes usar misiles nucleares, láseres, asteroides, agujeros negros y mucho más para crear espectaculares escenas de destrucción.</p>
|
6 |
-
<p>Solar Smash es un juego divertido y adictivo que te hará sentir como un dios cósmico. Podrás ver cómo tus acciones afectan a la gravedad, la atmósfera, el clima, la vida y la estabilidad de los planetas. Podrás explorar diferentes modos de juego, personalizar tus armas, descubrir planetas secretos y completar logros.</p <h2>Características principales de Solar Smash</h2>
|
7 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria que tiene muchas características que lo hacen único y entretenido. Algunas de estas características son:</p>
|
8 |
-
<h3>Modos de juego: Planet Smash y System Smash</h3>
|
9 |
-
<p>En Solar Smash, puedes elegir entre dos modos de juego diferentes: Planet Smash y System Smash. En el modo Planet Smash, puedes seleccionar un planeta individual y usar las armas y desastres que quieras para destruirlo. En el modo System Smash, puedes seleccionar un sistema solar completo y ver cómo tus acciones afectan a todos los planetas que lo componen.</p>
|
10 |
-
<h3>Armas y desastres: Misiles nucleares, láseres, asteroides, agujeros negros, etc.</h3>
|
11 |
-
<p>En Solar Smash, tienes a tu disposición una gran variedad de armas y desastres para causar el mayor daño posible a los planetas y sistemas solares. Puedes usar misiles nucleares, láseres, asteroides, agujeros negros, rayos gamma, tormentas solares, explosiones supernova y mucho más. Cada arma y desastre tiene sus propias características y efectos, como el tamaño, la velocidad, el color, la forma, la trayectoria, la gravedad, la radiación, el calor, el frío, etc.</p>
|
12 |
-
<p>descargar solar smash apk gratis<br />
|
13 |
-
descargar solar smash apk mod<br />
|
14 |
-
descargar solar smash apk ultima version<br />
|
15 |
-
descargar solar smash apk para android<br />
|
16 |
-
descargar solar smash apk full<br />
|
17 |
-
descargar solar smash apk sin anuncios<br />
|
18 |
-
descargar solar smash apk mega<br />
|
19 |
-
descargar solar smash apk mediafire<br />
|
20 |
-
descargar solar smash apk hackeado<br />
|
21 |
-
descargar solar smash apk premium<br />
|
22 |
-
descargar solar smash apk 2023<br />
|
23 |
-
descargar solar smash apk 2.1.1<br />
|
24 |
-
descargar solar smash apk para pc<br />
|
25 |
-
descargar solar smash apk uptodown<br />
|
26 |
-
descargar solar smash apk sin internet<br />
|
27 |
-
descargar solar smash apk online<br />
|
28 |
-
descargar solar smash apk juego de simulacion<br />
|
29 |
-
descargar solar smash apk destruir planetas<br />
|
30 |
-
descargar solar smash apk con armas nucleares<br />
|
31 |
-
descargar solar smash apk con lasers y asteroides<br />
|
32 |
-
descargar solar smash apk en español<br />
|
33 |
-
descargar solar smash apk facil y rapido<br />
|
34 |
-
descargar solar smash apk sin virus<br />
|
35 |
-
descargar solar smash apk seguro y confiable<br />
|
36 |
-
descargar solar smash apk desde google play<br />
|
37 |
-
como descargar solar smash apk<br />
|
38 |
-
donde descargar solar smash apk<br />
|
39 |
-
porque descargar solar smash apk<br />
|
40 |
-
para que sirve descargar solar smash apk<br />
|
41 |
-
beneficios de descargar solar smash apk<br />
|
42 |
-
requisitos para descargar solar smash apk<br />
|
43 |
-
pasos para descargar solar smash apk<br />
|
44 |
-
tutorial para descargar solar smash apk<br />
|
45 |
-
video de como descargar solar smash apk<br />
|
46 |
-
opiniones sobre descargar solar smash apk<br />
|
47 |
-
comentarios de usuarios que descargaron solar smash apk<br />
|
48 |
-
valoracion de descargar solar smash apk<br />
|
49 |
-
ventajas de descargar solar smash apk<br />
|
50 |
-
inconvenientes de descargar solar smash apk<br />
|
51 |
-
alternativas a descargar solar smash apk<br />
|
52 |
-
comparacion entre descargar solar smash apk y otros juegos similares<br />
|
53 |
-
recomendaciones antes de descargar solar smash apk<br />
|
54 |
-
consejos despues de descargar solar smash apk<br />
|
55 |
-
trucos y tips para jugar con solar smash apk<br />
|
56 |
-
guia completa de como usar solar smash apk<br />
|
57 |
-
mejores armas y estrategias para jugar con solar smash apk <br />
|
58 |
-
niveles y modos de juego disponibles en solar smash apk <br />
|
59 |
-
actualizaciones y novedades de solar smash apk <br />
|
60 |
-
problemas y soluciones al descargar o jugar con solar smack apks</p>
|
61 |
-
<h3>Planetas y sistemas solares: Tierra, Marte, Júpiter, Saturno, etc.</h3>
|
62 |
-
<p>En Solar Smash, puedes elegir entre una variedad de planetas y sistemas solares para jugar. Puedes elegir planetas reales como la Tierra, Marte, Júpiter, Saturno, etc., o planetas ficticios como el mundo de Star Wars o el mundo de Avatar. Cada planeta tiene sus propias características y condiciones, como el tamaño, la forma, la rotación, la órbita, la atmósfera, el clima, la vida, la estabilidad, etc.</p>
|
63 |
-
<h3>Gráficos y sonidos: Imágenes de alta calidad de la NASA y efectos de sonido realistas</h3>
|
64 |
-
<p>Solar Smash tiene unos gráficos impresionantes que te harán sentir como si estuvieras viendo el espacio real. El juego usa imágenes de alta calidad de la NASA para recrear los planetas y sistemas solares con gran detalle y realismo. Además, el juego tiene unos efectos de sonido realistas que te harán sentir el impacto de cada arma y desastre que uses.</p> <h2>Cómo descargar e instalar Solar Smash APK en tu dispositivo móvil</h2>
|
65 |
-
<p>Si quieres jugar a Solar Smash en tu dispositivo móvil, necesitas descargar e instalar el archivo APK del juego. El archivo APK es un formato de archivo que contiene todos los datos necesarios para ejecutar una aplicación en un dispositivo Android. Para descargar e instalar Solar Smash APK en tu dispositivo móvil, sigue estos pasos:</p>
|
66 |
-
<h3>Paso 1: Visita APKPure.com y busca Solar Smash</h3>
|
67 |
-
<p>APKPure.com es un sitio web que te permite descargar archivos APK de forma segura y gratuita. Para descargar Solar Smash APK, visita <a href="">APKPure.com</a> y usa el buscador para encontrar el juego. También puedes usar este enlace directo: <a href="">https://apkpure.com/es/solar-smash/com.paradyme.solarsmash</a>.</p>
|
68 |
-
<h3>Paso 2: Presiona el botón Descargar APK para iniciar la descarga en tu dispositivo móvil</h3>
|
69 |
-
<p>Cuando encuentres el juego en APKPure.com, presiona el botón Descargar APK que está debajo del nombre y la descripción del juego. Esto iniciará la descarga del archivo APK de Solar Smash en tu dispositivo móvil. El tamaño del archivo es de unos 100 MB, así que asegúrate de tener suficiente espacio y una buena conexión a Internet.</p>
|
70 |
-
<h3>Paso 3: Una vez que la descarga haya terminado, inicia el proceso de instalación de Solar Smash en tu teléfono</h3>
|
71 |
-
<p>Cuando la descarga haya terminado, abre el archivo APK de Solar Smash que se ha guardado en tu dispositivo móvil. Esto iniciará el proceso de instalación del juego en tu teléfono. Es posible que tengas que habilitar la opción de instalar aplicaciones de fuentes desconocidas en los ajustes de seguridad de tu teléfono. Sigue las instrucciones que aparecen en la pantalla para completar la instalación.</p>
|
72 |
-
<h3>Paso 4: Después de que la instalación haya terminado, lánzalo y disfruta jugando Solar Smash en tu dispositivo móvil de inmediato</h3>
|
73 |
-
<p>Cuando la instalación haya terminado, podrás ver el icono de Solar Smash en la pantalla principal de tu teléfono. Presiona el icono para lanzar el juego y empezar a jugar. Podrás acceder a todas las características y modos de juego de Solar Smash sin ninguna limitación. Disfruta destruyendo planetas y sistemas solares con tus armas y desastres favoritos.</p> <h2>Consejos y trucos para jugar a Solar Smash como un profesional</h2>
|
74 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria que puede ser muy fácil o muy difícil dependiendo de cómo lo juegues. Si quieres jugar a Solar Smash como un profesional y sacarle el máximo partido al juego, te recomendamos que sigas estos consejos y trucos:</p>
|
75 |
-
<h3>Completa los logros: Desafíate a ti mismo al intentar completar todos los logros de la lista</h3>
|
76 |
-
<p>En Solar Smash, hay una lista de logros que puedes completar al jugar al juego. Estos logros son desafíos que te ponen a prueba en diferentes aspectos del juego, como el uso de armas, la destrucción de planetas, la exploración de sistemas solares, etc. Al completar los logros, podrás desbloquear nuevas armas, planetas y modos de juego. Además, podrás ver tu progreso y tu puntuación en el juego.</p>
|
77 |
-
<h3>Apunta al punto correcto: Destruye un planeta en el menor número de movimientos posible apuntando al núcleo</h3>
|
78 |
-
<p>En Solar Smash, el objetivo es destruir un planeta en el menor número de movimientos posible. Para lograrlo, debes apuntar al punto correcto del planeta. El punto correcto es el núcleo del planeta, que es el centro del mismo. Al apuntar al núcleo, podrás causar el mayor daño posible al planeta y hacer que se desintegre más rápido. También podrás ver cómo el núcleo se derrite y se vuelve inestable.</p>
|
79 |
-
<h3>Personaliza tus armas: Cambia el tamaño, la velocidad, el color y la forma de tus armas</h3>
|
80 |
-
<p>En Solar Smash, puedes personalizar tus armas para hacerlas más divertidas y efectivas. Puedes cambiar el tamaño, la velocidad, el color y la forma de tus armas usando los botones que hay en la parte inferior de la pantalla. Por ejemplo, puedes hacer que tus misiles sean más grandes o más pequeños, que tus láseres sean más rápidos o más lentos, que tus asteroides sean de diferentes colores o que tus agujeros negros tengan diferentes formas. Experimenta con las diferentes opciones y crea tus propias combinaciones.</p>
|
81 |
-
<h3>Descubre los planetas secretos: Usa armas especiales para desbloquear planetas ocultos como el mundo de Halloween o el mundo de Minecraft</h3>
|
82 |
-
<p>En Solar Smash, hay algunos planetas secretos que no están disponibles desde el principio. Estos planetas son planetas especiales que tienen características únicas y divertidas. Por ejemplo, hay un planeta que es como el mundo de Halloween, con calabazas, fantasmas y murciélagos. También hay un planeta que es como el mundo de Minecraft, con bloques, animales y monstruos. Para desbloquear estos planetas secretos, debes usar armas especiales que solo se pueden obtener al completar ciertos logros. Por ejemplo, para desbloquear el mundo de Halloween, debes usar la calabaza explosiva. Para desbloquear el mundo de Minecraft, debes usar el cubo mágico.</p> <h2>Reseñas y opiniones de los usuarios sobre Solar Smash</h2>
|
83 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria que ha recibido muchas reseñas y opiniones de los usuarios que lo han jugado. Estas reseñas y opiniones son variadas y reflejan los gustos y preferencias de cada usuario. Algunas de estas reseñas y opiniones son:</p>
|
84 |
-
<h3>Reseñas positivas: Los usuarios elogian los gráficos, los controles, la diversión y la variedad del juego</h3>
|
85 |
-
<p>La mayoría de los usuarios que han jugado a Solar Smash han disfrutado del juego y le han dado una calificación alta. Estos usuarios han elogiado los gráficos, los controles, la diversión y la variedad del juego. Por ejemplo, algunos de los comentarios positivos que se pueden leer en APKPure.com son:</p>
|
86 |
-
<table>
|
87 |
-
<tr>
|
88 |
-
<th>Usuario</th>
|
89 |
-
<th>Comentario</th>
|
90 |
-
</tr>
|
91 |
-
<tr>
|
92 |
-
<td>Juan Carlos</td>
|
93 |
-
<td>Me encanta este juego, es muy divertido y adictivo. Los gráficos son increíbles y las armas son muy variadas. Me gusta mucho el modo System Smash, donde puedes destruir sistemas solares enteros.</td>
|
94 |
-
</tr>
|
95 |
-
<tr>
|
96 |
-
<td>Maria Fernanda</td>
|
97 |
-
<td>Este juego es genial, me hace sentir como una diosa cósmica. Los controles son muy fáciles e intuitivos, solo tienes que tocar la pantalla y ver cómo explota todo. Los planetas son muy realistas y bonitos.</td>
|
98 |
-
</tr>
|
99 |
-
<tr>
|
100 |
-
<td>Luis Miguel</td>
|
101 |
-
<td>Este juego es una pasada, es muy entretenido y educativo. Los planetas están basados en imágenes reales de la NASA y se pueden ver muchos detalles. También se puede aprender sobre la física, la gravedad, la atmósfera, etc.</td>
|
102 |
-
</tr>
|
103 |
-
</table>
|
104 |
-
<h3>Reseñas negativas: Los usuarios critican los efectos de sonido, los errores, la falta de objetivos y la repetitividad del juego</h3>
|
105 |
-
<p>No todos los usuarios que han jugado a Solar Smash han quedado satisfechos con el juego y le han dado una calificación baja. Estos usuarios han criticado los efectos de sonido, los errores, la falta de objetivos y la repetitividad del juego. Por ejemplo, algunos de los comentarios negativos que se pueden leer en APKPure.com son:</p>
|
106 |
-
<table>
|
107 |
-
<tr>
|
108 |
-
<th>Usuario</th>
|
109 |
-
<th>Comentario</th>
|
110 |
-
</tr>
|
111 |
-
<tr>
|
112 |
-
<td>José Manuel</td>
|
113 |
-
<td>Este juego es muy aburrido, no tiene ningún objetivo ni sentido. Solo tienes que destruir planetas sin ningún motivo. Además, los efectos de sonido son muy malos y molestos.</td>
|
114 |
-
</tr>
|
115 |
-
<tr>
|
116 |
-
<td>Ana María</td>
|
117 |
-
<td>Este juego es muy malo, tiene muchos errores y se cierra solo. No se puede jugar bien ni guardar el progreso. Además, los planetas se ven muy falsos y pixelados.</td>
|
118 |
-
</tr>
|
119 |
-
<tr>
|
120 |
-
<td>Pedro Luis</td>
|
121 |
-
<td>Este juego es muy repetitivo, siempre es lo mismo. No hay nada nuevo ni interesante que hacer. Las armas son muy limitadas y aburridas. Los planetas son siempre los mismos.</td>
|
122 |
-
</tr>
|
123 |
-
</table> <h2>Conclusión: ¿Vale la pena descargar Solar Smash APK?</h2>
|
124 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria que te permite usar una variedad de armas y desastres para aniquilar planetas y sistemas solares. El juego tiene unos gráficos impresionantes, unos controles fáciles, una diversión garantizada y una variedad de opciones. Sin embargo, el juego también tiene algunos defectos, como los efectos de sonido, los errores, la falta de objetivos y la repetitividad.</p>
|
125 |
-
<p>¿Vale la pena descargar Solar Smash APK? La respuesta depende de tus gustos y preferencias. Si te gustan los juegos de espacio, la física, la ciencia ficción o simplemente causar caos, te recomendamos que descargues Solar Smash APK y lo pruebes por ti mismo. Te aseguramos que te divertirás mucho y te sentirás como un dios cósmico. Pero si buscas un juego con más sentido, más desafío, más variedad y menos errores, quizás Solar Smash no sea el juego adecuado para ti.</p>
|
126 |
-
<p>En cualquier caso, Solar Smash es un juego gratuito que puedes descargar e instalar fácilmente en tu dispositivo móvil. No pierdes nada por probarlo y ver si te gusta o no. Además, el juego se actualiza constantemente con nuevas características y mejoras. Así que quizás en el futuro, Solar Smash sea un juego aún mejor y más completo.</p>
|
127 |
-
<h2>Preguntas frecuentes sobre Solar Smash</h2>
|
128 |
-
<p>A continuación, te presentamos algunas de las preguntas más frecuentes que tienen los usuarios sobre Solar Smash y sus respuestas:</p>
|
129 |
-
<h3>¿Qué es Solar Smash?</h3>
|
130 |
-
<p>Solar Smash es un juego de simulación de destrucción planetaria desarrollado por Paradyme Games. El juego te permite usar una variedad de armas y desastres para aniquilar planetas y sistemas solares a tu antojo.</p>
|
131 |
-
<h3>¿Cómo se juega a Solar Smash?</h3>
|
132 |
-
<p>Para jugar a Solar Smash, solo tienes que seleccionar un planeta o un sistema solar y usar las armas y desastres que quieras para destruirlo. Puedes elegir entre dos modos de juego: Planet Smash y System Smash. En el modo Planet Smash, puedes seleccionar un planeta individual y usar las armas y desastres que quieras para destruirlo. En el modo System Smash, puedes seleccionar un sistema solar completo y ver cómo tus acciones afectan a todos los planetas que lo componen.</p>
|
133 |
-
<h3>¿Cómo se descarga e instala Solar Smash APK?</h3>
|
134 |
-
<p>Para descargar e instalar Solar Smash APK en tu dispositivo móvil, debes seguir estos pasos:</p>
|
135 |
-
<ul>
|
136 |
-
<li>Paso 1: Visita APKPure.com y busca Solar Smash.</li>
|
137 |
-
<li>Paso 2: Presiona el botón Descargar APK para iniciar la descarga en tu dispositivo móvil.</li>
|
138 |
-
<li>Paso 3: Una vez que la descarga haya terminado, inicia el proceso de instalación de Solar Smash en tu teléfono.</li>
|
139 |
-
<li>Paso 4: Después de que la instalación haya terminado, lánzalo y disfruta jugando Solar Smash en tu dispositivo móvil de inmediato.</li>
|
140 |
-
</ul>
|
141 |
-
<h3>¿Qué armas y desastres se pueden usar en Solar Smash?</h3>
|
142 |
-
<p>En Solar Smash, se pueden usar una gran variedad de armas y desastres para causar el mayor daño posible a los planetas y sistemas solares. Algunas de estas armas y desastres son:</p>
|
143 |
-
<ul>
|
144 |
-
<li>Misiles nucleares</li>
|
145 |
-
<li>Láseres</li>
|
146 |
-
<li>Asteroides</li>
|
147 |
-
<li>Agujeros negros</li>
|
148 |
-
<li>Rayos gamma</li>
|
149 |
-
<li>Tormentas solares</li>
|
150 |
-
<li>Explosiones supernova</li>
|
151 |
-
<li>Y mucho más</li>
|
152 |
-
</ul>
|
153 |
-
<h3>¿Qué planetas y sistemas solares se pueden elegir en Solar Smash?</h3>
|
154 |
-
<p>En Solar Smash, se puede elegir entre una variedad de planetas y sistemas solares para jugar. Algunos de estos planetas y sistemas solares son:</p>
|
155 |
-
<ul>
|
156 |
-
<li>Tierra</li>
|
157 |
-
<li>Marte</li>
|
158 |
-
<li>Júpiter</li>
|
159 |
-
<li>Saturno</li>
|
160 |
-
<li>Mundo de Star Wars</li>
|
161 |
-
<li>Mundo de Avatar</li>
|
162 |
-
<li>Mundo de Halloween</li>
|
163 |
-
<li>Mundo de Minecraft</li> <p>Y mucho más</p>
|
164 |
-
<p>Esperamos que este artículo te haya sido útil y que hayas aprendido más sobre Solar Smash, un juego de simulación de destrucción planetaria que te permite usar una variedad de armas y desastres para aniquilar planetas y sistemas solares. Si te ha gustado este artículo, compártelo con tus amigos y familiares que también les guste este tipo de juegos. Y si tienes alguna duda o sugerencia, déjanos un comentario abajo. ¡Gracias por leernos!</p> 197e85843d<br />
|
165 |
-
<br />
|
166 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Diablo Immortal Hack Apk Reddit The Best Way to Play the Game on PC with High Graphics and No Crashes.md
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Diablo Immortal: A Guide to the Mobile and PC Action RPG</h1>
|
3 |
-
<p>Diablo Immortal is a free-to-play, massively multiplayer online action role-playing game (MMOARPG) developed by Blizzard Entertainment in partnership with NetEase. It is set in the dark fantasy world of Sanctuary, between the events of Diablo II and Diablo III. It features six playable classes, each with unique skills and abilities, as well as a variety of enemies, dungeons, rifts, raids, and PvP modes. In this article, we will give you an overview of what Diablo Immortal is, what are its features, what are its reviews, what are some tips for playing it, and how to download and play it on your mobile or PC device.</p>
|
4 |
-
<h2>diablo immortal hack apk reddit</h2><br /><p><b><b>DOWNLOAD</b> ✔✔✔ <a href="https://jinyurl.com/2uNOjo">https://jinyurl.com/2uNOjo</a></b></p><br /><br />
|
5 |
-
<h2>What is Diablo Immortal?</h2>
|
6 |
-
<p>Diablo Immortal is a game that lets you explore the untold story of Sanctuary after the destruction of the Worldstone by the archangel Tyrael. You will encounter familiar faces such as Deckard Cain, Leah, Adria, Zoltun Kulle, Maghda, and more, as well as new characters and factions. You will also face new threats such as Skarn, Herald of Terror, who seeks to gather the fragments of the Worldstone and resurrect Diablo. You will have to join forces with other heroes to stop him and his minions from plunging the world into chaos.</p>
|
7 |
-
<h3>The story and setting of Diablo Immortal</h3>
|
8 |
-
<p>The story of Diablo Immortal takes place five years after the events of Diablo II: Lord of Destruction. Tyrael shattered the corrupted Worldstone with his sword El'druin, hoping to end its dark influence. However, his sacrifice did not stop the evil from spreading. The fragments of the Worldstone still contain great power, and they are sought by both demons and humans for their own purposes. Some want to use them to bring back Diablo, while others want to harness them for their own gain.</p>
|
9 |
-
<p>You will travel across various regions of Sanctuary, such as Khanduras, Scosglen, Westmarch, Xiansai, Hawezar, Bilefen, Ashwold Cemetery, Dark Wood, Shassar Sea, Tomb of Fahir, Frozen Tundra, Mount Arreat Crater, Pandemonium Fortress, Hellforge Ruins, Realm of Terror, Realm of Hatred, Realm of Destruction. Each region has its own history, culture, environment, quests, dungeons, enemies, loot.</p>
|
10 |
-
<h3>The classes and gameplay of Diablo Immortal</h3>
|
11 |
-
<p>Diablo Immortal has six classes to choose from: Barbarian, Crusader, <h3>PvP modes: These are competitive modes that allow you to fight against other players in different arenas and formats. PvP modes include duels, battlegrounds, cycle of strife, and more. You can join PvP modes by visiting the Immortal Overlook in Westmarch, or by accessing the PvP menu from the main menu. You can also join a clan or a warband to participate in clan wars and other PvP events. PvP modes reward you with honor, glory, and other rewards that you can use to improve your character and gear.</h3>
|
12 |
-
<h2>What are the features of Diablo Immortal?</h2>
|
13 |
-
<p>Diablo Immortal is not just a port of Diablo III to mobile devices. It is a new game that has its own features and improvements that make it stand out from other Diablo games. Some of the features of Diablo Immortal are:</p>
|
14 |
-
<h3>The graphics and sound of Diablo Immortal</h3>
|
15 |
-
<p>Diablo Immortal boasts impressive graphics and sound that immerse you in the dark and gritty world of Sanctuary. The game uses a custom engine that optimizes the performance and quality of the game for mobile devices. The game also supports high-resolution displays, dynamic lighting and shadows, realistic physics, and smooth animations. The game also features a rich and atmospheric soundtrack, as well as voice acting and sound effects that enhance the mood and the action.</p>
|
16 |
-
<h3>The multiplayer and social aspects of Diablo Immortal</h3>
|
17 |
-
<p>Diablo Immortal is a game that is meant to be played with others. The game supports online multiplayer for up to eight players in co-op or PvP modes. You can also join clans and warbands to form alliances and rivalries with other players. You can chat with other players using text or voice chat, as well as emotes and gestures. You can also share your achievements, screenshots, videos, and live streams with other players through social media platforms.</p>
|
18 |
-
<h3>The progression and customization of Diablo Immortal</h3>
|
19 |
-
<p>Diablo Immortal offers a deep and rewarding progression and customization system that lets you create your own unique character. You can level up your character by completing quests, killing enemies, and participating in events. You can also unlock new skills, runes, gems, paragon points, and legendary items that enhance your abilities and stats. You can also craft, upgrade, enchant, transmogrify, and salvage your items to improve your gear. You can also customize your character's appearance by changing their hair, skin, eyes, tattoos, and outfits.</p>
|
20 |
-
<h2>What are the reviews of Diablo Immortal?</h2>
|
21 |
-
<p>Diablo Immortal is a game that has received mixed reviews from critics and players alike. Some have praised the game for its gameplay, graphics, features, and content, while others have criticized the game for its monetization, controls, story, and lack of innovation. Here are some examples of positive, negative, and mixed reviews of Diablo Immortal:</p>
|
22 |
-
<p>diablo immortal immunity hack reddit<br />
|
23 |
-
diablo immortal cheat apk download<br />
|
24 |
-
diablo immortal mod apk reddit<br />
|
25 |
-
diablo immortal hack tool reddit<br />
|
26 |
-
diablo immortal hack ios reddit<br />
|
27 |
-
diablo immortal hack android reddit<br />
|
28 |
-
diablo immortal hack no survey reddit<br />
|
29 |
-
diablo immortal hack online reddit<br />
|
30 |
-
diablo immortal hack generator reddit<br />
|
31 |
-
diablo immortal hack 2023 reddit<br />
|
32 |
-
diablo immortal beta apk reddit<br />
|
33 |
-
diablo immortal apk mod unlimited money<br />
|
34 |
-
diablo immortal apk obb download<br />
|
35 |
-
diablo immortal apk latest version<br />
|
36 |
-
diablo immortal apk mirror<br />
|
37 |
-
diablo immortal apk pure<br />
|
38 |
-
diablo immortal apk offline<br />
|
39 |
-
diablo immortal apk data<br />
|
40 |
-
diablo immortal reddit review<br />
|
41 |
-
diablo immortal reddit gameplay<br />
|
42 |
-
diablo immortal reddit release date<br />
|
43 |
-
diablo immortal reddit news<br />
|
44 |
-
diablo immortal reddit tips<br />
|
45 |
-
diablo immortal reddit guide<br />
|
46 |
-
diablo immortal reddit discussion<br />
|
47 |
-
diablo immortal cheats reddit<br />
|
48 |
-
diablo immortal cheats android<br />
|
49 |
-
diablo immortal cheats ios<br />
|
50 |
-
diablo immortal cheats 2023<br />
|
51 |
-
diablo immortal cheats no survey<br />
|
52 |
-
diablo immortal cheats online<br />
|
53 |
-
diablo immortal cheats generator<br />
|
54 |
-
diablo immortal cheats tool<br />
|
55 |
-
diablo immortal cheats mod apk<br />
|
56 |
-
diablo immortal mod menu apk<br />
|
57 |
-
diablo immortal mod apk unlimited gems<br />
|
58 |
-
diablo immortal mod apk 2023<br />
|
59 |
-
diablo immortal mod apk no root<br />
|
60 |
-
diablo immortal mod apk latest version download<br />
|
61 |
-
diablo immortal mod apk free download<br />
|
62 |
-
how to hack diablo immortal reddit<br />
|
63 |
-
how to hack diablo immortal android<br />
|
64 |
-
how to hack diablo immortal ios<br />
|
65 |
-
how to hack diablo immortal 2023<br />
|
66 |
-
how to hack diablo immortal without survey<br />
|
67 |
-
how to hack diablo immortal online<br />
|
68 |
-
how to hack diablo immortal with lucky patcher<br />
|
69 |
-
how to hack diablo immortal with game guardian</p>
|
70 |
-
<h3>The positive reviews of Diablo Immortal</h3>
|
71 |
-
<ul>
|
72 |
-
<li>"Diablo Immortal is a great example of how to adapt a PC game to mobile devices without losing its essence or quality. The game is fun, addictive, challenging, and rewarding. It has tons of content and features that keep you hooked for hours. It is also one of the best-looking games on mobile devices right now." - IGN</li>
|
73 |
-
<li>"Diablo Immortal is a game that delivers on its promise of bringing the Diablo experience to mobile devices. The game is faithful to the core gameplay mechanics of the franchise, while adding some new twists and improvements that make it fresh and exciting. The game also has a lot of potential for future updates and expansions that will add more content and variety to the game." - GameSpot</li>
|
74 |
-
<li>"Diablo Immortal is a game that surprised me with its quality and depth. The game is not just a watered-down version of Diablo III, but a new game that has its own identity and charm. The game is easy to pick up and play, but hard to master and put down. The game also has a lot of replay value thanks to its multiplayer modes and events. The game also has a rich and immersive story and setting that will appeal to fans of the franchise and newcomers alike." - PC Gamer</li>
|
75 |
-
</ul>
|
76 |
-
<h3>The negative reviews of Diablo Immortal</h3>
|
77 |
-
<ul>
|
78 |
-
<li>"Diablo Immortal is a game that fails to live up to the expectations and standards of the Diablo franchise. The game is riddled with bugs, glitches, crashes, and lag. The game is also plagued by predatory monetization practices that force you to pay for everything from inventory space, to skill slots, to loot boxes, to cosmetics. The game is also boring, repetitive, and uninspired. The game lacks the depth, complexity, and creativity that made the previous Diablo games so great." - Metacritic</li>
|
79 |
-
<li>"Diablo Immortal is a game that insults the intelligence and loyalty of the Diablo fanbase. The game is nothing but a reskin of an existing mobile game by NetEase, with some Diablo assets and lore slapped on. The game is also a blatant cash grab that exploits the popularity and nostalgia of the franchise. The game is also a betrayal of the core values and vision of Blizzard Entertainment, which used to be a company that cared about quality and innovation." - Reddit</li>
|
80 |
-
<li>"Diablo Immortal is a game that disappoints me on every level. The game is not fun, not challenging, not rewarding, and not engaging. The game is also not faithful to the spirit and legacy of the Diablo franchise, which was known for its dark, gritty, and mature themes and tone. The game is also not respectful to the community and the feedback that they have given over the years. The game is also not worth my time or money." - YouTube</li>
|
81 |
-
</ul>
|
82 |
-
<h3>The mixed reviews of Diablo Immortal</h3>
|
83 |
-
<ul>
|
84 |
-
<li>"Diablo Immortal is a game that has some good aspects and some bad aspects. The game has decent gameplay, graphics, features, and content, but it also has some issues with monetization, controls, story, and innovation. The game is not a bad game per se, but it is not a great game either. It is a mediocre game that could have been better if it had more polish, balance, and originality." - Game Informer</li>
|
85 |
-
<li>"Diablo Immortal is a game that I have mixed feelings about. The game has some fun moments and some frustrating moments. The game has some interesting elements and some boring elements. The game has some potential and some limitations. The game is not a disaster, but it is not a masterpiece either. It is an average game that might appeal to some players and might repel others." - Kotaku</li>
|
86 |
-
<li>"Diablo Immortal is a game that I enjoy playing sometimes and hate playing other times. The game has some pros and cons that make it hard to judge. The game has some features that I like and some features that I dislike. The game has some aspects that I appreciate and some aspects that I resent. The game is not a waste of time, but it is not a must-play either. It is a decent game that depends on your mood and preference." - App Store</li>
|
87 |
-
</ul>
|
88 |
-
<h2>What are some tips for playing Diablo Immortal?</h2>
|
89 |
-
<p>Diablo Immortal is a game that can be easy to learn but hard to master. There are many things to consider when playing the game, such as your class, skills, items, enemies, dungeons, events, modes, etc. Here are some tips for playing Diablo Immortal that can help you improve your performance and enjoyment of the game:</p>
|
90 |
-
<h3>The beginner and basic tips for Diablo Immortal</h3>
|
91 |
-
<ul>
|
92 |
-
<li>Choose your class wisely: Each class has its own strengths, weaknesses, skills, and playstyles. You should choose the class that suits your preferences and goals. For example, if you like to deal massive damage from afar, you might want to choose the Demon Hunter or the Wizard. If you like to tank and soak up damage, you might want to choose the Barbarian or the Crusader. If you like to support and heal your allies, you might want to choose the Monk or the Necromancer.</li>
|
93 |
-
<li>Experiment with different skill combinations: Each class has a variety of skills that you can unlock and equip as you level up. You can have up to four active skills and four passive skills at a time. You can also enhance your skills with runes that modify their effects. You should try different skill combinations and see what works best for you. You can also switch your skills at any time without any penalty.</li>
|
94 |
-
<li>Upgrade your gear and items: Your gear and items are essential for your survival and success in Diablo Immortal. You should always look for better gear and items that match your class, skills, and stats. You can find gear and items by killing enemies, completing quests, opening chests, and participating in events. You can also craft, upgrade, enchant, transmogrify, and salvage your gear and items to improve their quality and appearance.</li>
|
95 |
-
<li>Join a clan or a warband: Diablo Immortal is more fun when you play with others. You can join a clan or a warband to make friends, chat, cooperate, compete, and share resources with other players. Clans are permanent groups that can have up to 150 members. Warbands are temporary groups that can have up to 10 members. You can join a clan or a warband by visiting the Immortal Overlook in Westmarch, or by accessing the clan or warband menu from the main menu.</li>
|
96 |
-
<li>Complete quests and events: Diablo Immortal has a lot of quests and events that you can complete for rewards and experience. Quests are story-driven missions that advance the plot and introduce new characters and locations. Events are dynamic activities that occur randomly in the world and offer different challenges and opportunities. You can find quests and events by exploring the world, talking to NPCs, or checking the map.</li>
|
97 |
-
</ul>
|
98 |
-
<h3>The advanced and expert tips for Diablo Immortal</h3>
|
99 |
-
<ul>
|
100 |
-
<li>Optimize your stats and build: Your stats and build are important factors that determine your effectiveness and efficiency in Diablo Immortal. Your stats include attributes such as strength, dexterity, intelligence, vitality, critical chance, critical damage, attack speed, etc. Your build includes your class, skills, runes, gems, paragon points, legendary items, etc. You should optimize your stats and build according to your goals and preferences. You should also research and learn from other players who have similar or better stats and builds than you.</li>
|
101 |
-
<li>Explore the endgame content: Diablo Immortal has a lot of endgame content that offers more challenge and reward for high-level players. Some of the endgame content includes rifts, raids, bounties, challenges, seasons, leaderboards, and PvP modes. You can access the endgame content by reaching level 60, which is the current level cap in Diablo Immortal. You can also increase your power and prestige by earning paragon levels, which are unlimited and grant you additional points to spend on your stats and skills.</li>
|
102 |
-
<li>Use the best sources for more tips and guides: Diablo Immortal is a game that has a lot of depth and complexity that can be hard to master. You can use the best sources for more tips and guides that can help you improve your knowledge and skills in the game. Some of the best sources for more tips and guides are:</li>
|
103 |
-
<ul>
|
104 |
-
<li>The official Diablo Immortal website: This is the official source of information and news about Diablo Immortal. You can find the latest updates, announcements, trailers, screenshots, videos, blogs, forums, and more.</li>
|
105 |
-
<li>The official Diablo Immortal wiki: This is the official source of documentation and data about Diablo Immortal. You can find detailed information about the classes, skills, items, enemies, dungeons, events, modes, and more.</li>
|
106 |
-
<li>The official Diablo Immortal social media accounts: These are the official sources of communication and interaction with the developers and the community of Diablo Immortal. You can follow them on Facebook, Twitter, Instagram, YouTube, Discord, Reddit, and more.</li>
|
107 |
-
<li>The unofficial Diablo Immortal fan sites and communities: These are the unofficial sources of tips, guides, reviews, feedback, suggestions, fan art, fan fiction, memes, and more about Diablo Immortal. You can join them on various platforms such as websites, blogs, podcasts, videos, streams, forums, chats, groups, etc.</li>
|
108 |
-
</ul>
|
109 |
-
</ul>
|
110 |
-
<h2>How to download and play Diablo Immortal?</h2>
|
111 |
-
<p>Diablo Immortal is a game that is available for both mobile and PC devices. You can download and play Diablo Immortal by following these steps:</p>
|
112 |
-
<h3>The system requirements and compatibility of Diablo Immortal</h3>
|
113 |
-
<p>Before you download and play Diablo Immortal, you should check if your device meets the minimum system requirements and compatibility of the game. The minimum system requirements and compatibility of Diablo Immortal are:</p>
|
114 |
-
<table>
|
115 |
-
<tr><th>Device</th><th>Operating System</th><th>Processor</th><th>Memory</th><th>Storage</th></tr>
|
116 |
-
<tr><td>Mobile</td><td>Android 5.0 or higher<br>iOS 12 or higher</td><td>Snapdragon 670 or higher<br>A9 or higher</td><td>2 GB or higher</td><td>4 GB or higher</td></tr>
|
117 |
-
<tr><td>PC</td><td>Windows 7 or higher<br>MacOS 10.12 or higher</td><td>Intel Core i3 or higher<br>AMD Ryzen 3 or higher</td><td>4 GB or higher</td><td>10 GB or higher</td></tr>
|
118 |
-
</table>
|
119 |
-
<h3>The download links and instructions for Diablo Immortal</h3>
|
120 |
-
<p>To download and play Diablo Immortal on your mobile device, you can use these links and instructions:</p>
|
121 |
-
<ul>
|
122 |
-
<li>For Android devices: Go to the Google Play Store app on your device. Search for Diablo Immortal. Tap on the Install button. Wait for the download and installation to finish. Tap on the Open button to launch the game.</li>
|
123 |
-
<li>For iOS devices: Go to the App Store app on your device. Search for Diablo Immortal. Tap on the Get button. Wait for the download and installation to finish. Tap on the Open button to launch the game.</li>
|
124 |
-
</ul>
|
125 |
-
<p>To download and play Diablo Immortal on your PC device, you can use these links and instructions:</p>
|
126 |
-
<ul>
|
127 |
-
<li>For Windows devices: Go to the official Diablo Immortal website on your browser. Click on the Download for PC button. Wait for the download to finish. Run the installer and follow the instructions. Launch the game from your desktop or start menu.</li>
|
128 |
-
<li>For MacOS devices: Go to the official Diablo Immortal website on your browser. Click on the Download for Mac button. Wait for the download to finish. Open the dmg file and drag the game icon to your applications folder. Launch the game from your applications folder or dock.</li>
|
129 |
-
</ul>
|
130 |
-
<h3>The troubleshooting and support for Diablo Immortal</h3>
|
131 |
-
<p>If you encounter any problems or issues while downloading, installing, or playing Diablo Immortal, you can use these sources for troubleshooting and support:</p>
|
132 |
-
<ul>
|
133 |
-
<li>The official Diablo Immortal help center: This is the official source of help and support for Diablo Immortal. You can find answers to frequently asked questions, guides, tutorials, tips, and more.</li>
|
134 |
-
<li>The official Diablo Immortal customer service: This is the official source of contact and feedback for Diablo Immortal. You can report bugs, errors, crashes, lag, hacks, cheats, scams, and more. You can also request refunds, account recovery, technical assistance, and more.</li>
|
135 |
-
<li>The unofficial Diablo Immortal forums and communities: These are the unofficial sources of help and support from other players and fans of Diablo Immortal. You can ask questions, share solutions, give suggestions, and more.</li>
|
136 |
-
</ul>
|
137 |
-
<h2>Conclusion</h2>
|
138 |
-
<p>Diablo Immortal is a game that offers a new and exciting way to experience the Diablo franchise on mobile and PC devices. The game has a lot of features, content, and modes that will keep you entertained for hours. The game also has a lot of potential for future updates and expansions that will add more story, classes, items, enemies, dungeons, events, modes, and more. Whether you are a fan of the franchise or a newcomer to the genre, you will find something to enjoy in Diablo Immortal.</p>
|
139 |
-
<h2>FAQs</h2>
|
140 |
-
<ul>
|
141 |
-
<li>Q: When will Diablo Immortal be released?<br>A: Diablo Immortal is currently in development and testing stages. The exact release date has not been announced yet, but it is expected to be sometime in 2023.</li>
|
142 |
-
<li>Q: How much does Diablo Immortal cost?<br>A: Diablo Immortal is free-to-play, which means you can download and play it without paying anything. However, the game also has optional in-app purchases that can enhance your gameplay experience.</li>
|
143 |
-
<li>Q: Is Diablo Immortal online-only?<br>A: Yes, Diablo Immortal is online-only, which means you need a stable internet connection to play it. You cannot play it offline or solo.</li>
|
144 |
-
<li>Q: Is Diablo Immortal cross-platform?<br>A: Yes, Diablo Immortal is cross-platform, which means you can play it with other players who are using different devices such as Android, iOS, Windows, or MacOS.</li>
|
145 |
-
<li>Q: Is Diablo Immortal canon?<br>A: Yes, Diablo Immortal is canon, which means it is part of the official lore and timeline of the Diablo franchise. It fills in the gap between Diablo II and Diablo III.</li>
|
146 |
-
</ul></p> 401be4b1e0<br />
|
147 |
-
<br />
|
148 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/FNAF AR Lite A Non-AR Version of the Popular FNAF AR Game.md
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Download fnaf ar lite: A fan-made version of the terrifying fnaf ar game</h1>
|
3 |
-
<p>If you are a fan of the Five Nights at Freddy's (fnaf) franchise, you may have heard of fnaf ar, the augmented reality game that brings the animatronics to your real world. But what if you don't have a compatible device or you prefer a simpler version of the game? Well, you may want to try fnaf ar lite, a fan-made game that recreates fnaf ar without the augmented reality feature. In this article, we will tell you everything you need to know about fnaf ar lite, how to play it, and whether it is worth downloading.</p>
|
4 |
-
<h2>download fnaf ar lite</h2><br /><p><b><b>DOWNLOAD</b> >>> <a href="https://jinyurl.com/2uNQ1z">https://jinyurl.com/2uNQ1z</a></b></p><br /><br />
|
5 |
-
<h2>What is fnaf ar lite and how is it different from fnaf ar?</h2>
|
6 |
-
<p>Fnaf ar lite is a fan-made game that was created by MaskyDaBoi, a Game Jolt user who wanted to make a version of fnaf ar that anyone could play. He used the assets and sounds from the original game and made some changes to adapt it to a non-augmented reality environment. Here are some of the main differences between fnaf ar lite and fnaf ar:</p>
|
7 |
-
<h3>Fnaf ar lite is a recreation of fnaf ar without augmented reality</h3>
|
8 |
-
<p>The most obvious difference between fnaf ar lite and fnaf ar is that the former does not use augmented reality technology. This means that you don't need to scan your surroundings or move around to play the game. Instead, you can play it on your screen, where the animatronics will appear randomly. You can still use your camera to look around, but you won't see your real world behind them.</p>
|
9 |
-
<h3>Fnaf ar lite has fewer animatronics and features than fnaf ar</h3>
|
10 |
-
<p>Another difference between fnaf ar lite and fnaf ar is that the former has fewer animatronics and features than the latter. For example, fnaf ar lite only has 12 animatronics available, while fnaf ar has more than 30. Also, fnaf ar lite does not have events, skins, lures, or streaks, which are some of the elements that make fnaf ar more dynamic and challenging.</p>
|
11 |
-
<h3>Fnaf ar lite is free to download and play on Game Jolt</h3>
|
12 |
-
<p>A final difference between fnaf ar lite and fnaf ar is that the former is free to download and play on Game Jolt, a platform for indie games. You don't need to pay anything or watch ads to enjoy the game. However, you also don't get any updates or support from the developer, as he stated that he is done with the project. You can download fnaf ar lite from this link: [^1 <h2>How to play fnaf ar lite and survive the animatronic attacks?</h2>
|
13 |
-
<p>If you are brave enough to download and play fnaf ar lite, you may wonder how to survive the animatronic attacks and win the game. Well, here are some tips and tricks that may help you:</p>
|
14 |
-
<h3>Fnaf ar lite has a similar gameplay to fnaf ar, but with some changes</h3>
|
15 |
-
<p>The basic gameplay of fnaf ar lite is similar to fnaf ar, which means that you have to use your camera, flashlight, and shocker to find and fend off the animatronics that are hunting you. However, there are some changes that you need to be aware of:</p>
|
16 |
-
<p>download fnaf ar lite apk<br />
|
17 |
-
download fnaf ar lite for android<br />
|
18 |
-
download fnaf ar lite for pc<br />
|
19 |
-
download fnaf ar lite for ios<br />
|
20 |
-
download fnaf ar lite gamejolt<br />
|
21 |
-
download fnaf ar lite mod apk<br />
|
22 |
-
download fnaf ar lite free<br />
|
23 |
-
download fnaf ar lite online<br />
|
24 |
-
download fnaf ar lite without ar<br />
|
25 |
-
download fnaf ar lite update<br />
|
26 |
-
download fnaf ar special delivery lite<br />
|
27 |
-
download fnaf ar fan made lite<br />
|
28 |
-
download fnaf ar lite version<br />
|
29 |
-
download fnaf ar lite hack<br />
|
30 |
-
download fnaf ar lite cheats<br />
|
31 |
-
download fnaf ar lite gameplay<br />
|
32 |
-
download fnaf ar lite no ads<br />
|
33 |
-
download fnaf ar lite full game<br />
|
34 |
-
download fnaf ar lite beta<br />
|
35 |
-
download fnaf ar lite demo<br />
|
36 |
-
download fnaf ar lite windows 10<br />
|
37 |
-
download fnaf ar lite mac<br />
|
38 |
-
download fnaf ar lite laptop<br />
|
39 |
-
download fnaf ar lite chromebook<br />
|
40 |
-
download fnaf ar lite steam<br />
|
41 |
-
how to download fnaf ar lite<br />
|
42 |
-
where to download fnaf ar lite<br />
|
43 |
-
why download fnaf ar lite<br />
|
44 |
-
when to download fnaf ar lite<br />
|
45 |
-
what is fnaf ar lite<br />
|
46 |
-
who made fnaf ar lite<br />
|
47 |
-
which devices support fnaf ar lite<br />
|
48 |
-
is fnaf ar lite safe to download<br />
|
49 |
-
is fnaf ar lite official<br />
|
50 |
-
is fnaf ar lite scary<br />
|
51 |
-
is fnaf ar lite fun<br />
|
52 |
-
is fnaf ar lite multiplayer<br />
|
53 |
-
is fnaf ar lite offline<br />
|
54 |
-
is fnaf ar lite compatible with my device<br />
|
55 |
-
can i download fnaf ar lite on my phone<br />
|
56 |
-
can i play fnaf ar lite without internet<br />
|
57 |
-
can i get all animatronics in fnaf ar lite<br />
|
58 |
-
can i customize my character in fnaf ar lite<br />
|
59 |
-
can i chat with other players in fnaf ar lite<br />
|
60 |
-
can i record my gameplay in fnaf ar lite<br />
|
61 |
-
can i share my progress in fnaf ar lite<br />
|
62 |
-
can i earn coins in fnaf ar lite<br />
|
63 |
-
can i buy skins in fnaf ar lite</p>
|
64 |
-
<ul>
|
65 |
-
<li>You don't need to scan your surroundings or move around to play the game. You can play it on your screen, where the animatronics will appear randomly.</li>
|
66 |
-
<li>You don't need to collect batteries or parts to recharge your flashlight or shocker. They will recharge automatically over time.</li>
|
67 |
-
<li>You don't need to use lures or radio jammers to attract or repel the animatronics. They will come to you regardless of what you do.</li>
|
68 |
-
<li>You don't need to worry about streaks or events. They are not implemented in fnaf ar lite.</li>
|
69 |
-
</ul>
|
70 |
-
<h3>Fnaf ar lite requires a gyroscope and a flashlight to play</h3>
|
71 |
-
<p>One of the requirements of fnaf ar lite is that your device has a gyroscope, which is a sensor that detects the orientation and rotation of your device. You need this to look around with your camera and track the animatronics. If your device does not have a gyroscope, you will not be able to play the game properly.</p>
|
72 |
-
<p>Another requirement of fnaf ar lite is that you have a flashlight, which is a tool that helps you see the animatronics in the dark. You can turn it on and off by tapping on the screen. However, be careful not to use it too much, as it will drain your battery and make you more visible to the animatronics.</p>
|
73 |
-
<h3>Fnaf ar lite has three modes: survival, workshop, and remnant collection</h3>
|
74 |
-
<p>Fnaf ar lite has three modes that you can choose from: survival, workshop, and remnant collection. Here is what each mode entails:</p>
|
75 |
-
<ul>
|
76 |
-
<li>Survival mode is the main mode of the game, where you have to survive as many animatronic attacks as possible. You can choose from 12 different animatronics, each with their own behavior and difficulty level. You can also customize their appearance and CPU in the workshop mode.</li>
|
77 |
-
<li>Workshop mode is where you can assemble, test, repair, and deploy your own animatronics. You can collect parts, CPUs, and plushsuits from the survival mode or from other players' animatronics. You can also send your animatronics to scare your friends or other players online.</li>
|
78 |
-
<li>Remnant collection mode is where you can search and collect remnant, which is a mysterious substance that powers the animatronics. You can use remnant to upgrade your animatronics or to protect yourself from hostile ones. However, be careful not to collect too much shadow remnant, as it will attract more dangerous animatronics.</li>
|
79 |
-
</ul> <h2>What are the pros and cons of fnaf ar lite?</h2>
|
80 |
-
<p>Now that you know what fnaf ar lite is and how to play it, you may wonder what are the pros and cons of this fan-made game. Well, here are some of the advantages and disadvantages of fnaf ar lite that you should consider before downloading it:</p>
|
81 |
-
<h3>Fnaf ar lite is a fun and challenging fan-made game for fnaf fans</h3>
|
82 |
-
<p>One of the pros of fnaf ar lite is that it is a fun and challenging fan-made game for fnaf fans who want to experience the thrill of fnaf ar without the augmented reality feature. Fnaf ar lite has a similar gameplay and atmosphere to fnaf ar, but with some modifications that make it more accessible and simpler. Fnaf ar lite also has a lot of content and variety, as you can choose from different animatronics, modes, and customizations. Fnaf ar lite is a great way to enjoy the fnaf ar game without spending any money or having a compatible device.</p>
|
83 |
-
<h3>Fnaf ar lite has some limitations and bugs that may affect the experience</h3>
|
84 |
-
<p>One of the cons of fnaf ar lite is that it has some limitations and bugs that may affect the experience. For example, fnaf ar lite does not have all the animatronics and features that fnaf ar has, which may make it less exciting and diverse. Fnaf ar lite also has some glitches and errors that may cause the game to crash or freeze. Fnaf ar lite is not a polished or optimized game, as it was made by a single fan who did not have the resources or support of the official developers.</p>
|
85 |
-
<h3>Fnaf ar lite is not affiliated with Illumix or Scott Cawthon, the official developers of fnaf ar</h3>
|
86 |
-
<p>Another con of fnaf ar lite is that it is not affiliated with Illumix or Scott Cawthon, the official developers of fnaf ar. This means that fnaf ar lite is not authorized or endorsed by them, and it may violate their intellectual property rights. Fnaf ar lite is also not updated or supported by them, and it may not reflect their vision or quality standards. Fnaf ar lite is a fan-made game that should be played at your own risk and discretion.</p>
|
87 |
-
<h2>Conclusion: Is fnaf ar lite worth playing?</h2>
|
88 |
-
<p>In conclusion, fnaf ar lite is a fan-made game that recreates fnaf ar without the augmented reality feature. It has some pros and cons that you should weigh before downloading it. Fnaf ar lite is a good alternative for players who cannot access fnaf ar or want a simpler version of the game. However, fnaf ar lite is not a replacement for fnaf ar, but a tribute to it. Fnaf ar lite is a creative and impressive fan-made game that deserves recognition.</p>
|
89 |
-
<p>If you are interested in playing fnaf ar lite, you can download it from Game Jolt for free. However, if you want to play the original fnaf ar game, you can download it from Google Play or App Store for free as well. Either way, we hope you have fun and stay safe from the animatronics!</p>
|
90 |
-
<h2>Frequently Asked Questions</h2>
|
91 |
-
<p>Here are some of the frequently asked questions about fnaf ar lite:</p>
|
92 |
-
<h4>What devices can run fnaf ar lite?</h4>
|
93 |
-
<p>Fnaf ar lite can run on any device that has Android 4.4 or higher and a gyroscope. However, some devices may have compatibility issues or performance problems.</p>
|
94 |
-
<h4>How do I download fnaf ar lite?</h4>
|
95 |
-
<p>You can download fnaf ar lite from Game Jolt by following this link: . You will need to create an account or log in to download the game. You will also need to enable unknown sources on your device settings to install the game.</p>
|
96 |
-
<h4>How do I update fnaf ar lite?</h4>
|
97 |
-
<p>You can update fnaf ar lite by checking for new versions on Game Jolt. However, the developer has stated that he is done with the project and will not release any more updates.</p>
|
98 |
-
<h4>How do I contact the developer of fnaf ar lite?</h4>
|
99 |
-
<p>You can contact the developer of fnaf ar lite by leaving a comment on his Game Jolt page: . You can also follow him on Twitter: . However, he may not respond to your messages or requests.</p>
|
100 |
-
<h4>How do I support the official developers of fnaf ar?</h4>
|
101 |
-
<p>You can support the official developers of fnaf ar by downloading their game from Google Play or App Store: . You can also follow them on their social media accounts: [^6 <p>Here are the links to their social media accounts:</p>
|
102 |
-
<ul>
|
103 |
-
<li>Facebook: [^7 <li>Twitter: [^8 <li>Instagram: [^9 </ul>
|
104 |
-
<p>I hope you enjoyed this article and learned something new about fnaf ar lite. If you have any questions or feedback, please leave a comment below. Thank you for reading and have a nice day!</p> 197e85843d<br />
|
105 |
-
<br />
|
106 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/232labs/VToonify/vtoonify/model/bisenet/README.md
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
# face-parsing.PyTorch
|
2 |
-
|
3 |
-
<p align="center">
|
4 |
-
<a href="https://github.com/zllrunning/face-parsing.PyTorch">
|
5 |
-
<img class="page-image" src="https://github.com/zllrunning/face-parsing.PyTorch/blob/master/6.jpg" >
|
6 |
-
</a>
|
7 |
-
</p>
|
8 |
-
|
9 |
-
### Contents
|
10 |
-
- [Training](#training)
|
11 |
-
- [Demo](#Demo)
|
12 |
-
- [References](#references)
|
13 |
-
|
14 |
-
## Training
|
15 |
-
|
16 |
-
1. Prepare training data:
|
17 |
-
-- download [CelebAMask-HQ dataset](https://github.com/switchablenorms/CelebAMask-HQ)
|
18 |
-
|
19 |
-
-- change file path in the `prepropess_data.py` and run
|
20 |
-
```Shell
|
21 |
-
python prepropess_data.py
|
22 |
-
```
|
23 |
-
|
24 |
-
2. Train the model using CelebAMask-HQ dataset:
|
25 |
-
Just run the train script:
|
26 |
-
```
|
27 |
-
$ CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 train.py
|
28 |
-
```
|
29 |
-
|
30 |
-
If you do not wish to train the model, you can download [our pre-trained model](https://drive.google.com/open?id=154JgKpzCPW82qINcVieuPH3fZ2e0P812) and save it in `res/cp`.
|
31 |
-
|
32 |
-
|
33 |
-
## Demo
|
34 |
-
1. Evaluate the trained model using:
|
35 |
-
```Shell
|
36 |
-
# evaluate using GPU
|
37 |
-
python test.py
|
38 |
-
```
|
39 |
-
|
40 |
-
## Face makeup using parsing maps
|
41 |
-
[**face-makeup.PyTorch**](https://github.com/zllrunning/face-makeup.PyTorch)
|
42 |
-
<table>
|
43 |
-
|
44 |
-
<tr>
|
45 |
-
<th> </th>
|
46 |
-
<th>Hair</th>
|
47 |
-
<th>Lip</th>
|
48 |
-
</tr>
|
49 |
-
|
50 |
-
<!-- Line 1: Original Input -->
|
51 |
-
<tr>
|
52 |
-
<td><em>Original Input</em></td>
|
53 |
-
<td><img src="makeup/116_ori.png" height="256" width="256" alt="Original Input"></td>
|
54 |
-
<td><img src="makeup/116_lip_ori.png" height="256" width="256" alt="Original Input"></td>
|
55 |
-
</tr>
|
56 |
-
|
57 |
-
<!-- Line 3: Color -->
|
58 |
-
<tr>
|
59 |
-
<td>Color</td>
|
60 |
-
<td><img src="makeup/116_1.png" height="256" width="256" alt="Color"></td>
|
61 |
-
<td><img src="makeup/116_3.png" height="256" width="256" alt="Color"></td>
|
62 |
-
</tr>
|
63 |
-
|
64 |
-
</table>
|
65 |
-
|
66 |
-
|
67 |
-
## References
|
68 |
-
- [BiSeNet](https://github.com/CoinCheung/BiSeNet)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/801artistry/RVC801/infer/modules/train/extract/extract_f0_rmvpe.py
DELETED
@@ -1,141 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import sys
|
3 |
-
import traceback
|
4 |
-
|
5 |
-
import parselmouth
|
6 |
-
|
7 |
-
now_dir = os.getcwd()
|
8 |
-
sys.path.append(now_dir)
|
9 |
-
import logging
|
10 |
-
|
11 |
-
import numpy as np
|
12 |
-
import pyworld
|
13 |
-
|
14 |
-
from infer.lib.audio import load_audio
|
15 |
-
|
16 |
-
logging.getLogger("numba").setLevel(logging.WARNING)
|
17 |
-
|
18 |
-
n_part = int(sys.argv[1])
|
19 |
-
i_part = int(sys.argv[2])
|
20 |
-
i_gpu = sys.argv[3]
|
21 |
-
os.environ["CUDA_VISIBLE_DEVICES"] = str(i_gpu)
|
22 |
-
exp_dir = sys.argv[4]
|
23 |
-
is_half = sys.argv[5]
|
24 |
-
f = open("%s/extract_f0_feature.log" % exp_dir, "a+")
|
25 |
-
|
26 |
-
|
27 |
-
def printt(strr):
|
28 |
-
print(strr)
|
29 |
-
f.write("%s\n" % strr)
|
30 |
-
f.flush()
|
31 |
-
|
32 |
-
|
33 |
-
class FeatureInput(object):
|
34 |
-
def __init__(self, samplerate=16000, hop_size=160):
|
35 |
-
self.fs = samplerate
|
36 |
-
self.hop = hop_size
|
37 |
-
|
38 |
-
self.f0_bin = 256
|
39 |
-
self.f0_max = 1100.0
|
40 |
-
self.f0_min = 50.0
|
41 |
-
self.f0_mel_min = 1127 * np.log(1 + self.f0_min / 700)
|
42 |
-
self.f0_mel_max = 1127 * np.log(1 + self.f0_max / 700)
|
43 |
-
|
44 |
-
def compute_f0(self, path, f0_method):
|
45 |
-
x = load_audio(path, self.fs)
|
46 |
-
# p_len = x.shape[0] // self.hop
|
47 |
-
if f0_method == "rmvpe":
|
48 |
-
if hasattr(self, "model_rmvpe") == False:
|
49 |
-
from infer.lib.rmvpe import RMVPE
|
50 |
-
|
51 |
-
print("Loading rmvpe model")
|
52 |
-
self.model_rmvpe = RMVPE(
|
53 |
-
"assets/rmvpe/rmvpe.pt", is_half=is_half, device="cuda"
|
54 |
-
)
|
55 |
-
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
|
56 |
-
return f0
|
57 |
-
|
58 |
-
def coarse_f0(self, f0):
|
59 |
-
f0_mel = 1127 * np.log(1 + f0 / 700)
|
60 |
-
f0_mel[f0_mel > 0] = (f0_mel[f0_mel > 0] - self.f0_mel_min) * (
|
61 |
-
self.f0_bin - 2
|
62 |
-
) / (self.f0_mel_max - self.f0_mel_min) + 1
|
63 |
-
|
64 |
-
# use 0 or 1
|
65 |
-
f0_mel[f0_mel <= 1] = 1
|
66 |
-
f0_mel[f0_mel > self.f0_bin - 1] = self.f0_bin - 1
|
67 |
-
f0_coarse = np.rint(f0_mel).astype(int)
|
68 |
-
assert f0_coarse.max() <= 255 and f0_coarse.min() >= 1, (
|
69 |
-
f0_coarse.max(),
|
70 |
-
f0_coarse.min(),
|
71 |
-
)
|
72 |
-
return f0_coarse
|
73 |
-
|
74 |
-
def go(self, paths, f0_method):
|
75 |
-
if len(paths) == 0:
|
76 |
-
printt("no-f0-todo")
|
77 |
-
else:
|
78 |
-
printt("todo-f0-%s" % len(paths))
|
79 |
-
n = max(len(paths) // 5, 1) # 每个进程最多打印5条
|
80 |
-
for idx, (inp_path, opt_path1, opt_path2) in enumerate(paths):
|
81 |
-
try:
|
82 |
-
if idx % n == 0:
|
83 |
-
printt("f0ing,now-%s,all-%s,-%s" % (idx, len(paths), inp_path))
|
84 |
-
if (
|
85 |
-
os.path.exists(opt_path1 + ".npy") == True
|
86 |
-
and os.path.exists(opt_path2 + ".npy") == True
|
87 |
-
):
|
88 |
-
continue
|
89 |
-
featur_pit = self.compute_f0(inp_path, f0_method)
|
90 |
-
np.save(
|
91 |
-
opt_path2,
|
92 |
-
featur_pit,
|
93 |
-
allow_pickle=False,
|
94 |
-
) # nsf
|
95 |
-
coarse_pit = self.coarse_f0(featur_pit)
|
96 |
-
np.save(
|
97 |
-
opt_path1,
|
98 |
-
coarse_pit,
|
99 |
-
allow_pickle=False,
|
100 |
-
) # ori
|
101 |
-
except:
|
102 |
-
printt("f0fail-%s-%s-%s" % (idx, inp_path, traceback.format_exc()))
|
103 |
-
|
104 |
-
|
105 |
-
if __name__ == "__main__":
|
106 |
-
# exp_dir=r"E:\codes\py39\dataset\mi-test"
|
107 |
-
# n_p=16
|
108 |
-
# f = open("%s/log_extract_f0.log"%exp_dir, "w")
|
109 |
-
printt(sys.argv)
|
110 |
-
featureInput = FeatureInput()
|
111 |
-
paths = []
|
112 |
-
inp_root = "%s/1_16k_wavs" % (exp_dir)
|
113 |
-
opt_root1 = "%s/2a_f0" % (exp_dir)
|
114 |
-
opt_root2 = "%s/2b-f0nsf" % (exp_dir)
|
115 |
-
|
116 |
-
os.makedirs(opt_root1, exist_ok=True)
|
117 |
-
os.makedirs(opt_root2, exist_ok=True)
|
118 |
-
for name in sorted(list(os.listdir(inp_root))):
|
119 |
-
inp_path = "%s/%s" % (inp_root, name)
|
120 |
-
if "spec" in inp_path:
|
121 |
-
continue
|
122 |
-
opt_path1 = "%s/%s" % (opt_root1, name)
|
123 |
-
opt_path2 = "%s/%s" % (opt_root2, name)
|
124 |
-
paths.append([inp_path, opt_path1, opt_path2])
|
125 |
-
try:
|
126 |
-
featureInput.go(paths[i_part::n_part], "rmvpe")
|
127 |
-
except:
|
128 |
-
printt("f0_all_fail-%s" % (traceback.format_exc()))
|
129 |
-
# ps = []
|
130 |
-
# for i in range(n_p):
|
131 |
-
# p = Process(
|
132 |
-
# target=featureInput.go,
|
133 |
-
# args=(
|
134 |
-
# paths[i::n_p],
|
135 |
-
# f0method,
|
136 |
-
# ),
|
137 |
-
# )
|
138 |
-
# ps.append(p)
|
139 |
-
# p.start()
|
140 |
-
# for i in range(n_p):
|
141 |
-
# ps[i].join()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AHzizi/WaifuVoiceGen/text/__init__.py
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
""" from https://github.com/keithito/tacotron """
|
2 |
-
from text import cleaners
|
3 |
-
from text.symbols import symbols
|
4 |
-
|
5 |
-
|
6 |
-
# Mappings from symbol to numeric ID and vice versa:
|
7 |
-
_symbol_to_id = {s: i for i, s in enumerate(symbols)}
|
8 |
-
_id_to_symbol = {i: s for i, s in enumerate(symbols)}
|
9 |
-
|
10 |
-
|
11 |
-
def text_to_sequence(text, symbols, cleaner_names):
|
12 |
-
'''Converts a string of text to a sequence of IDs corresponding to the symbols in the text.
|
13 |
-
Args:
|
14 |
-
text: string to convert to a sequence
|
15 |
-
cleaner_names: names of the cleaner functions to run the text through
|
16 |
-
Returns:
|
17 |
-
List of integers corresponding to the symbols in the text
|
18 |
-
'''
|
19 |
-
_symbol_to_id = {s: i for i, s in enumerate(symbols)}
|
20 |
-
sequence = []
|
21 |
-
|
22 |
-
clean_text = _clean_text(text, cleaner_names)
|
23 |
-
for symbol in clean_text:
|
24 |
-
if symbol not in _symbol_to_id.keys():
|
25 |
-
continue
|
26 |
-
symbol_id = _symbol_to_id[symbol]
|
27 |
-
sequence += [symbol_id]
|
28 |
-
return sequence, clean_text
|
29 |
-
|
30 |
-
|
31 |
-
def cleaned_text_to_sequence(cleaned_text):
|
32 |
-
'''Converts a string of text to a sequence of IDs corresponding to the symbols in the text.
|
33 |
-
Args:
|
34 |
-
text: string to convert to a sequence
|
35 |
-
Returns:
|
36 |
-
List of integers corresponding to the symbols in the text
|
37 |
-
'''
|
38 |
-
sequence = [_symbol_to_id[symbol] for symbol in cleaned_text if symbol in _symbol_to_id.keys()]
|
39 |
-
return sequence
|
40 |
-
|
41 |
-
|
42 |
-
def sequence_to_text(sequence):
|
43 |
-
'''Converts a sequence of IDs back to a string'''
|
44 |
-
result = ''
|
45 |
-
for symbol_id in sequence:
|
46 |
-
s = _id_to_symbol[symbol_id]
|
47 |
-
result += s
|
48 |
-
return result
|
49 |
-
|
50 |
-
|
51 |
-
def _clean_text(text, cleaner_names):
|
52 |
-
for name in cleaner_names:
|
53 |
-
cleaner = getattr(cleaners, name)
|
54 |
-
if not cleaner:
|
55 |
-
raise Exception('Unknown cleaner: %s' % name)
|
56 |
-
text = cleaner(text)
|
57 |
-
return text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIGC-Audio/AudioGPT/text_to_speech/utils/commons/base_task.py
DELETED
@@ -1,238 +0,0 @@
|
|
1 |
-
import logging
|
2 |
-
import os
|
3 |
-
import random
|
4 |
-
import subprocess
|
5 |
-
import sys
|
6 |
-
from datetime import datetime
|
7 |
-
import numpy as np
|
8 |
-
import torch.utils.data
|
9 |
-
from torch import nn
|
10 |
-
from torch.utils.tensorboard import SummaryWriter
|
11 |
-
from text_to_speech.utils.commons.dataset_utils import data_loader
|
12 |
-
from text_to_speech.utils.commons.hparams import hparams
|
13 |
-
from text_to_speech.utils.commons.meters import AvgrageMeter
|
14 |
-
from text_to_speech.utils.commons.tensor_utils import tensors_to_scalars
|
15 |
-
from text_to_speech.utils.commons.trainer import Trainer
|
16 |
-
from text_to_speech.utils.nn.model_utils import get_grad_norm
|
17 |
-
|
18 |
-
torch.multiprocessing.set_sharing_strategy(os.getenv('TORCH_SHARE_STRATEGY', 'file_system'))
|
19 |
-
|
20 |
-
log_format = '%(asctime)s %(message)s'
|
21 |
-
logging.basicConfig(stream=sys.stdout, level=logging.INFO,
|
22 |
-
format=log_format, datefmt='%m/%d %I:%M:%S %p')
|
23 |
-
|
24 |
-
|
25 |
-
class BaseTask(nn.Module):
|
26 |
-
def __init__(self, *args, **kwargs):
|
27 |
-
super(BaseTask, self).__init__()
|
28 |
-
self.current_epoch = 0
|
29 |
-
self.global_step = 0
|
30 |
-
self.trainer = None
|
31 |
-
self.use_ddp = False
|
32 |
-
self.gradient_clip_norm = hparams['clip_grad_norm']
|
33 |
-
self.gradient_clip_val = hparams.get('clip_grad_value', 0)
|
34 |
-
self.model = None
|
35 |
-
self.training_losses_meter = None
|
36 |
-
self.logger: SummaryWriter = None
|
37 |
-
|
38 |
-
######################
|
39 |
-
# build model, dataloaders, optimizer, scheduler and tensorboard
|
40 |
-
######################
|
41 |
-
def build_model(self):
|
42 |
-
raise NotImplementedError
|
43 |
-
|
44 |
-
@data_loader
|
45 |
-
def train_dataloader(self):
|
46 |
-
raise NotImplementedError
|
47 |
-
|
48 |
-
@data_loader
|
49 |
-
def test_dataloader(self):
|
50 |
-
raise NotImplementedError
|
51 |
-
|
52 |
-
@data_loader
|
53 |
-
def val_dataloader(self):
|
54 |
-
raise NotImplementedError
|
55 |
-
|
56 |
-
def build_scheduler(self, optimizer):
|
57 |
-
return None
|
58 |
-
|
59 |
-
def build_optimizer(self, model):
|
60 |
-
raise NotImplementedError
|
61 |
-
|
62 |
-
def configure_optimizers(self):
|
63 |
-
optm = self.build_optimizer(self.model)
|
64 |
-
self.scheduler = self.build_scheduler(optm)
|
65 |
-
if isinstance(optm, (list, tuple)):
|
66 |
-
return optm
|
67 |
-
return [optm]
|
68 |
-
|
69 |
-
def build_tensorboard(self, save_dir, name, **kwargs):
|
70 |
-
log_dir = os.path.join(save_dir, name)
|
71 |
-
os.makedirs(log_dir, exist_ok=True)
|
72 |
-
self.logger = SummaryWriter(log_dir=log_dir, **kwargs)
|
73 |
-
|
74 |
-
######################
|
75 |
-
# training
|
76 |
-
######################
|
77 |
-
def on_train_start(self):
|
78 |
-
pass
|
79 |
-
|
80 |
-
def on_train_end(self):
|
81 |
-
pass
|
82 |
-
|
83 |
-
def on_epoch_start(self):
|
84 |
-
self.training_losses_meter = {'total_loss': AvgrageMeter()}
|
85 |
-
|
86 |
-
def on_epoch_end(self):
|
87 |
-
loss_outputs = {k: round(v.avg, 4) for k, v in self.training_losses_meter.items()}
|
88 |
-
print(f"Epoch {self.current_epoch} ended. Steps: {self.global_step}. {loss_outputs}")
|
89 |
-
|
90 |
-
def _training_step(self, sample, batch_idx, optimizer_idx):
|
91 |
-
"""
|
92 |
-
|
93 |
-
:param sample:
|
94 |
-
:param batch_idx:
|
95 |
-
:return: total loss: torch.Tensor, loss_log: dict
|
96 |
-
"""
|
97 |
-
raise NotImplementedError
|
98 |
-
|
99 |
-
def training_step(self, sample, batch_idx, optimizer_idx=-1):
|
100 |
-
"""
|
101 |
-
|
102 |
-
:param sample:
|
103 |
-
:param batch_idx:
|
104 |
-
:param optimizer_idx:
|
105 |
-
:return: {'loss': torch.Tensor, 'progress_bar': dict, 'tb_log': dict}
|
106 |
-
"""
|
107 |
-
loss_ret = self._training_step(sample, batch_idx, optimizer_idx)
|
108 |
-
if loss_ret is None:
|
109 |
-
return {'loss': None}
|
110 |
-
total_loss, log_outputs = loss_ret
|
111 |
-
log_outputs = tensors_to_scalars(log_outputs)
|
112 |
-
for k, v in log_outputs.items():
|
113 |
-
if k not in self.training_losses_meter:
|
114 |
-
self.training_losses_meter[k] = AvgrageMeter()
|
115 |
-
if not np.isnan(v):
|
116 |
-
self.training_losses_meter[k].update(v)
|
117 |
-
self.training_losses_meter['total_loss'].update(total_loss.item())
|
118 |
-
|
119 |
-
if optimizer_idx >= 0:
|
120 |
-
log_outputs[f'lr_{optimizer_idx}'] = self.trainer.optimizers[optimizer_idx].param_groups[0]['lr']
|
121 |
-
|
122 |
-
progress_bar_log = log_outputs
|
123 |
-
tb_log = {f'tr/{k}': v for k, v in log_outputs.items()}
|
124 |
-
return {
|
125 |
-
'loss': total_loss,
|
126 |
-
'progress_bar': progress_bar_log,
|
127 |
-
'tb_log': tb_log
|
128 |
-
}
|
129 |
-
|
130 |
-
def on_before_optimization(self, opt_idx):
|
131 |
-
if self.gradient_clip_norm > 0:
|
132 |
-
prefix = f"grad_norm_opt_idx_{opt_idx}"
|
133 |
-
grad_norm = torch.nn.utils.clip_grad_norm_(self.parameters(), self.gradient_clip_norm)
|
134 |
-
grad_norm_dict = {
|
135 |
-
f"{prefix}/task.parameters": grad_norm
|
136 |
-
}
|
137 |
-
return grad_norm_dict
|
138 |
-
if self.gradient_clip_val > 0:
|
139 |
-
torch.nn.utils.clip_grad_value_(self.parameters(), self.gradient_clip_val)
|
140 |
-
|
141 |
-
def on_after_optimization(self, epoch, batch_idx, optimizer, optimizer_idx):
|
142 |
-
if self.scheduler is not None:
|
143 |
-
self.scheduler.step(self.global_step // hparams['accumulate_grad_batches'])
|
144 |
-
|
145 |
-
######################
|
146 |
-
# validation
|
147 |
-
######################
|
148 |
-
def validation_start(self):
|
149 |
-
pass
|
150 |
-
|
151 |
-
def validation_step(self, sample, batch_idx):
|
152 |
-
"""
|
153 |
-
|
154 |
-
:param sample:
|
155 |
-
:param batch_idx:
|
156 |
-
:return: output: {"losses": {...}, "total_loss": float, ...} or (total loss: torch.Tensor, loss_log: dict)
|
157 |
-
"""
|
158 |
-
raise NotImplementedError
|
159 |
-
|
160 |
-
def validation_end(self, outputs):
|
161 |
-
"""
|
162 |
-
|
163 |
-
:param outputs:
|
164 |
-
:return: loss_output: dict
|
165 |
-
"""
|
166 |
-
all_losses_meter = {'total_loss': AvgrageMeter()}
|
167 |
-
for output in outputs:
|
168 |
-
if len(output) == 0 or output is None:
|
169 |
-
continue
|
170 |
-
if isinstance(output, dict):
|
171 |
-
assert 'losses' in output, 'Key "losses" should exist in validation output.'
|
172 |
-
n = output.pop('nsamples', 1)
|
173 |
-
losses = tensors_to_scalars(output['losses'])
|
174 |
-
total_loss = output.get('total_loss', sum(losses.values()))
|
175 |
-
else:
|
176 |
-
assert len(output) == 2, 'Validation output should only consist of two elements: (total_loss, losses)'
|
177 |
-
n = 1
|
178 |
-
total_loss, losses = output
|
179 |
-
losses = tensors_to_scalars(losses)
|
180 |
-
if isinstance(total_loss, torch.Tensor):
|
181 |
-
total_loss = total_loss.item()
|
182 |
-
for k, v in losses.items():
|
183 |
-
if k not in all_losses_meter:
|
184 |
-
all_losses_meter[k] = AvgrageMeter()
|
185 |
-
all_losses_meter[k].update(v, n)
|
186 |
-
all_losses_meter['total_loss'].update(total_loss, n)
|
187 |
-
loss_output = {k: round(v.avg, 4) for k, v in all_losses_meter.items()}
|
188 |
-
print(f"| Validation results@{self.global_step}: {loss_output}")
|
189 |
-
return {
|
190 |
-
'tb_log': {f'val/{k}': v for k, v in loss_output.items()},
|
191 |
-
'val_loss': loss_output['total_loss']
|
192 |
-
}
|
193 |
-
|
194 |
-
######################
|
195 |
-
# testing
|
196 |
-
######################
|
197 |
-
def test_start(self):
|
198 |
-
pass
|
199 |
-
|
200 |
-
def test_step(self, sample, batch_idx):
|
201 |
-
return self.validation_step(sample, batch_idx)
|
202 |
-
|
203 |
-
def test_end(self, outputs):
|
204 |
-
return self.validation_end(outputs)
|
205 |
-
|
206 |
-
######################
|
207 |
-
# start training/testing
|
208 |
-
######################
|
209 |
-
@classmethod
|
210 |
-
def start(cls):
|
211 |
-
os.environ['MASTER_PORT'] = str(random.randint(15000, 30000))
|
212 |
-
random.seed(hparams['seed'])
|
213 |
-
np.random.seed(hparams['seed'])
|
214 |
-
work_dir = hparams['work_dir']
|
215 |
-
trainer = Trainer(
|
216 |
-
work_dir=work_dir,
|
217 |
-
val_check_interval=hparams['val_check_interval'],
|
218 |
-
tb_log_interval=hparams['tb_log_interval'],
|
219 |
-
max_updates=hparams['max_updates'],
|
220 |
-
num_sanity_val_steps=hparams['num_sanity_val_steps'] if not hparams['validate'] else 10000,
|
221 |
-
accumulate_grad_batches=hparams['accumulate_grad_batches'],
|
222 |
-
print_nan_grads=hparams['print_nan_grads'],
|
223 |
-
resume_from_checkpoint=hparams.get('resume_from_checkpoint', 0),
|
224 |
-
amp=hparams['amp'],
|
225 |
-
monitor_key=hparams['valid_monitor_key'],
|
226 |
-
monitor_mode=hparams['valid_monitor_mode'],
|
227 |
-
num_ckpt_keep=hparams['num_ckpt_keep'],
|
228 |
-
save_best=hparams['save_best'],
|
229 |
-
seed=hparams['seed'],
|
230 |
-
debug=hparams['debug']
|
231 |
-
)
|
232 |
-
if not hparams['infer']: # train
|
233 |
-
trainer.fit(cls)
|
234 |
-
else:
|
235 |
-
trainer.test(cls)
|
236 |
-
|
237 |
-
def on_keyboard_interrupt(self):
|
238 |
-
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIGC-Audio/Make_An_Audio/ldm/modules/losses_audio/vqperceptual.py
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
import torch.nn as nn
|
3 |
-
import torch.nn.functional as F
|
4 |
-
import sys
|
5 |
-
from ldm.util import exists
|
6 |
-
sys.path.insert(0, '.') # nopep8
|
7 |
-
from ldm.modules.discriminator.model import (NLayerDiscriminator, NLayerDiscriminator1dFeats,
|
8 |
-
NLayerDiscriminator1dSpecs,
|
9 |
-
weights_init)
|
10 |
-
from ldm.modules.losses_audio.lpaps import LPAPS
|
11 |
-
from ldm.modules.losses.vqperceptual import l1, l2, measure_perplexity, hinge_d_loss, vanilla_d_loss, adopt_weight
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
class DummyLoss(nn.Module):
|
16 |
-
def __init__(self):
|
17 |
-
super().__init__()
|
18 |
-
|
19 |
-
class VQLPAPSWithDiscriminator(nn.Module):
|
20 |
-
def __init__(self, disc_start, codebook_weight=1.0, pixelloss_weight=1.0,
|
21 |
-
disc_num_layers=3, disc_in_channels=3, disc_factor=1.0, disc_weight=1.0,
|
22 |
-
perceptual_weight=1.0, use_actnorm=False, disc_conditional=False,
|
23 |
-
disc_ndf=64, disc_loss="hinge", n_classes=None, pixel_loss="l1"):
|
24 |
-
super().__init__()
|
25 |
-
assert disc_loss in ["hinge", "vanilla"]
|
26 |
-
self.codebook_weight = codebook_weight
|
27 |
-
self.pixel_weight = pixelloss_weight
|
28 |
-
self.perceptual_loss = LPAPS().eval()
|
29 |
-
self.perceptual_weight = perceptual_weight
|
30 |
-
|
31 |
-
if pixel_loss == "l1":
|
32 |
-
self.pixel_loss = l1
|
33 |
-
else:
|
34 |
-
self.pixel_loss = l2
|
35 |
-
|
36 |
-
self.discriminator = NLayerDiscriminator(input_nc=disc_in_channels,
|
37 |
-
n_layers=disc_num_layers,
|
38 |
-
use_actnorm=use_actnorm,
|
39 |
-
ndf=disc_ndf
|
40 |
-
).apply(weights_init)
|
41 |
-
self.discriminator_iter_start = disc_start
|
42 |
-
if disc_loss == "hinge":
|
43 |
-
self.disc_loss = hinge_d_loss
|
44 |
-
elif disc_loss == "vanilla":
|
45 |
-
self.disc_loss = vanilla_d_loss
|
46 |
-
else:
|
47 |
-
raise ValueError(f"Unknown GAN loss '{disc_loss}'.")
|
48 |
-
print(f"VQLPAPSWithDiscriminator running with {disc_loss} loss.")
|
49 |
-
self.disc_factor = disc_factor
|
50 |
-
self.discriminator_weight = disc_weight
|
51 |
-
self.disc_conditional = disc_conditional
|
52 |
-
self.n_classes = n_classes
|
53 |
-
|
54 |
-
def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None):
|
55 |
-
if last_layer is not None:
|
56 |
-
nll_grads = torch.autograd.grad(nll_loss, last_layer, retain_graph=True)[0]
|
57 |
-
g_grads = torch.autograd.grad(g_loss, last_layer, retain_graph=True)[0]
|
58 |
-
else:
|
59 |
-
nll_grads = torch.autograd.grad(nll_loss, self.last_layer[0], retain_graph=True)[0]
|
60 |
-
g_grads = torch.autograd.grad(g_loss, self.last_layer[0], retain_graph=True)[0]
|
61 |
-
|
62 |
-
d_weight = torch.norm(nll_grads) / (torch.norm(g_grads) + 1e-4)
|
63 |
-
d_weight = torch.clamp(d_weight, 0.0, 1e4).detach()
|
64 |
-
d_weight = d_weight * self.discriminator_weight
|
65 |
-
return d_weight
|
66 |
-
|
67 |
-
def forward(self, codebook_loss, inputs, reconstructions, optimizer_idx,
|
68 |
-
global_step, last_layer=None, cond=None, split="train", predicted_indices=None):
|
69 |
-
if not exists(codebook_loss):
|
70 |
-
codebook_loss = torch.tensor([0.]).to(inputs.device)
|
71 |
-
rec_loss = torch.abs(inputs.contiguous() - reconstructions.contiguous())
|
72 |
-
if self.perceptual_weight > 0:
|
73 |
-
p_loss = self.perceptual_loss(inputs.contiguous(), reconstructions.contiguous())
|
74 |
-
rec_loss = rec_loss + self.perceptual_weight * p_loss
|
75 |
-
else:
|
76 |
-
p_loss = torch.tensor([0.0])
|
77 |
-
|
78 |
-
nll_loss = rec_loss
|
79 |
-
# nll_loss = torch.sum(nll_loss) / nll_loss.shape[0]
|
80 |
-
nll_loss = torch.mean(nll_loss)
|
81 |
-
|
82 |
-
# now the GAN part
|
83 |
-
if optimizer_idx == 0:
|
84 |
-
# generator update
|
85 |
-
if cond is None:
|
86 |
-
assert not self.disc_conditional
|
87 |
-
logits_fake = self.discriminator(reconstructions.contiguous())
|
88 |
-
else:
|
89 |
-
assert self.disc_conditional
|
90 |
-
logits_fake = self.discriminator(torch.cat((reconstructions.contiguous(), cond), dim=1))
|
91 |
-
g_loss = -torch.mean(logits_fake)
|
92 |
-
|
93 |
-
try:
|
94 |
-
d_weight = self.calculate_adaptive_weight(nll_loss, g_loss, last_layer=last_layer)
|
95 |
-
except RuntimeError:
|
96 |
-
assert not self.training
|
97 |
-
d_weight = torch.tensor(0.0)
|
98 |
-
|
99 |
-
disc_factor = adopt_weight(self.disc_factor, global_step, threshold=self.discriminator_iter_start)
|
100 |
-
loss = nll_loss + d_weight * disc_factor * g_loss + self.codebook_weight * codebook_loss.mean()
|
101 |
-
|
102 |
-
log = {"{}/total_loss".format(split): loss.clone().detach().mean(),
|
103 |
-
"{}/quant_loss".format(split): codebook_loss.detach().mean(),
|
104 |
-
"{}/nll_loss".format(split): nll_loss.detach().mean(),
|
105 |
-
"{}/rec_loss".format(split): rec_loss.detach().mean(),
|
106 |
-
"{}/p_loss".format(split): p_loss.detach().mean(),
|
107 |
-
"{}/d_weight".format(split): d_weight.detach(),
|
108 |
-
"{}/disc_factor".format(split): torch.tensor(disc_factor),
|
109 |
-
"{}/g_loss".format(split): g_loss.detach().mean(),
|
110 |
-
}
|
111 |
-
# if predicted_indices is not None:
|
112 |
-
# assert self.n_classes is not None
|
113 |
-
# with torch.no_grad():
|
114 |
-
# perplexity, cluster_usage = measure_perplexity(predicted_indices, self.n_classes)
|
115 |
-
# log[f"{split}/perplexity"] = perplexity
|
116 |
-
# log[f"{split}/cluster_usage"] = cluster_usage
|
117 |
-
return loss, log
|
118 |
-
|
119 |
-
if optimizer_idx == 1:
|
120 |
-
# second pass for discriminator update
|
121 |
-
if cond is None:
|
122 |
-
logits_real = self.discriminator(inputs.contiguous().detach())
|
123 |
-
logits_fake = self.discriminator(reconstructions.contiguous().detach())
|
124 |
-
else:
|
125 |
-
logits_real = self.discriminator(torch.cat((inputs.contiguous().detach(), cond), dim=1))
|
126 |
-
logits_fake = self.discriminator(torch.cat((reconstructions.contiguous().detach(), cond), dim=1))
|
127 |
-
|
128 |
-
disc_factor = adopt_weight(self.disc_factor, global_step, threshold=self.discriminator_iter_start)
|
129 |
-
d_loss = disc_factor * self.disc_loss(logits_real, logits_fake)
|
130 |
-
|
131 |
-
log = {"{}/disc_loss".format(split): d_loss.clone().detach().mean(),
|
132 |
-
"{}/logits_real".format(split): logits_real.detach().mean(),
|
133 |
-
"{}/logits_fake".format(split): logits_fake.detach().mean()
|
134 |
-
}
|
135 |
-
return d_loss, log
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIZero2HeroBootcamp/ClassDescriptionAndExamplesStreamlit/app.py
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
|
3 |
-
st.markdown('''
|
4 |
-
|
5 |
-
---
|
6 |
-
title: README
|
7 |
-
emoji: 🏃
|
8 |
-
colorFrom: pink
|
9 |
-
colorTo: blue
|
10 |
-
sdk: static
|
11 |
-
pinned: false
|
12 |
-
---
|
13 |
-
Welcome - This classroom organization holds examples and links for this session.
|
14 |
-
Begin by adding a bookmark.
|
15 |
-
|
16 |
-
# Examples and Exercises - Create These Spaces in Your Account and Test / Modify
|
17 |
-
|
18 |
-
## Easy Examples
|
19 |
-
1. [FastSpeech](https://huggingface.co/spaces/AIZero2HeroBootcamp/FastSpeech2LinerGradioApp)
|
20 |
-
2. [Memory](https://huggingface.co/spaces/AIZero2HeroBootcamp/Memory)
|
21 |
-
3. [StaticHTML5PlayCanvas](https://huggingface.co/spaces/AIZero2HeroBootcamp/StaticHTML5Playcanvas)
|
22 |
-
4. [3DHuman](https://huggingface.co/spaces/AIZero2HeroBootcamp/3DHuman)
|
23 |
-
5. [TranscriptAILearnerFromYoutube](https://huggingface.co/spaces/AIZero2HeroBootcamp/TranscriptAILearnerFromYoutube)
|
24 |
-
6. [AnimatedGifGallery](https://huggingface.co/spaces/AIZero2HeroBootcamp/AnimatedGifGallery)
|
25 |
-
7. [VideoToAnimatedGif](https://huggingface.co/spaces/AIZero2HeroBootcamp/VideoToAnimatedGif)
|
26 |
-
|
27 |
-
## Hard Examples:
|
28 |
-
8. [ChatGPTandLangChain](https://huggingface.co/spaces/AIZero2HeroBootcamp/ChatGPTandLangchain)
|
29 |
-
a. Keys: [API Keys](https://platform.openai.com/account/api-keys)
|
30 |
-
9. [MultiPDFQAChatGPTLangchain](https://huggingface.co/spaces/AIZero2HeroBootcamp/MultiPDF-QA-ChatGPT-Langchain)
|
31 |
-
|
32 |
-
# 👋 Two easy ways to turbo boost your AI learning journey - Lets go 100X! 💻
|
33 |
-
|
34 |
-
# 🌐 AI Pair Programming with GPT
|
35 |
-
### Open 2 Browsers to:
|
36 |
-
1. 🌐 [ChatGPT](https://chat.openai.com/chat) or [URL2](https://platform.openai.com/playground) and
|
37 |
-
2. 🌐 [Huggingface](https://huggingface.co/awacke1) in separate browser windows.
|
38 |
-
1. 🤖 Use prompts to generate a streamlit program on Huggingface or locally to test it.
|
39 |
-
2. 🔧 For advanced work, add Python 3.10 and VSCode locally, and debug as gradio or streamlit apps.
|
40 |
-
3. 🚀 Use these two superpower processes to reduce the time it takes you to make a new AI program! ⏱️
|
41 |
-
|
42 |
-
# 🎥 YouTube University Method:
|
43 |
-
1. 🏋️♀️ Plan two hours each weekday to exercise your body and brain.
|
44 |
-
2. 🎬 Make a playlist of videos you want to learn from on YouTube. Save the links to edit later.
|
45 |
-
3. 🚀 Try watching the videos at a faster speed while exercising, and sample the first five minutes of each video.
|
46 |
-
4. 📜 Reorder the playlist so the most useful videos are at the front, and take breaks to exercise.
|
47 |
-
5. 📝 Practice note-taking in markdown to instantly save what you want to remember. Share your notes with others!
|
48 |
-
6. 👥 AI Pair Programming Using Long Answer Language Models with Human Feedback
|
49 |
-
|
50 |
-
## 🎥 2023 AI/ML Learning Playlists for ChatGPT, LLMs, Recent Events in AI:
|
51 |
-
1. [AI News](https://www.youtube.com/playlist?list=PLHgX2IExbFotMOKWOErYeyHSiikf6RTeX)
|
52 |
-
2. [ChatGPT Code Interpreter](https://www.youtube.com/playlist?list=PLHgX2IExbFou1pOQMayB7PArCalMWLfU-)
|
53 |
-
3. [Ilya Sutskever and Sam Altman](https://www.youtube.com/playlist?list=PLHgX2IExbFovr66KW6Mqa456qyY-Vmvw-)
|
54 |
-
4. [Andrew Huberman on Neuroscience and Health](https://www.youtube.com/playlist?list=PLHgX2IExbFotRU0jl_a0e0mdlYU-NWy1r)
|
55 |
-
5. [Andrej Karpathy](https://www.youtube.com/playlist?list=PLHgX2IExbFovbOFCgLNw1hRutQQKrfYNP)
|
56 |
-
6. [Medical Futurist on GPT](https://www.youtube.com/playlist?list=PLHgX2IExbFosVaCMZCZ36bYqKBYqFKHB2)
|
57 |
-
7. [ML APIs](https://www.youtube.com/playlist?list=PLHg
|
58 |
-
|
59 |
-
- 🔗 Source Code:
|
60 |
-
1. [BigScience (GitHub)](https://github.com/bigscience-workshop/bigscience)
|
61 |
-
|
62 |
-
## 🏃 GPT-3 Performance:
|
63 |
-
|
64 |
-
- GPT-3, while less performant than BigScience, has found widespread use due to its availability through the OpenAI API, making it easier for developers to incorporate the model into their applications without requiring substantial computational resources.
|
65 |
-
- While the GPT-3 model has 175 billion parameters, its performance is considered slightly less than the newer BigScience model. However, the specific performance of each model can vary depending on the task.
|
66 |
-
|
67 |
-
## DALL-E 2.0 Overview 🎨
|
68 |
-
|
69 |
-
- DALL-E 2.0 is an AI model developed by OpenAI that generates images from textual descriptions.
|
70 |
-
- It has 500 million parameters and uses a dataset curated by OpenAI, consisting of a diverse range of images from the internet.
|
71 |
-
|
72 |
-
## NVIDIA's Megatron Overview 💡
|
73 |
-
|
74 |
-
- Megatron is a large-scale transformer model developed by NVIDIA. It's primarily designed for tasks that require understanding the context of large pieces of text.
|
75 |
-
- It has 8.3 billion parameters and is trained on a variety of text data from the internet.
|
76 |
-
|
77 |
-
## Transformer-XL Overview ⚡️
|
78 |
-
|
79 |
-
- Transformer-XL is an AI model developed by Google Brain, which introduces a novel recurrence mechanism and relative positional encoding scheme.
|
80 |
-
- It has 250 million parameters and uses a variety of datasets for training, including BooksCorpus and English Wikipedia.
|
81 |
-
|
82 |
-
## XLNet Overview 🌐
|
83 |
-
|
84 |
-
- XLNet is a generalized autoregressive model that outperforms BERT on several benchmarks.
|
85 |
-
- It has 210 million parameters and uses a variety of datasets for training, including BooksCorpus and English Wikipedia.
|
86 |
-
|
87 |
-
<h1><center>📊AI Model Comparison📉</center></h1>
|
88 |
-
|
89 |
-
| Model Name | Model Size (in Parameters) | Model Overview |
|
90 |
-
| --- | --- | --- |
|
91 |
-
| BigScience-tr11-176B | 176 billion | BigScience is the latest AI model developed by the Big Science Workshop. It has 176 billion parameters and uses a combination of text data from the internet and scientific literature for training. |
|
92 |
-
| GPT-3 | 175 billion | GPT-3 is an AI model developed by OpenAI, which has 175 billion parameters and uses a variety of datasets for training, including Common Crawl, BooksCorpus, and English Wikipedia. |
|
93 |
-
| OpenAI's DALL-E 2.0 | 500 million | DALL-E 2.0 is an AI model developed by OpenAI that generates images from textual descriptions. It has 500 million parameters and uses a dataset curated by OpenAI. |
|
94 |
-
| NVIDIA's Megatron | 8.3 billion | Megatron is a large-scale transformer model developed by NVIDIA. It's primarily designed for tasks that require understanding the context of large pieces of text. |
|
95 |
-
| Transformer-XL | 250 million | Transformer-XL is an AI model developed by Google Brain, which introduces a novel recurrence mechanism and relative positional encoding scheme. |
|
96 |
-
| XLNet | 210 million | XLNet is a generalized autoregressive model that outperforms BERT on several benchmarks. |
|
97 |
-
|
98 |
-
## References:
|
99 |
-
|
100 |
-
1. [BigScience - A 176B-Parameter Open-Access Multilingual Language Model](https://arxiv.org/abs/2211.05100)
|
101 |
-
2. [GPT-3 - Language Models are Few-Shot Learners](https://arxiv.org/abs/2005.14165)
|
102 |
-
3. [DALL-E 2.0 - Generative Pretraining from Pixels](https://openai.com/research/dall-e/)
|
103 |
-
4. [Megatron - Training Multi-Billion Parameter Language Models Using GPU Model Parallelism](https://arxiv.org/abs/1909.08053)
|
104 |
-
5. [Transformer-XL - Transformers with Longer-Range Dependencies](https://arxiv.org/abs/1901.02860)
|
105 |
-
6. [XLNet - Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237)
|
106 |
-
|
107 |
-
|
108 |
-
| Model Name | Model Size (in Parameters) |
|
109 |
-
| --- | --- |
|
110 |
-
| BigScience-tr11-176B | 176 billion |
|
111 |
-
| GPT-3 | 175 billion |
|
112 |
-
| OpenAI's DALL-E 2.0 | 500 million |
|
113 |
-
| NVIDIA's Megatron | 8.3 billion |
|
114 |
-
| Transformer-XL | 250 million |
|
115 |
-
| XLNet | 210 million |
|
116 |
-
|
117 |
-
|
118 |
-
| Model Name | Model Size (in Parameters) | Model Overview |
|
119 |
-
| --- | --- | --- |
|
120 |
-
| BigScience-tr11-176B | 176 billion | Uses a combination of text data from the internet and scientific literature for training. |
|
121 |
-
| GPT-3 | 175 billion | Uses a variety of datasets for training, including Common Crawl,
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
''')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ASJMO/freegpt/g4f/utils.py
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
import browser_cookie3
|
2 |
-
|
3 |
-
|
4 |
-
class Utils:
|
5 |
-
browsers = [
|
6 |
-
browser_cookie3.chrome, # 62.74% market share
|
7 |
-
browser_cookie3.safari, # 24.12% market share
|
8 |
-
browser_cookie3.firefox, # 4.56% market share
|
9 |
-
browser_cookie3.edge, # 2.85% market share
|
10 |
-
browser_cookie3.opera, # 1.69% market share
|
11 |
-
browser_cookie3.brave, # 0.96% market share
|
12 |
-
browser_cookie3.opera_gx, # 0.64% market share
|
13 |
-
browser_cookie3.vivaldi, # 0.32% market share
|
14 |
-
]
|
15 |
-
|
16 |
-
def get_cookies(domain: str, setName: str = None, setBrowser: str = False) -> dict:
|
17 |
-
cookies = {}
|
18 |
-
|
19 |
-
if setBrowser != False:
|
20 |
-
for browser in Utils.browsers:
|
21 |
-
if browser.__name__ == setBrowser:
|
22 |
-
try:
|
23 |
-
for c in browser(domain_name=domain):
|
24 |
-
if c.name not in cookies:
|
25 |
-
cookies = cookies | {c.name: c.value}
|
26 |
-
|
27 |
-
except Exception as e:
|
28 |
-
pass
|
29 |
-
|
30 |
-
else:
|
31 |
-
for browser in Utils.browsers:
|
32 |
-
try:
|
33 |
-
for c in browser(domain_name=domain):
|
34 |
-
if c.name not in cookies:
|
35 |
-
cookies = cookies | {c.name: c.value}
|
36 |
-
|
37 |
-
except Exception as e:
|
38 |
-
pass
|
39 |
-
|
40 |
-
if setName:
|
41 |
-
try:
|
42 |
-
return {setName: cookies[setName]}
|
43 |
-
|
44 |
-
except ValueError:
|
45 |
-
print(f'Error: could not find {setName} cookie in any browser.')
|
46 |
-
exit(1)
|
47 |
-
|
48 |
-
else:
|
49 |
-
return cookies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Aadi1149/Arkenbrien-text-to-image-Arkenbrien/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Arkenbrien Text To Image Arkenbrien
|
3 |
-
emoji: 💻
|
4 |
-
colorFrom: yellow
|
5 |
-
colorTo: yellow
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.50.2
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ababababababbababa/topic2poem/app.py
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
from transformers import BertTokenizer, EncoderDecoderModel
|
2 |
-
import gradio as gr
|
3 |
-
|
4 |
-
tokenizerM = BertTokenizer.from_pretrained("mareloraby/BERTShared-PoetryGen-arV01")
|
5 |
-
bertSharedM = EncoderDecoderModel.from_pretrained("mareloraby/BERTShared-PoetryGen-arV01")
|
6 |
-
# bertSharedM.cuda()
|
7 |
-
|
8 |
-
|
9 |
-
def generate_response(text, k = 70, p = 0.9, nb = 4):
|
10 |
-
prompt = f"{text}"
|
11 |
-
encoded_prompt = tokenizerM.encode_plus(prompt, return_tensors = 'pt')#.to(device)
|
12 |
-
gneration = bertSharedM.generate(
|
13 |
-
input_ids = encoded_prompt.input_ids,
|
14 |
-
attention_mask = encoded_prompt.attention_mask,
|
15 |
-
do_sample = True,
|
16 |
-
top_k= k,
|
17 |
-
top_p = p,
|
18 |
-
num_beams= nb,
|
19 |
-
max_length =130,
|
20 |
-
repetition_penalty = 2.0,
|
21 |
-
no_repeat_ngram_size = 2,
|
22 |
-
early_stopping=True)
|
23 |
-
|
24 |
-
generated_text = tokenizerM.decode(gneration[0], skip_special_tokens=True)
|
25 |
-
bayts = generated_text.split("[BSEP]")
|
26 |
-
while("FSEP" not in bayts[-1]):
|
27 |
-
bayts = bayts[:-1]
|
28 |
-
bayts = bayts[:-1]
|
29 |
-
temp_poem = ''
|
30 |
-
for b in range(len(bayts)):
|
31 |
-
temp_line = bayts[b].split('[FSEP]')
|
32 |
-
temp_poem = temp_poem + temp_line[1] + ' - ' + temp_line[0] +'\n'
|
33 |
-
|
34 |
-
return temp_poem
|
35 |
-
|
36 |
-
iface = gr.Interface(fn=generate_response,
|
37 |
-
title = 'BERTShared - topic based generation',
|
38 |
-
|
39 |
-
inputs=[
|
40 |
-
gr.inputs.Radio(['حزينه','هجاء','عتاب','غزل','مدح','رومنسيه','دينية'],label='Choose Topic'),
|
41 |
-
gr.inputs.Slider(10, 200, step=10,default = 70, label='Top-K'),
|
42 |
-
gr.inputs.Slider(0.10, 0.99, step=0.02, default = 0.90, label='Top-P'),
|
43 |
-
#gr.inputs.Slider(1, 20, step=1, default = 4, label='Beams'),
|
44 |
-
|
45 |
-
],
|
46 |
-
outputs="text")
|
47 |
-
|
48 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Abhilashvj/planogram-compliance/utils/loggers/clearml/__init__.py
DELETED
File without changes
|
spaces/Adapter/CoAdapter/ldm/modules/extra_condition/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
|
|
|
spaces/Aiusernumber5/janitorai/Dockerfile
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
FROM node:18-bullseye-slim
|
2 |
-
|
3 |
-
RUN apt-get update && \
|
4 |
-
|
5 |
-
apt-get install -y git
|
6 |
-
|
7 |
-
RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app
|
8 |
-
|
9 |
-
WORKDIR /app
|
10 |
-
|
11 |
-
RUN npm install
|
12 |
-
|
13 |
-
COPY Dockerfile greeting.md* .env* ./
|
14 |
-
|
15 |
-
RUN npm run build
|
16 |
-
|
17 |
-
EXPOSE 7860
|
18 |
-
|
19 |
-
ENV NODE_ENV=production
|
20 |
-
|
21 |
-
CMD [ "npm", "start" ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/PTI/models/StyleCLIP/models/stylegan2/model.py
DELETED
@@ -1,674 +0,0 @@
|
|
1 |
-
import math
|
2 |
-
import random
|
3 |
-
|
4 |
-
import torch
|
5 |
-
from torch import nn
|
6 |
-
from torch.nn import functional as F
|
7 |
-
|
8 |
-
from models.StyleCLIP.models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
|
9 |
-
|
10 |
-
|
11 |
-
class PixelNorm(nn.Module):
|
12 |
-
def __init__(self):
|
13 |
-
super().__init__()
|
14 |
-
|
15 |
-
def forward(self, input):
|
16 |
-
return input * torch.rsqrt(torch.mean(input ** 2, dim=1, keepdim=True) + 1e-8)
|
17 |
-
|
18 |
-
|
19 |
-
def make_kernel(k):
|
20 |
-
k = torch.tensor(k, dtype=torch.float32)
|
21 |
-
|
22 |
-
if k.ndim == 1:
|
23 |
-
k = k[None, :] * k[:, None]
|
24 |
-
|
25 |
-
k /= k.sum()
|
26 |
-
|
27 |
-
return k
|
28 |
-
|
29 |
-
|
30 |
-
class Upsample(nn.Module):
|
31 |
-
def __init__(self, kernel, factor=2):
|
32 |
-
super().__init__()
|
33 |
-
|
34 |
-
self.factor = factor
|
35 |
-
kernel = make_kernel(kernel) * (factor ** 2)
|
36 |
-
self.register_buffer('kernel', kernel)
|
37 |
-
|
38 |
-
p = kernel.shape[0] - factor
|
39 |
-
|
40 |
-
pad0 = (p + 1) // 2 + factor - 1
|
41 |
-
pad1 = p // 2
|
42 |
-
|
43 |
-
self.pad = (pad0, pad1)
|
44 |
-
|
45 |
-
def forward(self, input):
|
46 |
-
out = upfirdn2d(input, self.kernel, up=self.factor, down=1, pad=self.pad)
|
47 |
-
|
48 |
-
return out
|
49 |
-
|
50 |
-
|
51 |
-
class Downsample(nn.Module):
|
52 |
-
def __init__(self, kernel, factor=2):
|
53 |
-
super().__init__()
|
54 |
-
|
55 |
-
self.factor = factor
|
56 |
-
kernel = make_kernel(kernel)
|
57 |
-
self.register_buffer('kernel', kernel)
|
58 |
-
|
59 |
-
p = kernel.shape[0] - factor
|
60 |
-
|
61 |
-
pad0 = (p + 1) // 2
|
62 |
-
pad1 = p // 2
|
63 |
-
|
64 |
-
self.pad = (pad0, pad1)
|
65 |
-
|
66 |
-
def forward(self, input):
|
67 |
-
out = upfirdn2d(input, self.kernel, up=1, down=self.factor, pad=self.pad)
|
68 |
-
|
69 |
-
return out
|
70 |
-
|
71 |
-
|
72 |
-
class Blur(nn.Module):
|
73 |
-
def __init__(self, kernel, pad, upsample_factor=1):
|
74 |
-
super().__init__()
|
75 |
-
|
76 |
-
kernel = make_kernel(kernel)
|
77 |
-
|
78 |
-
if upsample_factor > 1:
|
79 |
-
kernel = kernel * (upsample_factor ** 2)
|
80 |
-
|
81 |
-
self.register_buffer('kernel', kernel)
|
82 |
-
|
83 |
-
self.pad = pad
|
84 |
-
|
85 |
-
def forward(self, input):
|
86 |
-
out = upfirdn2d(input, self.kernel, pad=self.pad)
|
87 |
-
|
88 |
-
return out
|
89 |
-
|
90 |
-
|
91 |
-
class EqualConv2d(nn.Module):
|
92 |
-
def __init__(
|
93 |
-
self, in_channel, out_channel, kernel_size, stride=1, padding=0, bias=True
|
94 |
-
):
|
95 |
-
super().__init__()
|
96 |
-
|
97 |
-
self.weight = nn.Parameter(
|
98 |
-
torch.randn(out_channel, in_channel, kernel_size, kernel_size)
|
99 |
-
)
|
100 |
-
self.scale = 1 / math.sqrt(in_channel * kernel_size ** 2)
|
101 |
-
|
102 |
-
self.stride = stride
|
103 |
-
self.padding = padding
|
104 |
-
|
105 |
-
if bias:
|
106 |
-
self.bias = nn.Parameter(torch.zeros(out_channel))
|
107 |
-
|
108 |
-
else:
|
109 |
-
self.bias = None
|
110 |
-
|
111 |
-
def forward(self, input):
|
112 |
-
out = F.conv2d(
|
113 |
-
input,
|
114 |
-
self.weight * self.scale,
|
115 |
-
bias=self.bias,
|
116 |
-
stride=self.stride,
|
117 |
-
padding=self.padding,
|
118 |
-
)
|
119 |
-
|
120 |
-
return out
|
121 |
-
|
122 |
-
def __repr__(self):
|
123 |
-
return (
|
124 |
-
f'{self.__class__.__name__}({self.weight.shape[1]}, {self.weight.shape[0]},'
|
125 |
-
f' {self.weight.shape[2]}, stride={self.stride}, padding={self.padding})'
|
126 |
-
)
|
127 |
-
|
128 |
-
|
129 |
-
class EqualLinear(nn.Module):
|
130 |
-
def __init__(
|
131 |
-
self, in_dim, out_dim, bias=True, bias_init=0, lr_mul=1, activation=None
|
132 |
-
):
|
133 |
-
super().__init__()
|
134 |
-
|
135 |
-
self.weight = nn.Parameter(torch.randn(out_dim, in_dim).div_(lr_mul))
|
136 |
-
|
137 |
-
if bias:
|
138 |
-
self.bias = nn.Parameter(torch.zeros(out_dim).fill_(bias_init))
|
139 |
-
|
140 |
-
else:
|
141 |
-
self.bias = None
|
142 |
-
|
143 |
-
self.activation = activation
|
144 |
-
|
145 |
-
self.scale = (1 / math.sqrt(in_dim)) * lr_mul
|
146 |
-
self.lr_mul = lr_mul
|
147 |
-
|
148 |
-
def forward(self, input):
|
149 |
-
if self.activation:
|
150 |
-
out = F.linear(input, self.weight * self.scale)
|
151 |
-
out = fused_leaky_relu(out, self.bias * self.lr_mul)
|
152 |
-
|
153 |
-
else:
|
154 |
-
out = F.linear(
|
155 |
-
input, self.weight * self.scale, bias=self.bias * self.lr_mul
|
156 |
-
)
|
157 |
-
|
158 |
-
return out
|
159 |
-
|
160 |
-
def __repr__(self):
|
161 |
-
return (
|
162 |
-
f'{self.__class__.__name__}({self.weight.shape[1]}, {self.weight.shape[0]})'
|
163 |
-
)
|
164 |
-
|
165 |
-
|
166 |
-
class ScaledLeakyReLU(nn.Module):
|
167 |
-
def __init__(self, negative_slope=0.2):
|
168 |
-
super().__init__()
|
169 |
-
|
170 |
-
self.negative_slope = negative_slope
|
171 |
-
|
172 |
-
def forward(self, input):
|
173 |
-
out = F.leaky_relu(input, negative_slope=self.negative_slope)
|
174 |
-
|
175 |
-
return out * math.sqrt(2)
|
176 |
-
|
177 |
-
|
178 |
-
class ModulatedConv2d(nn.Module):
|
179 |
-
def __init__(
|
180 |
-
self,
|
181 |
-
in_channel,
|
182 |
-
out_channel,
|
183 |
-
kernel_size,
|
184 |
-
style_dim,
|
185 |
-
demodulate=True,
|
186 |
-
upsample=False,
|
187 |
-
downsample=False,
|
188 |
-
blur_kernel=[1, 3, 3, 1],
|
189 |
-
):
|
190 |
-
super().__init__()
|
191 |
-
|
192 |
-
self.eps = 1e-8
|
193 |
-
self.kernel_size = kernel_size
|
194 |
-
self.in_channel = in_channel
|
195 |
-
self.out_channel = out_channel
|
196 |
-
self.upsample = upsample
|
197 |
-
self.downsample = downsample
|
198 |
-
|
199 |
-
if upsample:
|
200 |
-
factor = 2
|
201 |
-
p = (len(blur_kernel) - factor) - (kernel_size - 1)
|
202 |
-
pad0 = (p + 1) // 2 + factor - 1
|
203 |
-
pad1 = p // 2 + 1
|
204 |
-
|
205 |
-
self.blur = Blur(blur_kernel, pad=(pad0, pad1), upsample_factor=factor)
|
206 |
-
|
207 |
-
if downsample:
|
208 |
-
factor = 2
|
209 |
-
p = (len(blur_kernel) - factor) + (kernel_size - 1)
|
210 |
-
pad0 = (p + 1) // 2
|
211 |
-
pad1 = p // 2
|
212 |
-
|
213 |
-
self.blur = Blur(blur_kernel, pad=(pad0, pad1))
|
214 |
-
|
215 |
-
fan_in = in_channel * kernel_size ** 2
|
216 |
-
self.scale = 1 / math.sqrt(fan_in)
|
217 |
-
self.padding = kernel_size // 2
|
218 |
-
|
219 |
-
self.weight = nn.Parameter(
|
220 |
-
torch.randn(1, out_channel, in_channel, kernel_size, kernel_size)
|
221 |
-
)
|
222 |
-
|
223 |
-
self.modulation = EqualLinear(style_dim, in_channel, bias_init=1)
|
224 |
-
|
225 |
-
self.demodulate = demodulate
|
226 |
-
|
227 |
-
def __repr__(self):
|
228 |
-
return (
|
229 |
-
f'{self.__class__.__name__}({self.in_channel}, {self.out_channel}, {self.kernel_size}, '
|
230 |
-
f'upsample={self.upsample}, downsample={self.downsample})'
|
231 |
-
)
|
232 |
-
|
233 |
-
def forward(self, input, style):
|
234 |
-
batch, in_channel, height, width = input.shape
|
235 |
-
|
236 |
-
style = self.modulation(style).view(batch, 1, in_channel, 1, 1)
|
237 |
-
weight = self.scale * self.weight * style
|
238 |
-
|
239 |
-
if self.demodulate:
|
240 |
-
demod = torch.rsqrt(weight.pow(2).sum([2, 3, 4]) + 1e-8)
|
241 |
-
weight = weight * demod.view(batch, self.out_channel, 1, 1, 1)
|
242 |
-
|
243 |
-
weight = weight.view(
|
244 |
-
batch * self.out_channel, in_channel, self.kernel_size, self.kernel_size
|
245 |
-
)
|
246 |
-
|
247 |
-
if self.upsample:
|
248 |
-
input = input.view(1, batch * in_channel, height, width)
|
249 |
-
weight = weight.view(
|
250 |
-
batch, self.out_channel, in_channel, self.kernel_size, self.kernel_size
|
251 |
-
)
|
252 |
-
weight = weight.transpose(1, 2).reshape(
|
253 |
-
batch * in_channel, self.out_channel, self.kernel_size, self.kernel_size
|
254 |
-
)
|
255 |
-
out = F.conv_transpose2d(input, weight, padding=0, stride=2, groups=batch)
|
256 |
-
_, _, height, width = out.shape
|
257 |
-
out = out.view(batch, self.out_channel, height, width)
|
258 |
-
out = self.blur(out)
|
259 |
-
|
260 |
-
elif self.downsample:
|
261 |
-
input = self.blur(input)
|
262 |
-
_, _, height, width = input.shape
|
263 |
-
input = input.view(1, batch * in_channel, height, width)
|
264 |
-
out = F.conv2d(input, weight, padding=0, stride=2, groups=batch)
|
265 |
-
_, _, height, width = out.shape
|
266 |
-
out = out.view(batch, self.out_channel, height, width)
|
267 |
-
|
268 |
-
else:
|
269 |
-
input = input.view(1, batch * in_channel, height, width)
|
270 |
-
out = F.conv2d(input, weight, padding=self.padding, groups=batch)
|
271 |
-
_, _, height, width = out.shape
|
272 |
-
out = out.view(batch, self.out_channel, height, width)
|
273 |
-
|
274 |
-
return out
|
275 |
-
|
276 |
-
|
277 |
-
class NoiseInjection(nn.Module):
|
278 |
-
def __init__(self):
|
279 |
-
super().__init__()
|
280 |
-
|
281 |
-
self.weight = nn.Parameter(torch.zeros(1))
|
282 |
-
|
283 |
-
def forward(self, image, noise=None):
|
284 |
-
if noise is None:
|
285 |
-
batch, _, height, width = image.shape
|
286 |
-
noise = image.new_empty(batch, 1, height, width).normal_()
|
287 |
-
|
288 |
-
return image + self.weight * noise
|
289 |
-
|
290 |
-
|
291 |
-
class ConstantInput(nn.Module):
|
292 |
-
def __init__(self, channel, size=4):
|
293 |
-
super().__init__()
|
294 |
-
|
295 |
-
self.input = nn.Parameter(torch.randn(1, channel, size, size))
|
296 |
-
|
297 |
-
def forward(self, input):
|
298 |
-
batch = input.shape[0]
|
299 |
-
out = self.input.repeat(batch, 1, 1, 1)
|
300 |
-
|
301 |
-
return out
|
302 |
-
|
303 |
-
|
304 |
-
class StyledConv(nn.Module):
|
305 |
-
def __init__(
|
306 |
-
self,
|
307 |
-
in_channel,
|
308 |
-
out_channel,
|
309 |
-
kernel_size,
|
310 |
-
style_dim,
|
311 |
-
upsample=False,
|
312 |
-
blur_kernel=[1, 3, 3, 1],
|
313 |
-
demodulate=True,
|
314 |
-
):
|
315 |
-
super().__init__()
|
316 |
-
|
317 |
-
self.conv = ModulatedConv2d(
|
318 |
-
in_channel,
|
319 |
-
out_channel,
|
320 |
-
kernel_size,
|
321 |
-
style_dim,
|
322 |
-
upsample=upsample,
|
323 |
-
blur_kernel=blur_kernel,
|
324 |
-
demodulate=demodulate,
|
325 |
-
)
|
326 |
-
|
327 |
-
self.noise = NoiseInjection()
|
328 |
-
# self.bias = nn.Parameter(torch.zeros(1, out_channel, 1, 1))
|
329 |
-
# self.activate = ScaledLeakyReLU(0.2)
|
330 |
-
self.activate = FusedLeakyReLU(out_channel)
|
331 |
-
|
332 |
-
def forward(self, input, style, noise=None):
|
333 |
-
out = self.conv(input, style)
|
334 |
-
out = self.noise(out, noise=noise)
|
335 |
-
# out = out + self.bias
|
336 |
-
out = self.activate(out)
|
337 |
-
|
338 |
-
return out
|
339 |
-
|
340 |
-
|
341 |
-
class ToRGB(nn.Module):
|
342 |
-
def __init__(self, in_channel, style_dim, upsample=True, blur_kernel=[1, 3, 3, 1]):
|
343 |
-
super().__init__()
|
344 |
-
|
345 |
-
if upsample:
|
346 |
-
self.upsample = Upsample(blur_kernel)
|
347 |
-
|
348 |
-
self.conv = ModulatedConv2d(in_channel, 3, 1, style_dim, demodulate=False)
|
349 |
-
self.bias = nn.Parameter(torch.zeros(1, 3, 1, 1))
|
350 |
-
|
351 |
-
def forward(self, input, style, skip=None):
|
352 |
-
out = self.conv(input, style)
|
353 |
-
out = out + self.bias
|
354 |
-
|
355 |
-
if skip is not None:
|
356 |
-
skip = self.upsample(skip)
|
357 |
-
|
358 |
-
out = out + skip
|
359 |
-
|
360 |
-
return out
|
361 |
-
|
362 |
-
|
363 |
-
class Generator(nn.Module):
|
364 |
-
def __init__(
|
365 |
-
self,
|
366 |
-
size,
|
367 |
-
style_dim,
|
368 |
-
n_mlp,
|
369 |
-
channel_multiplier=2,
|
370 |
-
blur_kernel=[1, 3, 3, 1],
|
371 |
-
lr_mlp=0.01,
|
372 |
-
):
|
373 |
-
super().__init__()
|
374 |
-
|
375 |
-
self.size = size
|
376 |
-
|
377 |
-
self.style_dim = style_dim
|
378 |
-
|
379 |
-
layers = [PixelNorm()]
|
380 |
-
|
381 |
-
for i in range(n_mlp):
|
382 |
-
layers.append(
|
383 |
-
EqualLinear(
|
384 |
-
style_dim, style_dim, lr_mul=lr_mlp, activation='fused_lrelu'
|
385 |
-
)
|
386 |
-
)
|
387 |
-
|
388 |
-
self.style = nn.Sequential(*layers)
|
389 |
-
|
390 |
-
self.channels = {
|
391 |
-
4: 512,
|
392 |
-
8: 512,
|
393 |
-
16: 512,
|
394 |
-
32: 512,
|
395 |
-
64: 256 * channel_multiplier,
|
396 |
-
128: 128 * channel_multiplier,
|
397 |
-
256: 64 * channel_multiplier,
|
398 |
-
512: 32 * channel_multiplier,
|
399 |
-
1024: 16 * channel_multiplier,
|
400 |
-
}
|
401 |
-
|
402 |
-
self.input = ConstantInput(self.channels[4])
|
403 |
-
self.conv1 = StyledConv(
|
404 |
-
self.channels[4], self.channels[4], 3, style_dim, blur_kernel=blur_kernel
|
405 |
-
)
|
406 |
-
self.to_rgb1 = ToRGB(self.channels[4], style_dim, upsample=False)
|
407 |
-
|
408 |
-
self.log_size = int(math.log(size, 2))
|
409 |
-
self.num_layers = (self.log_size - 2) * 2 + 1
|
410 |
-
|
411 |
-
self.convs = nn.ModuleList()
|
412 |
-
self.upsamples = nn.ModuleList()
|
413 |
-
self.to_rgbs = nn.ModuleList()
|
414 |
-
self.noises = nn.Module()
|
415 |
-
|
416 |
-
in_channel = self.channels[4]
|
417 |
-
|
418 |
-
for layer_idx in range(self.num_layers):
|
419 |
-
res = (layer_idx + 5) // 2
|
420 |
-
shape = [1, 1, 2 ** res, 2 ** res]
|
421 |
-
self.noises.register_buffer(f'noise_{layer_idx}', torch.randn(*shape))
|
422 |
-
|
423 |
-
for i in range(3, self.log_size + 1):
|
424 |
-
out_channel = self.channels[2 ** i]
|
425 |
-
|
426 |
-
self.convs.append(
|
427 |
-
StyledConv(
|
428 |
-
in_channel,
|
429 |
-
out_channel,
|
430 |
-
3,
|
431 |
-
style_dim,
|
432 |
-
upsample=True,
|
433 |
-
blur_kernel=blur_kernel,
|
434 |
-
)
|
435 |
-
)
|
436 |
-
|
437 |
-
self.convs.append(
|
438 |
-
StyledConv(
|
439 |
-
out_channel, out_channel, 3, style_dim, blur_kernel=blur_kernel
|
440 |
-
)
|
441 |
-
)
|
442 |
-
|
443 |
-
self.to_rgbs.append(ToRGB(out_channel, style_dim))
|
444 |
-
|
445 |
-
in_channel = out_channel
|
446 |
-
|
447 |
-
self.n_latent = self.log_size * 2 - 2
|
448 |
-
|
449 |
-
def make_noise(self):
|
450 |
-
device = self.input.input.device
|
451 |
-
|
452 |
-
noises = [torch.randn(1, 1, 2 ** 2, 2 ** 2, device=device)]
|
453 |
-
|
454 |
-
for i in range(3, self.log_size + 1):
|
455 |
-
for _ in range(2):
|
456 |
-
noises.append(torch.randn(1, 1, 2 ** i, 2 ** i, device=device))
|
457 |
-
|
458 |
-
return noises
|
459 |
-
|
460 |
-
def mean_latent(self, n_latent):
|
461 |
-
latent_in = torch.randn(
|
462 |
-
n_latent, self.style_dim, device=self.input.input.device
|
463 |
-
)
|
464 |
-
latent = self.style(latent_in).mean(0, keepdim=True)
|
465 |
-
|
466 |
-
return latent
|
467 |
-
|
468 |
-
def get_latent(self, input):
|
469 |
-
return self.style(input)
|
470 |
-
|
471 |
-
def forward(
|
472 |
-
self,
|
473 |
-
styles,
|
474 |
-
return_latents=False,
|
475 |
-
inject_index=None,
|
476 |
-
truncation=1,
|
477 |
-
truncation_latent=None,
|
478 |
-
input_is_latent=False,
|
479 |
-
noise=None,
|
480 |
-
randomize_noise=True,
|
481 |
-
):
|
482 |
-
if not input_is_latent:
|
483 |
-
styles = [self.style(s) for s in styles]
|
484 |
-
|
485 |
-
if noise is None:
|
486 |
-
if randomize_noise:
|
487 |
-
noise = [None] * self.num_layers
|
488 |
-
else:
|
489 |
-
noise = [
|
490 |
-
getattr(self.noises, f'noise_{i}') for i in range(self.num_layers)
|
491 |
-
]
|
492 |
-
|
493 |
-
if truncation < 1:
|
494 |
-
style_t = []
|
495 |
-
|
496 |
-
for style in styles:
|
497 |
-
style_t.append(
|
498 |
-
truncation_latent + truncation * (style - truncation_latent)
|
499 |
-
)
|
500 |
-
|
501 |
-
styles = style_t
|
502 |
-
|
503 |
-
if len(styles) < 2:
|
504 |
-
inject_index = self.n_latent
|
505 |
-
|
506 |
-
if styles[0].ndim < 3:
|
507 |
-
latent = styles[0].unsqueeze(1).repeat(1, inject_index, 1)
|
508 |
-
|
509 |
-
else:
|
510 |
-
latent = styles[0]
|
511 |
-
|
512 |
-
else:
|
513 |
-
if inject_index is None:
|
514 |
-
inject_index = random.randint(1, self.n_latent - 1)
|
515 |
-
|
516 |
-
latent = styles[0].unsqueeze(1).repeat(1, inject_index, 1)
|
517 |
-
latent2 = styles[1].unsqueeze(1).repeat(1, self.n_latent - inject_index, 1)
|
518 |
-
|
519 |
-
latent = torch.cat([latent, latent2], 1)
|
520 |
-
|
521 |
-
out = self.input(latent)
|
522 |
-
out = self.conv1(out, latent[:, 0], noise=noise[0])
|
523 |
-
|
524 |
-
skip = self.to_rgb1(out, latent[:, 1])
|
525 |
-
|
526 |
-
i = 1
|
527 |
-
for conv1, conv2, noise1, noise2, to_rgb in zip(
|
528 |
-
self.convs[::2], self.convs[1::2], noise[1::2], noise[2::2], self.to_rgbs
|
529 |
-
):
|
530 |
-
out = conv1(out, latent[:, i], noise=noise1)
|
531 |
-
out = conv2(out, latent[:, i + 1], noise=noise2)
|
532 |
-
skip = to_rgb(out, latent[:, i + 2], skip)
|
533 |
-
|
534 |
-
i += 2
|
535 |
-
|
536 |
-
image = skip
|
537 |
-
|
538 |
-
if return_latents:
|
539 |
-
return image, latent
|
540 |
-
|
541 |
-
else:
|
542 |
-
return image, None
|
543 |
-
|
544 |
-
|
545 |
-
class ConvLayer(nn.Sequential):
|
546 |
-
def __init__(
|
547 |
-
self,
|
548 |
-
in_channel,
|
549 |
-
out_channel,
|
550 |
-
kernel_size,
|
551 |
-
downsample=False,
|
552 |
-
blur_kernel=[1, 3, 3, 1],
|
553 |
-
bias=True,
|
554 |
-
activate=True,
|
555 |
-
):
|
556 |
-
layers = []
|
557 |
-
|
558 |
-
if downsample:
|
559 |
-
factor = 2
|
560 |
-
p = (len(blur_kernel) - factor) + (kernel_size - 1)
|
561 |
-
pad0 = (p + 1) // 2
|
562 |
-
pad1 = p // 2
|
563 |
-
|
564 |
-
layers.append(Blur(blur_kernel, pad=(pad0, pad1)))
|
565 |
-
|
566 |
-
stride = 2
|
567 |
-
self.padding = 0
|
568 |
-
|
569 |
-
else:
|
570 |
-
stride = 1
|
571 |
-
self.padding = kernel_size // 2
|
572 |
-
|
573 |
-
layers.append(
|
574 |
-
EqualConv2d(
|
575 |
-
in_channel,
|
576 |
-
out_channel,
|
577 |
-
kernel_size,
|
578 |
-
padding=self.padding,
|
579 |
-
stride=stride,
|
580 |
-
bias=bias and not activate,
|
581 |
-
)
|
582 |
-
)
|
583 |
-
|
584 |
-
if activate:
|
585 |
-
if bias:
|
586 |
-
layers.append(FusedLeakyReLU(out_channel))
|
587 |
-
|
588 |
-
else:
|
589 |
-
layers.append(ScaledLeakyReLU(0.2))
|
590 |
-
|
591 |
-
super().__init__(*layers)
|
592 |
-
|
593 |
-
|
594 |
-
class ResBlock(nn.Module):
|
595 |
-
def __init__(self, in_channel, out_channel, blur_kernel=[1, 3, 3, 1]):
|
596 |
-
super().__init__()
|
597 |
-
|
598 |
-
self.conv1 = ConvLayer(in_channel, in_channel, 3)
|
599 |
-
self.conv2 = ConvLayer(in_channel, out_channel, 3, downsample=True)
|
600 |
-
|
601 |
-
self.skip = ConvLayer(
|
602 |
-
in_channel, out_channel, 1, downsample=True, activate=False, bias=False
|
603 |
-
)
|
604 |
-
|
605 |
-
def forward(self, input):
|
606 |
-
out = self.conv1(input)
|
607 |
-
out = self.conv2(out)
|
608 |
-
|
609 |
-
skip = self.skip(input)
|
610 |
-
out = (out + skip) / math.sqrt(2)
|
611 |
-
|
612 |
-
return out
|
613 |
-
|
614 |
-
|
615 |
-
class Discriminator(nn.Module):
|
616 |
-
def __init__(self, size, channel_multiplier=2, blur_kernel=[1, 3, 3, 1]):
|
617 |
-
super().__init__()
|
618 |
-
|
619 |
-
channels = {
|
620 |
-
4: 512,
|
621 |
-
8: 512,
|
622 |
-
16: 512,
|
623 |
-
32: 512,
|
624 |
-
64: 256 * channel_multiplier,
|
625 |
-
128: 128 * channel_multiplier,
|
626 |
-
256: 64 * channel_multiplier,
|
627 |
-
512: 32 * channel_multiplier,
|
628 |
-
1024: 16 * channel_multiplier,
|
629 |
-
}
|
630 |
-
|
631 |
-
convs = [ConvLayer(3, channels[size], 1)]
|
632 |
-
|
633 |
-
log_size = int(math.log(size, 2))
|
634 |
-
|
635 |
-
in_channel = channels[size]
|
636 |
-
|
637 |
-
for i in range(log_size, 2, -1):
|
638 |
-
out_channel = channels[2 ** (i - 1)]
|
639 |
-
|
640 |
-
convs.append(ResBlock(in_channel, out_channel, blur_kernel))
|
641 |
-
|
642 |
-
in_channel = out_channel
|
643 |
-
|
644 |
-
self.convs = nn.Sequential(*convs)
|
645 |
-
|
646 |
-
self.stddev_group = 4
|
647 |
-
self.stddev_feat = 1
|
648 |
-
|
649 |
-
self.final_conv = ConvLayer(in_channel + 1, channels[4], 3)
|
650 |
-
self.final_linear = nn.Sequential(
|
651 |
-
EqualLinear(channels[4] * 4 * 4, channels[4], activation='fused_lrelu'),
|
652 |
-
EqualLinear(channels[4], 1),
|
653 |
-
)
|
654 |
-
|
655 |
-
def forward(self, input):
|
656 |
-
out = self.convs(input)
|
657 |
-
|
658 |
-
batch, channel, height, width = out.shape
|
659 |
-
group = min(batch, self.stddev_group)
|
660 |
-
stddev = out.view(
|
661 |
-
group, -1, self.stddev_feat, channel // self.stddev_feat, height, width
|
662 |
-
)
|
663 |
-
stddev = torch.sqrt(stddev.var(0, unbiased=False) + 1e-8)
|
664 |
-
stddev = stddev.mean([2, 3, 4], keepdims=True).squeeze(2)
|
665 |
-
stddev = stddev.repeat(group, 1, height, width)
|
666 |
-
out = torch.cat([out, stddev], 1)
|
667 |
-
|
668 |
-
out = self.final_conv(out)
|
669 |
-
|
670 |
-
out = out.view(batch, -1)
|
671 |
-
out = self.final_linear(out)
|
672 |
-
|
673 |
-
return out
|
674 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
_base_ = '../faster_rcnn/faster_rcnn_r50_fpn_2x_coco.py'
|
2 |
-
model = dict(
|
3 |
-
pretrained='open-mmlab://res2net101_v1d_26w_4s',
|
4 |
-
backbone=dict(type='Res2Net', depth=101, scales=4, base_width=26))
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_segmentation/configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
_base_ = './fcn_r50-d8_769x769_80k_cityscapes.py'
|
2 |
-
model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_segmentation/configs/psanet/psanet_r101-d8_512x512_40k_voc12aug.py
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
_base_ = './psanet_r50-d8_512x512_40k_voc12aug.py'
|
2 |
-
model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
|
|
|
|
|
|
spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/LLaMA-v2-model.md
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
# LLaMA-v2
|
2 |
-
|
3 |
-
To convert LLaMA-v2 from the `.pth` format provided by Meta to transformers format, follow the steps below:
|
4 |
-
|
5 |
-
1) `cd` into your `llama` folder (the one containing `download.sh` and the models that you downloaded):
|
6 |
-
|
7 |
-
```
|
8 |
-
cd llama
|
9 |
-
```
|
10 |
-
|
11 |
-
2) Clone the transformers library:
|
12 |
-
|
13 |
-
```
|
14 |
-
git clone 'https://github.com/huggingface/transformers'
|
15 |
-
|
16 |
-
```
|
17 |
-
|
18 |
-
3) Create symbolic links from the downloaded folders to names that the conversion script can recognize:
|
19 |
-
|
20 |
-
```
|
21 |
-
ln -s llama-2-7b 7B
|
22 |
-
ln -s llama-2-13b 13B
|
23 |
-
```
|
24 |
-
|
25 |
-
4) Do the conversions:
|
26 |
-
|
27 |
-
```
|
28 |
-
mkdir llama-2-7b-hf llama-2-13b-hf
|
29 |
-
python ./transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py --input_dir . --model_size 7B --output_dir llama-2-7b-hf --safe_serialization true
|
30 |
-
python ./transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py --input_dir . --model_size 13B --output_dir llama-2-13b-hf --safe_serialization true
|
31 |
-
```
|
32 |
-
|
33 |
-
5) Move the output folders inside `text-generation-webui/models`
|
34 |
-
|
35 |
-
6) Have fun
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AnthonyTruchetPoC/persistent-docker/jupyter/scripts/ex_autoreload.py
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
# ---
|
2 |
-
# jupyter:
|
3 |
-
# jupytext:
|
4 |
-
# text_representation:
|
5 |
-
# extension: .py
|
6 |
-
# format_name: percent
|
7 |
-
# format_version: '1.3'
|
8 |
-
# jupytext_version: 1.14.7
|
9 |
-
# kernelspec:
|
10 |
-
# display_name: Python 3 (ipykernel)
|
11 |
-
# language: python
|
12 |
-
# name: python3
|
13 |
-
# ---
|
14 |
-
|
15 |
-
# %% [markdown]
|
16 |
-
# # Automatic reloading example for interactive development
|
17 |
-
#
|
18 |
-
|
19 |
-
# %%
|
20 |
-
# %load_ext autoreload
|
21 |
-
# %autoreload 1
|
22 |
-
|
23 |
-
|
24 |
-
# %%
|
25 |
-
# %aimport athai.hello
|
26 |
-
|
27 |
-
# %% [markdown]
|
28 |
-
#
|
29 |
-
|
30 |
-
# %%
|
31 |
-
from athai import hello
|
32 |
-
|
33 |
-
# %%
|
34 |
-
hello.build_greetings("Jae")
|
35 |
-
|
36 |
-
# %%
|
37 |
-
|
38 |
-
# %%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ArchitSharma/Digital-Photo-Color-Restoration/src/deoldify/unet.py
DELETED
@@ -1,285 +0,0 @@
|
|
1 |
-
from fastai.layers import *
|
2 |
-
from .layers import *
|
3 |
-
from fastai.torch_core import *
|
4 |
-
from fastai.callbacks.hooks import *
|
5 |
-
from fastai.vision import *
|
6 |
-
|
7 |
-
|
8 |
-
# The code below is meant to be merged into fastaiv1 ideally
|
9 |
-
|
10 |
-
__all__ = ['DynamicUnetDeep', 'DynamicUnetWide']
|
11 |
-
|
12 |
-
|
13 |
-
def _get_sfs_idxs(sizes: Sizes) -> List[int]:
|
14 |
-
"Get the indexes of the layers where the size of the activation changes."
|
15 |
-
feature_szs = [size[-1] for size in sizes]
|
16 |
-
sfs_idxs = list(
|
17 |
-
np.where(np.array(feature_szs[:-1]) != np.array(feature_szs[1:]))[0]
|
18 |
-
)
|
19 |
-
if feature_szs[0] != feature_szs[1]:
|
20 |
-
sfs_idxs = [0] + sfs_idxs
|
21 |
-
return sfs_idxs
|
22 |
-
|
23 |
-
|
24 |
-
class CustomPixelShuffle_ICNR(nn.Module):
|
25 |
-
"Upsample by `scale` from `ni` filters to `nf` (default `ni`), using `nn.PixelShuffle`, `icnr` init, and `weight_norm`."
|
26 |
-
|
27 |
-
def __init__(
|
28 |
-
self,
|
29 |
-
ni: int,
|
30 |
-
nf: int = None,
|
31 |
-
scale: int = 2,
|
32 |
-
blur: bool = False,
|
33 |
-
leaky: float = None,
|
34 |
-
**kwargs
|
35 |
-
):
|
36 |
-
super().__init__()
|
37 |
-
nf = ifnone(nf, ni)
|
38 |
-
self.conv = custom_conv_layer(
|
39 |
-
ni, nf * (scale ** 2), ks=1, use_activ=False, **kwargs
|
40 |
-
)
|
41 |
-
icnr(self.conv[0].weight)
|
42 |
-
self.shuf = nn.PixelShuffle(scale)
|
43 |
-
# Blurring over (h*w) kernel
|
44 |
-
# "Super-Resolution using Convolutional Neural Networks without Any Checkerboard Artifacts"
|
45 |
-
# - https://arxiv.org/abs/1806.02658
|
46 |
-
self.pad = nn.ReplicationPad2d((1, 0, 1, 0))
|
47 |
-
self.blur = nn.AvgPool2d(2, stride=1)
|
48 |
-
self.relu = relu(True, leaky=leaky)
|
49 |
-
|
50 |
-
def forward(self, x):
|
51 |
-
x = self.shuf(self.relu(self.conv(x)))
|
52 |
-
return self.blur(self.pad(x)) if self.blur else x
|
53 |
-
|
54 |
-
|
55 |
-
class UnetBlockDeep(nn.Module):
|
56 |
-
"A quasi-UNet block, using `PixelShuffle_ICNR upsampling`."
|
57 |
-
|
58 |
-
def __init__(
|
59 |
-
self,
|
60 |
-
up_in_c: int,
|
61 |
-
x_in_c: int,
|
62 |
-
hook: Hook,
|
63 |
-
final_div: bool = True,
|
64 |
-
blur: bool = False,
|
65 |
-
leaky: float = None,
|
66 |
-
self_attention: bool = False,
|
67 |
-
nf_factor: float = 1.0,
|
68 |
-
**kwargs
|
69 |
-
):
|
70 |
-
super().__init__()
|
71 |
-
self.hook = hook
|
72 |
-
self.shuf = CustomPixelShuffle_ICNR(
|
73 |
-
up_in_c, up_in_c // 2, blur=blur, leaky=leaky, **kwargs
|
74 |
-
)
|
75 |
-
self.bn = batchnorm_2d(x_in_c)
|
76 |
-
ni = up_in_c // 2 + x_in_c
|
77 |
-
nf = int((ni if final_div else ni // 2) * nf_factor)
|
78 |
-
self.conv1 = custom_conv_layer(ni, nf, leaky=leaky, **kwargs)
|
79 |
-
self.conv2 = custom_conv_layer(
|
80 |
-
nf, nf, leaky=leaky, self_attention=self_attention, **kwargs
|
81 |
-
)
|
82 |
-
self.relu = relu(leaky=leaky)
|
83 |
-
|
84 |
-
def forward(self, up_in: Tensor) -> Tensor:
|
85 |
-
s = self.hook.stored
|
86 |
-
up_out = self.shuf(up_in)
|
87 |
-
ssh = s.shape[-2:]
|
88 |
-
if ssh != up_out.shape[-2:]:
|
89 |
-
up_out = F.interpolate(up_out, s.shape[-2:], mode='nearest')
|
90 |
-
cat_x = self.relu(torch.cat([up_out, self.bn(s)], dim=1))
|
91 |
-
return self.conv2(self.conv1(cat_x))
|
92 |
-
|
93 |
-
|
94 |
-
class DynamicUnetDeep(SequentialEx):
|
95 |
-
"Create a U-Net from a given architecture."
|
96 |
-
|
97 |
-
def __init__(
|
98 |
-
self,
|
99 |
-
encoder: nn.Module,
|
100 |
-
n_classes: int,
|
101 |
-
blur: bool = False,
|
102 |
-
blur_final=True,
|
103 |
-
self_attention: bool = False,
|
104 |
-
y_range: Optional[Tuple[float, float]] = None,
|
105 |
-
last_cross: bool = True,
|
106 |
-
bottle: bool = False,
|
107 |
-
norm_type: Optional[NormType] = NormType.Batch,
|
108 |
-
nf_factor: float = 1.0,
|
109 |
-
**kwargs
|
110 |
-
):
|
111 |
-
extra_bn = norm_type == NormType.Spectral
|
112 |
-
imsize = (256, 256)
|
113 |
-
sfs_szs = model_sizes(encoder, size=imsize)
|
114 |
-
sfs_idxs = list(reversed(_get_sfs_idxs(sfs_szs)))
|
115 |
-
self.sfs = hook_outputs([encoder[i] for i in sfs_idxs], detach=False)
|
116 |
-
x = dummy_eval(encoder, imsize).detach()
|
117 |
-
|
118 |
-
ni = sfs_szs[-1][1]
|
119 |
-
middle_conv = nn.Sequential(
|
120 |
-
custom_conv_layer(
|
121 |
-
ni, ni * 2, norm_type=norm_type, extra_bn=extra_bn, **kwargs
|
122 |
-
),
|
123 |
-
custom_conv_layer(
|
124 |
-
ni * 2, ni, norm_type=norm_type, extra_bn=extra_bn, **kwargs
|
125 |
-
),
|
126 |
-
).eval()
|
127 |
-
x = middle_conv(x)
|
128 |
-
layers = [encoder, batchnorm_2d(ni), nn.ReLU(), middle_conv]
|
129 |
-
|
130 |
-
for i, idx in enumerate(sfs_idxs):
|
131 |
-
not_final = i != len(sfs_idxs) - 1
|
132 |
-
up_in_c, x_in_c = int(x.shape[1]), int(sfs_szs[idx][1])
|
133 |
-
do_blur = blur and (not_final or blur_final)
|
134 |
-
sa = self_attention and (i == len(sfs_idxs) - 3)
|
135 |
-
unet_block = UnetBlockDeep(
|
136 |
-
up_in_c,
|
137 |
-
x_in_c,
|
138 |
-
self.sfs[i],
|
139 |
-
final_div=not_final,
|
140 |
-
blur=blur,
|
141 |
-
self_attention=sa,
|
142 |
-
norm_type=norm_type,
|
143 |
-
extra_bn=extra_bn,
|
144 |
-
nf_factor=nf_factor,
|
145 |
-
**kwargs
|
146 |
-
).eval()
|
147 |
-
layers.append(unet_block)
|
148 |
-
x = unet_block(x)
|
149 |
-
|
150 |
-
ni = x.shape[1]
|
151 |
-
if imsize != sfs_szs[0][-2:]:
|
152 |
-
layers.append(PixelShuffle_ICNR(ni, **kwargs))
|
153 |
-
if last_cross:
|
154 |
-
layers.append(MergeLayer(dense=True))
|
155 |
-
ni += in_channels(encoder)
|
156 |
-
layers.append(res_block(ni, bottle=bottle, norm_type=norm_type, **kwargs))
|
157 |
-
layers += [
|
158 |
-
custom_conv_layer(ni, n_classes, ks=1, use_activ=False, norm_type=norm_type)
|
159 |
-
]
|
160 |
-
if y_range is not None:
|
161 |
-
layers.append(SigmoidRange(*y_range))
|
162 |
-
super().__init__(*layers)
|
163 |
-
|
164 |
-
def __del__(self):
|
165 |
-
if hasattr(self, "sfs"):
|
166 |
-
self.sfs.remove()
|
167 |
-
|
168 |
-
|
169 |
-
# ------------------------------------------------------
|
170 |
-
class UnetBlockWide(nn.Module):
|
171 |
-
"A quasi-UNet block, using `PixelShuffle_ICNR upsampling`."
|
172 |
-
|
173 |
-
def __init__(
|
174 |
-
self,
|
175 |
-
up_in_c: int,
|
176 |
-
x_in_c: int,
|
177 |
-
n_out: int,
|
178 |
-
hook: Hook,
|
179 |
-
final_div: bool = True,
|
180 |
-
blur: bool = False,
|
181 |
-
leaky: float = None,
|
182 |
-
self_attention: bool = False,
|
183 |
-
**kwargs
|
184 |
-
):
|
185 |
-
super().__init__()
|
186 |
-
self.hook = hook
|
187 |
-
up_out = x_out = n_out // 2
|
188 |
-
self.shuf = CustomPixelShuffle_ICNR(
|
189 |
-
up_in_c, up_out, blur=blur, leaky=leaky, **kwargs
|
190 |
-
)
|
191 |
-
self.bn = batchnorm_2d(x_in_c)
|
192 |
-
ni = up_out + x_in_c
|
193 |
-
self.conv = custom_conv_layer(
|
194 |
-
ni, x_out, leaky=leaky, self_attention=self_attention, **kwargs
|
195 |
-
)
|
196 |
-
self.relu = relu(leaky=leaky)
|
197 |
-
|
198 |
-
def forward(self, up_in: Tensor) -> Tensor:
|
199 |
-
s = self.hook.stored
|
200 |
-
up_out = self.shuf(up_in)
|
201 |
-
ssh = s.shape[-2:]
|
202 |
-
if ssh != up_out.shape[-2:]:
|
203 |
-
up_out = F.interpolate(up_out, s.shape[-2:], mode='nearest')
|
204 |
-
cat_x = self.relu(torch.cat([up_out, self.bn(s)], dim=1))
|
205 |
-
return self.conv(cat_x)
|
206 |
-
|
207 |
-
|
208 |
-
class DynamicUnetWide(SequentialEx):
|
209 |
-
"Create a U-Net from a given architecture."
|
210 |
-
|
211 |
-
def __init__(
|
212 |
-
self,
|
213 |
-
encoder: nn.Module,
|
214 |
-
n_classes: int,
|
215 |
-
blur: bool = False,
|
216 |
-
blur_final=True,
|
217 |
-
self_attention: bool = False,
|
218 |
-
y_range: Optional[Tuple[float, float]] = None,
|
219 |
-
last_cross: bool = True,
|
220 |
-
bottle: bool = False,
|
221 |
-
norm_type: Optional[NormType] = NormType.Batch,
|
222 |
-
nf_factor: int = 1,
|
223 |
-
**kwargs
|
224 |
-
):
|
225 |
-
|
226 |
-
nf = 512 * nf_factor
|
227 |
-
extra_bn = norm_type == NormType.Spectral
|
228 |
-
imsize = (256, 256)
|
229 |
-
sfs_szs = model_sizes(encoder, size=imsize)
|
230 |
-
sfs_idxs = list(reversed(_get_sfs_idxs(sfs_szs)))
|
231 |
-
self.sfs = hook_outputs([encoder[i] for i in sfs_idxs], detach=False)
|
232 |
-
x = dummy_eval(encoder, imsize).detach()
|
233 |
-
|
234 |
-
ni = sfs_szs[-1][1]
|
235 |
-
middle_conv = nn.Sequential(
|
236 |
-
custom_conv_layer(
|
237 |
-
ni, ni * 2, norm_type=norm_type, extra_bn=extra_bn, **kwargs
|
238 |
-
),
|
239 |
-
custom_conv_layer(
|
240 |
-
ni * 2, ni, norm_type=norm_type, extra_bn=extra_bn, **kwargs
|
241 |
-
),
|
242 |
-
).eval()
|
243 |
-
x = middle_conv(x)
|
244 |
-
layers = [encoder, batchnorm_2d(ni), nn.ReLU(), middle_conv]
|
245 |
-
|
246 |
-
for i, idx in enumerate(sfs_idxs):
|
247 |
-
not_final = i != len(sfs_idxs) - 1
|
248 |
-
up_in_c, x_in_c = int(x.shape[1]), int(sfs_szs[idx][1])
|
249 |
-
do_blur = blur and (not_final or blur_final)
|
250 |
-
sa = self_attention and (i == len(sfs_idxs) - 3)
|
251 |
-
|
252 |
-
n_out = nf if not_final else nf // 2
|
253 |
-
|
254 |
-
unet_block = UnetBlockWide(
|
255 |
-
up_in_c,
|
256 |
-
x_in_c,
|
257 |
-
n_out,
|
258 |
-
self.sfs[i],
|
259 |
-
final_div=not_final,
|
260 |
-
blur=blur,
|
261 |
-
self_attention=sa,
|
262 |
-
norm_type=norm_type,
|
263 |
-
extra_bn=extra_bn,
|
264 |
-
**kwargs
|
265 |
-
).eval()
|
266 |
-
layers.append(unet_block)
|
267 |
-
x = unet_block(x)
|
268 |
-
|
269 |
-
ni = x.shape[1]
|
270 |
-
if imsize != sfs_szs[0][-2:]:
|
271 |
-
layers.append(PixelShuffle_ICNR(ni, **kwargs))
|
272 |
-
if last_cross:
|
273 |
-
layers.append(MergeLayer(dense=True))
|
274 |
-
ni += in_channels(encoder)
|
275 |
-
layers.append(res_block(ni, bottle=bottle, norm_type=norm_type, **kwargs))
|
276 |
-
layers += [
|
277 |
-
custom_conv_layer(ni, n_classes, ks=1, use_activ=False, norm_type=norm_type)
|
278 |
-
]
|
279 |
-
if y_range is not None:
|
280 |
-
layers.append(SigmoidRange(*y_range))
|
281 |
-
super().__init__(*layers)
|
282 |
-
|
283 |
-
def __del__(self):
|
284 |
-
if hasattr(self, "sfs"):
|
285 |
-
self.sfs.remove()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ariharasudhan/YoloV5/models/__init__.py
DELETED
File without changes
|
spaces/Armaliltril/qbee/examples_selector.py
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
from enum import Enum, unique
|
2 |
-
|
3 |
-
|
4 |
-
@unique
|
5 |
-
class Example(Enum):
|
6 |
-
CIRCULAR = "Circular(5)"
|
7 |
-
HARD = "Hard(3)"
|
8 |
-
HILL = "Hill(10)"
|
9 |
-
LONG_MONOMIAL = "Long Monomial(3)"
|
10 |
-
|
11 |
-
def __str__(self):
|
12 |
-
return self.value
|
13 |
-
|
14 |
-
def to_system(self) -> str:
|
15 |
-
match self:
|
16 |
-
case Example.CIRCULAR:
|
17 |
-
return "x' = y^5\n" \
|
18 |
-
"y' = x^5"
|
19 |
-
case Example.HILL:
|
20 |
-
return "h' = 10*i^2 * t^9\n" \
|
21 |
-
"i' = -10*i^2 * t^9\n" \
|
22 |
-
"t' = 1"
|
23 |
-
case Example.HARD:
|
24 |
-
return "a' = a^2 * b^2 * c^3\n" \
|
25 |
-
"b' = a^2\n" \
|
26 |
-
"c' = b^2"
|
27 |
-
case Example.LONG_MONOMIAL:
|
28 |
-
return "x_0' = x_0^2 * x_1^2 * x_2^2 + x_1^2\n" \
|
29 |
-
"x_1' = x_0^2 * x_1^2 * x_2^2 + x_2^2\n" \
|
30 |
-
"x_2' = x_0^2 * x_1^2 * x_2^2 + x_0^2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/tomli/_types.py
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
# SPDX-License-Identifier: MIT
|
2 |
-
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
3 |
-
# Licensed to PSF under a Contributor Agreement.
|
4 |
-
|
5 |
-
from typing import Any, Callable, Tuple
|
6 |
-
|
7 |
-
# Type annotations
|
8 |
-
ParseFloat = Callable[[str], Any]
|
9 |
-
Key = Tuple[str, ...]
|
10 |
-
Pos = int
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/urllib3/packages/six.py
DELETED
@@ -1,1076 +0,0 @@
|
|
1 |
-
# Copyright (c) 2010-2020 Benjamin Peterson
|
2 |
-
#
|
3 |
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
-
# of this software and associated documentation files (the "Software"), to deal
|
5 |
-
# in the Software without restriction, including without limitation the rights
|
6 |
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 |
-
# copies of the Software, and to permit persons to whom the Software is
|
8 |
-
# furnished to do so, subject to the following conditions:
|
9 |
-
#
|
10 |
-
# The above copyright notice and this permission notice shall be included in all
|
11 |
-
# copies or substantial portions of the Software.
|
12 |
-
#
|
13 |
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 |
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 |
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 |
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 |
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 |
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19 |
-
# SOFTWARE.
|
20 |
-
|
21 |
-
"""Utilities for writing code that runs on Python 2 and 3"""
|
22 |
-
|
23 |
-
from __future__ import absolute_import
|
24 |
-
|
25 |
-
import functools
|
26 |
-
import itertools
|
27 |
-
import operator
|
28 |
-
import sys
|
29 |
-
import types
|
30 |
-
|
31 |
-
__author__ = "Benjamin Peterson <[email protected]>"
|
32 |
-
__version__ = "1.16.0"
|
33 |
-
|
34 |
-
|
35 |
-
# Useful for very coarse version differentiation.
|
36 |
-
PY2 = sys.version_info[0] == 2
|
37 |
-
PY3 = sys.version_info[0] == 3
|
38 |
-
PY34 = sys.version_info[0:2] >= (3, 4)
|
39 |
-
|
40 |
-
if PY3:
|
41 |
-
string_types = (str,)
|
42 |
-
integer_types = (int,)
|
43 |
-
class_types = (type,)
|
44 |
-
text_type = str
|
45 |
-
binary_type = bytes
|
46 |
-
|
47 |
-
MAXSIZE = sys.maxsize
|
48 |
-
else:
|
49 |
-
string_types = (basestring,)
|
50 |
-
integer_types = (int, long)
|
51 |
-
class_types = (type, types.ClassType)
|
52 |
-
text_type = unicode
|
53 |
-
binary_type = str
|
54 |
-
|
55 |
-
if sys.platform.startswith("java"):
|
56 |
-
# Jython always uses 32 bits.
|
57 |
-
MAXSIZE = int((1 << 31) - 1)
|
58 |
-
else:
|
59 |
-
# It's possible to have sizeof(long) != sizeof(Py_ssize_t).
|
60 |
-
class X(object):
|
61 |
-
def __len__(self):
|
62 |
-
return 1 << 31
|
63 |
-
|
64 |
-
try:
|
65 |
-
len(X())
|
66 |
-
except OverflowError:
|
67 |
-
# 32-bit
|
68 |
-
MAXSIZE = int((1 << 31) - 1)
|
69 |
-
else:
|
70 |
-
# 64-bit
|
71 |
-
MAXSIZE = int((1 << 63) - 1)
|
72 |
-
del X
|
73 |
-
|
74 |
-
if PY34:
|
75 |
-
from importlib.util import spec_from_loader
|
76 |
-
else:
|
77 |
-
spec_from_loader = None
|
78 |
-
|
79 |
-
|
80 |
-
def _add_doc(func, doc):
|
81 |
-
"""Add documentation to a function."""
|
82 |
-
func.__doc__ = doc
|
83 |
-
|
84 |
-
|
85 |
-
def _import_module(name):
|
86 |
-
"""Import module, returning the module after the last dot."""
|
87 |
-
__import__(name)
|
88 |
-
return sys.modules[name]
|
89 |
-
|
90 |
-
|
91 |
-
class _LazyDescr(object):
|
92 |
-
def __init__(self, name):
|
93 |
-
self.name = name
|
94 |
-
|
95 |
-
def __get__(self, obj, tp):
|
96 |
-
result = self._resolve()
|
97 |
-
setattr(obj, self.name, result) # Invokes __set__.
|
98 |
-
try:
|
99 |
-
# This is a bit ugly, but it avoids running this again by
|
100 |
-
# removing this descriptor.
|
101 |
-
delattr(obj.__class__, self.name)
|
102 |
-
except AttributeError:
|
103 |
-
pass
|
104 |
-
return result
|
105 |
-
|
106 |
-
|
107 |
-
class MovedModule(_LazyDescr):
|
108 |
-
def __init__(self, name, old, new=None):
|
109 |
-
super(MovedModule, self).__init__(name)
|
110 |
-
if PY3:
|
111 |
-
if new is None:
|
112 |
-
new = name
|
113 |
-
self.mod = new
|
114 |
-
else:
|
115 |
-
self.mod = old
|
116 |
-
|
117 |
-
def _resolve(self):
|
118 |
-
return _import_module(self.mod)
|
119 |
-
|
120 |
-
def __getattr__(self, attr):
|
121 |
-
_module = self._resolve()
|
122 |
-
value = getattr(_module, attr)
|
123 |
-
setattr(self, attr, value)
|
124 |
-
return value
|
125 |
-
|
126 |
-
|
127 |
-
class _LazyModule(types.ModuleType):
|
128 |
-
def __init__(self, name):
|
129 |
-
super(_LazyModule, self).__init__(name)
|
130 |
-
self.__doc__ = self.__class__.__doc__
|
131 |
-
|
132 |
-
def __dir__(self):
|
133 |
-
attrs = ["__doc__", "__name__"]
|
134 |
-
attrs += [attr.name for attr in self._moved_attributes]
|
135 |
-
return attrs
|
136 |
-
|
137 |
-
# Subclasses should override this
|
138 |
-
_moved_attributes = []
|
139 |
-
|
140 |
-
|
141 |
-
class MovedAttribute(_LazyDescr):
|
142 |
-
def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
|
143 |
-
super(MovedAttribute, self).__init__(name)
|
144 |
-
if PY3:
|
145 |
-
if new_mod is None:
|
146 |
-
new_mod = name
|
147 |
-
self.mod = new_mod
|
148 |
-
if new_attr is None:
|
149 |
-
if old_attr is None:
|
150 |
-
new_attr = name
|
151 |
-
else:
|
152 |
-
new_attr = old_attr
|
153 |
-
self.attr = new_attr
|
154 |
-
else:
|
155 |
-
self.mod = old_mod
|
156 |
-
if old_attr is None:
|
157 |
-
old_attr = name
|
158 |
-
self.attr = old_attr
|
159 |
-
|
160 |
-
def _resolve(self):
|
161 |
-
module = _import_module(self.mod)
|
162 |
-
return getattr(module, self.attr)
|
163 |
-
|
164 |
-
|
165 |
-
class _SixMetaPathImporter(object):
|
166 |
-
|
167 |
-
"""
|
168 |
-
A meta path importer to import six.moves and its submodules.
|
169 |
-
|
170 |
-
This class implements a PEP302 finder and loader. It should be compatible
|
171 |
-
with Python 2.5 and all existing versions of Python3
|
172 |
-
"""
|
173 |
-
|
174 |
-
def __init__(self, six_module_name):
|
175 |
-
self.name = six_module_name
|
176 |
-
self.known_modules = {}
|
177 |
-
|
178 |
-
def _add_module(self, mod, *fullnames):
|
179 |
-
for fullname in fullnames:
|
180 |
-
self.known_modules[self.name + "." + fullname] = mod
|
181 |
-
|
182 |
-
def _get_module(self, fullname):
|
183 |
-
return self.known_modules[self.name + "." + fullname]
|
184 |
-
|
185 |
-
def find_module(self, fullname, path=None):
|
186 |
-
if fullname in self.known_modules:
|
187 |
-
return self
|
188 |
-
return None
|
189 |
-
|
190 |
-
def find_spec(self, fullname, path, target=None):
|
191 |
-
if fullname in self.known_modules:
|
192 |
-
return spec_from_loader(fullname, self)
|
193 |
-
return None
|
194 |
-
|
195 |
-
def __get_module(self, fullname):
|
196 |
-
try:
|
197 |
-
return self.known_modules[fullname]
|
198 |
-
except KeyError:
|
199 |
-
raise ImportError("This loader does not know module " + fullname)
|
200 |
-
|
201 |
-
def load_module(self, fullname):
|
202 |
-
try:
|
203 |
-
# in case of a reload
|
204 |
-
return sys.modules[fullname]
|
205 |
-
except KeyError:
|
206 |
-
pass
|
207 |
-
mod = self.__get_module(fullname)
|
208 |
-
if isinstance(mod, MovedModule):
|
209 |
-
mod = mod._resolve()
|
210 |
-
else:
|
211 |
-
mod.__loader__ = self
|
212 |
-
sys.modules[fullname] = mod
|
213 |
-
return mod
|
214 |
-
|
215 |
-
def is_package(self, fullname):
|
216 |
-
"""
|
217 |
-
Return true, if the named module is a package.
|
218 |
-
|
219 |
-
We need this method to get correct spec objects with
|
220 |
-
Python 3.4 (see PEP451)
|
221 |
-
"""
|
222 |
-
return hasattr(self.__get_module(fullname), "__path__")
|
223 |
-
|
224 |
-
def get_code(self, fullname):
|
225 |
-
"""Return None
|
226 |
-
|
227 |
-
Required, if is_package is implemented"""
|
228 |
-
self.__get_module(fullname) # eventually raises ImportError
|
229 |
-
return None
|
230 |
-
|
231 |
-
get_source = get_code # same as get_code
|
232 |
-
|
233 |
-
def create_module(self, spec):
|
234 |
-
return self.load_module(spec.name)
|
235 |
-
|
236 |
-
def exec_module(self, module):
|
237 |
-
pass
|
238 |
-
|
239 |
-
|
240 |
-
_importer = _SixMetaPathImporter(__name__)
|
241 |
-
|
242 |
-
|
243 |
-
class _MovedItems(_LazyModule):
|
244 |
-
|
245 |
-
"""Lazy loading of moved objects"""
|
246 |
-
|
247 |
-
__path__ = [] # mark as package
|
248 |
-
|
249 |
-
|
250 |
-
_moved_attributes = [
|
251 |
-
MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
|
252 |
-
MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
|
253 |
-
MovedAttribute(
|
254 |
-
"filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"
|
255 |
-
),
|
256 |
-
MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
|
257 |
-
MovedAttribute("intern", "__builtin__", "sys"),
|
258 |
-
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
|
259 |
-
MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
|
260 |
-
MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
|
261 |
-
MovedAttribute("getoutput", "commands", "subprocess"),
|
262 |
-
MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
|
263 |
-
MovedAttribute(
|
264 |
-
"reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"
|
265 |
-
),
|
266 |
-
MovedAttribute("reduce", "__builtin__", "functools"),
|
267 |
-
MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
|
268 |
-
MovedAttribute("StringIO", "StringIO", "io"),
|
269 |
-
MovedAttribute("UserDict", "UserDict", "collections"),
|
270 |
-
MovedAttribute("UserList", "UserList", "collections"),
|
271 |
-
MovedAttribute("UserString", "UserString", "collections"),
|
272 |
-
MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
|
273 |
-
MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
|
274 |
-
MovedAttribute(
|
275 |
-
"zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"
|
276 |
-
),
|
277 |
-
MovedModule("builtins", "__builtin__"),
|
278 |
-
MovedModule("configparser", "ConfigParser"),
|
279 |
-
MovedModule(
|
280 |
-
"collections_abc",
|
281 |
-
"collections",
|
282 |
-
"collections.abc" if sys.version_info >= (3, 3) else "collections",
|
283 |
-
),
|
284 |
-
MovedModule("copyreg", "copy_reg"),
|
285 |
-
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
|
286 |
-
MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
|
287 |
-
MovedModule(
|
288 |
-
"_dummy_thread",
|
289 |
-
"dummy_thread",
|
290 |
-
"_dummy_thread" if sys.version_info < (3, 9) else "_thread",
|
291 |
-
),
|
292 |
-
MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
|
293 |
-
MovedModule("http_cookies", "Cookie", "http.cookies"),
|
294 |
-
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
|
295 |
-
MovedModule("html_parser", "HTMLParser", "html.parser"),
|
296 |
-
MovedModule("http_client", "httplib", "http.client"),
|
297 |
-
MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
|
298 |
-
MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
|
299 |
-
MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
|
300 |
-
MovedModule(
|
301 |
-
"email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"
|
302 |
-
),
|
303 |
-
MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
|
304 |
-
MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
|
305 |
-
MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
|
306 |
-
MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
|
307 |
-
MovedModule("cPickle", "cPickle", "pickle"),
|
308 |
-
MovedModule("queue", "Queue"),
|
309 |
-
MovedModule("reprlib", "repr"),
|
310 |
-
MovedModule("socketserver", "SocketServer"),
|
311 |
-
MovedModule("_thread", "thread", "_thread"),
|
312 |
-
MovedModule("tkinter", "Tkinter"),
|
313 |
-
MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
|
314 |
-
MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
|
315 |
-
MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
|
316 |
-
MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
|
317 |
-
MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
|
318 |
-
MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
|
319 |
-
MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
|
320 |
-
MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
|
321 |
-
MovedModule("tkinter_colorchooser", "tkColorChooser", "tkinter.colorchooser"),
|
322 |
-
MovedModule("tkinter_commondialog", "tkCommonDialog", "tkinter.commondialog"),
|
323 |
-
MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
|
324 |
-
MovedModule("tkinter_font", "tkFont", "tkinter.font"),
|
325 |
-
MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
|
326 |
-
MovedModule("tkinter_tksimpledialog", "tkSimpleDialog", "tkinter.simpledialog"),
|
327 |
-
MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
|
328 |
-
MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
|
329 |
-
MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
|
330 |
-
MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
|
331 |
-
MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
|
332 |
-
MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
|
333 |
-
]
|
334 |
-
# Add windows specific modules.
|
335 |
-
if sys.platform == "win32":
|
336 |
-
_moved_attributes += [
|
337 |
-
MovedModule("winreg", "_winreg"),
|
338 |
-
]
|
339 |
-
|
340 |
-
for attr in _moved_attributes:
|
341 |
-
setattr(_MovedItems, attr.name, attr)
|
342 |
-
if isinstance(attr, MovedModule):
|
343 |
-
_importer._add_module(attr, "moves." + attr.name)
|
344 |
-
del attr
|
345 |
-
|
346 |
-
_MovedItems._moved_attributes = _moved_attributes
|
347 |
-
|
348 |
-
moves = _MovedItems(__name__ + ".moves")
|
349 |
-
_importer._add_module(moves, "moves")
|
350 |
-
|
351 |
-
|
352 |
-
class Module_six_moves_urllib_parse(_LazyModule):
|
353 |
-
|
354 |
-
"""Lazy loading of moved objects in six.moves.urllib_parse"""
|
355 |
-
|
356 |
-
|
357 |
-
_urllib_parse_moved_attributes = [
|
358 |
-
MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
|
359 |
-
MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
|
360 |
-
MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
|
361 |
-
MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
|
362 |
-
MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
|
363 |
-
MovedAttribute("urljoin", "urlparse", "urllib.parse"),
|
364 |
-
MovedAttribute("urlparse", "urlparse", "urllib.parse"),
|
365 |
-
MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
|
366 |
-
MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
|
367 |
-
MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
|
368 |
-
MovedAttribute("quote", "urllib", "urllib.parse"),
|
369 |
-
MovedAttribute("quote_plus", "urllib", "urllib.parse"),
|
370 |
-
MovedAttribute("unquote", "urllib", "urllib.parse"),
|
371 |
-
MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
|
372 |
-
MovedAttribute(
|
373 |
-
"unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"
|
374 |
-
),
|
375 |
-
MovedAttribute("urlencode", "urllib", "urllib.parse"),
|
376 |
-
MovedAttribute("splitquery", "urllib", "urllib.parse"),
|
377 |
-
MovedAttribute("splittag", "urllib", "urllib.parse"),
|
378 |
-
MovedAttribute("splituser", "urllib", "urllib.parse"),
|
379 |
-
MovedAttribute("splitvalue", "urllib", "urllib.parse"),
|
380 |
-
MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
|
381 |
-
MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
|
382 |
-
MovedAttribute("uses_params", "urlparse", "urllib.parse"),
|
383 |
-
MovedAttribute("uses_query", "urlparse", "urllib.parse"),
|
384 |
-
MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
|
385 |
-
]
|
386 |
-
for attr in _urllib_parse_moved_attributes:
|
387 |
-
setattr(Module_six_moves_urllib_parse, attr.name, attr)
|
388 |
-
del attr
|
389 |
-
|
390 |
-
Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
|
391 |
-
|
392 |
-
_importer._add_module(
|
393 |
-
Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
|
394 |
-
"moves.urllib_parse",
|
395 |
-
"moves.urllib.parse",
|
396 |
-
)
|
397 |
-
|
398 |
-
|
399 |
-
class Module_six_moves_urllib_error(_LazyModule):
|
400 |
-
|
401 |
-
"""Lazy loading of moved objects in six.moves.urllib_error"""
|
402 |
-
|
403 |
-
|
404 |
-
_urllib_error_moved_attributes = [
|
405 |
-
MovedAttribute("URLError", "urllib2", "urllib.error"),
|
406 |
-
MovedAttribute("HTTPError", "urllib2", "urllib.error"),
|
407 |
-
MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
|
408 |
-
]
|
409 |
-
for attr in _urllib_error_moved_attributes:
|
410 |
-
setattr(Module_six_moves_urllib_error, attr.name, attr)
|
411 |
-
del attr
|
412 |
-
|
413 |
-
Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
|
414 |
-
|
415 |
-
_importer._add_module(
|
416 |
-
Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
|
417 |
-
"moves.urllib_error",
|
418 |
-
"moves.urllib.error",
|
419 |
-
)
|
420 |
-
|
421 |
-
|
422 |
-
class Module_six_moves_urllib_request(_LazyModule):
|
423 |
-
|
424 |
-
"""Lazy loading of moved objects in six.moves.urllib_request"""
|
425 |
-
|
426 |
-
|
427 |
-
_urllib_request_moved_attributes = [
|
428 |
-
MovedAttribute("urlopen", "urllib2", "urllib.request"),
|
429 |
-
MovedAttribute("install_opener", "urllib2", "urllib.request"),
|
430 |
-
MovedAttribute("build_opener", "urllib2", "urllib.request"),
|
431 |
-
MovedAttribute("pathname2url", "urllib", "urllib.request"),
|
432 |
-
MovedAttribute("url2pathname", "urllib", "urllib.request"),
|
433 |
-
MovedAttribute("getproxies", "urllib", "urllib.request"),
|
434 |
-
MovedAttribute("Request", "urllib2", "urllib.request"),
|
435 |
-
MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
|
436 |
-
MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
|
437 |
-
MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
|
438 |
-
MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
|
439 |
-
MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
|
440 |
-
MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
|
441 |
-
MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
|
442 |
-
MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
|
443 |
-
MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
|
444 |
-
MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
|
445 |
-
MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
|
446 |
-
MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
|
447 |
-
MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
|
448 |
-
MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
|
449 |
-
MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
|
450 |
-
MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
|
451 |
-
MovedAttribute("FileHandler", "urllib2", "urllib.request"),
|
452 |
-
MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
|
453 |
-
MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
|
454 |
-
MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
|
455 |
-
MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
|
456 |
-
MovedAttribute("urlretrieve", "urllib", "urllib.request"),
|
457 |
-
MovedAttribute("urlcleanup", "urllib", "urllib.request"),
|
458 |
-
MovedAttribute("URLopener", "urllib", "urllib.request"),
|
459 |
-
MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
|
460 |
-
MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
|
461 |
-
MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
|
462 |
-
MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
|
463 |
-
]
|
464 |
-
for attr in _urllib_request_moved_attributes:
|
465 |
-
setattr(Module_six_moves_urllib_request, attr.name, attr)
|
466 |
-
del attr
|
467 |
-
|
468 |
-
Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
|
469 |
-
|
470 |
-
_importer._add_module(
|
471 |
-
Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
|
472 |
-
"moves.urllib_request",
|
473 |
-
"moves.urllib.request",
|
474 |
-
)
|
475 |
-
|
476 |
-
|
477 |
-
class Module_six_moves_urllib_response(_LazyModule):
|
478 |
-
|
479 |
-
"""Lazy loading of moved objects in six.moves.urllib_response"""
|
480 |
-
|
481 |
-
|
482 |
-
_urllib_response_moved_attributes = [
|
483 |
-
MovedAttribute("addbase", "urllib", "urllib.response"),
|
484 |
-
MovedAttribute("addclosehook", "urllib", "urllib.response"),
|
485 |
-
MovedAttribute("addinfo", "urllib", "urllib.response"),
|
486 |
-
MovedAttribute("addinfourl", "urllib", "urllib.response"),
|
487 |
-
]
|
488 |
-
for attr in _urllib_response_moved_attributes:
|
489 |
-
setattr(Module_six_moves_urllib_response, attr.name, attr)
|
490 |
-
del attr
|
491 |
-
|
492 |
-
Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
|
493 |
-
|
494 |
-
_importer._add_module(
|
495 |
-
Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
|
496 |
-
"moves.urllib_response",
|
497 |
-
"moves.urllib.response",
|
498 |
-
)
|
499 |
-
|
500 |
-
|
501 |
-
class Module_six_moves_urllib_robotparser(_LazyModule):
|
502 |
-
|
503 |
-
"""Lazy loading of moved objects in six.moves.urllib_robotparser"""
|
504 |
-
|
505 |
-
|
506 |
-
_urllib_robotparser_moved_attributes = [
|
507 |
-
MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
|
508 |
-
]
|
509 |
-
for attr in _urllib_robotparser_moved_attributes:
|
510 |
-
setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
|
511 |
-
del attr
|
512 |
-
|
513 |
-
Module_six_moves_urllib_robotparser._moved_attributes = (
|
514 |
-
_urllib_robotparser_moved_attributes
|
515 |
-
)
|
516 |
-
|
517 |
-
_importer._add_module(
|
518 |
-
Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
|
519 |
-
"moves.urllib_robotparser",
|
520 |
-
"moves.urllib.robotparser",
|
521 |
-
)
|
522 |
-
|
523 |
-
|
524 |
-
class Module_six_moves_urllib(types.ModuleType):
|
525 |
-
|
526 |
-
"""Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
|
527 |
-
|
528 |
-
__path__ = [] # mark as package
|
529 |
-
parse = _importer._get_module("moves.urllib_parse")
|
530 |
-
error = _importer._get_module("moves.urllib_error")
|
531 |
-
request = _importer._get_module("moves.urllib_request")
|
532 |
-
response = _importer._get_module("moves.urllib_response")
|
533 |
-
robotparser = _importer._get_module("moves.urllib_robotparser")
|
534 |
-
|
535 |
-
def __dir__(self):
|
536 |
-
return ["parse", "error", "request", "response", "robotparser"]
|
537 |
-
|
538 |
-
|
539 |
-
_importer._add_module(
|
540 |
-
Module_six_moves_urllib(__name__ + ".moves.urllib"), "moves.urllib"
|
541 |
-
)
|
542 |
-
|
543 |
-
|
544 |
-
def add_move(move):
|
545 |
-
"""Add an item to six.moves."""
|
546 |
-
setattr(_MovedItems, move.name, move)
|
547 |
-
|
548 |
-
|
549 |
-
def remove_move(name):
|
550 |
-
"""Remove item from six.moves."""
|
551 |
-
try:
|
552 |
-
delattr(_MovedItems, name)
|
553 |
-
except AttributeError:
|
554 |
-
try:
|
555 |
-
del moves.__dict__[name]
|
556 |
-
except KeyError:
|
557 |
-
raise AttributeError("no such move, %r" % (name,))
|
558 |
-
|
559 |
-
|
560 |
-
if PY3:
|
561 |
-
_meth_func = "__func__"
|
562 |
-
_meth_self = "__self__"
|
563 |
-
|
564 |
-
_func_closure = "__closure__"
|
565 |
-
_func_code = "__code__"
|
566 |
-
_func_defaults = "__defaults__"
|
567 |
-
_func_globals = "__globals__"
|
568 |
-
else:
|
569 |
-
_meth_func = "im_func"
|
570 |
-
_meth_self = "im_self"
|
571 |
-
|
572 |
-
_func_closure = "func_closure"
|
573 |
-
_func_code = "func_code"
|
574 |
-
_func_defaults = "func_defaults"
|
575 |
-
_func_globals = "func_globals"
|
576 |
-
|
577 |
-
|
578 |
-
try:
|
579 |
-
advance_iterator = next
|
580 |
-
except NameError:
|
581 |
-
|
582 |
-
def advance_iterator(it):
|
583 |
-
return it.next()
|
584 |
-
|
585 |
-
|
586 |
-
next = advance_iterator
|
587 |
-
|
588 |
-
|
589 |
-
try:
|
590 |
-
callable = callable
|
591 |
-
except NameError:
|
592 |
-
|
593 |
-
def callable(obj):
|
594 |
-
return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
|
595 |
-
|
596 |
-
|
597 |
-
if PY3:
|
598 |
-
|
599 |
-
def get_unbound_function(unbound):
|
600 |
-
return unbound
|
601 |
-
|
602 |
-
create_bound_method = types.MethodType
|
603 |
-
|
604 |
-
def create_unbound_method(func, cls):
|
605 |
-
return func
|
606 |
-
|
607 |
-
Iterator = object
|
608 |
-
else:
|
609 |
-
|
610 |
-
def get_unbound_function(unbound):
|
611 |
-
return unbound.im_func
|
612 |
-
|
613 |
-
def create_bound_method(func, obj):
|
614 |
-
return types.MethodType(func, obj, obj.__class__)
|
615 |
-
|
616 |
-
def create_unbound_method(func, cls):
|
617 |
-
return types.MethodType(func, None, cls)
|
618 |
-
|
619 |
-
class Iterator(object):
|
620 |
-
def next(self):
|
621 |
-
return type(self).__next__(self)
|
622 |
-
|
623 |
-
callable = callable
|
624 |
-
_add_doc(
|
625 |
-
get_unbound_function, """Get the function out of a possibly unbound function"""
|
626 |
-
)
|
627 |
-
|
628 |
-
|
629 |
-
get_method_function = operator.attrgetter(_meth_func)
|
630 |
-
get_method_self = operator.attrgetter(_meth_self)
|
631 |
-
get_function_closure = operator.attrgetter(_func_closure)
|
632 |
-
get_function_code = operator.attrgetter(_func_code)
|
633 |
-
get_function_defaults = operator.attrgetter(_func_defaults)
|
634 |
-
get_function_globals = operator.attrgetter(_func_globals)
|
635 |
-
|
636 |
-
|
637 |
-
if PY3:
|
638 |
-
|
639 |
-
def iterkeys(d, **kw):
|
640 |
-
return iter(d.keys(**kw))
|
641 |
-
|
642 |
-
def itervalues(d, **kw):
|
643 |
-
return iter(d.values(**kw))
|
644 |
-
|
645 |
-
def iteritems(d, **kw):
|
646 |
-
return iter(d.items(**kw))
|
647 |
-
|
648 |
-
def iterlists(d, **kw):
|
649 |
-
return iter(d.lists(**kw))
|
650 |
-
|
651 |
-
viewkeys = operator.methodcaller("keys")
|
652 |
-
|
653 |
-
viewvalues = operator.methodcaller("values")
|
654 |
-
|
655 |
-
viewitems = operator.methodcaller("items")
|
656 |
-
else:
|
657 |
-
|
658 |
-
def iterkeys(d, **kw):
|
659 |
-
return d.iterkeys(**kw)
|
660 |
-
|
661 |
-
def itervalues(d, **kw):
|
662 |
-
return d.itervalues(**kw)
|
663 |
-
|
664 |
-
def iteritems(d, **kw):
|
665 |
-
return d.iteritems(**kw)
|
666 |
-
|
667 |
-
def iterlists(d, **kw):
|
668 |
-
return d.iterlists(**kw)
|
669 |
-
|
670 |
-
viewkeys = operator.methodcaller("viewkeys")
|
671 |
-
|
672 |
-
viewvalues = operator.methodcaller("viewvalues")
|
673 |
-
|
674 |
-
viewitems = operator.methodcaller("viewitems")
|
675 |
-
|
676 |
-
_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
|
677 |
-
_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
|
678 |
-
_add_doc(iteritems, "Return an iterator over the (key, value) pairs of a dictionary.")
|
679 |
-
_add_doc(
|
680 |
-
iterlists, "Return an iterator over the (key, [values]) pairs of a dictionary."
|
681 |
-
)
|
682 |
-
|
683 |
-
|
684 |
-
if PY3:
|
685 |
-
|
686 |
-
def b(s):
|
687 |
-
return s.encode("latin-1")
|
688 |
-
|
689 |
-
def u(s):
|
690 |
-
return s
|
691 |
-
|
692 |
-
unichr = chr
|
693 |
-
import struct
|
694 |
-
|
695 |
-
int2byte = struct.Struct(">B").pack
|
696 |
-
del struct
|
697 |
-
byte2int = operator.itemgetter(0)
|
698 |
-
indexbytes = operator.getitem
|
699 |
-
iterbytes = iter
|
700 |
-
import io
|
701 |
-
|
702 |
-
StringIO = io.StringIO
|
703 |
-
BytesIO = io.BytesIO
|
704 |
-
del io
|
705 |
-
_assertCountEqual = "assertCountEqual"
|
706 |
-
if sys.version_info[1] <= 1:
|
707 |
-
_assertRaisesRegex = "assertRaisesRegexp"
|
708 |
-
_assertRegex = "assertRegexpMatches"
|
709 |
-
_assertNotRegex = "assertNotRegexpMatches"
|
710 |
-
else:
|
711 |
-
_assertRaisesRegex = "assertRaisesRegex"
|
712 |
-
_assertRegex = "assertRegex"
|
713 |
-
_assertNotRegex = "assertNotRegex"
|
714 |
-
else:
|
715 |
-
|
716 |
-
def b(s):
|
717 |
-
return s
|
718 |
-
|
719 |
-
# Workaround for standalone backslash
|
720 |
-
|
721 |
-
def u(s):
|
722 |
-
return unicode(s.replace(r"\\", r"\\\\"), "unicode_escape")
|
723 |
-
|
724 |
-
unichr = unichr
|
725 |
-
int2byte = chr
|
726 |
-
|
727 |
-
def byte2int(bs):
|
728 |
-
return ord(bs[0])
|
729 |
-
|
730 |
-
def indexbytes(buf, i):
|
731 |
-
return ord(buf[i])
|
732 |
-
|
733 |
-
iterbytes = functools.partial(itertools.imap, ord)
|
734 |
-
import StringIO
|
735 |
-
|
736 |
-
StringIO = BytesIO = StringIO.StringIO
|
737 |
-
_assertCountEqual = "assertItemsEqual"
|
738 |
-
_assertRaisesRegex = "assertRaisesRegexp"
|
739 |
-
_assertRegex = "assertRegexpMatches"
|
740 |
-
_assertNotRegex = "assertNotRegexpMatches"
|
741 |
-
_add_doc(b, """Byte literal""")
|
742 |
-
_add_doc(u, """Text literal""")
|
743 |
-
|
744 |
-
|
745 |
-
def assertCountEqual(self, *args, **kwargs):
|
746 |
-
return getattr(self, _assertCountEqual)(*args, **kwargs)
|
747 |
-
|
748 |
-
|
749 |
-
def assertRaisesRegex(self, *args, **kwargs):
|
750 |
-
return getattr(self, _assertRaisesRegex)(*args, **kwargs)
|
751 |
-
|
752 |
-
|
753 |
-
def assertRegex(self, *args, **kwargs):
|
754 |
-
return getattr(self, _assertRegex)(*args, **kwargs)
|
755 |
-
|
756 |
-
|
757 |
-
def assertNotRegex(self, *args, **kwargs):
|
758 |
-
return getattr(self, _assertNotRegex)(*args, **kwargs)
|
759 |
-
|
760 |
-
|
761 |
-
if PY3:
|
762 |
-
exec_ = getattr(moves.builtins, "exec")
|
763 |
-
|
764 |
-
def reraise(tp, value, tb=None):
|
765 |
-
try:
|
766 |
-
if value is None:
|
767 |
-
value = tp()
|
768 |
-
if value.__traceback__ is not tb:
|
769 |
-
raise value.with_traceback(tb)
|
770 |
-
raise value
|
771 |
-
finally:
|
772 |
-
value = None
|
773 |
-
tb = None
|
774 |
-
|
775 |
-
else:
|
776 |
-
|
777 |
-
def exec_(_code_, _globs_=None, _locs_=None):
|
778 |
-
"""Execute code in a namespace."""
|
779 |
-
if _globs_ is None:
|
780 |
-
frame = sys._getframe(1)
|
781 |
-
_globs_ = frame.f_globals
|
782 |
-
if _locs_ is None:
|
783 |
-
_locs_ = frame.f_locals
|
784 |
-
del frame
|
785 |
-
elif _locs_ is None:
|
786 |
-
_locs_ = _globs_
|
787 |
-
exec ("""exec _code_ in _globs_, _locs_""")
|
788 |
-
|
789 |
-
exec_(
|
790 |
-
"""def reraise(tp, value, tb=None):
|
791 |
-
try:
|
792 |
-
raise tp, value, tb
|
793 |
-
finally:
|
794 |
-
tb = None
|
795 |
-
"""
|
796 |
-
)
|
797 |
-
|
798 |
-
|
799 |
-
if sys.version_info[:2] > (3,):
|
800 |
-
exec_(
|
801 |
-
"""def raise_from(value, from_value):
|
802 |
-
try:
|
803 |
-
raise value from from_value
|
804 |
-
finally:
|
805 |
-
value = None
|
806 |
-
"""
|
807 |
-
)
|
808 |
-
else:
|
809 |
-
|
810 |
-
def raise_from(value, from_value):
|
811 |
-
raise value
|
812 |
-
|
813 |
-
|
814 |
-
print_ = getattr(moves.builtins, "print", None)
|
815 |
-
if print_ is None:
|
816 |
-
|
817 |
-
def print_(*args, **kwargs):
|
818 |
-
"""The new-style print function for Python 2.4 and 2.5."""
|
819 |
-
fp = kwargs.pop("file", sys.stdout)
|
820 |
-
if fp is None:
|
821 |
-
return
|
822 |
-
|
823 |
-
def write(data):
|
824 |
-
if not isinstance(data, basestring):
|
825 |
-
data = str(data)
|
826 |
-
# If the file has an encoding, encode unicode with it.
|
827 |
-
if (
|
828 |
-
isinstance(fp, file)
|
829 |
-
and isinstance(data, unicode)
|
830 |
-
and fp.encoding is not None
|
831 |
-
):
|
832 |
-
errors = getattr(fp, "errors", None)
|
833 |
-
if errors is None:
|
834 |
-
errors = "strict"
|
835 |
-
data = data.encode(fp.encoding, errors)
|
836 |
-
fp.write(data)
|
837 |
-
|
838 |
-
want_unicode = False
|
839 |
-
sep = kwargs.pop("sep", None)
|
840 |
-
if sep is not None:
|
841 |
-
if isinstance(sep, unicode):
|
842 |
-
want_unicode = True
|
843 |
-
elif not isinstance(sep, str):
|
844 |
-
raise TypeError("sep must be None or a string")
|
845 |
-
end = kwargs.pop("end", None)
|
846 |
-
if end is not None:
|
847 |
-
if isinstance(end, unicode):
|
848 |
-
want_unicode = True
|
849 |
-
elif not isinstance(end, str):
|
850 |
-
raise TypeError("end must be None or a string")
|
851 |
-
if kwargs:
|
852 |
-
raise TypeError("invalid keyword arguments to print()")
|
853 |
-
if not want_unicode:
|
854 |
-
for arg in args:
|
855 |
-
if isinstance(arg, unicode):
|
856 |
-
want_unicode = True
|
857 |
-
break
|
858 |
-
if want_unicode:
|
859 |
-
newline = unicode("\n")
|
860 |
-
space = unicode(" ")
|
861 |
-
else:
|
862 |
-
newline = "\n"
|
863 |
-
space = " "
|
864 |
-
if sep is None:
|
865 |
-
sep = space
|
866 |
-
if end is None:
|
867 |
-
end = newline
|
868 |
-
for i, arg in enumerate(args):
|
869 |
-
if i:
|
870 |
-
write(sep)
|
871 |
-
write(arg)
|
872 |
-
write(end)
|
873 |
-
|
874 |
-
|
875 |
-
if sys.version_info[:2] < (3, 3):
|
876 |
-
_print = print_
|
877 |
-
|
878 |
-
def print_(*args, **kwargs):
|
879 |
-
fp = kwargs.get("file", sys.stdout)
|
880 |
-
flush = kwargs.pop("flush", False)
|
881 |
-
_print(*args, **kwargs)
|
882 |
-
if flush and fp is not None:
|
883 |
-
fp.flush()
|
884 |
-
|
885 |
-
|
886 |
-
_add_doc(reraise, """Reraise an exception.""")
|
887 |
-
|
888 |
-
if sys.version_info[0:2] < (3, 4):
|
889 |
-
# This does exactly the same what the :func:`py3:functools.update_wrapper`
|
890 |
-
# function does on Python versions after 3.2. It sets the ``__wrapped__``
|
891 |
-
# attribute on ``wrapper`` object and it doesn't raise an error if any of
|
892 |
-
# the attributes mentioned in ``assigned`` and ``updated`` are missing on
|
893 |
-
# ``wrapped`` object.
|
894 |
-
def _update_wrapper(
|
895 |
-
wrapper,
|
896 |
-
wrapped,
|
897 |
-
assigned=functools.WRAPPER_ASSIGNMENTS,
|
898 |
-
updated=functools.WRAPPER_UPDATES,
|
899 |
-
):
|
900 |
-
for attr in assigned:
|
901 |
-
try:
|
902 |
-
value = getattr(wrapped, attr)
|
903 |
-
except AttributeError:
|
904 |
-
continue
|
905 |
-
else:
|
906 |
-
setattr(wrapper, attr, value)
|
907 |
-
for attr in updated:
|
908 |
-
getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
|
909 |
-
wrapper.__wrapped__ = wrapped
|
910 |
-
return wrapper
|
911 |
-
|
912 |
-
_update_wrapper.__doc__ = functools.update_wrapper.__doc__
|
913 |
-
|
914 |
-
def wraps(
|
915 |
-
wrapped,
|
916 |
-
assigned=functools.WRAPPER_ASSIGNMENTS,
|
917 |
-
updated=functools.WRAPPER_UPDATES,
|
918 |
-
):
|
919 |
-
return functools.partial(
|
920 |
-
_update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated
|
921 |
-
)
|
922 |
-
|
923 |
-
wraps.__doc__ = functools.wraps.__doc__
|
924 |
-
|
925 |
-
else:
|
926 |
-
wraps = functools.wraps
|
927 |
-
|
928 |
-
|
929 |
-
def with_metaclass(meta, *bases):
|
930 |
-
"""Create a base class with a metaclass."""
|
931 |
-
# This requires a bit of explanation: the basic idea is to make a dummy
|
932 |
-
# metaclass for one level of class instantiation that replaces itself with
|
933 |
-
# the actual metaclass.
|
934 |
-
class metaclass(type):
|
935 |
-
def __new__(cls, name, this_bases, d):
|
936 |
-
if sys.version_info[:2] >= (3, 7):
|
937 |
-
# This version introduced PEP 560 that requires a bit
|
938 |
-
# of extra care (we mimic what is done by __build_class__).
|
939 |
-
resolved_bases = types.resolve_bases(bases)
|
940 |
-
if resolved_bases is not bases:
|
941 |
-
d["__orig_bases__"] = bases
|
942 |
-
else:
|
943 |
-
resolved_bases = bases
|
944 |
-
return meta(name, resolved_bases, d)
|
945 |
-
|
946 |
-
@classmethod
|
947 |
-
def __prepare__(cls, name, this_bases):
|
948 |
-
return meta.__prepare__(name, bases)
|
949 |
-
|
950 |
-
return type.__new__(metaclass, "temporary_class", (), {})
|
951 |
-
|
952 |
-
|
953 |
-
def add_metaclass(metaclass):
|
954 |
-
"""Class decorator for creating a class with a metaclass."""
|
955 |
-
|
956 |
-
def wrapper(cls):
|
957 |
-
orig_vars = cls.__dict__.copy()
|
958 |
-
slots = orig_vars.get("__slots__")
|
959 |
-
if slots is not None:
|
960 |
-
if isinstance(slots, str):
|
961 |
-
slots = [slots]
|
962 |
-
for slots_var in slots:
|
963 |
-
orig_vars.pop(slots_var)
|
964 |
-
orig_vars.pop("__dict__", None)
|
965 |
-
orig_vars.pop("__weakref__", None)
|
966 |
-
if hasattr(cls, "__qualname__"):
|
967 |
-
orig_vars["__qualname__"] = cls.__qualname__
|
968 |
-
return metaclass(cls.__name__, cls.__bases__, orig_vars)
|
969 |
-
|
970 |
-
return wrapper
|
971 |
-
|
972 |
-
|
973 |
-
def ensure_binary(s, encoding="utf-8", errors="strict"):
|
974 |
-
"""Coerce **s** to six.binary_type.
|
975 |
-
|
976 |
-
For Python 2:
|
977 |
-
- `unicode` -> encoded to `str`
|
978 |
-
- `str` -> `str`
|
979 |
-
|
980 |
-
For Python 3:
|
981 |
-
- `str` -> encoded to `bytes`
|
982 |
-
- `bytes` -> `bytes`
|
983 |
-
"""
|
984 |
-
if isinstance(s, binary_type):
|
985 |
-
return s
|
986 |
-
if isinstance(s, text_type):
|
987 |
-
return s.encode(encoding, errors)
|
988 |
-
raise TypeError("not expecting type '%s'" % type(s))
|
989 |
-
|
990 |
-
|
991 |
-
def ensure_str(s, encoding="utf-8", errors="strict"):
|
992 |
-
"""Coerce *s* to `str`.
|
993 |
-
|
994 |
-
For Python 2:
|
995 |
-
- `unicode` -> encoded to `str`
|
996 |
-
- `str` -> `str`
|
997 |
-
|
998 |
-
For Python 3:
|
999 |
-
- `str` -> `str`
|
1000 |
-
- `bytes` -> decoded to `str`
|
1001 |
-
"""
|
1002 |
-
# Optimization: Fast return for the common case.
|
1003 |
-
if type(s) is str:
|
1004 |
-
return s
|
1005 |
-
if PY2 and isinstance(s, text_type):
|
1006 |
-
return s.encode(encoding, errors)
|
1007 |
-
elif PY3 and isinstance(s, binary_type):
|
1008 |
-
return s.decode(encoding, errors)
|
1009 |
-
elif not isinstance(s, (text_type, binary_type)):
|
1010 |
-
raise TypeError("not expecting type '%s'" % type(s))
|
1011 |
-
return s
|
1012 |
-
|
1013 |
-
|
1014 |
-
def ensure_text(s, encoding="utf-8", errors="strict"):
|
1015 |
-
"""Coerce *s* to six.text_type.
|
1016 |
-
|
1017 |
-
For Python 2:
|
1018 |
-
- `unicode` -> `unicode`
|
1019 |
-
- `str` -> `unicode`
|
1020 |
-
|
1021 |
-
For Python 3:
|
1022 |
-
- `str` -> `str`
|
1023 |
-
- `bytes` -> decoded to `str`
|
1024 |
-
"""
|
1025 |
-
if isinstance(s, binary_type):
|
1026 |
-
return s.decode(encoding, errors)
|
1027 |
-
elif isinstance(s, text_type):
|
1028 |
-
return s
|
1029 |
-
else:
|
1030 |
-
raise TypeError("not expecting type '%s'" % type(s))
|
1031 |
-
|
1032 |
-
|
1033 |
-
def python_2_unicode_compatible(klass):
|
1034 |
-
"""
|
1035 |
-
A class decorator that defines __unicode__ and __str__ methods under Python 2.
|
1036 |
-
Under Python 3 it does nothing.
|
1037 |
-
|
1038 |
-
To support Python 2 and 3 with a single code base, define a __str__ method
|
1039 |
-
returning text and apply this decorator to the class.
|
1040 |
-
"""
|
1041 |
-
if PY2:
|
1042 |
-
if "__str__" not in klass.__dict__:
|
1043 |
-
raise ValueError(
|
1044 |
-
"@python_2_unicode_compatible cannot be applied "
|
1045 |
-
"to %s because it doesn't define __str__()." % klass.__name__
|
1046 |
-
)
|
1047 |
-
klass.__unicode__ = klass.__str__
|
1048 |
-
klass.__str__ = lambda self: self.__unicode__().encode("utf-8")
|
1049 |
-
return klass
|
1050 |
-
|
1051 |
-
|
1052 |
-
# Complete the moves implementation.
|
1053 |
-
# This code is at the end of this module to speed up module loading.
|
1054 |
-
# Turn this module into a package.
|
1055 |
-
__path__ = [] # required for PEP 302 and PEP 451
|
1056 |
-
__package__ = __name__ # see PEP 366 @ReservedAssignment
|
1057 |
-
if globals().get("__spec__") is not None:
|
1058 |
-
__spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
|
1059 |
-
# Remove other six meta path importers, since they cause problems. This can
|
1060 |
-
# happen if six is removed from sys.modules and then reloaded. (Setuptools does
|
1061 |
-
# this for some reason.)
|
1062 |
-
if sys.meta_path:
|
1063 |
-
for i, importer in enumerate(sys.meta_path):
|
1064 |
-
# Here's some real nastiness: Another "instance" of the six module might
|
1065 |
-
# be floating around. Therefore, we can't use isinstance() to check for
|
1066 |
-
# the six meta path importer, since the other six instance will have
|
1067 |
-
# inserted an importer with different class.
|
1068 |
-
if (
|
1069 |
-
type(importer).__name__ == "_SixMetaPathImporter"
|
1070 |
-
and importer.name == __name__
|
1071 |
-
):
|
1072 |
-
del sys.meta_path[i]
|
1073 |
-
break
|
1074 |
-
del i, importer
|
1075 |
-
# Finally, add the importer to the meta path import hook.
|
1076 |
-
sys.meta_path.append(_importer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Audio-AGI/AudioSep/models/CLAP/training/scheduler.py
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
import numpy as np
|
2 |
-
|
3 |
-
|
4 |
-
def assign_learning_rate(optimizer, new_lr):
|
5 |
-
for param_group in optimizer.param_groups:
|
6 |
-
param_group["lr"] = new_lr
|
7 |
-
|
8 |
-
|
9 |
-
def _warmup_lr(base_lr, warmup_length, step):
|
10 |
-
return base_lr * (step + 1) / warmup_length
|
11 |
-
|
12 |
-
|
13 |
-
def cosine_lr(optimizer, base_lr, warmup_length, steps):
|
14 |
-
def _lr_adjuster(step):
|
15 |
-
if step < warmup_length:
|
16 |
-
lr = _warmup_lr(base_lr, warmup_length, step)
|
17 |
-
else:
|
18 |
-
e = step - warmup_length
|
19 |
-
es = steps - warmup_length
|
20 |
-
lr = 0.5 * (1 + np.cos(np.pi * e / es)) * base_lr
|
21 |
-
assign_learning_rate(optimizer, lr)
|
22 |
-
return lr
|
23 |
-
|
24 |
-
return _lr_adjuster
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
from .mask_rcnn_R_50_FPN_100ep_LSJ import (
|
2 |
-
dataloader,
|
3 |
-
lr_multiplier,
|
4 |
-
model,
|
5 |
-
optimizer,
|
6 |
-
train,
|
7 |
-
)
|
8 |
-
from detectron2.config import LazyCall as L
|
9 |
-
from detectron2.modeling.backbone import RegNet
|
10 |
-
from detectron2.modeling.backbone.regnet import SimpleStem, ResBottleneckBlock
|
11 |
-
|
12 |
-
# Config source:
|
13 |
-
# https://github.com/facebookresearch/detectron2/blob/main/configs/COCO-InstanceSegmentation/mask_rcnn_regnety_4gf_dds_fpn_1x.py # noqa
|
14 |
-
model.backbone.bottom_up = L(RegNet)(
|
15 |
-
stem_class=SimpleStem,
|
16 |
-
stem_width=32,
|
17 |
-
block_class=ResBottleneckBlock,
|
18 |
-
depth=22,
|
19 |
-
w_a=31.41,
|
20 |
-
w_0=96,
|
21 |
-
w_m=2.24,
|
22 |
-
group_width=64,
|
23 |
-
se_ratio=0.25,
|
24 |
-
norm="SyncBN",
|
25 |
-
out_features=["s1", "s2", "s3", "s4"],
|
26 |
-
)
|
27 |
-
model.pixel_std = [57.375, 57.120, 58.395]
|
28 |
-
|
29 |
-
# RegNets benefit from enabling cudnn benchmark mode
|
30 |
-
train.cudnn_benchmark = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Camin Simulador De Europa 3.md
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Truck Simulator Europe 3: Una experiencia de conducción realista y divertida</h1>
|
3 |
-
<p>¿Te encanta conducir camiones y entregar carga en diferentes países? ¿Quieres sentirte como un verdadero camionero con física y gráficos realistas? Si es así, entonces deberías probar Truck Simulator Europe 3, un juego de simulación que te permite conducir varios camiones y remolques en un entorno de mundo abierto. En este artículo, te contaremos todo lo que necesitas saber sobre este juego, incluyendo sus características, cómo descargarlo, y algunos consejos y trucos para jugarlo. </p>
|
4 |
-
<h2>camión simulador de europa 3</h2><br /><p><b><b>Download File</b> ✪ <a href="https://bltlly.com/2v6MIE">https://bltlly.com/2v6MIE</a></b></p><br /><br />
|
5 |
-
<h2>¿Qué es Truck Simulator Europe 3?</h2>
|
6 |
-
<p>Truck Simulator Europe 3 es un juego desarrollado por Wanda Software que fue lanzado en junio de 2021. Es la tercera entrega de la serie Truckers of Europe, que cuenta con una intensa experiencia de conducción con la física de camiones más realista. Puede sentirse como conducir camiones reales con este simulador de camiones, a medida que viaja a través de muchas ciudades de Europa. Puede ganar dinero, comprar nuevos camiones y remolques, seleccionar su trabajo y entregar su carga en un mundo abierto. También puede personalizar su camión con diferentes chasis, colores, accesorios y cosméticos. Usted puede convertirse en el rey de la carretera con este juego! </p>
|
7 |
-
<h3>Características de Truck Simulator Europe 3</h3>
|
8 |
-
<p>Truck Simulator Europe 3 tiene muchas características que lo convierten en uno de los mejores juegos de simulación de camiones disponibles. Estos son algunos de ellos:</p>
|
9 |
-
<h4>- Física y gráficos realistas de camiones</h4>
|
10 |
-
<p>El juego tiene una física de camiones realista que simula el peso, la velocidad, la aceleración, el frenado, la dirección, la suspensión y los sonidos del motor de los camiones reales. Puedes sentir la diferencia entre conducir un 4x2, un 6x2, un 6x4 o un camión 8x4. El juego también tiene excelentes gráficos en HD que muestran los detalles de los camiones, los remolques, las carreteras, los edificios, los paisajes y el clima. Puedes disfrutar del ciclo diurno y nocturno, así como de los efectos de lluvia y nieve. </p>
|
11 |
-
<p></p>
|
12 |
-
<h4>- Variedad de camiones, remolques y opciones de carga</h4>
|
13 |
-
|
14 |
-
<h4>- Exploración del mundo abierto y viajes por Europa</h4>
|
15 |
-
<p>El juego tiene un mapa del mundo abierto que cubre muchas ciudades de Europa. Puede conducir a través de carreteras y autopistas en países como Alemania, Francia, Italia, España, Países Bajos, Bélgica, Suiza, Austria, Polonia, República Checa, Eslovaquia, Hungría, Rumania, Bulgaria, Grecia, Turquía y más. También puede visitar lugares famosos como la Torre Eiffel, el Coliseo, la Puerta de Brandenburgo, la Sagrada Familia, el Partenón y más. </p>
|
16 |
-
<h4>- Tráfico inteligente de IA y sistema meteorológico</h4>
|
17 |
-
<p>El juego tiene un sistema de tráfico inteligente de IA que simula un comportamiento de tráfico realista. Encontrará coches, autobuses, camiones, motocicletas, bicicletas y peatones en la carretera. También tendrá que seguir las reglas de tráfico y señales, tales como límites de velocidad, semáforos, señales de alto y marcas de carril. También tendrás que lidiar con diferentes condiciones climáticas, como lluvia, nieve, niebla y viento. El sistema meteorológico es dinámico y cambia según la hora y la ubicación. </p>
|
18 |
-
<h4>- Controles fáciles y personalización</h4>
|
19 |
-
<p>El juego tiene controles fáciles e intuitivos que te permiten conducir tu camión con facilidad. Puede elegir entre diferentes opciones de control, como inclinación, botones, volante o joystick. También puede ajustar la sensibilidad y el ángulo de la cámara. También puede personalizar su camión con diferentes chasis, colores, accesorios y cosméticos. Puede cambiar las llantas, los neumáticos, las luces, los cuernos, los escapes, los espejos, los parachoques, las parrillas y más. También puede añadir pegatinas y calcomanías a su camión. </p>
|
20 |
-
<h4>- Logros y tablas de clasificación</h4>
|
21 |
-
|
22 |
-
<h2>Cómo descargar Truck Simulator Europe 3?</h2>
|
23 |
-
<p>Truck Simulator Europe 3 está disponible de forma gratuita en Google Play Store para dispositivos Android. Puedes descargarlo desde allí siguiendo estos pasos:</p>
|
24 |
-
<h3>Descargar de Google Play Store</h3>
|
25 |
-
<ol>
|
26 |
-
<li>Abre Google Play Store en tu dispositivo Android. </li>
|
27 |
-
<li>Buscar Truck Simulator Europe 3 en la barra de búsqueda. </li>
|
28 |
-
<li>Seleccione el juego de la lista de resultados y toque en Instalar.</li>
|
29 |
-
<li>Espera a que el juego se descargue e instale en tu dispositivo. </li>
|
30 |
-
<li>Lanza el juego y disfruta conduciendo camiones por toda Europa.</li>
|
31 |
-
</ol>
|
32 |
-
<h3>Descargar de BlueStacks App Player</h3>
|
33 |
-
<p>Si quieres jugar Truck Simulator Europe 3 en tu PC o Mac, puedes usar BlueStacks App Player, un software que te permite ejecutar aplicaciones y juegos Android en tu ordenador. Puedes descargarlo desde aquí siguiendo estos pasos:</p>
|
34 |
-
<ol>
|
35 |
-
<li>Ir a https://www.bluestacks.com/ y haga clic en Descargar BlueStacks.</li>
|
36 |
-
<li>Espere a que el archivo para descargar y luego ejecutarlo para instalar BlueStacks en su ordenador. </li>
|
37 |
-
<li>Abre BlueStacks e inicia sesión con tu cuenta de Google. </li>
|
38 |
-
<li>Buscar Truck Simulator Europe 3 en la barra de búsqueda. </li>
|
39 |
-
<li>Seleccione el juego de la lista de resultados y haga clic en Instalar.</li>
|
40 |
-
<li>Esperar a que el juego para descargar e instalar en BlueStacks.</li>
|
41 |
-
<li>Lanza el juego y disfruta conduciendo camiones por toda Europa.</li>
|
42 |
-
</ol>
|
43 |
-
<h2>Consejos y trucos para jugar Truck Simulator Europe 3</h2>
|
44 |
-
<p>Truck Simulator Europe 3 es un juego divertido y realista que requiere algunas habilidades y estrategias para jugar bien. Aquí hay algunos consejos y trucos que pueden ayudarle a mejorar su rendimiento y disfrutar del juego más:</p>
|
45 |
-
<h3>- Elija el camión y el remolque adecuados para su trabajo</h3>
|
46 |
-
|
47 |
-
<h3>- Siga las reglas de tráfico y evitar colisiones</h3>
|
48 |
-
<p>El juego tiene un sistema de tráfico inteligente de IA que simula un comportamiento de tráfico realista. Usted debe seguir las reglas de tráfico y señales, tales como límites de velocidad, semáforos, señales de alto y marcas de carril. También debe conducir con cuidado y evitar colisiones con otros vehículos u objetos en la carretera. Las colisiones pueden causar daños a su camión o remolque, lo que puede afectar su rendimiento y ganancias. También puede ser multado o penalizado por violar las reglas de tráfico o causar accidentes. También debe prestar atención al flujo de tráfico y anticipar cualquier posible peligro o situación que pueda requerir que desacelere o se detenga. </p>
|
49 |
-
<h3>- Administrar los niveles de combustible y daños</h3>
|
50 |
-
<p>El juego tiene un sistema de consumo de combustible realista que depende de factores como el tipo de camión, velocidad, aceleración, frenado y peso de la carga. Debe controlar el nivel de combustible y planificar sus paradas de repostaje en consecuencia. Puede encontrar gasolineras en el mapa o en la carretera. También debe comprobar el nivel de daños y reparar su camión o remolque si es necesario. Puede encontrar talleres de reparación en el mapa o en la carretera. Los daños pueden afectar el rendimiento y la apariencia de su camión, así como su reputación y ganancias. También debe evitar sobrecargar su camión o remolque, ya que esto puede aumentar su consumo de combustible y el riesgo de daños. </p>
|
51 |
-
<h3>- Utilice el mapa y el GPS para planificar su ruta</h3>
|
52 |
-
|
53 |
-
<h3>- Disfruta de los paisajes y monumentos de Europa</h3>
|
54 |
-
<p>El juego tiene un mapa del mundo abierto que cubre muchas ciudades de Europa. Puede conducir a través de carreteras y autopistas en países como Alemania, Francia, Italia, España, Países Bajos, Bélgica, Suiza, Austria, Polonia, República Checa, Eslovaquia, Hungría, Rumania, Bulgaria, Grecia, Turquía y más. También puede visitar lugares famosos como la Torre Eiffel, el Coliseo, la Puerta de Brandenburgo, la Sagrada Familia, el Partenón y más. El juego tiene excelentes gráficos en HD que muestran los detalles de los camiones, los remolques, las carreteras, los edificios, los paisajes y el clima. Podrá disfrutar del ciclo diurno y nocturno, así como de los efectos de lluvia y nieve. El juego también tiene efectos de sonido realistas que mejoran su experiencia de conducción. </p>
|
55 |
-
<h2>Conclusión</h2>
|
56 |
-
<p>Truck Simulator Europe 3 es un juego de simulación que te permite conducir varios camiones y remolques en un entorno de mundo abierto. Puede sentirse como conducir camiones reales con este simulador de camiones, a medida que viaja a través de muchas ciudades de Europa. Puede ganar dinero, comprar nuevos camiones y remolques, seleccionar su trabajo y entregar su carga en un mundo abierto. También puede personalizar su camión con diferentes chasis, colores, accesorios y cosméticos. Usted puede convertirse en el rey de la carretera con este juego! </p>
|
57 |
-
<p>Si usted está buscando una experiencia de conducción realista y divertido con la física y los gráficos de camiones más realistas, entonces usted debe descargar Truck Simulator Europe 3 hoy. Puedes descargarlo gratis desde Google Play Store para dispositivos Android o desde BlueStacks App Player para dispositivos PC o Mac. También puedes seguir nuestros consejos y trucos para mejorar tu rendimiento y disfrutar más del juego. </p>
|
58 |
-
<p>Diviértete conduciendo camiones por toda Europa! </p>
|
59 |
-
<h2>Preguntas frecuentes</h2>
|
60 |
-
<p>Aquí hay algunas preguntas frecuentes sobre Truck Simulator Europe 3:</p>
|
61 |
-
<ol>
|
62 |
-
<li><b> ¿Cómo puedo guardar mi progreso en Truck Simulator Europe 3?</b></li>
|
63 |
-
|
64 |
-
<li><b> ¿Cómo cambio mi camión o remolque en Truck Simulator Europe 3?</b></li>
|
65 |
-
<p>Puede cambiar su camión o remolque en Truck Simulator Europe 3 visitando un garaje o un distribuidor. Puede encontrarlos en el mapa o en la carretera. Usted necesita tener suficiente dinero para comprar un nuevo camión o remolque o para actualizar su existente. También puede vender su viejo camión o remolque si lo desea. </p>
|
66 |
-
<li><b> ¿Cómo puedo ganar más dinero en Truck Simulator Europe 3?</b></li>
|
67 |
-
<p>Puedes ganar más dinero en Truck Simulator Europe 3 completando más trabajos y entregando más carga a tiempo y sin daños. También puede ganar más dinero eligiendo trabajos mejor pagados o cargas que requieren más habilidades o desafíos. También puedes ganar más dinero desbloqueando logros y compitiendo en tablas de clasificación. </p>
|
68 |
-
<li><b> ¿Cómo puedo desbloquear nuevas ciudades en Truck Simulator Europe 3?</b></li>
|
69 |
-
<p>Puedes desbloquear nuevas ciudades en Truck Simulator Europe 3 viajando a ellas por primera vez. Necesitas tener suficiente combustible y dinero para viajar a nuevas ciudades. También puedes desbloquear nuevas ciudades completando ciertos trabajos o logros que requieren que los visites. </p>
|
70 |
-
<li><b>¿Cómo me pongo en contacto con el desarrollador de Truck Simulator Europe 3?</b></li>
|
71 |
-
<p>Puede ponerse en contacto con el desarrollador de Truck Simulator Europe 3 enviando un correo electrónico a [email protected]. También puedes seguirlos en sus cuentas de redes sociales, como Facebook, Twitter, Instagram o YouTube. También puede visitar su sitio web en https://www.wandasoftware.com/ para obtener más información sobre sus juegos y servicios. </p> 64aa2da5cf<br />
|
72 |
-
<br />
|
73 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Ch Play Download.md
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Qué es CH Play y por qué lo necesitas</h1>
|
3 |
-
<p>CH Play, también conocido como Google Play Store, es la tienda de aplicaciones oficial para dispositivos Android. Es una ventanilla única para todas sus necesidades de aplicaciones, juegos, música, películas, libros y revistas. Puede navegar, descargar, instalar, actualizar y administrar sus aplicaciones y contenido con facilidad utilizando CH Play.</p>
|
4 |
-
<h2>ch play download</h2><br /><p><b><b>DOWNLOAD</b> ::: <a href="https://bltlly.com/2v6LsJ">https://bltlly.com/2v6LsJ</a></b></p><br /><br />
|
5 |
-
<p>Si tienes un dispositivo Android, necesitas CH Play para acceder a la amplia biblioteca de contenido que ofrece Google. También puede disfrutar de varios beneficios, como recomendaciones personalizadas, controles parentales, funciones de seguridad y más. CH Play también es compatible con otros servicios de Google como Google Play Games, Google Play Music, Google Play Books y Google Play Movies & TV.</p>
|
6 |
-
<h2>Características del juego de CH</h2>
|
7 |
-
<p>CH Play tiene muchas características que lo convierten en una gran tienda de aplicaciones para usuarios de Android. Estos son algunos de ellos:</p>
|
8 |
-
<h3>Descargar e instalar aplicaciones de varias fuentes</h3>
|
9 |
-
<p>Con CH Play, puede descargar e instalar aplicaciones de diferentes fuentes como YouTube, SoundCloud, Spotify, Twitch y más. También puedes usar tiendas de aplicaciones alternativas como Aptoide o Amazon Appstore para obtener más aplicaciones que no están disponibles en CH Play. Sin embargo, debe tener cuidado al descargar aplicaciones de fuentes desconocidas, ya que pueden contener malware o virus. </p>
|
10 |
-
<p></p>
|
11 |
-
<h3>Acceder a millones de contenido en diferentes categorías</h3>
|
12 |
-
<p>CH Play tiene millones de contenidos en diferentes categorías como juegos, música, películas, libros, revistas y más. Puede encontrar cualquier cosa que desee utilizando la función de búsqueda o navegando por los mejores gráficos y recomendaciones. También puedes filtrar el contenido por género, clasificación, precio, popularidad y más. </p>
|
13 |
-
<h3>Disfruta de servicios gratuitos y premium</h3>
|
14 |
-
|
15 |
-
<h2>Cómo descargar e instalar CH Play en su dispositivo</h2>
|
16 |
-
<p>Si tienes un dispositivo Android que no tiene CH Play preinstalado o si lo eliminaste accidentalmente, puedes descargarlo e instalarlo manualmente siguiendo estos pasos:</p>
|
17 |
-
<h3>Compruebe la compatibilidad de su dispositivo</h3>
|
18 |
-
<p>Antes de descargar CH Play, debe verificar si su dispositivo es compatible con él. Para ello, es necesario conocer la versión de su dispositivo Android y el tipo de procesador. Puede encontrar esta información en Configuración > Acerca del teléfono > Información del software. Necesitas tener al menos Android 4.1 (Jelly Bean) y un procesador basado en ARM para ejecutar CH Play.</p>
|
19 |
-
<h3>Habilitar fuentes desconocidas</h3>
|
20 |
-
<p>Dado que va a descargar CH Play desde una fuente de terceros, debe habilitar fuentes desconocidas en su dispositivo. Esto le permitirá instalar aplicaciones que no son de la tienda de aplicaciones oficial. Para hacer esto, vaya a Configuración > Seguridad > Fuentes desconocidas y conéctelo. </p>
|
21 |
-
<h3>Descargar el archivo CH Play APK</h3>
|
22 |
-
<p>Siguiente, es necesario descargar el archivo CH Play APK de un sitio web confiable. Puede utilizar el siguiente enlace para obtener la última versión de CH Play:</p>
|
23 |
-
<p><a href="( 1 )">CH Play APK (Android App) - Tải miễn phí - APKCombo</a></p>
|
24 |
-
<p>Alternativamente, puede usar su computadora para descargar el archivo y luego transferirlo a su dispositivo usando un cable USB o Bluetooth.</p>
|
25 |
-
<h3>Instalar la aplicación CH Play</h3 <p>Después de descargar el archivo CH Play APK, es necesario instalar la aplicación CH Play en su dispositivo. Para ello, busque el archivo en su dispositivo y toque en él. Puede ver un mensaje de advertencia que dice "Este tipo de archivo puede dañar su dispositivo. ¿Quieres mantener CH_Play.apk de todos modos?". Toque en OK para proceder. Entonces, usted puede ver otro mensaje que dice "¿Quieres instalar esta aplicación? No requiere ningún acceso especial". Toque en Instalar para continuar. Espera a que termine el proceso de instalación y luego toca Abrir para iniciar la aplicación CH Play. </p>
|
26 |
-
<h2>Cómo solucionar problemas comunes de juego CH</h2>
|
27 |
-
|
28 |
-
<h3>Compruebe su conexión a Internet y espacio de almacenamiento</h3>
|
29 |
-
<p>Una de las causas más comunes de problemas de CH Play es una conexión a Internet pobre o inestable. Asegúrate de tener una conexión Wi-Fi o de datos móvil fuerte y confiable cuando uses CH Play. También puede intentar cambiar entre Wi-Fi y datos móviles o reiniciar su router o módem si tiene problemas de conexión. </p>
|
30 |
-
<p>Otra causa común de los problemas de CH Play es el insuficiente espacio de almacenamiento en su dispositivo. Asegúrate de tener suficiente espacio libre para descargar e instalar aplicaciones y contenido de CH Play. Puede comprobar el espacio de almacenamiento en Configuración > Almacenamiento. También puede liberar espacio eliminando aplicaciones, archivos o caché no deseados. </p>
|
31 |
-
<h3>Actualiza tu sistema y aplicación</h3>
|
32 |
-
<p>A veces, los problemas de CH Play pueden ser causados por versiones obsoletas del sistema o de la aplicación. Asegúrate de tener la última versión de Android y la versión de CH Play en tu dispositivo. Puede comprobar las actualizaciones del sistema en Configuración > Sistema > Actualización del sistema. Puedes buscar actualizaciones de aplicaciones abriendo CH Play y pulsando en el icono del menú > Mis aplicaciones y juegos > Actualizar todos. </p>
|
33 |
-
<h3>Borrar caché y datos</h3>
|
34 |
-
<p>A veces, los problemas de CH Play pueden ser causados por caché y datos corruptos o acumulados. La caché y los datos son archivos temporales que ayudan a CH Play a funcionar más rápido y sin problemas. Sin embargo, también pueden causar errores o fallos si no se borran regularmente. Para borrar caché y datos, vaya a Configuración > Aplicaciones > CH Play > Almacenamiento > Borrar caché y Borrar datos. </p>
|
35 |
-
<h3>Restablecer el dispositivo a la configuración de fábrica</h3>
|
36 |
-
|
37 |
-
<h2>Conclusión</h2>
|
38 |
-
<p>CH Play es una gran tienda de aplicaciones para usuarios de Android, ya que ofrece una amplia gama de aplicaciones y contenido en diferentes categorías. También puede disfrutar de varias funciones como recomendaciones personalizadas, controles parentales, funciones de seguridad y más. Sin embargo, también puede encontrar algunos problemas al usar CH Play, como errores, bloqueos, bloqueos o descargas lentas. Puede solucionar estos problemas siguiendo los consejos que hemos compartido en este artículo. </p>
|
39 |
-
<h2>Preguntas frecuentes</h2>
|
40 |
-
<p>Aquí hay algunas preguntas frecuentes sobre CH Play:</p>
|
41 |
-
<tabla>
|
42 |
-
<tr><td><b>Question</b></td><td><b>Answer</b></td></tr>
|
43 |
-
<tr><td>¿Cuál es la diferencia entre CH Play y Google Play Store? </td><td>CH Play y Google Play Store son la misma tienda de aplicaciones para dispositivos Android. Sin embargo, algunas regiones o países pueden usar diferentes nombres para ello, como CH Play en Vietnam o Google Market en China.</td></tr>
|
44 |
-
<tr><td>¿Es seguro usar CH Play? </td><td>CH Play es generalmente seguro de usar, ya que tiene varias características de seguridad, como escanear aplicaciones para detectar malware, verificar las identidades de los desarrolladores y hacer cumplir los controles parentales. Sin embargo, también debe tener cuidado al descargar aplicaciones de fuentes desconocidas o tiendas de aplicaciones alternativas, ya que pueden contener contenido dañino o ilegal. </td></tr>
|
45 |
-
<tr><td>¿Cómo puedo obtener aplicaciones de pago o contenido gratis en CH Play? </td><td>No puede obtener aplicaciones o contenido de pago de forma gratuita en CH Play legalmente, ya que violaría los términos del servicio y los derechos de propiedad intelectual de los desarrolladores o creadores. Sin embargo, puede probar algunas de las alternativas o ensayos gratuitos que están disponibles en CH Play u otras fuentes. </td></tr>
|
46 |
-
<tr><td>¿Cómo puedo ponerme en contacto con el soporte de CH Play? </td><td>Puede ponerse en contacto con el soporte de CH Play yendo al icono del menú > Ayuda y comentarios > Contáctenos. También puede visitar el sitio web oficial o el foro de CH Play para obtener más información o apoyo. </td></tr>
|
47 |
-
|
48 |
-
</table></p> 64aa2da5cf<br />
|
49 |
-
<br />
|
50 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Descargar Grupo De Fuerzas Especiales 2 Apk.md
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Cómo descargar entre nosotros en PC en 2022</h1>
|
3 |
-
<p>Among Us es un juego multijugador de trabajo en equipo y traición que ha tomado el mundo del juego por asalto. En este juego, usted juega como uno de los miembros de la tripulación de una nave espacial que está tratando de completar tareas y sobrevivir. Sin embargo, entre ustedes hay impostores que están saboteando en secreto la nave y matando a sus compañeros de equipo. Tienes que trabajar junto a tus compañeros de equipo para averiguar quiénes son los impostores y expulsarlos antes de que te maten a todos. </p>
|
4 |
-
<h2>descargar grupo de fuerzas especiales 2 apk</h2><br /><p><b><b>DOWNLOAD</b> »»» <a href="https://bltlly.com/2v6Kps">https://bltlly.com/2v6Kps</a></b></p><br /><br />
|
5 |
-
<p>Among Us está disponible en varias plataformas, como Android, iOS, PC y consola. Sin embargo, reproducirlo en PC tiene algunas ventajas sobre otros dispositivos. Por ejemplo, puede disfrutar de un tamaño de pantalla más grande, una mejor calidad de gráficos, un rendimiento de juego más suave, controles más fáciles y más opciones de personalización. Además, puedes usar chat de voz con tus amigos u otros jugadores en línea usando Discord u otras aplicaciones. </p>
|
6 |
-
<p>Si quieres saber cómo descargar Among Us en PC en 2022, entonces has venido al lugar correcto. En este artículo, te mostraremos tres métodos para descargar y jugar entre nosotros en el PC usando Steam, BlueStacks o tu navegador. También te contaremos algunas de las características de Among Us en PC que lo hacen divertido y emocionante. Por último, te daremos algunos consejos y trucos para jugar como un compañero de equipo o un impostor, así como algunas revisiones y valoraciones de Among Us en PC de varias fuentes. </p>
|
7 |
-
<h2>Requisitos para jugar entre nosotros en PC</h2>
|
8 |
-
<p>Antes de descargar Entre nosotros en el PC, es necesario asegurarse de que su equipo cumple con los requisitos mínimos o recomendados del sistema para ejecutar el juego sin problemas. Estos son los requisitos para jugar entre nosotros en el PC de acuerdo con el sitio web oficial:</p>
|
9 |
-
<p></p>
|
10 |
-
<ul>
|
11 |
-
<li>Mínimo: <ul>
|
12 |
-
<li>OS: Windows 10 x32bit</li>
|
13 |
-
<li>Procesador: INTEL i3-4330</li>
|
14 |
-
<li>Memoria: 1 GB de RAM</li>
|
15 |
-
<li>Gráficos: Gráficos HD INTEL 4600</li>
|
16 |
-
</ul>
|
17 |
-
</li>
|
18 |
-
<li>Recomendado: <ul>
|
19 |
-
<li>OS: Windows 10 x64bit</li>
|
20 |
-
|
21 |
-
<li>Gráficos: Gráficos HD INTEL 4600</li>
|
22 |
-
</ul>
|
23 |
-
</li>
|
24 |
-
</ul>
|
25 |
-
<p>Si no está seguro sobre las especificaciones de su PC, puede verificarlas siguiendo estos pasos:</p>
|
26 |
-
<ol>
|
27 |
-
<li>Pulse la tecla de Windows + R para abrir el cuadro de diálogo Ejecutar. </li>
|
28 |
-
<li>Escriba dxdiag y haga clic en OK para abrir la herramienta de diagnóstico DirectX.</li>
|
29 |
-
<li> Haga clic en la pestaña Sistema para ver su sistema operativo, procesador e información de memoria. </li>
|
30 |
-
<li>Haga clic en la pestaña Mostrar para ver la información de su tarjeta gráfica. </li>
|
31 |
-
</ol>
|
32 |
-
<p>Para más detalles sobre los requisitos del sistema para jugar Entre nosotros en el PC, puede visitar el sitio web oficial aquí: <a href="">https://innersloth.com/gameAmongUs.php</a></p>
|
33 |
-
<h2>Métodos para descargar entre nosotros en PC</h2>
|
34 |
-
<p>Hay tres métodos para descargar y jugar entre nosotros en el PC: Steam, BlueStacks y navegador. Cada método tiene sus propios pros y contras, así que puedes elegir el que más te convenga. Aquí tienes una breve descripción de cada método y cómo usarlo:</p>
|
35 |
-
<h3>Método 1: Vapor</h3>
|
36 |
-
<p>Steam es una plataforma de distribución digital que te permite comprar, descargar y jugar juegos en tu PC. Entre nosotros está uno de los juegos que puedes comprar y jugar en Steam. Estos son los pasos para descargar e instalar Among Us en PC usando Steam:</p>
|
37 |
-
<ol>
|
38 |
-
<li>Ve al sitio web de Steam y descarga el cliente de Steam aquí: <a href="">https://store.steampowered.com/about/</a></li>
|
39 |
-
<li>Instala el cliente de Steam en tu PC y crea una cuenta o inicia sesión con tu cuenta existente. </li>
|
40 |
-
<li>Ir a la página de la tienda de vapor para Entre nosotros aquí: <a href="">https://store.steampowered.com/app/945360/Among_Us/</a></li>
|
41 |
-
<li>Haga clic en el botón Añadir al carrito y proceda a la compra. </li>
|
42 |
-
<li>Paga el juego usando tu método de pago preferido. El juego cuesta $4.99 USD a partir de junio de 2023. </li>
|
43 |
-
<li>Una vez confirmado el pago, vaya a su biblioteca y haga clic en Entre nosotros.</li>
|
44 |
-
<li>Haga clic en el botón Instalar y espere a que el juego se descargue e instale en su PC.</li>
|
45 |
-
|
46 |
-
</ol>
|
47 |
-
<p>Las ventajas de usar Steam son que puedes acceder a varias funciones como logros, almacenamiento en la nube, multijugador en línea, chat en el juego y más. También puedes personalizar la configuración del juego, como la resolución, la calidad gráfica, el volumen de sonido y los controles. Las desventajas son que tienes que pagar por el juego y necesitas una conexión a Internet estable para jugar online. </p>
|
48 |
-
<h3>Método 2: BlueStacks</h3>
|
49 |
-
<p>BlueStacks es un emulador de Android que te permite ejecutar aplicaciones y juegos de Android en tu PC. Entre nosotros es uno de los juegos que se puede jugar en BlueStacks gratis. Estos son los pasos para descargar y jugar entre nosotros en el PC usando BlueStacks:</p>
|
50 |
-
<ol>
|
51 |
-
<li>Vaya al sitio web de BlueStacks y descargue el reproductor de la aplicación BlueStacks aquí: <a href="">https://www.bluestacks.com/</a></li>
|
52 |
-
<li> Instalar el reproductor de aplicaciones BlueStacks en su PC y lanzarlo. </li>
|
53 |
-
<li>Inicia sesión con tu cuenta de Google o crea una nueva. </li>
|
54 |
-
<li>Ir a la aplicación Google Play Store en BlueStacks y buscar entre nosotros.</li>
|
55 |
-
<li>Haga clic en el botón Instalar y espere a que el juego se descargue e instale en BlueStacks.</li>
|
56 |
-
<li>Una vez completada la instalación, haga clic en el botón Abrir y disfrute de Entre Nosotros en PC.</li>
|
57 |
-
</ol>
|
58 |
-
<p>Las ventajas de usar BlueStacks son que usted puede jugar entre nosotros de forma gratuita y puede utilizar los controles del teclado y el ratón o personalizarlos según su preferencia. También puede usar el chat de voz con otros jugadores usando Discord u otras aplicaciones. Las desventajas son que puede experimentar algún retraso o problemas de rendimiento dependiendo de las especificaciones de su PC y la velocidad de Internet. También puede encontrar algunos anuncios o ventanas emergentes de BlueStacks u otras aplicaciones. </p>
|
59 |
-
<h3>Método 3: Navegador</h3>
|
60 |
-
<p>Si no desea descargar nada en su PC, también puede jugar entre nosotros en su navegador sin descargar. Esto es posible gracias a una versión del navegador de Among Us que fue creado por los fans del juego. Estos son los pasos para jugar entre nosotros en su navegador en su PC o móvil:</p>
|
61 |
-
<ol>
|
62 |
-
|
63 |
-
<li>Introduzca su apodo y elija su región. </li>
|
64 |
-
<li>Haga clic en el botón Host para crear un nuevo juego o en el botón Buscar juego para unirse a un juego existente. </li>
|
65 |
-
<li>Seleccione la configuración del juego, como el modo, el mapa, el número de jugadores y las reglas. </li>
|
66 |
-
<li>Haga clic en el botón Inicio para comenzar el juego o el botón Unirse para entrar en el juego. </li>
|
67 |
-
</ol>
|
68 |
-
<p>Las ventajas de usar la versión del navegador son que puedes jugar entre nosotros sin descargar nada y puedes acceder desde cualquier dispositivo que tenga un navegador. También puedes jugar con otros jugadores en línea o invitar a tus amigos usando un código. Las desventajas son que usted no puede tener todas las características y opciones que están disponibles en el PC o versiones móviles, tales como personalización, chat, logros, y más. También puede experimentar algunos errores o fallos dependiendo de su navegador y conexión a Internet. </p>
|
69 |
-
<h2>Características de Among Us en PC</h2>
|
70 |
-
<p>Jugar entre nosotros en PC no solo es fácil y conveniente, sino también divertido y emocionante. Hay muchas características que hacen que Among Us on PC sea agradable, como:</p>
|
71 |
-
<ul>
|
72 |
-
<li>Juego multiplataforma: Puedes jugar con otros jugadores que utilizan diferentes dispositivos, como Android, iOS, PC o consola. Esto significa que puedes unirte a tus amigos o conocer gente nueva en línea independientemente de la plataforma que estén utilizando. </li>
|
73 |
-
<li>Opciones de personalización: Puedes personalizar la apariencia de tu personaje, como color, sombrero, atuendo, mascota y piel. También puedes personalizar la configuración del juego, como el modo, el mapa, el número de jugadores y las reglas. Puedes crear tu propio juego o unirte al juego de otra persona según tu preferencia. </li>
|
74 |
-
<li>Diferentes modos y mapas: Puedes elegir entre diferentes modos y mapas para jugar, como Classic, Hide and Seek, Zombies y más. Cada modo y mapa tiene sus propios desafíos y estrategias que necesitas dominar. También puede probar nuevos modos y mapas que se agregan regularmente por los desarrolladores o la comunidad. </li>
|
75 |
-
|
76 |
-
<li>Integración de discordia: También puedes usar Discord para chatear con otros jugadores fuera del juego. Discord es una aplicación popular que le permite crear o unirse a servidores donde se puede hablar con otras personas que comparten sus intereses. Puedes usar Discord para encontrar o invitar a los jugadores a jugar Entre Nosotros contigo, así como para compartir consejos, trucos, memes, fan art y más. </li>
|
77 |
-
<li>Logros: Puedes ganar logros completando ciertas tareas o metas en el juego. Los logros son una forma de seguir tu progreso y mostrar tus habilidades. Algunos logros son fáciles de obtener, mientras que otros son difíciles o raros. Puedes ver tus logros en Steam o en tu perfil en el juego. </li>
|
78 |
-
</ul>
|
79 |
-
<p>Estas son algunas de las características que hacen que Among Us en PC sea divertido y emocionante. Hay más características que puedes descubrir jugando el juego tú mismo. ¿Qué estás esperando? Descargar Entre nosotros en PC hoy y unirse a la diversión! </p>
|
80 |
-
<h2>Consejos y trucos para jugar entre nosotros en PC</h2>
|
81 |
-
<p>Jugar entre nosotros en PC no solo es divertido y emocionante, sino también desafiante y competitivo. Necesitas usar tus habilidades y estrategias para ganar como compañero de equipo o como impostor. Aquí hay algunos consejos y trucos para jugar entre nosotros en PC como un compañero de equipo o un impostor:</p>
|
82 |
-
<h3>Consejos para compañeros de equipo</h3>
|
83 |
-
<p>Si eres un compañero de equipo, tu objetivo es completar tus tareas y averiguar quiénes son los impostores antes de que te maten a todos. Aquí hay algunos consejos para jugar como compañero de equipo:</p>
|
84 |
-
<ul>
|
85 |
-
<li>Completa tus tareas: Tus tareas se muestran en la esquina superior izquierda de la pantalla. También puede acceder a un mapa que muestra dónde se encuentran sus tareas pulsando Tab. Completar tus tareas llenará la barra de tareas y te acercará a la victoria. Sin embargo, tenga cuidado de no ser asesinado por los impostores mientras hace sus tareas. </li>
|
86 |
-
|
87 |
-
<li>Reportar cuerpos: Si encuentra un cuerpo muerto, puede reportarlo haciendo clic en él. Reportar a un cuerpo desencadenará una reunión de emergencia donde puedes discutir y votar por quién crees que son los impostores. Sin embargo, tenga cuidado de no reportar un cuerpo que vio matar al impostor, ya que pueden acusarlo de ser el asesino. </li>
|
88 |
-
<li>Reuniones de llamadas: Si tiene información urgente o sospecha para compartir, puede llamar a una reunión de emergencia presionando el botón en la cafetería o la oficina. Convocar una reunión hará una pausa en el juego y te permitirá hablar y votar con tus compañeros de equipo. Sin embargo, tenga en cuenta que tiene un número limitado de reuniones a las que puede llamar, y que los impostores pueden sabotear el botón para evitar que llame a una reunión. </li>
|
89 |
-
<li>Impostores de voto: Si tienes suficiente evidencia o pistas para identificar quiénes son los impostores, puedes expulsarlos durante una reunión. Expulsar a un impostor reducirá su número y aumentará sus posibilidades de ganar. Sin embargo, tenga cuidado de no expulsar a un compañero de tripulación inocente, ya que eso le dará a los impostores una ventaja. </li>
|
90 |
-
<li>Mantente vivo: Lo más importante para un compañero de equipo es mantenerse vivo y evitar ser asesinado por los impostores. Puedes hacer esto manteniéndote con tus compañeros de equipo, escondiéndote en respiraderos o esquinas, usando botones de emergencia o reuniones, y siendo alerta y cauteloso. Sin embargo, tenga en cuenta que los impostores pueden utilizar varios trucos y tácticas para atraerlo a una trampa o matarlo frente a otros. </li>
|
91 |
-
</ul>
|
92 |
-
<h3>Consejos para impostores</h3>
|
93 |
-
<p>Si eres un impostor, tu objetivo es matar a todos los tripulantes o sabotear la nave antes de que completen sus tareas o averiguar quién eres. Aquí hay algunos consejos para jugar como un impostor:</p>
|
94 |
-
<ul>
|
95 |
-
|
96 |
-
<li>Sabotaje: Como un impostor, puede sabotear varios sistemas en la nave presionando el botón de sabotaje en la esquina inferior derecha de la pantalla. Sabotear puede ayudar a crear caos y confusión entre los compañeros de equipo, así como distraerlos de sus tareas o reuniones. Puedes sabotear cosas como puertas, luces, oxígeno, reactores, comunicaciones y más. Sin embargo, tenga en cuenta que algunos sabotajes pueden ser arreglados por los compañeros de tripulación, y que algunos sabotajes pueden ser contraproducentes si no tiene cuidado. </li>
|
97 |
-
<li>Vent: Como impostor, puedes usar respiraderos para viajar rápida y sigilosamente alrededor de la nave. Los respiraderos son pasajes ocultos que conectan diferentes habitaciones y áreas en el mapa. Puedes usar respiraderos para escapar después de matar a alguien, para sorprender a alguien por detrás o para moverte sin ser notado. Sin embargo, tenga cuidado de no ventilar delante de otra persona, ya que sabrá que usted es un impostor. </li>
|
98 |
-
<li>Matar: Como un impostor, puedes matar compañeros de equipo acercándote a ellos y presionando el botón de matar en la esquina inferior derecha de la pantalla. Matar compañeros de equipo es su principal manera de ganar el juego como un impostor. Puedes matar compañeros de equipo de varias maneras, como sigilosamente, atrayéndolos a una trampa, o matándolos delante de otros y culpando a alguien más. Sin embargo, tenga cuidado de no matar a alguien que esté cerca de una cámara, un cuerpo u otro jugador, ya que puede verlo o denunciarlo. </li>
|
99 |
-
<li>Frame: Como un impostor, puedes enmarcar a otros jugadores para tus asesinatos haciéndoles parecer sospechosos o culpables. Puedes enmarcar a otros jugadores de varias maneras, como dejar un cuerpo cerca de ellos, ventilar cerca de ellos, sabotear cerca de ellos o acusarlos durante una reunión. Enmarcar a otros jugadores puede ayudarte a desviar la atención de ti mismo y hacer que los compañeros expulsen a personas inocentes. Sin embargo, tenga cuidado de no incriminar a alguien que tiene una coartada, una prueba o un testigo, ya que pueden probar su inocencia o exponer sus mentiras. </li>
|
100 |
-
|
101 |
-
<li>Ganar: Como un impostor, puedes ganar el juego matando a todos los compañeros de equipo, haciendo que los compañeros de equipo se maten entre sí, o saboteando la nave hasta que explote. Ganar el juego como impostor no es fácil, pero es muy satisfactorio y gratificante. Puedes mejorar tus posibilidades de ganar usando tus habilidades y estrategias, así como cooperando con tus compañeros impostores si hay alguno. </li>
|
102 |
-
</ul>
|
103 |
-
<h2>Comentarios y calificaciones de entre nosotros en PC</h2>
|
104 |
-
<p>Entre nosotros en PC ha recibido muchas críticas y valoraciones de varias fuentes, como críticos, sitios web y usuarios. La mayoría de las críticas y valoraciones son positivas y elogian el juego por su juego divertido y adictivo, sus gráficos simples y coloridos, sus características sociales e interactivas, y su valor de repetición y variedad. Sin embargo, algunas de las críticas y valoraciones son negativas y critican el juego por sus problemas técnicos, su falta de contenido y actualizaciones, sus jugadores tóxicos y tramposos, y sus aspectos repetitivos y aburridos. Aquí hay algunos ejemplos de reseñas y valoraciones de Among Us en PC de diferentes fuentes:</p>
|
105 |
-
<tabla>
|
106 |
-
<tr>
|
107 |
-
<th>Fuente</th>
|
108 |
-
<th>Revisión</th>
|
109 |
-
<th>Valoración</th>
|
110 |
-
</tr>
|
111 |
-
<tr>
|
112 |
-
<td>Metacritic</td>
|
113 |
-
<td>"Entre nosotros es un juego de fiesta fantástico que es perfecto con los amigos. Es fácil de recoger y jugar, pero difícil de dominar. El juego está lleno de momentos hilarantes y situaciones tensas que te mantendrán enganchado durante horas."</td>
|
114 |
-
<td>85/100</td>
|
115 |
-
</tr>
|
116 |
-
<tr>
|
117 |
-
<td>IGN</td>
|
118 |
-
<td>"Entre nosotros es un giro inteligente en los juegos de deducción social que añade mucho caos y diversión. La emoción de mentir a tus amigos o atraparlos en una mentira es lo que lo hace tan emocionante y adictivo."</td>
|
119 |
-
<td>8/10</td>
|
120 |
-
</tr>
|
121 |
-
<tr>
|
122 |
-
<td>Steam</td>
|
123 |
-
<td>"Este juego es increíble. Me encanta jugar con mis amigos en línea o en persona. Es muy divertido tratar de averiguar quiénes son los impostores o tratar de engañar a todos como un impostor. El juego es simple pero tiene mucha profundidad y estrategia." </td>
|
124 |
-
<td>Muy positivo (94% de 1.234.567 opiniones)</td>
|
125 |
-
</tr>
|
126 |
-
<tr>
|
127 |
-
|
128 |
-
<td>"Este juego es terrible. Está lleno de errores y fallos que arruinan el juego. Los desarrolladores no se preocupan por actualizar o arreglar el juego. Los jugadores son tóxicos y groseros. Hacen trampa, hackean o dejan el juego si no consiguen lo que quieren." </td>
|
129 |
-
<td>Negativo (1/5 estrellas)</td>
|
130 |
-
</tr>
|
131 |
-
</tabla>
|
132 |
-
<h2>Conclusión</h2>
|
133 |
-
<p>En conclusión, Among Us es un juego multijugador de trabajo en equipo y traición que puedes descargar y jugar en PC en 2022. Puedes usar tres métodos para descargar y jugar Among Us en PC: Steam, BlueStacks o navegador. Cada método tiene sus propios pros y contras que se pueden considerar antes de elegir uno. También puedes disfrutar de varias características de Among Us en PC que lo hacen divertido y emocionante, como el juego multiplataforma, opciones de personalización, diferentes modos y mapas, chat en el juego, integración de Discord y logros. También puede utilizar algunos consejos y trucos para jugar como compañero de equipo o un impostor que puede ayudarle a ganar el juego. También puedes ver algunas reseñas y valoraciones de Among Us en PC de diferentes fuentes que te pueden dar una idea de lo que otras personas piensan sobre el juego. </p>
|
134 |
-
<p>Si estás buscando un juego que sea fácil de jugar pero difícil de dominar, que sea divertido y adictivo, pero también desafiante y competitivo, que sea social e interactivo pero también engañoso y secreto, entonces Among Us on PC es el juego para ti. Descargar Entre nosotros en PC hoy y unirse a la diversión! </p>
|
135 |
-
<h2>Preguntas frecuentes (preguntas frecuentes)</h2>
|
136 |
-
<p>Aquí hay algunas preguntas frecuentes (preguntas frecuentes) acerca de Entre Nosotros en PC:</p>
|
137 |
-
<h3>Q: ¿Cuántos jugadores pueden jugar entre nosotros en PC? </h3>
|
138 |
-
<p>A: Puedes jugar entre nosotros en PC con hasta 15 jugadores en línea o localmente. </p>
|
139 |
-
<h3>Q: ¿Cuánto cuesta entre nosotros en el PC? </h3>
|
140 |
-
<p>A: Entre nosotros cuesta $4.99 USD en Steam a partir de junio de 2023. Sin embargo, puedes jugarlo gratis en BlueStacks o en el navegador. </p <h3>Q: ¿Cómo puedo jugar entre nosotros en el PC con mis amigos? </h3>
|
141 |
-
|
142 |
-
<h3>Q: ¿Cómo puedo cambiar mi nombre en entre nosotros en PC? </h3>
|
143 |
-
<p>A: Puede cambiar su nombre en Entre nosotros en el PC haciendo clic en el cuadro de nombre en la esquina superior izquierda de la pantalla. Puede introducir cualquier nombre que desee, siempre y cuando no sea ofensivo o inapropiado. </p>
|
144 |
-
<h3>Q: ¿Cómo puedo reportar un error o un problema en Entre nosotros en PC? </h3>
|
145 |
-
<p>A: Puede reportar un error o un problema en Entre nosotros en el PC poniéndose en contacto con los desarrolladores o el equipo de soporte. Puedes hacer esto visitando el sitio web oficial, la página de Steam, el servidor de Discord o las cuentas de redes sociales de Among Us. También puedes dejar una reseña o un comentario en Steam u otras plataformas. </p> 64aa2da5cf<br />
|
146 |
-
<br />
|
147 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py
DELETED
File without changes
|
spaces/Blackroot/Fancy-Audiogen/generator.py
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
import time
|
3 |
-
import typing as tp
|
4 |
-
from audiocraft.models import MusicGen
|
5 |
-
from audiocraft.modules.conditioners import ConditioningAttributes
|
6 |
-
|
7 |
-
class HijackedMusicGen(MusicGen):
|
8 |
-
def __init__(self, socketio=None, *args, **kwargs):
|
9 |
-
super().__init__(*args, **kwargs)
|
10 |
-
self.socketio = socketio
|
11 |
-
self._progress_callback = self._timed_progress_callback if socketio is not None else None
|
12 |
-
self._last_update_time = time.time()
|
13 |
-
|
14 |
-
def _timed_progress_callback(self, generated_tokens: int, tokens_to_generate: int):
|
15 |
-
current_time = time.time()
|
16 |
-
if current_time - self._last_update_time >= 0.1: # 0.1 seconds have passed
|
17 |
-
self.socketio.emit('progress', {'generated_tokens': generated_tokens, 'tokens_to_generate': tokens_to_generate})
|
18 |
-
self._last_update_time = current_time
|
19 |
-
|
20 |
-
@staticmethod
|
21 |
-
def get_pretrained(socketio, name: str = 'melody', device='cuda'):
|
22 |
-
music_gen = MusicGen.get_pretrained(name, device)
|
23 |
-
return HijackedMusicGen(socketio, music_gen.name, music_gen.compression_model, music_gen.lm)
|
24 |
-
|
25 |
-
@property
|
26 |
-
def progress_callback(self):
|
27 |
-
raise Exception("Progress callback is write-only")
|
28 |
-
|
29 |
-
@progress_callback.setter
|
30 |
-
def progress_callback(self, callback):
|
31 |
-
self._progress_callback = callback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/app.py
DELETED
@@ -1,377 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
# os.system('sudo apt-get install python3-dev')
|
3 |
-
os.system('python setup.py install --user')
|
4 |
-
import argparse
|
5 |
-
import csv
|
6 |
-
import numpy as np
|
7 |
-
import sys
|
8 |
-
sys.path.append("/home/user/.local/lib/python3.8/site-packages/diffvg-0.0.1-py3.8-linux-x86_64.egg")
|
9 |
-
print(sys.path)
|
10 |
-
from pathlib import Path
|
11 |
-
|
12 |
-
import gradio as gr
|
13 |
-
|
14 |
-
import torch
|
15 |
-
import yaml
|
16 |
-
from PIL import Image
|
17 |
-
from subprocess import call
|
18 |
-
import torch
|
19 |
-
import cv2
|
20 |
-
import matplotlib.pyplot as plt
|
21 |
-
import random
|
22 |
-
import argparse
|
23 |
-
import math
|
24 |
-
import errno
|
25 |
-
from tqdm import tqdm
|
26 |
-
import yaml
|
27 |
-
from easydict import EasyDict as edict
|
28 |
-
|
29 |
-
|
30 |
-
def run_cmd(command):
|
31 |
-
try:
|
32 |
-
print(command)
|
33 |
-
call(command, shell=True)
|
34 |
-
except KeyboardInterrupt:
|
35 |
-
print("Process interrupted")
|
36 |
-
sys.exit(1)
|
37 |
-
# run_cmd("gcc --version")
|
38 |
-
# run_cmd("pwd")
|
39 |
-
# run_cmd("ls")
|
40 |
-
# run_cmd("git submodule update --init --recursive")
|
41 |
-
# run_cmd("python setup.py install --user")
|
42 |
-
# run_cmd("pip3 list")
|
43 |
-
# import pydiffvg
|
44 |
-
#
|
45 |
-
# print("Sccuessfuly import diffvg ")
|
46 |
-
# run_cmd("pwd")
|
47 |
-
# run_cmd("ls")
|
48 |
-
# run_cmd("git submodule update --init --recursive")
|
49 |
-
# run_cmd("python setup.py install --user")
|
50 |
-
|
51 |
-
# run_cmd("python main.py --config config/base.yaml --experiment experiment_5x1 --signature smile --target figures/smile.png --log_dir log/")
|
52 |
-
from main import main_func
|
53 |
-
|
54 |
-
|
55 |
-
def parse_args():
|
56 |
-
parser = argparse.ArgumentParser()
|
57 |
-
parser.add_argument('--debug', action='store_true', default=False)
|
58 |
-
parser.add_argument("--config", default="config/base.yaml", type=str)
|
59 |
-
parser.add_argument("--experiment", type=str)
|
60 |
-
parser.add_argument("--seed", type=int)
|
61 |
-
parser.add_argument("--target", type=str, help="target image path")
|
62 |
-
parser.add_argument('--log_dir', metavar='DIR', default="log/")
|
63 |
-
parser.add_argument('--initial', type=str, default="random", choices=['random', 'circle'])
|
64 |
-
parser.add_argument('--signature', default="demo", nargs='+', type=str)
|
65 |
-
parser.add_argument('--seginit', nargs='+', type=str)
|
66 |
-
parser.add_argument("--num_segments", type=int, default=4)
|
67 |
-
# parser.add_argument("--num_paths", type=str, default="1,1,1")
|
68 |
-
# parser.add_argument("--num_iter", type=int, default=500)
|
69 |
-
# parser.add_argument('--free', action='store_true')
|
70 |
-
# Please ensure that image resolution is divisible by pool_size; otherwise the performance would drop a lot.
|
71 |
-
# parser.add_argument('--pool_size', type=int, default=40, help="the pooled image size for next path initialization")
|
72 |
-
# parser.add_argument('--save_loss', action='store_true')
|
73 |
-
# parser.add_argument('--save_init', action='store_true')
|
74 |
-
# parser.add_argument('--save_image', action='store_true')
|
75 |
-
# parser.add_argument('--save_video', action='store_true')
|
76 |
-
# parser.add_argument('--print_weight', action='store_true')
|
77 |
-
# parser.add_argument('--circle_init_radius', type=float)
|
78 |
-
cfg = edict()
|
79 |
-
args = parser.parse_args()
|
80 |
-
cfg.debug = args.debug
|
81 |
-
cfg.config = args.config
|
82 |
-
cfg.experiment = args.experiment
|
83 |
-
cfg.seed = args.seed
|
84 |
-
cfg.target = args.target
|
85 |
-
cfg.log_dir = args.log_dir
|
86 |
-
cfg.initial = args.initial
|
87 |
-
cfg.signature = args.signature
|
88 |
-
# set cfg num_segments in command
|
89 |
-
cfg.num_segments = args.num_segments
|
90 |
-
if args.seginit is not None:
|
91 |
-
cfg.seginit = edict()
|
92 |
-
cfg.seginit.type = args.seginit[0]
|
93 |
-
if cfg.seginit.type == 'circle':
|
94 |
-
cfg.seginit.radius = float(args.seginit[1])
|
95 |
-
return cfg
|
96 |
-
|
97 |
-
|
98 |
-
def app_experiment_change(experiment_id):
|
99 |
-
if experiment_id == "add [1] total 1 path for demonstration":
|
100 |
-
return "experiment_1x1"
|
101 |
-
if experiment_id == "add [1, 1, 1, 1, 1] total 5 paths one by one":
|
102 |
-
return "experiment_5x1"
|
103 |
-
elif experiment_id == "add [1, 1, 1, 1, 1, 1, 1, 1] total 8 paths one by one":
|
104 |
-
return "experiment_8x1"
|
105 |
-
elif experiment_id == "add [1,2,4,8,16,32, ...] total 128 paths":
|
106 |
-
return "experiment_exp2_128"
|
107 |
-
elif experiment_id == "add [1,2,4,8,16,32, ...] total 256 paths":
|
108 |
-
return "experiment_exp2_256"
|
109 |
-
|
110 |
-
|
111 |
-
cfg_arg = parse_args()
|
112 |
-
temp_image = np.random.rand(224,224,3)
|
113 |
-
temp_text = "start"
|
114 |
-
temp_input = np.random.rand(224,224,3)
|
115 |
-
def run_live(img, experiment_id, num_iter, cfg_arg=cfg_arg):
|
116 |
-
experiment = app_experiment_change(experiment_id)
|
117 |
-
cfg_arg.target = img
|
118 |
-
cfg_arg.experiment = experiment
|
119 |
-
img, text = main_func(img, experiment_id, num_iter, cfg_arg=cfg_arg)
|
120 |
-
return img, text
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
# ROOT_PATH = sys.path[0] # 根目录
|
131 |
-
# # 模型路径
|
132 |
-
# model_path = "ultralytics/yolov5"
|
133 |
-
# # 模型名称临时变量
|
134 |
-
# model_name_tmp = ""
|
135 |
-
# # 设备临时变量
|
136 |
-
# device_tmp = ""
|
137 |
-
# # 文件后缀
|
138 |
-
# suffix_list = [".csv", ".yaml"]
|
139 |
-
# def parse_args(known=False):
|
140 |
-
# parser = argparse.ArgumentParser(description="Gradio LIVE")
|
141 |
-
# parser.add_argument(
|
142 |
-
# "--model_name", "-mn", default="yolov5s", type=str, help="model name"
|
143 |
-
# )
|
144 |
-
# parser.add_argument(
|
145 |
-
# "--model_cfg",
|
146 |
-
# "-mc",
|
147 |
-
# default="./model_config/model_name_p5_all.yaml",
|
148 |
-
# type=str,
|
149 |
-
# help="model config",
|
150 |
-
# )
|
151 |
-
# parser.add_argument(
|
152 |
-
# "--cls_name",
|
153 |
-
# "-cls",
|
154 |
-
# default="./cls_name/cls_name.yaml",
|
155 |
-
# type=str,
|
156 |
-
# help="cls name",
|
157 |
-
# )
|
158 |
-
# parser.add_argument(
|
159 |
-
# "--nms_conf",
|
160 |
-
# "-conf",
|
161 |
-
# default=0.5,
|
162 |
-
# type=float,
|
163 |
-
# help="model NMS confidence threshold",
|
164 |
-
# )
|
165 |
-
# parser.add_argument(
|
166 |
-
# "--nms_iou", "-iou", default=0.45, type=float, help="model NMS IoU threshold"
|
167 |
-
# )
|
168 |
-
#
|
169 |
-
# parser.add_argument(
|
170 |
-
# "--label_dnt_show",
|
171 |
-
# "-lds",
|
172 |
-
# action="store_false",
|
173 |
-
# default=True,
|
174 |
-
# help="label show",
|
175 |
-
# )
|
176 |
-
# parser.add_argument(
|
177 |
-
# "--device",
|
178 |
-
# "-dev",
|
179 |
-
# default="cpu",
|
180 |
-
# type=str,
|
181 |
-
# help="cuda or cpu, hugging face only cpu",
|
182 |
-
# )
|
183 |
-
# parser.add_argument(
|
184 |
-
# "--inference_size", "-isz", default=640, type=int, help="model inference size"
|
185 |
-
# )
|
186 |
-
#
|
187 |
-
# args = parser.parse_known_args()[0] if known else parser.parse_args()
|
188 |
-
# return args
|
189 |
-
# # 模型加载
|
190 |
-
# def model_loading(model_name, device):
|
191 |
-
#
|
192 |
-
# # 加载本地模型
|
193 |
-
# model = torch.hub.load(model_path, model_name, force_reload=True, device=device)
|
194 |
-
#
|
195 |
-
# return model
|
196 |
-
# # 检测信息
|
197 |
-
# def export_json(results, model, img_size):
|
198 |
-
#
|
199 |
-
# return [
|
200 |
-
# [
|
201 |
-
# {
|
202 |
-
# "id": int(i),
|
203 |
-
# "class": int(result[i][5]),
|
204 |
-
# "class_name": model.model.names[int(result[i][5])],
|
205 |
-
# "normalized_box": {
|
206 |
-
# "x0": round(result[i][:4].tolist()[0], 6),
|
207 |
-
# "y0": round(result[i][:4].tolist()[1], 6),
|
208 |
-
# "x1": round(result[i][:4].tolist()[2], 6),
|
209 |
-
# "y1": round(result[i][:4].tolist()[3], 6),
|
210 |
-
# },
|
211 |
-
# "confidence": round(float(result[i][4]), 2),
|
212 |
-
# "fps": round(1000 / float(results.t[1]), 2),
|
213 |
-
# "width": img_size[0],
|
214 |
-
# "height": img_size[1],
|
215 |
-
# }
|
216 |
-
# for i in range(len(result))
|
217 |
-
# ]
|
218 |
-
# for result in results.xyxyn
|
219 |
-
# ]
|
220 |
-
# def yolo_det(img, experiment_id, device=None, model_name=None, inference_size=None, conf=None, iou=None, label_opt=None, model_cls=None):
|
221 |
-
#
|
222 |
-
# global model, model_name_tmp, device_tmp
|
223 |
-
#
|
224 |
-
# if model_name_tmp != model_name:
|
225 |
-
# # 模型判断,避免反复加载
|
226 |
-
# model_name_tmp = model_name
|
227 |
-
# model = model_loading(model_name_tmp, device)
|
228 |
-
# elif device_tmp != device:
|
229 |
-
# device_tmp = device
|
230 |
-
# model = model_loading(model_name_tmp, device)
|
231 |
-
#
|
232 |
-
# # -----------模型调参-----------
|
233 |
-
# model.conf = conf # NMS 置信度阈值
|
234 |
-
# model.iou = iou # NMS IOU阈值
|
235 |
-
# model.max_det = 1000 # 最大检测框数
|
236 |
-
# model.classes = model_cls # 模型类别
|
237 |
-
#
|
238 |
-
# results = model(img, size=inference_size) # 检测
|
239 |
-
# results.render(labels=label_opt) # 渲染
|
240 |
-
#
|
241 |
-
# det_img = Image.fromarray(results.imgs[0]) # 检测图片
|
242 |
-
#
|
243 |
-
# det_json = export_json(results, model, img.size)[0] # 检测信息
|
244 |
-
#
|
245 |
-
# return det_img, det_json
|
246 |
-
|
247 |
-
|
248 |
-
# def run_cmd(command):
|
249 |
-
# try:
|
250 |
-
# print(command)
|
251 |
-
# call(command, shell=True)
|
252 |
-
# except KeyboardInterrupt:
|
253 |
-
# print("Process interrupted")
|
254 |
-
# sys.exit(1)
|
255 |
-
#
|
256 |
-
# run_cmd("gcc --version")
|
257 |
-
# run_cmd("pwd")
|
258 |
-
# run_cmd("ls")
|
259 |
-
# run_cmd("git submodule update --init --recursive")
|
260 |
-
# run_cmd("python setup.py install --user")
|
261 |
-
# run_cmd("ls")
|
262 |
-
# run_cmd("python main.py --config config/base.yaml --experiment experiment_5x1 --signature smile --target figures/smile.png --log_dir log/")
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
# # yaml文件解析
|
270 |
-
# def yaml_parse(file_path):
|
271 |
-
# return yaml.safe_load(open(file_path, "r", encoding="utf-8").read())
|
272 |
-
#
|
273 |
-
#
|
274 |
-
# # yaml csv 文件解析
|
275 |
-
# def yaml_csv(file_path, file_tag):
|
276 |
-
# file_suffix = Path(file_path).suffix
|
277 |
-
# if file_suffix == suffix_list[0]:
|
278 |
-
# # 模型名称
|
279 |
-
# file_names = [i[0] for i in list(csv.reader(open(file_path)))] # csv版
|
280 |
-
# elif file_suffix == suffix_list[1]:
|
281 |
-
# # 模型名称
|
282 |
-
# file_names = yaml_parse(file_path).get(file_tag) # yaml版
|
283 |
-
# else:
|
284 |
-
# print(f"{file_path}格式不正确!程序退出!")
|
285 |
-
# sys.exit()
|
286 |
-
#
|
287 |
-
# return file_names
|
288 |
-
|
289 |
-
|
290 |
-
def main(args):
|
291 |
-
gr.close_all()
|
292 |
-
# -------------------Inputs-------------------
|
293 |
-
inputs_iteration = gr.inputs.Slider(
|
294 |
-
label="Optimization Iteration",
|
295 |
-
default=500, maximum=600, minimum=100, step=100)
|
296 |
-
inputs_img = gr.inputs.Image(type="pil", label="Input Image", shape=[160, 160])
|
297 |
-
experiment_id = gr.inputs.Radio(
|
298 |
-
choices=[
|
299 |
-
"add [1] total 1 path for demonstration",
|
300 |
-
"add [1, 1, 1, 1, 1] total 5 paths one by one",
|
301 |
-
"add [1, 1, 1, 1, 1, 1, 1, 1] total 8 paths one by one",
|
302 |
-
"add [1,2,4,8,16,32, ...] total 128 paths",
|
303 |
-
"add [1,2,4,8,16,32, ...] total 256 paths"], type="value", default="add [1, 1, 1, 1, 1] total 5 paths one by one", label="Path Adding Scheduler"
|
304 |
-
)
|
305 |
-
|
306 |
-
# inputs
|
307 |
-
inputs = [
|
308 |
-
|
309 |
-
inputs_img, # input image
|
310 |
-
experiment_id, # path adding scheduler
|
311 |
-
inputs_iteration, # input iteration
|
312 |
-
|
313 |
-
]
|
314 |
-
# outputs
|
315 |
-
outputs = gr.outputs.Image(type="numpy", label="Vectorized Image")
|
316 |
-
outputs02 = gr.outputs.File(label="Generated SVG output")
|
317 |
-
|
318 |
-
# title
|
319 |
-
title = "LIVE: Towards Layer-wise Image Vectorization"
|
320 |
-
# description
|
321 |
-
description = "<div align='center'>(CVPR 2022 Oral Presentation)</div>" \
|
322 |
-
"<div align='center'>For efficiency, we rescale input to 160x160 (smaller size and fewer iterations will decrease the reconstructions).</div> "
|
323 |
-
article = "<p style='text-align: center'><a href='https://ma-xu.github.io/LIVE/' target='_blank'>Towards Layer-wise Image Vectorization</a> | <a href='https://github.com/Picsart-AI-Research/LIVE-Layerwise-Image-Vectorization' target='_blank'>Github Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=Picsart-AI-Research.LIVE-Layerwise-Image-Vectorization' alt='visitor badge'></center>"
|
324 |
-
|
325 |
-
# examples
|
326 |
-
examples = [
|
327 |
-
[
|
328 |
-
"./examples/1.png",
|
329 |
-
"add [1] total 1 path for demonstration",
|
330 |
-
100,
|
331 |
-
],
|
332 |
-
[
|
333 |
-
"./examples/2.png",
|
334 |
-
"add [1, 1, 1, 1, 1] total 5 paths one by one",
|
335 |
-
300,
|
336 |
-
],
|
337 |
-
[
|
338 |
-
"./examples/3.jpg",
|
339 |
-
"add [1,2,4,8,16,32, ...] total 128 paths",
|
340 |
-
300,
|
341 |
-
],
|
342 |
-
[
|
343 |
-
"./examples/4.png",
|
344 |
-
"add [1,2,4,8,16,32, ...] total 256 paths",
|
345 |
-
300,
|
346 |
-
],
|
347 |
-
[
|
348 |
-
"./examples/5.png",
|
349 |
-
"add [1, 1, 1, 1, 1] total 5 paths one by one",
|
350 |
-
300,
|
351 |
-
],
|
352 |
-
]
|
353 |
-
|
354 |
-
# Interface
|
355 |
-
gr.Interface(
|
356 |
-
fn=run_live,
|
357 |
-
inputs=inputs,
|
358 |
-
outputs=[outputs, outputs02],
|
359 |
-
title=title,
|
360 |
-
description=description,
|
361 |
-
article=article,
|
362 |
-
examples=examples,
|
363 |
-
theme="seafoam",
|
364 |
-
# live=True, # 实时变更输出
|
365 |
-
flagging_dir="log" # 输出目录
|
366 |
-
# ).launch(inbrowser=True, auth=['admin', 'admin'])
|
367 |
-
).launch(
|
368 |
-
inbrowser=True, # 自动打开默认浏览器
|
369 |
-
show_tips=True, # 自动显示gradio最新功能
|
370 |
-
enable_queue=True
|
371 |
-
# favicon_path="./icon/logo.ico",
|
372 |
-
)
|
373 |
-
|
374 |
-
|
375 |
-
if __name__ == "__main__":
|
376 |
-
args = parse_args()
|
377 |
-
main(args)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/random/uniform_int_distribution.h
DELETED
@@ -1,276 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Copyright 2008-2013 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 |
-
|
18 |
-
/*! \file uniform_int_distribution.h
|
19 |
-
* \brief A uniform distribution of integer-valued numbers
|
20 |
-
*/
|
21 |
-
|
22 |
-
#pragma once
|
23 |
-
|
24 |
-
#include <thrust/detail/config.h>
|
25 |
-
#include <thrust/pair.h>
|
26 |
-
#include <thrust/detail/integer_traits.h>
|
27 |
-
#include <thrust/random/detail/random_core_access.h>
|
28 |
-
#include <iostream>
|
29 |
-
|
30 |
-
namespace thrust
|
31 |
-
{
|
32 |
-
|
33 |
-
namespace random
|
34 |
-
{
|
35 |
-
|
36 |
-
/*! \addtogroup random_number_distributions Random Number Distributions Class Templates
|
37 |
-
* \ingroup random
|
38 |
-
* \{
|
39 |
-
*/
|
40 |
-
|
41 |
-
/*! \class uniform_int_distribution
|
42 |
-
* \brief A \p uniform_int_distribution random number distribution produces signed or unsigned integer
|
43 |
-
* uniform random numbers from a given range.
|
44 |
-
*
|
45 |
-
* \tparam IntType The type of integer to produce.
|
46 |
-
*
|
47 |
-
* The following code snippet demonstrates examples of using a \p uniform_int_distribution with a
|
48 |
-
* random number engine to produce random integers drawn from a given range:
|
49 |
-
*
|
50 |
-
* \code
|
51 |
-
* #include <thrust/random/linear_congruential_engine.h>
|
52 |
-
* #include <thrust/random/uniform_int_distribution.h>
|
53 |
-
*
|
54 |
-
* int main(void)
|
55 |
-
* {
|
56 |
-
* // create a minstd_rand object to act as our source of randomness
|
57 |
-
* thrust::minstd_rand rng;
|
58 |
-
*
|
59 |
-
* // create a uniform_int_distribution to produce ints from [-7,13]
|
60 |
-
* thrust::uniform_int_distribution<int> dist(-7,13);
|
61 |
-
*
|
62 |
-
* // write a random number from the range [-7,13] to standard output
|
63 |
-
* std::cout << dist(rng) << std::endl;
|
64 |
-
*
|
65 |
-
* // write the range of the distribution, just in case we forgot
|
66 |
-
* std::cout << dist.min() << std::endl;
|
67 |
-
*
|
68 |
-
* // -7 is printed
|
69 |
-
*
|
70 |
-
* std::cout << dist.max() << std::endl;
|
71 |
-
*
|
72 |
-
* // 13 is printed
|
73 |
-
*
|
74 |
-
* // write the parameters of the distribution (which happen to be the bounds) to standard output
|
75 |
-
* std::cout << dist.a() << std::endl;
|
76 |
-
*
|
77 |
-
* // -7 is printed
|
78 |
-
*
|
79 |
-
* std::cout << dist.b() << std::endl;
|
80 |
-
*
|
81 |
-
* // 13 is printed
|
82 |
-
*
|
83 |
-
* return 0;
|
84 |
-
* }
|
85 |
-
* \endcode
|
86 |
-
*/
|
87 |
-
template<typename IntType = int>
|
88 |
-
class uniform_int_distribution
|
89 |
-
{
|
90 |
-
public:
|
91 |
-
// types
|
92 |
-
|
93 |
-
/*! \typedef result_type
|
94 |
-
* \brief The type of the integer produced by this \p uniform_int_distribution.
|
95 |
-
*/
|
96 |
-
typedef IntType result_type;
|
97 |
-
|
98 |
-
/*! \typedef param_type
|
99 |
-
* \brief The type of the object encapsulating this \p uniform_int_distribution's parameters.
|
100 |
-
*/
|
101 |
-
typedef thrust::pair<IntType,IntType> param_type;
|
102 |
-
|
103 |
-
// constructors and reset functions
|
104 |
-
|
105 |
-
/*! This constructor creates a new \p uniform_int_distribution from two values defining the
|
106 |
-
* range of the distribution.
|
107 |
-
*
|
108 |
-
* \param a The smallest integer to potentially produce. Defaults to \c 0.
|
109 |
-
* \param b The largest integer to potentially produce. Defaults to the largest representable integer in
|
110 |
-
* the platform.
|
111 |
-
*/
|
112 |
-
__host__ __device__
|
113 |
-
explicit uniform_int_distribution(IntType a = 0, IntType b = thrust::detail::integer_traits<IntType>::const_max);
|
114 |
-
|
115 |
-
/*! This constructor creates a new \p uniform_int_distribution from a \p param_type object
|
116 |
-
* encapsulating the range of the distribution.
|
117 |
-
*
|
118 |
-
* \param parm A \p param_type object encapsulating the parameters (i.e., the range) of the distribution.
|
119 |
-
*/
|
120 |
-
__host__ __device__
|
121 |
-
explicit uniform_int_distribution(const param_type &parm);
|
122 |
-
|
123 |
-
/*! This does nothing. It is included to conform to the requirements of the RandomDistribution concept.
|
124 |
-
*/
|
125 |
-
__host__ __device__
|
126 |
-
void reset(void);
|
127 |
-
|
128 |
-
// generating functions
|
129 |
-
|
130 |
-
/*! This method produces a new uniform random integer drawn from this \p uniform_int_distribution's
|
131 |
-
* range using a \p UniformRandomNumberGenerator as a source of randomness.
|
132 |
-
*
|
133 |
-
* \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
|
134 |
-
*/
|
135 |
-
template<typename UniformRandomNumberGenerator>
|
136 |
-
__host__ __device__
|
137 |
-
result_type operator()(UniformRandomNumberGenerator &urng);
|
138 |
-
|
139 |
-
/*! This method produces a new uniform random integer as if by creating a new \p uniform_int_distribution
|
140 |
-
* from the given \p param_type object, and calling its <tt>operator()</tt> method with the given
|
141 |
-
* \p UniformRandomNumberGenerator as a source of randomness.
|
142 |
-
*
|
143 |
-
* \param urng The \p UniformRandomNumberGenerator to use as a source of randomness.
|
144 |
-
* \param parm A \p param_type object encapsulating the parameters of the \p uniform_int_distribution
|
145 |
-
* to draw from.
|
146 |
-
*/
|
147 |
-
template<typename UniformRandomNumberGenerator>
|
148 |
-
__host__ __device__
|
149 |
-
result_type operator()(UniformRandomNumberGenerator &urng, const param_type &parm);
|
150 |
-
|
151 |
-
// property functions
|
152 |
-
|
153 |
-
/*! This method returns the value of the parameter with which this \p uniform_int_distribution
|
154 |
-
* was constructed.
|
155 |
-
*
|
156 |
-
* \return The lower bound of this \p uniform_int_distribution's range.
|
157 |
-
*/
|
158 |
-
__host__ __device__
|
159 |
-
result_type a(void) const;
|
160 |
-
|
161 |
-
/*! This method returns the value of the parameter with which this \p uniform_int_distribution
|
162 |
-
* was constructed.
|
163 |
-
*
|
164 |
-
* \return The upper bound of this \p uniform_int_distribution's range.
|
165 |
-
*/
|
166 |
-
__host__ __device__
|
167 |
-
result_type b(void) const;
|
168 |
-
|
169 |
-
/*! This method returns a \p param_type object encapsulating the parameters with which this
|
170 |
-
* \p uniform_int_distribution was constructed.
|
171 |
-
*
|
172 |
-
* \return A \p param_type object enapsulating the range of this \p uniform_int_distribution.
|
173 |
-
*/
|
174 |
-
__host__ __device__
|
175 |
-
param_type param(void) const;
|
176 |
-
|
177 |
-
/*! This method changes the parameters of this \p uniform_int_distribution using the values encapsulated
|
178 |
-
* in a given \p param_type object.
|
179 |
-
*
|
180 |
-
* \param parm A \p param_type object encapsulating the new range of this \p uniform_int_distribution.
|
181 |
-
*/
|
182 |
-
__host__ __device__
|
183 |
-
void param(const param_type &parm);
|
184 |
-
|
185 |
-
/*! This method returns the smallest integer this \p uniform_int_distribution can potentially produce.
|
186 |
-
*
|
187 |
-
* \return The lower bound of this \p uniform_int_distribution's range.
|
188 |
-
*/
|
189 |
-
__host__ __device__
|
190 |
-
result_type min THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
|
191 |
-
|
192 |
-
/*! This method returns the largest integer this \p uniform_int_distribution can potentially produce.
|
193 |
-
*
|
194 |
-
* \return The upper bound of this \p uniform_int_distribution's range.
|
195 |
-
*/
|
196 |
-
__host__ __device__
|
197 |
-
result_type max THRUST_PREVENT_MACRO_SUBSTITUTION (void) const;
|
198 |
-
|
199 |
-
/*! \cond
|
200 |
-
*/
|
201 |
-
private:
|
202 |
-
param_type m_param;
|
203 |
-
|
204 |
-
friend struct thrust::random::detail::random_core_access;
|
205 |
-
|
206 |
-
__host__ __device__
|
207 |
-
bool equal(const uniform_int_distribution &rhs) const;
|
208 |
-
|
209 |
-
template<typename CharT, typename Traits>
|
210 |
-
std::basic_ostream<CharT,Traits>& stream_out(std::basic_ostream<CharT,Traits> &os) const;
|
211 |
-
|
212 |
-
template<typename CharT, typename Traits>
|
213 |
-
std::basic_istream<CharT,Traits>& stream_in(std::basic_istream<CharT,Traits> &is);
|
214 |
-
/*! \endcond
|
215 |
-
*/
|
216 |
-
}; // end uniform_int_distribution
|
217 |
-
|
218 |
-
|
219 |
-
/*! This function checks two \p uniform_int_distributions for equality.
|
220 |
-
* \param lhs The first \p uniform_int_distribution to test.
|
221 |
-
* \param rhs The second \p uniform_int_distribution to test.
|
222 |
-
* \return \c true if \p lhs is equal to \p rhs; \c false, otherwise.
|
223 |
-
*/
|
224 |
-
template<typename IntType>
|
225 |
-
__host__ __device__
|
226 |
-
bool operator==(const uniform_int_distribution<IntType> &lhs,
|
227 |
-
const uniform_int_distribution<IntType> &rhs);
|
228 |
-
|
229 |
-
|
230 |
-
/*! This function checks two \p uniform_int_distributions for inequality.
|
231 |
-
* \param lhs The first \p uniform_int_distribution to test.
|
232 |
-
* \param rhs The second \p uniform_int_distribution to test.
|
233 |
-
* \return \c true if \p lhs is not equal to \p rhs; \c false, otherwise.
|
234 |
-
*/
|
235 |
-
template<typename IntType>
|
236 |
-
__host__ __device__
|
237 |
-
bool operator!=(const uniform_int_distribution<IntType> &lhs,
|
238 |
-
const uniform_int_distribution<IntType> &rhs);
|
239 |
-
|
240 |
-
|
241 |
-
/*! This function streams a uniform_int_distribution to a \p std::basic_ostream.
|
242 |
-
* \param os The \p basic_ostream to stream out to.
|
243 |
-
* \param d The \p uniform_int_distribution to stream out.
|
244 |
-
* \return \p os
|
245 |
-
*/
|
246 |
-
template<typename IntType,
|
247 |
-
typename CharT, typename Traits>
|
248 |
-
std::basic_ostream<CharT,Traits>&
|
249 |
-
operator<<(std::basic_ostream<CharT,Traits> &os,
|
250 |
-
const uniform_int_distribution<IntType> &d);
|
251 |
-
|
252 |
-
|
253 |
-
/*! This function streams a uniform_int_distribution in from a std::basic_istream.
|
254 |
-
* \param is The \p basic_istream to stream from.
|
255 |
-
* \param d The \p uniform_int_distribution to stream in.
|
256 |
-
* \return \p is
|
257 |
-
*/
|
258 |
-
template<typename IntType,
|
259 |
-
typename CharT, typename Traits>
|
260 |
-
std::basic_istream<CharT,Traits>&
|
261 |
-
operator>>(std::basic_istream<CharT,Traits> &is,
|
262 |
-
uniform_int_distribution<IntType> &d);
|
263 |
-
|
264 |
-
|
265 |
-
/*! \} // end random_number_distributions
|
266 |
-
*/
|
267 |
-
|
268 |
-
|
269 |
-
} // end random
|
270 |
-
|
271 |
-
using random::uniform_int_distribution;
|
272 |
-
|
273 |
-
} // end thrust
|
274 |
-
|
275 |
-
#include <thrust/random/detail/uniform_int_distribution.inl>
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/system/detail/generic/reduce_by_key.h
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Copyright 2008-2013 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 |
-
|
18 |
-
#pragma once
|
19 |
-
|
20 |
-
#include <thrust/detail/config.h>
|
21 |
-
#include <thrust/system/detail/generic/tag.h>
|
22 |
-
#include <thrust/iterator/iterator_traits.h>
|
23 |
-
|
24 |
-
namespace thrust
|
25 |
-
{
|
26 |
-
namespace system
|
27 |
-
{
|
28 |
-
namespace detail
|
29 |
-
{
|
30 |
-
namespace generic
|
31 |
-
{
|
32 |
-
|
33 |
-
|
34 |
-
template<typename DerivedPolicy,
|
35 |
-
typename InputIterator1,
|
36 |
-
typename InputIterator2,
|
37 |
-
typename OutputIterator1,
|
38 |
-
typename OutputIterator2>
|
39 |
-
__host__ __device__
|
40 |
-
thrust::pair<OutputIterator1,OutputIterator2>
|
41 |
-
reduce_by_key(thrust::execution_policy<DerivedPolicy> &exec,
|
42 |
-
InputIterator1 keys_first,
|
43 |
-
InputIterator1 keys_last,
|
44 |
-
InputIterator2 values_first,
|
45 |
-
OutputIterator1 keys_output,
|
46 |
-
OutputIterator2 values_output);
|
47 |
-
|
48 |
-
template<typename DerivedPolicy,
|
49 |
-
typename InputIterator1,
|
50 |
-
typename InputIterator2,
|
51 |
-
typename OutputIterator1,
|
52 |
-
typename OutputIterator2,
|
53 |
-
typename BinaryPredicate>
|
54 |
-
__host__ __device__
|
55 |
-
thrust::pair<OutputIterator1,OutputIterator2>
|
56 |
-
reduce_by_key(thrust::execution_policy<DerivedPolicy> &exec,
|
57 |
-
InputIterator1 keys_first,
|
58 |
-
InputIterator1 keys_last,
|
59 |
-
InputIterator2 values_first,
|
60 |
-
OutputIterator1 keys_output,
|
61 |
-
OutputIterator2 values_output,
|
62 |
-
BinaryPredicate binary_pred);
|
63 |
-
|
64 |
-
template<typename DerivedPolicy,
|
65 |
-
typename InputIterator1,
|
66 |
-
typename InputIterator2,
|
67 |
-
typename OutputIterator1,
|
68 |
-
typename OutputIterator2,
|
69 |
-
typename BinaryPredicate,
|
70 |
-
typename BinaryFunction>
|
71 |
-
__host__ __device__
|
72 |
-
thrust::pair<OutputIterator1,OutputIterator2>
|
73 |
-
reduce_by_key(thrust::execution_policy<DerivedPolicy> &exec,
|
74 |
-
InputIterator1 keys_first,
|
75 |
-
InputIterator1 keys_last,
|
76 |
-
InputIterator2 values_first,
|
77 |
-
OutputIterator1 keys_output,
|
78 |
-
OutputIterator2 values_output,
|
79 |
-
BinaryPredicate binary_pred,
|
80 |
-
BinaryFunction binary_op);
|
81 |
-
|
82 |
-
|
83 |
-
} // end namespace generic
|
84 |
-
} // end namespace detail
|
85 |
-
} // end namespace system
|
86 |
-
} // end namespace thrust
|
87 |
-
|
88 |
-
#include <thrust/system/detail/generic/reduce_by_key.inl>
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/drawings-to-human/static/_app/immutable/chunks/paths-d3bcbd10.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{E as f,s as p}from"./index-bcf2726a.js";const n=[];function _(t,b=f){let o;const i=new Set;function r(e){if(p(t,e)&&(t=e,o)){const c=!n.length;for(const s of i)s[1](),n.push(s,t);if(c){for(let s=0;s<n.length;s+=2)n[s][0](n[s+1]);n.length=0}}}function a(e){r(e(t))}function l(e,c=f){const s=[e,c];return i.add(s),i.size===1&&(o=b(r)||f),e(t),()=>{i.delete(s),i.size===0&&(o(),o=null)}}return{set:r,update:a,subscribe:l}}let u="",d="";function g(t){u=t.base,d=t.assets||u}export{d as a,u as b,g as s,_ as w};
|
|
|
|
spaces/Caoyunkang/Segment-Any-Anomaly/SAM/linter.sh
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
#!/bin/bash -e
|
2 |
-
# Copyright (c) Facebook, Inc. and its affiliates.
|
3 |
-
|
4 |
-
{
|
5 |
-
black --version | grep -E "23\." > /dev/null
|
6 |
-
} || {
|
7 |
-
echo "Linter requires 'black==23.*' !"
|
8 |
-
exit 1
|
9 |
-
}
|
10 |
-
|
11 |
-
ISORT_VERSION=$(isort --version-number)
|
12 |
-
if [[ "$ISORT_VERSION" != 5.12* ]]; then
|
13 |
-
echo "Linter requires isort==5.12.0 !"
|
14 |
-
exit 1
|
15 |
-
fi
|
16 |
-
|
17 |
-
echo "Running isort ..."
|
18 |
-
isort . --atomic
|
19 |
-
|
20 |
-
echo "Running black ..."
|
21 |
-
black -l 100 .
|
22 |
-
|
23 |
-
echo "Running flake8 ..."
|
24 |
-
if [ -x "$(command -v flake8)" ]; then
|
25 |
-
flake8 .
|
26 |
-
else
|
27 |
-
python3 -m flake8 .
|
28 |
-
fi
|
29 |
-
|
30 |
-
echo "Running mypy..."
|
31 |
-
|
32 |
-
mypy --exclude 'setup.py|notebooks' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ChristopherMarais/Andrew_AI-BB_classification-beta/mysite/mysite/wsgi.py
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
"""
|
2 |
-
WSGI config for mysite project.
|
3 |
-
|
4 |
-
It exposes the WSGI callable as a module-level variable named ``application``.
|
5 |
-
|
6 |
-
For more information on this file, see
|
7 |
-
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
|
8 |
-
"""
|
9 |
-
|
10 |
-
import os
|
11 |
-
|
12 |
-
from django.core.wsgi import get_wsgi_application
|
13 |
-
|
14 |
-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
|
15 |
-
|
16 |
-
application = get_wsgi_application()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Cyril666/my_abi/tools/create_lmdb_dataset.py
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
""" a modified version of CRNN torch repository https://github.com/bgshih/crnn/blob/master/tool/create_dataset.py """
|
2 |
-
|
3 |
-
import fire
|
4 |
-
import os
|
5 |
-
import lmdb
|
6 |
-
import cv2
|
7 |
-
|
8 |
-
import numpy as np
|
9 |
-
|
10 |
-
|
11 |
-
def checkImageIsValid(imageBin):
|
12 |
-
if imageBin is None:
|
13 |
-
return False
|
14 |
-
imageBuf = np.frombuffer(imageBin, dtype=np.uint8)
|
15 |
-
img = cv2.imdecode(imageBuf, cv2.IMREAD_GRAYSCALE)
|
16 |
-
imgH, imgW = img.shape[0], img.shape[1]
|
17 |
-
if imgH * imgW == 0:
|
18 |
-
return False
|
19 |
-
return True
|
20 |
-
|
21 |
-
|
22 |
-
def writeCache(env, cache):
|
23 |
-
with env.begin(write=True) as txn:
|
24 |
-
for k, v in cache.items():
|
25 |
-
txn.put(k, v)
|
26 |
-
|
27 |
-
|
28 |
-
def createDataset(inputPath, gtFile, outputPath, checkValid=True):
|
29 |
-
"""
|
30 |
-
Create LMDB dataset for training and evaluation.
|
31 |
-
ARGS:
|
32 |
-
inputPath : input folder path where starts imagePath
|
33 |
-
outputPath : LMDB output path
|
34 |
-
gtFile : list of image path and label
|
35 |
-
checkValid : if true, check the validity of every image
|
36 |
-
"""
|
37 |
-
os.makedirs(outputPath, exist_ok=True)
|
38 |
-
env = lmdb.open(outputPath, map_size=1099511627776)
|
39 |
-
cache = {}
|
40 |
-
cnt = 1
|
41 |
-
|
42 |
-
with open(gtFile, 'r', encoding='utf-8') as data:
|
43 |
-
datalist = data.readlines()
|
44 |
-
|
45 |
-
nSamples = len(datalist)
|
46 |
-
for i in range(nSamples):
|
47 |
-
imagePath, label = datalist[i].strip('\n').split('\t')
|
48 |
-
imagePath = os.path.join(inputPath, imagePath)
|
49 |
-
|
50 |
-
# # only use alphanumeric data
|
51 |
-
# if re.search('[^a-zA-Z0-9]', label):
|
52 |
-
# continue
|
53 |
-
|
54 |
-
if not os.path.exists(imagePath):
|
55 |
-
print('%s does not exist' % imagePath)
|
56 |
-
continue
|
57 |
-
with open(imagePath, 'rb') as f:
|
58 |
-
imageBin = f.read()
|
59 |
-
if checkValid:
|
60 |
-
try:
|
61 |
-
if not checkImageIsValid(imageBin):
|
62 |
-
print('%s is not a valid image' % imagePath)
|
63 |
-
continue
|
64 |
-
except:
|
65 |
-
print('error occured', i)
|
66 |
-
with open(outputPath + '/error_image_log.txt', 'a') as log:
|
67 |
-
log.write('%s-th image data occured error\n' % str(i))
|
68 |
-
continue
|
69 |
-
|
70 |
-
imageKey = 'image-%09d'.encode() % cnt
|
71 |
-
labelKey = 'label-%09d'.encode() % cnt
|
72 |
-
cache[imageKey] = imageBin
|
73 |
-
cache[labelKey] = label.encode()
|
74 |
-
|
75 |
-
if cnt % 1000 == 0:
|
76 |
-
writeCache(env, cache)
|
77 |
-
cache = {}
|
78 |
-
print('Written %d / %d' % (cnt, nSamples))
|
79 |
-
cnt += 1
|
80 |
-
nSamples = cnt-1
|
81 |
-
cache['num-samples'.encode()] = str(nSamples).encode()
|
82 |
-
writeCache(env, cache)
|
83 |
-
print('Created dataset with %d samples' % nSamples)
|
84 |
-
|
85 |
-
|
86 |
-
if __name__ == '__main__':
|
87 |
-
fire.Fire(createDataset)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DJQmUKV/rvc-inference/README.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: RVC Inference
|
3 |
-
emoji: 🎙
|
4 |
-
colorFrom: pink
|
5 |
-
colorTo: green
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.28.3
|
8 |
-
app_file: app_multi.py
|
9 |
-
pinned: false
|
10 |
-
license: mit
|
11 |
-
---
|
12 |
-
Great Value RVC models, quality and accuracy not guaranteed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DJQmUKV/rvc-inference/app_multi.py
DELETED
@@ -1,509 +0,0 @@
|
|
1 |
-
from typing import Union
|
2 |
-
|
3 |
-
from argparse import ArgumentParser
|
4 |
-
|
5 |
-
import asyncio
|
6 |
-
import json
|
7 |
-
import hashlib
|
8 |
-
from os import path, getenv
|
9 |
-
|
10 |
-
import gradio as gr
|
11 |
-
|
12 |
-
import torch
|
13 |
-
|
14 |
-
import numpy as np
|
15 |
-
import librosa
|
16 |
-
|
17 |
-
import edge_tts
|
18 |
-
|
19 |
-
import config
|
20 |
-
import util
|
21 |
-
from infer_pack.models import (
|
22 |
-
SynthesizerTrnMs256NSFsid,
|
23 |
-
SynthesizerTrnMs256NSFsid_nono,
|
24 |
-
SynthesizerTrnMs768NSFsid,
|
25 |
-
SynthesizerTrnMs768NSFsid_nono
|
26 |
-
)
|
27 |
-
from vc_infer_pipeline import VC
|
28 |
-
|
29 |
-
|
30 |
-
# Reference: https://huggingface.co/spaces/zomehwh/rvc-models/blob/main/app.py#L21 # noqa
|
31 |
-
in_hf_space = getenv('SYSTEM') == 'spaces'
|
32 |
-
|
33 |
-
# Argument parsing
|
34 |
-
arg_parser = ArgumentParser()
|
35 |
-
arg_parser.add_argument(
|
36 |
-
'--hubert',
|
37 |
-
default=getenv('RVC_HUBERT', 'hubert_base.pt'),
|
38 |
-
help='path to hubert base model (default: hubert_base.pt)'
|
39 |
-
)
|
40 |
-
arg_parser.add_argument(
|
41 |
-
'--config',
|
42 |
-
default=getenv('RVC_MULTI_CFG', 'multi_config.json'),
|
43 |
-
help='path to config file (default: multi_config.json)'
|
44 |
-
)
|
45 |
-
arg_parser.add_argument(
|
46 |
-
'--bind',
|
47 |
-
default=getenv('RVC_LISTEN_ADDR', '127.0.0.1'),
|
48 |
-
help='gradio server listen address (default: 127.0.0.1)'
|
49 |
-
)
|
50 |
-
arg_parser.add_argument(
|
51 |
-
'--port',
|
52 |
-
default=getenv('RVC_LISTEN_PORT', '7860'),
|
53 |
-
type=int,
|
54 |
-
help='gradio server listen port (default: 7860)'
|
55 |
-
)
|
56 |
-
arg_parser.add_argument(
|
57 |
-
'--share',
|
58 |
-
action='store_true',
|
59 |
-
help='let gradio create a public link for you'
|
60 |
-
)
|
61 |
-
arg_parser.add_argument(
|
62 |
-
'--api',
|
63 |
-
action='store_true',
|
64 |
-
help='enable api endpoint'
|
65 |
-
)
|
66 |
-
arg_parser.add_argument(
|
67 |
-
'--cache-examples',
|
68 |
-
action='store_true',
|
69 |
-
help='enable example caching, please remember delete gradio_cached_examples folder when example config has been modified' # noqa
|
70 |
-
)
|
71 |
-
args = arg_parser.parse_args()
|
72 |
-
|
73 |
-
app_css = '''
|
74 |
-
#model_info img {
|
75 |
-
max-width: 100px;
|
76 |
-
max-height: 100px;
|
77 |
-
float: right;
|
78 |
-
}
|
79 |
-
|
80 |
-
#model_info p {
|
81 |
-
margin: unset;
|
82 |
-
}
|
83 |
-
'''
|
84 |
-
|
85 |
-
app = gr.Blocks(
|
86 |
-
theme=gr.themes.Glass(),
|
87 |
-
css=app_css,
|
88 |
-
analytics_enabled=False
|
89 |
-
)
|
90 |
-
|
91 |
-
# Load hubert model
|
92 |
-
hubert_model = util.load_hubert_model(config.device, args.hubert)
|
93 |
-
hubert_model.eval()
|
94 |
-
|
95 |
-
# Load models
|
96 |
-
multi_cfg = json.load(open(args.config, 'r'))
|
97 |
-
loaded_models = []
|
98 |
-
|
99 |
-
for model_name in multi_cfg.get('models'):
|
100 |
-
print(f'Loading model: {model_name}')
|
101 |
-
|
102 |
-
# Load model info
|
103 |
-
model_info = json.load(
|
104 |
-
open(path.join('model', model_name, 'config.json'), 'r')
|
105 |
-
)
|
106 |
-
|
107 |
-
# Load RVC checkpoint
|
108 |
-
cpt = torch.load(
|
109 |
-
path.join('model', model_name, model_info['model']),
|
110 |
-
map_location='cpu'
|
111 |
-
)
|
112 |
-
tgt_sr = cpt['config'][-1]
|
113 |
-
cpt['config'][-3] = cpt['weight']['emb_g.weight'].shape[0] # n_spk
|
114 |
-
|
115 |
-
cpt_version = cpt.get('version', 'v1')
|
116 |
-
print(f'Model version: {cpt_version}')
|
117 |
-
|
118 |
-
if_f0 = cpt.get('f0', 1)
|
119 |
-
|
120 |
-
net_g: Union[
|
121 |
-
SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono,
|
122 |
-
SynthesizerTrnMs768NSFsid, SynthesizerTrnMs768NSFsid_nono
|
123 |
-
]
|
124 |
-
|
125 |
-
if if_f0 == 1:
|
126 |
-
if cpt_version == 'v2':
|
127 |
-
net_g = SynthesizerTrnMs768NSFsid(
|
128 |
-
*cpt['config'],
|
129 |
-
is_half=config.is_half
|
130 |
-
)
|
131 |
-
else:
|
132 |
-
net_g = SynthesizerTrnMs256NSFsid(
|
133 |
-
*cpt['config'],
|
134 |
-
is_half=config.is_half
|
135 |
-
)
|
136 |
-
else:
|
137 |
-
if cpt_version == 'v2':
|
138 |
-
net_g = SynthesizerTrnMs768NSFsid_nono(*cpt['config'])
|
139 |
-
else:
|
140 |
-
net_g = SynthesizerTrnMs256NSFsid_nono(*cpt['config'])
|
141 |
-
|
142 |
-
del net_g.enc_q
|
143 |
-
|
144 |
-
# According to original code, this thing seems necessary.
|
145 |
-
print(net_g.load_state_dict(cpt['weight'], strict=False))
|
146 |
-
|
147 |
-
net_g.eval().to(config.device)
|
148 |
-
net_g = net_g.half() if util.is_half(config.device) else net_g.float()
|
149 |
-
|
150 |
-
vc = VC(tgt_sr, config)
|
151 |
-
|
152 |
-
loaded_models.append(dict(
|
153 |
-
name=model_name,
|
154 |
-
metadata=model_info,
|
155 |
-
vc=vc,
|
156 |
-
net_g=net_g,
|
157 |
-
if_f0=if_f0,
|
158 |
-
target_sr=tgt_sr,
|
159 |
-
version=cpt_version
|
160 |
-
))
|
161 |
-
|
162 |
-
print(f'Models loaded: {len(loaded_models)}')
|
163 |
-
|
164 |
-
# Edge TTS speakers
|
165 |
-
tts_speakers_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices()) # noqa
|
166 |
-
|
167 |
-
|
168 |
-
# https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI/blob/main/infer-web.py#L118 # noqa
|
169 |
-
def vc_func(
|
170 |
-
input_audio, model_index, pitch_adjust, f0_method, feat_ratio,
|
171 |
-
filter_radius, rms_mix_rate, resample_option
|
172 |
-
):
|
173 |
-
if input_audio is None:
|
174 |
-
return (None, 'Please provide input audio.')
|
175 |
-
|
176 |
-
if model_index is None:
|
177 |
-
return (None, 'Please select a model.')
|
178 |
-
|
179 |
-
model = loaded_models[model_index]
|
180 |
-
|
181 |
-
# Reference: so-vits
|
182 |
-
(audio_samp, audio_npy) = input_audio
|
183 |
-
|
184 |
-
# https://huggingface.co/spaces/zomehwh/rvc-models/blob/main/app.py#L49
|
185 |
-
if (audio_npy.shape[0] / audio_samp) > 30 and in_hf_space:
|
186 |
-
return (None, 'Input audio is longer than 30 secs.')
|
187 |
-
|
188 |
-
# Bloody hell: https://stackoverflow.com/questions/26921836/
|
189 |
-
if audio_npy.dtype != np.float32: # :thonk:
|
190 |
-
audio_npy = (
|
191 |
-
audio_npy / np.iinfo(audio_npy.dtype).max
|
192 |
-
).astype(np.float32)
|
193 |
-
|
194 |
-
if len(audio_npy.shape) > 1:
|
195 |
-
audio_npy = librosa.to_mono(audio_npy.transpose(1, 0))
|
196 |
-
|
197 |
-
if audio_samp != 16000:
|
198 |
-
audio_npy = librosa.resample(
|
199 |
-
audio_npy,
|
200 |
-
orig_sr=audio_samp,
|
201 |
-
target_sr=16000
|
202 |
-
)
|
203 |
-
|
204 |
-
pitch_int = int(pitch_adjust)
|
205 |
-
|
206 |
-
resample = (
|
207 |
-
0 if resample_option == 'Disable resampling'
|
208 |
-
else int(resample_option)
|
209 |
-
)
|
210 |
-
|
211 |
-
times = [0, 0, 0]
|
212 |
-
|
213 |
-
checksum = hashlib.sha512()
|
214 |
-
checksum.update(audio_npy.tobytes())
|
215 |
-
|
216 |
-
output_audio = model['vc'].pipeline(
|
217 |
-
hubert_model,
|
218 |
-
model['net_g'],
|
219 |
-
model['metadata'].get('speaker_id', 0),
|
220 |
-
audio_npy,
|
221 |
-
checksum.hexdigest(),
|
222 |
-
times,
|
223 |
-
pitch_int,
|
224 |
-
f0_method,
|
225 |
-
path.join('model', model['name'], model['metadata']['feat_index']),
|
226 |
-
feat_ratio,
|
227 |
-
model['if_f0'],
|
228 |
-
filter_radius,
|
229 |
-
model['target_sr'],
|
230 |
-
resample,
|
231 |
-
rms_mix_rate,
|
232 |
-
model['version']
|
233 |
-
)
|
234 |
-
|
235 |
-
out_sr = (
|
236 |
-
resample if resample >= 16000 and model['target_sr'] != resample
|
237 |
-
else model['target_sr']
|
238 |
-
)
|
239 |
-
|
240 |
-
print(f'npy: {times[0]}s, f0: {times[1]}s, infer: {times[2]}s')
|
241 |
-
return ((out_sr, output_audio), 'Success')
|
242 |
-
|
243 |
-
|
244 |
-
async def edge_tts_vc_func(
|
245 |
-
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio,
|
246 |
-
filter_radius, rms_mix_rate, resample_option
|
247 |
-
):
|
248 |
-
if input_text is None:
|
249 |
-
return (None, 'Please provide TTS text.')
|
250 |
-
|
251 |
-
if tts_speaker is None:
|
252 |
-
return (None, 'Please select TTS speaker.')
|
253 |
-
|
254 |
-
if model_index is None:
|
255 |
-
return (None, 'Please select a model.')
|
256 |
-
|
257 |
-
speaker = tts_speakers_list[tts_speaker]['ShortName']
|
258 |
-
(tts_np, tts_sr) = await util.call_edge_tts(speaker, input_text)
|
259 |
-
return vc_func(
|
260 |
-
(tts_sr, tts_np),
|
261 |
-
model_index,
|
262 |
-
pitch_adjust,
|
263 |
-
f0_method,
|
264 |
-
feat_ratio,
|
265 |
-
filter_radius,
|
266 |
-
rms_mix_rate,
|
267 |
-
resample_option
|
268 |
-
)
|
269 |
-
|
270 |
-
|
271 |
-
def update_model_info(model_index):
|
272 |
-
if model_index is None:
|
273 |
-
return str(
|
274 |
-
'### Model info\n'
|
275 |
-
'Please select a model from dropdown above.'
|
276 |
-
)
|
277 |
-
|
278 |
-
model = loaded_models[model_index]
|
279 |
-
model_icon = model['metadata'].get('icon', '')
|
280 |
-
|
281 |
-
return str(
|
282 |
-
'### Model info\n'
|
283 |
-
''
|
284 |
-
'**{name}**\n\n'
|
285 |
-
'Author: {author}\n\n'
|
286 |
-
'Source: {source}\n\n'
|
287 |
-
'{note}'
|
288 |
-
).format(
|
289 |
-
name=model['metadata'].get('name'),
|
290 |
-
author=model['metadata'].get('author', 'Anonymous'),
|
291 |
-
source=model['metadata'].get('source', 'Unknown'),
|
292 |
-
note=model['metadata'].get('note', ''),
|
293 |
-
icon=(
|
294 |
-
model_icon
|
295 |
-
if model_icon.startswith(('http://', 'https://'))
|
296 |
-
else '/file/model/%s/%s' % (model['name'], model_icon)
|
297 |
-
)
|
298 |
-
)
|
299 |
-
|
300 |
-
|
301 |
-
def _example_vc(
|
302 |
-
input_audio, model_index, pitch_adjust, f0_method, feat_ratio,
|
303 |
-
filter_radius, rms_mix_rate, resample_option
|
304 |
-
):
|
305 |
-
(audio, message) = vc_func(
|
306 |
-
input_audio, model_index, pitch_adjust, f0_method, feat_ratio,
|
307 |
-
filter_radius, rms_mix_rate, resample_option
|
308 |
-
)
|
309 |
-
return (
|
310 |
-
audio,
|
311 |
-
message,
|
312 |
-
update_model_info(model_index)
|
313 |
-
)
|
314 |
-
|
315 |
-
|
316 |
-
async def _example_edge_tts(
|
317 |
-
input_text, model_index, tts_speaker, pitch_adjust, f0_method, feat_ratio,
|
318 |
-
filter_radius, rms_mix_rate, resample_option
|
319 |
-
):
|
320 |
-
(audio, message) = await edge_tts_vc_func(
|
321 |
-
input_text, model_index, tts_speaker, pitch_adjust, f0_method,
|
322 |
-
feat_ratio, filter_radius, rms_mix_rate, resample_option
|
323 |
-
)
|
324 |
-
return (
|
325 |
-
audio,
|
326 |
-
message,
|
327 |
-
update_model_info(model_index)
|
328 |
-
)
|
329 |
-
|
330 |
-
|
331 |
-
with app:
|
332 |
-
gr.Markdown(
|
333 |
-
'## Simple, Stupid RVC Inference WebUI\n'
|
334 |
-
'Another RVC inference WebUI based on [RVC-WebUI](https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI), ' # noqa
|
335 |
-
'some code and features inspired from so-vits and [zomehwh/rvc-models](https://huggingface.co/spaces/zomehwh/rvc-models).\n' # noqa
|
336 |
-
)
|
337 |
-
|
338 |
-
with gr.Row():
|
339 |
-
with gr.Column():
|
340 |
-
with gr.Tab('Audio conversion'):
|
341 |
-
input_audio = gr.Audio(label='Input audio')
|
342 |
-
|
343 |
-
vc_convert_btn = gr.Button('Convert', variant='primary')
|
344 |
-
|
345 |
-
with gr.Tab('TTS conversion'):
|
346 |
-
tts_input = gr.TextArea(
|
347 |
-
label='TTS input text'
|
348 |
-
)
|
349 |
-
tts_speaker = gr.Dropdown(
|
350 |
-
[
|
351 |
-
'%s (%s)' % (
|
352 |
-
s['FriendlyName'],
|
353 |
-
s['Gender']
|
354 |
-
)
|
355 |
-
for s in tts_speakers_list
|
356 |
-
],
|
357 |
-
label='TTS speaker',
|
358 |
-
type='index'
|
359 |
-
)
|
360 |
-
|
361 |
-
tts_convert_btn = gr.Button('Convert', variant='primary')
|
362 |
-
|
363 |
-
pitch_adjust = gr.Slider(
|
364 |
-
label='Pitch',
|
365 |
-
minimum=-24,
|
366 |
-
maximum=24,
|
367 |
-
step=1,
|
368 |
-
value=0
|
369 |
-
)
|
370 |
-
f0_method = gr.Radio(
|
371 |
-
label='f0 methods',
|
372 |
-
choices=['pm', 'harvest'],
|
373 |
-
value='pm',
|
374 |
-
interactive=True
|
375 |
-
)
|
376 |
-
|
377 |
-
with gr.Accordion('Advanced options', open=False):
|
378 |
-
feat_ratio = gr.Slider(
|
379 |
-
label='Feature ratio',
|
380 |
-
minimum=0,
|
381 |
-
maximum=1,
|
382 |
-
step=0.1,
|
383 |
-
value=0.6
|
384 |
-
)
|
385 |
-
filter_radius = gr.Slider(
|
386 |
-
label='Filter radius',
|
387 |
-
minimum=0,
|
388 |
-
maximum=7,
|
389 |
-
step=1,
|
390 |
-
value=3
|
391 |
-
)
|
392 |
-
rms_mix_rate = gr.Slider(
|
393 |
-
label='Volume envelope mix rate',
|
394 |
-
minimum=0,
|
395 |
-
maximum=1,
|
396 |
-
step=0.1,
|
397 |
-
value=1
|
398 |
-
)
|
399 |
-
resample_rate = gr.Dropdown(
|
400 |
-
[
|
401 |
-
'Disable resampling',
|
402 |
-
'16000',
|
403 |
-
'22050',
|
404 |
-
'44100',
|
405 |
-
'48000'
|
406 |
-
],
|
407 |
-
label='Resample rate',
|
408 |
-
value='Disable resampling'
|
409 |
-
)
|
410 |
-
|
411 |
-
with gr.Column():
|
412 |
-
# Model select
|
413 |
-
model_index = gr.Dropdown(
|
414 |
-
[
|
415 |
-
'%s - %s' % (
|
416 |
-
m['metadata'].get('source', 'Unknown'),
|
417 |
-
m['metadata'].get('name')
|
418 |
-
)
|
419 |
-
for m in loaded_models
|
420 |
-
],
|
421 |
-
label='Model',
|
422 |
-
type='index'
|
423 |
-
)
|
424 |
-
|
425 |
-
# Model info
|
426 |
-
with gr.Box():
|
427 |
-
model_info = gr.Markdown(
|
428 |
-
'### Model info\n'
|
429 |
-
'Please select a model from dropdown above.',
|
430 |
-
elem_id='model_info'
|
431 |
-
)
|
432 |
-
|
433 |
-
output_audio = gr.Audio(label='Output audio')
|
434 |
-
output_msg = gr.Textbox(label='Output message')
|
435 |
-
|
436 |
-
multi_examples = multi_cfg.get('examples')
|
437 |
-
if (
|
438 |
-
multi_examples and
|
439 |
-
multi_examples.get('vc') and multi_examples.get('tts_vc')
|
440 |
-
):
|
441 |
-
with gr.Accordion('Sweet sweet examples', open=False):
|
442 |
-
with gr.Row():
|
443 |
-
# VC Example
|
444 |
-
if multi_examples.get('vc'):
|
445 |
-
gr.Examples(
|
446 |
-
label='Audio conversion examples',
|
447 |
-
examples=multi_examples.get('vc'),
|
448 |
-
inputs=[
|
449 |
-
input_audio, model_index, pitch_adjust, f0_method,
|
450 |
-
feat_ratio
|
451 |
-
],
|
452 |
-
outputs=[output_audio, output_msg, model_info],
|
453 |
-
fn=_example_vc,
|
454 |
-
cache_examples=args.cache_examples,
|
455 |
-
run_on_click=args.cache_examples
|
456 |
-
)
|
457 |
-
|
458 |
-
# Edge TTS Example
|
459 |
-
if multi_examples.get('tts_vc'):
|
460 |
-
gr.Examples(
|
461 |
-
label='TTS conversion examples',
|
462 |
-
examples=multi_examples.get('tts_vc'),
|
463 |
-
inputs=[
|
464 |
-
tts_input, model_index, tts_speaker, pitch_adjust,
|
465 |
-
f0_method, feat_ratio
|
466 |
-
],
|
467 |
-
outputs=[output_audio, output_msg, model_info],
|
468 |
-
fn=_example_edge_tts,
|
469 |
-
cache_examples=args.cache_examples,
|
470 |
-
run_on_click=args.cache_examples
|
471 |
-
)
|
472 |
-
|
473 |
-
vc_convert_btn.click(
|
474 |
-
vc_func,
|
475 |
-
[
|
476 |
-
input_audio, model_index, pitch_adjust, f0_method, feat_ratio,
|
477 |
-
filter_radius, rms_mix_rate, resample_rate
|
478 |
-
],
|
479 |
-
[output_audio, output_msg],
|
480 |
-
api_name='audio_conversion'
|
481 |
-
)
|
482 |
-
|
483 |
-
tts_convert_btn.click(
|
484 |
-
edge_tts_vc_func,
|
485 |
-
[
|
486 |
-
tts_input, model_index, tts_speaker, pitch_adjust, f0_method,
|
487 |
-
feat_ratio, filter_radius, rms_mix_rate, resample_rate
|
488 |
-
],
|
489 |
-
[output_audio, output_msg],
|
490 |
-
api_name='tts_conversion'
|
491 |
-
)
|
492 |
-
|
493 |
-
model_index.change(
|
494 |
-
update_model_info,
|
495 |
-
inputs=[model_index],
|
496 |
-
outputs=[model_info],
|
497 |
-
show_progress=False,
|
498 |
-
queue=False
|
499 |
-
)
|
500 |
-
|
501 |
-
app.queue(
|
502 |
-
concurrency_count=1,
|
503 |
-
max_size=20,
|
504 |
-
api_open=args.api
|
505 |
-
).launch(
|
506 |
-
server_name=args.bind,
|
507 |
-
server_port=args.port,
|
508 |
-
share=args.share
|
509 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/altair/__init__.py
DELETED
@@ -1,613 +0,0 @@
|
|
1 |
-
# ruff: noqa
|
2 |
-
__version__ = "5.0.1"
|
3 |
-
|
4 |
-
from typing import Any
|
5 |
-
|
6 |
-
# Necessary as mypy would see expr as the module alt.expr although due to how
|
7 |
-
# the imports are set up it is expr in the alt.expr module
|
8 |
-
expr: Any
|
9 |
-
|
10 |
-
|
11 |
-
# The content of __all__ is automatically written by
|
12 |
-
# tools/update_init_file.py. Do not modify directly.
|
13 |
-
__all__ = [
|
14 |
-
"Aggregate",
|
15 |
-
"AggregateOp",
|
16 |
-
"AggregateTransform",
|
17 |
-
"AggregatedFieldDef",
|
18 |
-
"Align",
|
19 |
-
"AllSortString",
|
20 |
-
"Angle",
|
21 |
-
"AngleDatum",
|
22 |
-
"AngleValue",
|
23 |
-
"AnyMark",
|
24 |
-
"AnyMarkConfig",
|
25 |
-
"AreaConfig",
|
26 |
-
"ArgmaxDef",
|
27 |
-
"ArgminDef",
|
28 |
-
"AutoSizeParams",
|
29 |
-
"AutosizeType",
|
30 |
-
"Axis",
|
31 |
-
"AxisConfig",
|
32 |
-
"AxisOrient",
|
33 |
-
"AxisResolveMap",
|
34 |
-
"BBox",
|
35 |
-
"BarConfig",
|
36 |
-
"BaseTitleNoValueRefs",
|
37 |
-
"Baseline",
|
38 |
-
"Bin",
|
39 |
-
"BinExtent",
|
40 |
-
"BinParams",
|
41 |
-
"BinTransform",
|
42 |
-
"BindCheckbox",
|
43 |
-
"BindDirect",
|
44 |
-
"BindInput",
|
45 |
-
"BindRadioSelect",
|
46 |
-
"BindRange",
|
47 |
-
"Binding",
|
48 |
-
"Blend",
|
49 |
-
"BoxPlot",
|
50 |
-
"BoxPlotConfig",
|
51 |
-
"BoxPlotDef",
|
52 |
-
"BrushConfig",
|
53 |
-
"CalculateTransform",
|
54 |
-
"Categorical",
|
55 |
-
"Chart",
|
56 |
-
"Color",
|
57 |
-
"ColorDatum",
|
58 |
-
"ColorDef",
|
59 |
-
"ColorName",
|
60 |
-
"ColorScheme",
|
61 |
-
"ColorValue",
|
62 |
-
"Column",
|
63 |
-
"CompositeMark",
|
64 |
-
"CompositeMarkDef",
|
65 |
-
"CompositionConfig",
|
66 |
-
"ConcatChart",
|
67 |
-
"ConcatSpecGenericSpec",
|
68 |
-
"ConditionalAxisColor",
|
69 |
-
"ConditionalAxisLabelAlign",
|
70 |
-
"ConditionalAxisLabelBaseline",
|
71 |
-
"ConditionalAxisLabelFontStyle",
|
72 |
-
"ConditionalAxisLabelFontWeight",
|
73 |
-
"ConditionalAxisNumber",
|
74 |
-
"ConditionalAxisNumberArray",
|
75 |
-
"ConditionalAxisPropertyAlignnull",
|
76 |
-
"ConditionalAxisPropertyColornull",
|
77 |
-
"ConditionalAxisPropertyFontStylenull",
|
78 |
-
"ConditionalAxisPropertyFontWeightnull",
|
79 |
-
"ConditionalAxisPropertyTextBaselinenull",
|
80 |
-
"ConditionalAxisPropertynumberArraynull",
|
81 |
-
"ConditionalAxisPropertynumbernull",
|
82 |
-
"ConditionalAxisPropertystringnull",
|
83 |
-
"ConditionalAxisString",
|
84 |
-
"ConditionalMarkPropFieldOrDatumDef",
|
85 |
-
"ConditionalMarkPropFieldOrDatumDefTypeForShape",
|
86 |
-
"ConditionalParameterMarkPropFieldOrDatumDef",
|
87 |
-
"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape",
|
88 |
-
"ConditionalParameterStringFieldDef",
|
89 |
-
"ConditionalParameterValueDefGradientstringnullExprRef",
|
90 |
-
"ConditionalParameterValueDefTextExprRef",
|
91 |
-
"ConditionalParameterValueDefnumber",
|
92 |
-
"ConditionalParameterValueDefnumberArrayExprRef",
|
93 |
-
"ConditionalParameterValueDefnumberExprRef",
|
94 |
-
"ConditionalParameterValueDefstringExprRef",
|
95 |
-
"ConditionalParameterValueDefstringnullExprRef",
|
96 |
-
"ConditionalPredicateMarkPropFieldOrDatumDef",
|
97 |
-
"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape",
|
98 |
-
"ConditionalPredicateStringFieldDef",
|
99 |
-
"ConditionalPredicateValueDefAlignnullExprRef",
|
100 |
-
"ConditionalPredicateValueDefColornullExprRef",
|
101 |
-
"ConditionalPredicateValueDefFontStylenullExprRef",
|
102 |
-
"ConditionalPredicateValueDefFontWeightnullExprRef",
|
103 |
-
"ConditionalPredicateValueDefGradientstringnullExprRef",
|
104 |
-
"ConditionalPredicateValueDefTextBaselinenullExprRef",
|
105 |
-
"ConditionalPredicateValueDefTextExprRef",
|
106 |
-
"ConditionalPredicateValueDefnumber",
|
107 |
-
"ConditionalPredicateValueDefnumberArrayExprRef",
|
108 |
-
"ConditionalPredicateValueDefnumberArraynullExprRef",
|
109 |
-
"ConditionalPredicateValueDefnumberExprRef",
|
110 |
-
"ConditionalPredicateValueDefnumbernullExprRef",
|
111 |
-
"ConditionalPredicateValueDefstringExprRef",
|
112 |
-
"ConditionalPredicateValueDefstringnullExprRef",
|
113 |
-
"ConditionalStringFieldDef",
|
114 |
-
"ConditionalValueDefGradientstringnullExprRef",
|
115 |
-
"ConditionalValueDefTextExprRef",
|
116 |
-
"ConditionalValueDefnumber",
|
117 |
-
"ConditionalValueDefnumberArrayExprRef",
|
118 |
-
"ConditionalValueDefnumberExprRef",
|
119 |
-
"ConditionalValueDefstringExprRef",
|
120 |
-
"ConditionalValueDefstringnullExprRef",
|
121 |
-
"Config",
|
122 |
-
"CsvDataFormat",
|
123 |
-
"Cursor",
|
124 |
-
"Cyclical",
|
125 |
-
"Data",
|
126 |
-
"DataFormat",
|
127 |
-
"DataSource",
|
128 |
-
"Datasets",
|
129 |
-
"DateTime",
|
130 |
-
"DatumChannelMixin",
|
131 |
-
"DatumDef",
|
132 |
-
"Day",
|
133 |
-
"DensityTransform",
|
134 |
-
"DerivedStream",
|
135 |
-
"Description",
|
136 |
-
"DescriptionValue",
|
137 |
-
"Detail",
|
138 |
-
"Dict",
|
139 |
-
"DictInlineDataset",
|
140 |
-
"DictSelectionInit",
|
141 |
-
"DictSelectionInitInterval",
|
142 |
-
"Diverging",
|
143 |
-
"DomainUnionWith",
|
144 |
-
"DsvDataFormat",
|
145 |
-
"Element",
|
146 |
-
"Encoding",
|
147 |
-
"EncodingSortField",
|
148 |
-
"ErrorBand",
|
149 |
-
"ErrorBandConfig",
|
150 |
-
"ErrorBandDef",
|
151 |
-
"ErrorBar",
|
152 |
-
"ErrorBarConfig",
|
153 |
-
"ErrorBarDef",
|
154 |
-
"ErrorBarExtent",
|
155 |
-
"EventStream",
|
156 |
-
"EventType",
|
157 |
-
"Expr",
|
158 |
-
"ExprRef",
|
159 |
-
"Facet",
|
160 |
-
"FacetChart",
|
161 |
-
"FacetEncodingFieldDef",
|
162 |
-
"FacetFieldDef",
|
163 |
-
"FacetMapping",
|
164 |
-
"FacetSpec",
|
165 |
-
"FacetedEncoding",
|
166 |
-
"FacetedUnitSpec",
|
167 |
-
"Feature",
|
168 |
-
"FeatureCollection",
|
169 |
-
"FeatureGeometryGeoJsonProperties",
|
170 |
-
"Field",
|
171 |
-
"FieldChannelMixin",
|
172 |
-
"FieldDefWithoutScale",
|
173 |
-
"FieldEqualPredicate",
|
174 |
-
"FieldGTEPredicate",
|
175 |
-
"FieldGTPredicate",
|
176 |
-
"FieldLTEPredicate",
|
177 |
-
"FieldLTPredicate",
|
178 |
-
"FieldName",
|
179 |
-
"FieldOneOfPredicate",
|
180 |
-
"FieldOrDatumDefWithConditionDatumDefGradientstringnull",
|
181 |
-
"FieldOrDatumDefWithConditionDatumDefnumber",
|
182 |
-
"FieldOrDatumDefWithConditionDatumDefnumberArray",
|
183 |
-
"FieldOrDatumDefWithConditionDatumDefstringnull",
|
184 |
-
"FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull",
|
185 |
-
"FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull",
|
186 |
-
"FieldOrDatumDefWithConditionMarkPropFieldDefnumber",
|
187 |
-
"FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray",
|
188 |
-
"FieldOrDatumDefWithConditionStringDatumDefText",
|
189 |
-
"FieldOrDatumDefWithConditionStringFieldDefText",
|
190 |
-
"FieldOrDatumDefWithConditionStringFieldDefstring",
|
191 |
-
"FieldRange",
|
192 |
-
"FieldRangePredicate",
|
193 |
-
"FieldValidPredicate",
|
194 |
-
"Fill",
|
195 |
-
"FillDatum",
|
196 |
-
"FillOpacity",
|
197 |
-
"FillOpacityDatum",
|
198 |
-
"FillOpacityValue",
|
199 |
-
"FillValue",
|
200 |
-
"FilterTransform",
|
201 |
-
"Fit",
|
202 |
-
"FlattenTransform",
|
203 |
-
"FoldTransform",
|
204 |
-
"FontStyle",
|
205 |
-
"FontWeight",
|
206 |
-
"Generator",
|
207 |
-
"GenericUnitSpecEncodingAnyMark",
|
208 |
-
"GeoJsonFeature",
|
209 |
-
"GeoJsonFeatureCollection",
|
210 |
-
"GeoJsonProperties",
|
211 |
-
"Geometry",
|
212 |
-
"GeometryCollection",
|
213 |
-
"Gradient",
|
214 |
-
"GradientStop",
|
215 |
-
"GraticuleGenerator",
|
216 |
-
"GraticuleParams",
|
217 |
-
"HConcatChart",
|
218 |
-
"HConcatSpecGenericSpec",
|
219 |
-
"Header",
|
220 |
-
"HeaderConfig",
|
221 |
-
"HexColor",
|
222 |
-
"Href",
|
223 |
-
"HrefValue",
|
224 |
-
"Impute",
|
225 |
-
"ImputeMethod",
|
226 |
-
"ImputeParams",
|
227 |
-
"ImputeSequence",
|
228 |
-
"ImputeTransform",
|
229 |
-
"InlineData",
|
230 |
-
"InlineDataset",
|
231 |
-
"Interpolate",
|
232 |
-
"IntervalSelectionConfig",
|
233 |
-
"IntervalSelectionConfigWithoutType",
|
234 |
-
"JoinAggregateFieldDef",
|
235 |
-
"JoinAggregateTransform",
|
236 |
-
"JsonDataFormat",
|
237 |
-
"Key",
|
238 |
-
"LabelOverlap",
|
239 |
-
"LatLongDef",
|
240 |
-
"LatLongFieldDef",
|
241 |
-
"Latitude",
|
242 |
-
"Latitude2",
|
243 |
-
"Latitude2Datum",
|
244 |
-
"Latitude2Value",
|
245 |
-
"LatitudeDatum",
|
246 |
-
"LayerChart",
|
247 |
-
"LayerRepeatMapping",
|
248 |
-
"LayerRepeatSpec",
|
249 |
-
"LayerSpec",
|
250 |
-
"LayoutAlign",
|
251 |
-
"Legend",
|
252 |
-
"LegendBinding",
|
253 |
-
"LegendConfig",
|
254 |
-
"LegendOrient",
|
255 |
-
"LegendResolveMap",
|
256 |
-
"LegendStreamBinding",
|
257 |
-
"LineConfig",
|
258 |
-
"LineString",
|
259 |
-
"LinearGradient",
|
260 |
-
"LocalMultiTimeUnit",
|
261 |
-
"LocalSingleTimeUnit",
|
262 |
-
"Locale",
|
263 |
-
"LoessTransform",
|
264 |
-
"LogicalAndPredicate",
|
265 |
-
"LogicalNotPredicate",
|
266 |
-
"LogicalOrPredicate",
|
267 |
-
"Longitude",
|
268 |
-
"Longitude2",
|
269 |
-
"Longitude2Datum",
|
270 |
-
"Longitude2Value",
|
271 |
-
"LongitudeDatum",
|
272 |
-
"LookupData",
|
273 |
-
"LookupSelection",
|
274 |
-
"LookupTransform",
|
275 |
-
"Mark",
|
276 |
-
"MarkConfig",
|
277 |
-
"MarkDef",
|
278 |
-
"MarkPropDefGradientstringnull",
|
279 |
-
"MarkPropDefnumber",
|
280 |
-
"MarkPropDefnumberArray",
|
281 |
-
"MarkPropDefstringnullTypeForShape",
|
282 |
-
"MarkType",
|
283 |
-
"MaxRowsError",
|
284 |
-
"MergedStream",
|
285 |
-
"Month",
|
286 |
-
"MultiLineString",
|
287 |
-
"MultiPoint",
|
288 |
-
"MultiPolygon",
|
289 |
-
"MultiTimeUnit",
|
290 |
-
"NamedData",
|
291 |
-
"NonArgAggregateOp",
|
292 |
-
"NonLayerRepeatSpec",
|
293 |
-
"NonNormalizedSpec",
|
294 |
-
"NumberLocale",
|
295 |
-
"NumericArrayMarkPropDef",
|
296 |
-
"NumericMarkPropDef",
|
297 |
-
"OffsetDef",
|
298 |
-
"Opacity",
|
299 |
-
"OpacityDatum",
|
300 |
-
"OpacityValue",
|
301 |
-
"Order",
|
302 |
-
"OrderFieldDef",
|
303 |
-
"OrderValue",
|
304 |
-
"OrderValueDef",
|
305 |
-
"Orient",
|
306 |
-
"Orientation",
|
307 |
-
"OverlayMarkDef",
|
308 |
-
"Padding",
|
309 |
-
"Parameter",
|
310 |
-
"ParameterExpression",
|
311 |
-
"ParameterExtent",
|
312 |
-
"ParameterName",
|
313 |
-
"ParameterPredicate",
|
314 |
-
"Parse",
|
315 |
-
"ParseValue",
|
316 |
-
"PivotTransform",
|
317 |
-
"Point",
|
318 |
-
"PointSelectionConfig",
|
319 |
-
"PointSelectionConfigWithoutType",
|
320 |
-
"PolarDef",
|
321 |
-
"Polygon",
|
322 |
-
"Position",
|
323 |
-
"Position2Def",
|
324 |
-
"PositionDatumDef",
|
325 |
-
"PositionDatumDefBase",
|
326 |
-
"PositionDef",
|
327 |
-
"PositionFieldDef",
|
328 |
-
"PositionFieldDefBase",
|
329 |
-
"PositionValueDef",
|
330 |
-
"Predicate",
|
331 |
-
"PredicateComposition",
|
332 |
-
"PrimitiveValue",
|
333 |
-
"Projection",
|
334 |
-
"ProjectionConfig",
|
335 |
-
"ProjectionType",
|
336 |
-
"QuantileTransform",
|
337 |
-
"RadialGradient",
|
338 |
-
"Radius",
|
339 |
-
"Radius2",
|
340 |
-
"Radius2Datum",
|
341 |
-
"Radius2Value",
|
342 |
-
"RadiusDatum",
|
343 |
-
"RadiusValue",
|
344 |
-
"RangeConfig",
|
345 |
-
"RangeEnum",
|
346 |
-
"RangeRaw",
|
347 |
-
"RangeRawArray",
|
348 |
-
"RangeScheme",
|
349 |
-
"RectConfig",
|
350 |
-
"RegressionTransform",
|
351 |
-
"RelativeBandSize",
|
352 |
-
"RepeatChart",
|
353 |
-
"RepeatMapping",
|
354 |
-
"RepeatRef",
|
355 |
-
"RepeatSpec",
|
356 |
-
"Resolve",
|
357 |
-
"ResolveMode",
|
358 |
-
"Root",
|
359 |
-
"Row",
|
360 |
-
"RowColLayoutAlign",
|
361 |
-
"RowColboolean",
|
362 |
-
"RowColnumber",
|
363 |
-
"RowColumnEncodingFieldDef",
|
364 |
-
"SCHEMA_URL",
|
365 |
-
"SCHEMA_VERSION",
|
366 |
-
"SampleTransform",
|
367 |
-
"Scale",
|
368 |
-
"ScaleBinParams",
|
369 |
-
"ScaleBins",
|
370 |
-
"ScaleConfig",
|
371 |
-
"ScaleDatumDef",
|
372 |
-
"ScaleFieldDef",
|
373 |
-
"ScaleInterpolateEnum",
|
374 |
-
"ScaleInterpolateParams",
|
375 |
-
"ScaleResolveMap",
|
376 |
-
"ScaleType",
|
377 |
-
"SchemaBase",
|
378 |
-
"SchemeParams",
|
379 |
-
"SecondaryFieldDef",
|
380 |
-
"SelectionConfig",
|
381 |
-
"SelectionExpression",
|
382 |
-
"SelectionInit",
|
383 |
-
"SelectionInitInterval",
|
384 |
-
"SelectionInitIntervalMapping",
|
385 |
-
"SelectionInitMapping",
|
386 |
-
"SelectionParameter",
|
387 |
-
"SelectionPredicateComposition",
|
388 |
-
"SelectionResolution",
|
389 |
-
"SelectionType",
|
390 |
-
"SequenceGenerator",
|
391 |
-
"SequenceParams",
|
392 |
-
"SequentialMultiHue",
|
393 |
-
"SequentialSingleHue",
|
394 |
-
"Shape",
|
395 |
-
"ShapeDatum",
|
396 |
-
"ShapeDef",
|
397 |
-
"ShapeValue",
|
398 |
-
"SharedEncoding",
|
399 |
-
"SingleDefUnitChannel",
|
400 |
-
"SingleTimeUnit",
|
401 |
-
"Size",
|
402 |
-
"SizeDatum",
|
403 |
-
"SizeValue",
|
404 |
-
"Sort",
|
405 |
-
"SortArray",
|
406 |
-
"SortByChannel",
|
407 |
-
"SortByChannelDesc",
|
408 |
-
"SortByEncoding",
|
409 |
-
"SortField",
|
410 |
-
"SortOrder",
|
411 |
-
"Spec",
|
412 |
-
"SphereGenerator",
|
413 |
-
"StackOffset",
|
414 |
-
"StackTransform",
|
415 |
-
"StandardType",
|
416 |
-
"Step",
|
417 |
-
"StepFor",
|
418 |
-
"Stream",
|
419 |
-
"StringFieldDef",
|
420 |
-
"StringFieldDefWithCondition",
|
421 |
-
"StringValueDefWithCondition",
|
422 |
-
"Stroke",
|
423 |
-
"StrokeCap",
|
424 |
-
"StrokeDash",
|
425 |
-
"StrokeDashDatum",
|
426 |
-
"StrokeDashValue",
|
427 |
-
"StrokeDatum",
|
428 |
-
"StrokeJoin",
|
429 |
-
"StrokeOpacity",
|
430 |
-
"StrokeOpacityDatum",
|
431 |
-
"StrokeOpacityValue",
|
432 |
-
"StrokeValue",
|
433 |
-
"StrokeWidth",
|
434 |
-
"StrokeWidthDatum",
|
435 |
-
"StrokeWidthValue",
|
436 |
-
"StyleConfigIndex",
|
437 |
-
"SymbolShape",
|
438 |
-
"TOPLEVEL_ONLY_KEYS",
|
439 |
-
"Text",
|
440 |
-
"TextBaseline",
|
441 |
-
"TextDatum",
|
442 |
-
"TextDef",
|
443 |
-
"TextDirection",
|
444 |
-
"TextValue",
|
445 |
-
"Theta",
|
446 |
-
"Theta2",
|
447 |
-
"Theta2Datum",
|
448 |
-
"Theta2Value",
|
449 |
-
"ThetaDatum",
|
450 |
-
"ThetaValue",
|
451 |
-
"TickConfig",
|
452 |
-
"TickCount",
|
453 |
-
"TimeInterval",
|
454 |
-
"TimeIntervalStep",
|
455 |
-
"TimeLocale",
|
456 |
-
"TimeUnit",
|
457 |
-
"TimeUnitParams",
|
458 |
-
"TimeUnitTransform",
|
459 |
-
"Title",
|
460 |
-
"TitleAnchor",
|
461 |
-
"TitleConfig",
|
462 |
-
"TitleFrame",
|
463 |
-
"TitleOrient",
|
464 |
-
"TitleParams",
|
465 |
-
"Tooltip",
|
466 |
-
"TooltipContent",
|
467 |
-
"TooltipValue",
|
468 |
-
"TopLevelConcatSpec",
|
469 |
-
"TopLevelFacetSpec",
|
470 |
-
"TopLevelHConcatSpec",
|
471 |
-
"TopLevelLayerSpec",
|
472 |
-
"TopLevelMixin",
|
473 |
-
"TopLevelParameter",
|
474 |
-
"TopLevelRepeatSpec",
|
475 |
-
"TopLevelSelectionParameter",
|
476 |
-
"TopLevelSpec",
|
477 |
-
"TopLevelUnitSpec",
|
478 |
-
"TopLevelVConcatSpec",
|
479 |
-
"TopoDataFormat",
|
480 |
-
"Transform",
|
481 |
-
"Type",
|
482 |
-
"TypeForShape",
|
483 |
-
"TypedFieldDef",
|
484 |
-
"URI",
|
485 |
-
"Undefined",
|
486 |
-
"UnitSpec",
|
487 |
-
"UnitSpecWithFrame",
|
488 |
-
"Url",
|
489 |
-
"UrlData",
|
490 |
-
"UrlValue",
|
491 |
-
"UtcMultiTimeUnit",
|
492 |
-
"UtcSingleTimeUnit",
|
493 |
-
"VConcatChart",
|
494 |
-
"VConcatSpecGenericSpec",
|
495 |
-
"VEGAEMBED_VERSION",
|
496 |
-
"VEGALITE_VERSION",
|
497 |
-
"VEGA_VERSION",
|
498 |
-
"ValueChannelMixin",
|
499 |
-
"ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull",
|
500 |
-
"ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull",
|
501 |
-
"ValueDefWithConditionMarkPropFieldOrDatumDefnumber",
|
502 |
-
"ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray",
|
503 |
-
"ValueDefWithConditionMarkPropFieldOrDatumDefstringnull",
|
504 |
-
"ValueDefWithConditionStringFieldDefText",
|
505 |
-
"ValueDefnumber",
|
506 |
-
"ValueDefnumberwidthheightExprRef",
|
507 |
-
"VariableParameter",
|
508 |
-
"Vector10string",
|
509 |
-
"Vector12string",
|
510 |
-
"Vector2DateTime",
|
511 |
-
"Vector2Vector2number",
|
512 |
-
"Vector2boolean",
|
513 |
-
"Vector2number",
|
514 |
-
"Vector2string",
|
515 |
-
"Vector3number",
|
516 |
-
"Vector7string",
|
517 |
-
"VegaLite",
|
518 |
-
"VegaLiteSchema",
|
519 |
-
"ViewBackground",
|
520 |
-
"ViewConfig",
|
521 |
-
"WindowEventType",
|
522 |
-
"WindowFieldDef",
|
523 |
-
"WindowOnlyOp",
|
524 |
-
"WindowTransform",
|
525 |
-
"X",
|
526 |
-
"X2",
|
527 |
-
"X2Datum",
|
528 |
-
"X2Value",
|
529 |
-
"XDatum",
|
530 |
-
"XError",
|
531 |
-
"XError2",
|
532 |
-
"XError2Value",
|
533 |
-
"XErrorValue",
|
534 |
-
"XOffset",
|
535 |
-
"XOffsetDatum",
|
536 |
-
"XOffsetValue",
|
537 |
-
"XValue",
|
538 |
-
"Y",
|
539 |
-
"Y2",
|
540 |
-
"Y2Datum",
|
541 |
-
"Y2Value",
|
542 |
-
"YDatum",
|
543 |
-
"YError",
|
544 |
-
"YError2",
|
545 |
-
"YError2Value",
|
546 |
-
"YErrorValue",
|
547 |
-
"YOffset",
|
548 |
-
"YOffsetDatum",
|
549 |
-
"YOffsetValue",
|
550 |
-
"YValue",
|
551 |
-
"api",
|
552 |
-
"binding",
|
553 |
-
"binding_checkbox",
|
554 |
-
"binding_radio",
|
555 |
-
"binding_range",
|
556 |
-
"binding_select",
|
557 |
-
"channels",
|
558 |
-
"check_fields_and_encodings",
|
559 |
-
"concat",
|
560 |
-
"condition",
|
561 |
-
"core",
|
562 |
-
"curry",
|
563 |
-
"data",
|
564 |
-
"data_transformers",
|
565 |
-
"datum",
|
566 |
-
"default_data_transformer",
|
567 |
-
"display",
|
568 |
-
"expr",
|
569 |
-
"graticule",
|
570 |
-
"hconcat",
|
571 |
-
"layer",
|
572 |
-
"limit_rows",
|
573 |
-
"load_ipython_extension",
|
574 |
-
"load_schema",
|
575 |
-
"mixins",
|
576 |
-
"overload",
|
577 |
-
"param",
|
578 |
-
"parse_shorthand",
|
579 |
-
"pipe",
|
580 |
-
"renderers",
|
581 |
-
"repeat",
|
582 |
-
"sample",
|
583 |
-
"schema",
|
584 |
-
"selection_interval",
|
585 |
-
"selection_point",
|
586 |
-
"sequence",
|
587 |
-
"sphere",
|
588 |
-
"theme",
|
589 |
-
"themes",
|
590 |
-
"to_csv",
|
591 |
-
"to_json",
|
592 |
-
"to_values",
|
593 |
-
"topo_feature",
|
594 |
-
"utils",
|
595 |
-
"v5",
|
596 |
-
"value",
|
597 |
-
"vconcat",
|
598 |
-
"vegalite",
|
599 |
-
"with_property_setters",
|
600 |
-
]
|
601 |
-
|
602 |
-
|
603 |
-
def __dir__():
|
604 |
-
return __all__
|
605 |
-
|
606 |
-
|
607 |
-
from .vegalite import *
|
608 |
-
|
609 |
-
|
610 |
-
def load_ipython_extension(ipython):
|
611 |
-
from ._magics import vegalite
|
612 |
-
|
613 |
-
ipython.register_magic_function(vegalite, "cell")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/dateutil/tzwin.py
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
# tzwin has moved to dateutil.tz.win
|
2 |
-
from .tz.win import *
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/httpx/_transports/__init__.py
DELETED
File without changes
|
spaces/FadouaFGM/Stackoverflow_Questions_Categorisation/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Stackoverflow Questions Categorisation
|
3 |
-
emoji: 📈
|
4 |
-
colorFrom: purple
|
5 |
-
colorTo: pink
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.18.0
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Faridmaruf/rvc-Blue-archives/lib/infer_pack/transforms.py
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
from torch.nn import functional as F
|
3 |
-
|
4 |
-
import numpy as np
|
5 |
-
|
6 |
-
|
7 |
-
DEFAULT_MIN_BIN_WIDTH = 1e-3
|
8 |
-
DEFAULT_MIN_BIN_HEIGHT = 1e-3
|
9 |
-
DEFAULT_MIN_DERIVATIVE = 1e-3
|
10 |
-
|
11 |
-
|
12 |
-
def piecewise_rational_quadratic_transform(
|
13 |
-
inputs,
|
14 |
-
unnormalized_widths,
|
15 |
-
unnormalized_heights,
|
16 |
-
unnormalized_derivatives,
|
17 |
-
inverse=False,
|
18 |
-
tails=None,
|
19 |
-
tail_bound=1.0,
|
20 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
21 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
22 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
23 |
-
):
|
24 |
-
if tails is None:
|
25 |
-
spline_fn = rational_quadratic_spline
|
26 |
-
spline_kwargs = {}
|
27 |
-
else:
|
28 |
-
spline_fn = unconstrained_rational_quadratic_spline
|
29 |
-
spline_kwargs = {"tails": tails, "tail_bound": tail_bound}
|
30 |
-
|
31 |
-
outputs, logabsdet = spline_fn(
|
32 |
-
inputs=inputs,
|
33 |
-
unnormalized_widths=unnormalized_widths,
|
34 |
-
unnormalized_heights=unnormalized_heights,
|
35 |
-
unnormalized_derivatives=unnormalized_derivatives,
|
36 |
-
inverse=inverse,
|
37 |
-
min_bin_width=min_bin_width,
|
38 |
-
min_bin_height=min_bin_height,
|
39 |
-
min_derivative=min_derivative,
|
40 |
-
**spline_kwargs
|
41 |
-
)
|
42 |
-
return outputs, logabsdet
|
43 |
-
|
44 |
-
|
45 |
-
def searchsorted(bin_locations, inputs, eps=1e-6):
|
46 |
-
bin_locations[..., -1] += eps
|
47 |
-
return torch.sum(inputs[..., None] >= bin_locations, dim=-1) - 1
|
48 |
-
|
49 |
-
|
50 |
-
def unconstrained_rational_quadratic_spline(
|
51 |
-
inputs,
|
52 |
-
unnormalized_widths,
|
53 |
-
unnormalized_heights,
|
54 |
-
unnormalized_derivatives,
|
55 |
-
inverse=False,
|
56 |
-
tails="linear",
|
57 |
-
tail_bound=1.0,
|
58 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
59 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
60 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
61 |
-
):
|
62 |
-
inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound)
|
63 |
-
outside_interval_mask = ~inside_interval_mask
|
64 |
-
|
65 |
-
outputs = torch.zeros_like(inputs)
|
66 |
-
logabsdet = torch.zeros_like(inputs)
|
67 |
-
|
68 |
-
if tails == "linear":
|
69 |
-
unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1))
|
70 |
-
constant = np.log(np.exp(1 - min_derivative) - 1)
|
71 |
-
unnormalized_derivatives[..., 0] = constant
|
72 |
-
unnormalized_derivatives[..., -1] = constant
|
73 |
-
|
74 |
-
outputs[outside_interval_mask] = inputs[outside_interval_mask]
|
75 |
-
logabsdet[outside_interval_mask] = 0
|
76 |
-
else:
|
77 |
-
raise RuntimeError("{} tails are not implemented.".format(tails))
|
78 |
-
|
79 |
-
(
|
80 |
-
outputs[inside_interval_mask],
|
81 |
-
logabsdet[inside_interval_mask],
|
82 |
-
) = rational_quadratic_spline(
|
83 |
-
inputs=inputs[inside_interval_mask],
|
84 |
-
unnormalized_widths=unnormalized_widths[inside_interval_mask, :],
|
85 |
-
unnormalized_heights=unnormalized_heights[inside_interval_mask, :],
|
86 |
-
unnormalized_derivatives=unnormalized_derivatives[inside_interval_mask, :],
|
87 |
-
inverse=inverse,
|
88 |
-
left=-tail_bound,
|
89 |
-
right=tail_bound,
|
90 |
-
bottom=-tail_bound,
|
91 |
-
top=tail_bound,
|
92 |
-
min_bin_width=min_bin_width,
|
93 |
-
min_bin_height=min_bin_height,
|
94 |
-
min_derivative=min_derivative,
|
95 |
-
)
|
96 |
-
|
97 |
-
return outputs, logabsdet
|
98 |
-
|
99 |
-
|
100 |
-
def rational_quadratic_spline(
|
101 |
-
inputs,
|
102 |
-
unnormalized_widths,
|
103 |
-
unnormalized_heights,
|
104 |
-
unnormalized_derivatives,
|
105 |
-
inverse=False,
|
106 |
-
left=0.0,
|
107 |
-
right=1.0,
|
108 |
-
bottom=0.0,
|
109 |
-
top=1.0,
|
110 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
111 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
112 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
113 |
-
):
|
114 |
-
if torch.min(inputs) < left or torch.max(inputs) > right:
|
115 |
-
raise ValueError("Input to a transform is not within its domain")
|
116 |
-
|
117 |
-
num_bins = unnormalized_widths.shape[-1]
|
118 |
-
|
119 |
-
if min_bin_width * num_bins > 1.0:
|
120 |
-
raise ValueError("Minimal bin width too large for the number of bins")
|
121 |
-
if min_bin_height * num_bins > 1.0:
|
122 |
-
raise ValueError("Minimal bin height too large for the number of bins")
|
123 |
-
|
124 |
-
widths = F.softmax(unnormalized_widths, dim=-1)
|
125 |
-
widths = min_bin_width + (1 - min_bin_width * num_bins) * widths
|
126 |
-
cumwidths = torch.cumsum(widths, dim=-1)
|
127 |
-
cumwidths = F.pad(cumwidths, pad=(1, 0), mode="constant", value=0.0)
|
128 |
-
cumwidths = (right - left) * cumwidths + left
|
129 |
-
cumwidths[..., 0] = left
|
130 |
-
cumwidths[..., -1] = right
|
131 |
-
widths = cumwidths[..., 1:] - cumwidths[..., :-1]
|
132 |
-
|
133 |
-
derivatives = min_derivative + F.softplus(unnormalized_derivatives)
|
134 |
-
|
135 |
-
heights = F.softmax(unnormalized_heights, dim=-1)
|
136 |
-
heights = min_bin_height + (1 - min_bin_height * num_bins) * heights
|
137 |
-
cumheights = torch.cumsum(heights, dim=-1)
|
138 |
-
cumheights = F.pad(cumheights, pad=(1, 0), mode="constant", value=0.0)
|
139 |
-
cumheights = (top - bottom) * cumheights + bottom
|
140 |
-
cumheights[..., 0] = bottom
|
141 |
-
cumheights[..., -1] = top
|
142 |
-
heights = cumheights[..., 1:] - cumheights[..., :-1]
|
143 |
-
|
144 |
-
if inverse:
|
145 |
-
bin_idx = searchsorted(cumheights, inputs)[..., None]
|
146 |
-
else:
|
147 |
-
bin_idx = searchsorted(cumwidths, inputs)[..., None]
|
148 |
-
|
149 |
-
input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0]
|
150 |
-
input_bin_widths = widths.gather(-1, bin_idx)[..., 0]
|
151 |
-
|
152 |
-
input_cumheights = cumheights.gather(-1, bin_idx)[..., 0]
|
153 |
-
delta = heights / widths
|
154 |
-
input_delta = delta.gather(-1, bin_idx)[..., 0]
|
155 |
-
|
156 |
-
input_derivatives = derivatives.gather(-1, bin_idx)[..., 0]
|
157 |
-
input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0]
|
158 |
-
|
159 |
-
input_heights = heights.gather(-1, bin_idx)[..., 0]
|
160 |
-
|
161 |
-
if inverse:
|
162 |
-
a = (inputs - input_cumheights) * (
|
163 |
-
input_derivatives + input_derivatives_plus_one - 2 * input_delta
|
164 |
-
) + input_heights * (input_delta - input_derivatives)
|
165 |
-
b = input_heights * input_derivatives - (inputs - input_cumheights) * (
|
166 |
-
input_derivatives + input_derivatives_plus_one - 2 * input_delta
|
167 |
-
)
|
168 |
-
c = -input_delta * (inputs - input_cumheights)
|
169 |
-
|
170 |
-
discriminant = b.pow(2) - 4 * a * c
|
171 |
-
assert (discriminant >= 0).all()
|
172 |
-
|
173 |
-
root = (2 * c) / (-b - torch.sqrt(discriminant))
|
174 |
-
outputs = root * input_bin_widths + input_cumwidths
|
175 |
-
|
176 |
-
theta_one_minus_theta = root * (1 - root)
|
177 |
-
denominator = input_delta + (
|
178 |
-
(input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
179 |
-
* theta_one_minus_theta
|
180 |
-
)
|
181 |
-
derivative_numerator = input_delta.pow(2) * (
|
182 |
-
input_derivatives_plus_one * root.pow(2)
|
183 |
-
+ 2 * input_delta * theta_one_minus_theta
|
184 |
-
+ input_derivatives * (1 - root).pow(2)
|
185 |
-
)
|
186 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
187 |
-
|
188 |
-
return outputs, -logabsdet
|
189 |
-
else:
|
190 |
-
theta = (inputs - input_cumwidths) / input_bin_widths
|
191 |
-
theta_one_minus_theta = theta * (1 - theta)
|
192 |
-
|
193 |
-
numerator = input_heights * (
|
194 |
-
input_delta * theta.pow(2) + input_derivatives * theta_one_minus_theta
|
195 |
-
)
|
196 |
-
denominator = input_delta + (
|
197 |
-
(input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
198 |
-
* theta_one_minus_theta
|
199 |
-
)
|
200 |
-
outputs = input_cumheights + numerator / denominator
|
201 |
-
|
202 |
-
derivative_numerator = input_delta.pow(2) * (
|
203 |
-
input_derivatives_plus_one * theta.pow(2)
|
204 |
-
+ 2 * input_delta * theta_one_minus_theta
|
205 |
-
+ input_derivatives * (1 - theta).pow(2)
|
206 |
-
)
|
207 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
208 |
-
|
209 |
-
return outputs, logabsdet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|