Commit
·
b75593f
1
Parent(s):
656c72b
Update parquet files (step 36 of 121)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- spaces/1acneusushi/gradio-2dmoleculeeditor/data/Crackdown 2 DLC What It Is Why You Need It and How to Get It.md +0 -37
- spaces/1gistliPinn/ChatGPT4/Examples/Arsenal Extended Power License Generator.md +0 -6
- spaces/1gistliPinn/ChatGPT4/Examples/AutoCAD Architecture 2007 Crack Free Download The Ultimate Guide for Architects and Designers.md +0 -5
- spaces/1gistliPinn/ChatGPT4/Examples/Descargar Winrar Para Mac Os X 10.5.8 [BETTER].md +0 -6
- spaces/1gistliPinn/ChatGPT4/Examples/Download Salamander 2012 TV Serie 4DVDrip Dutch English Klam Torrent - A Must-See for Fans of Mystery and Suspense.md +0 -6
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Airline Commander Hack How to Get Free AC Credits and Unlock All Planes.md +0 -81
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Among Us on PC - How to Download and Install the Game for Free.md +0 -176
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Brawl Stars Cheats How to Download and Install the Unlimited Gems Mod.md +0 -126
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Dolphin Emulator The Ultimate Guide to Downloading and Setting Up the Latest Version.md +0 -116
- spaces/1phancelerku/anime-remove-background/Download 5 MB File without Losing Quality.md +0 -212
- spaces/1phancelerku/anime-remove-background/Download Garten Of Banban 3 Fanmade Characters The Ultimate Guide.md +0 -143
- spaces/1phancelerku/anime-remove-background/Download X-War Clash of Zombies Mod Apk and Get Unlimited Money and Crystals.md +0 -101
- spaces/1toTree/lora_test/ppdiffusers/pipelines/__init__.py +0 -109
- spaces/2ndelement/voicevox/speaker_info/7ffcb7ce-00ec-4bdc-82cd-45a8889e43ff/policy.md +0 -3
- spaces/801artistry/RVC801/demucs/separate.py +0 -185
- spaces/801artistry/RVC801/gui_v0.py +0 -786
- spaces/AI-Zero-to-Hero/02-H5-AR-VR-IOT/README.md +0 -11
- spaces/AI-Zero-to-Hero/09-SL-Live-RealTime-Dashboard/app.py +0 -92
- spaces/AIConsultant/MusicGen/scripts/templates/index.html +0 -28
- spaces/AIGC-Audio/AudioGPT/NeuralSeq/inference/tts/base_tts_infer.py +0 -101
- spaces/AILab-CVC/SEED-LLaMA/models/transforms.py +0 -21
- spaces/AeroXi/english-ai/app.py +0 -28
- spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/circularprogress/Factory.js +0 -13
- spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/drag/Drag.d.ts +0 -2
- spaces/Amrrs/DragGan-Inversion/PTI/configs/paths_config.py +0 -31
- spaces/Amrrs/DragGan-Inversion/stylegan_human/pti/pti_models/e4e/psp.py +0 -109
- spaces/Andy1621/uniformer_image_segmentation/configs/fcn/fcn_r50-d8_480x480_40k_pascal_context.py +0 -9
- spaces/Andy1621/uniformer_image_segmentation/configs/hrnet/fcn_hr18_512x1024_80k_cityscapes.py +0 -4
- spaces/AnishKumbhar/ChatBot/text-generation-webui-main/modules/RoPE.py +0 -18
- spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/ops/fused_bias_leakyrelu.py +0 -268
- spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/ops/roiaware_pool3d.py +0 -114
- spaces/Ariharasudhan/YoloV5/utils/autoanchor.py +0 -169
- spaces/Arulkumar03/GroundingDINO_SOTA_Zero_Shot_Model/groundingdino/models/GroundingDINO/__init__.py +0 -15
- spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/setuptools/command/install_egg_info.py +0 -63
- spaces/Atualli/yoloxTeste/yoloxdetect2/configs/yolox_m.py +0 -15
- spaces/Aveygo/AstroSleuth/app.py +0 -163
- spaces/Benson/text-generation/Examples/Cuentos Milagrosos De Mariquita Y Amperio Episodios De Gato Negro.md +0 -103
- spaces/Big-Web/MMSD/env/Lib/site-packages/botocore/retries/adaptive.py +0 -133
- spaces/Big-Web/MMSD/env/Lib/site-packages/s3transfer/upload.py +0 -802
- spaces/CForGETaass/vits-uma-genshin-honkai/transforms.py +0 -193
- spaces/CVH-vn1210/make_hair/minigpt4/tasks/base_task.py +0 -286
- spaces/CVPR/Dual-Key_Backdoor_Attacks/openvqa/openvqa/core/base_dataset.py +0 -103
- spaces/CVPR/LIVE/pybind11/.github/ISSUE_TEMPLATE/bug-report.md +0 -28
- spaces/CVPR/LIVE/thrust/thrust/detail/memory_wrapper.h +0 -30
- spaces/CVPR/Text2Human/Text2Human/utils/__init__.py +0 -0
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/frontend/assets/index-b7124075.js +0 -4
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio_client/data_classes.py +0 -15
- spaces/Dewa/Text-Summurisation/app.py +0 -12
- spaces/Dinoking/Guccio-AI-Designer/README.md +0 -13
- spaces/Dorado607/ChuanhuChatGPT/modules/shared.py +0 -64
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Crackdown 2 DLC What It Is Why You Need It and How to Get It.md
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Crackdown 2 DLC: Everything You Need to Know</h1>
|
3 |
-
<p>Crackdown 2 is a sandbox action-adventure game that lets you play as a super-powered agent in a futuristic city. You can explore the open world, fight enemies, collect orbs, and complete missions. But if you want more content and challenges, you may be interested in the downloadable content (DLC) packs that are available for Crackdown 2.</p>
|
4 |
-
<p>In this article, we will give you an overview of the two DLC packs that were released for Crackdown 2: the Toy Box pack and the Deluge pack. We will tell you what they include, how much they cost, and how to get them. We will also share some tips and tricks on how to enjoy the DLC packs to the fullest.</p>
|
5 |
-
<h2>crackdown 2 dlc</h2><br /><p><b><b>Download File</b> ✑ ✑ ✑ <a href="https://byltly.com/2uKxFs">https://byltly.com/2uKxFs</a></b></p><br /><br />
|
6 |
-
<h2>The Toy Box Pack</h2>
|
7 |
-
<p>The Toy Box pack was the first DLC pack that was released for Crackdown 2 on September 2, 2010. It added new features, modes, vehicles, weapons, and achievements to the game. The Toy Box pack had two versions: a free version and a premium version.</p>
|
8 |
-
<p>The free version included:</p>
|
9 |
-
<ul>
|
10 |
-
<li>A new mode called Keys to the City, which allowed you to activate cheats and modifiers such as infinite ammo, god mode, super speed, etc.</li>
|
11 |
-
<li>A new vehicle called the Thruster, which was a jetpack that let you fly around the city.</li>
|
12 |
-
<li>A new weapon called the Mass Driver, which was a powerful cannon that could launch cars and enemies into the air.</li>
|
13 |
-
<li>A new ability called Vehicle Tag, which allowed you to tag any vehicle with your agency logo and track it on your map.</li>
|
14 |
-
<li>10 new achievements worth 100 Gamerscore points.</li>
|
15 |
-
</ul>
|
16 |
-
<p>The premium version cost 560 Microsoft Points ($7) and included everything in the free version plus:</p>
|
17 |
-
<ul>
|
18 |
-
<li>Two new vehicles: the Squad Chopper, which was a helicopter that could carry four agents and had a mounted machine gun; and the ATV Assault Vehicle, which was a fast and agile buggy that could jump over obstacles.</li>
|
19 |
-
<li>Five new weapons: the Portable Launch Pad, which was a device that could launch agents into the air; the Stickler Grenade, which was a sticky bomb that could attach to enemies and vehicles; the Mags Grenade, which was a magnetic grenade that could pull objects together; the Cluster Grenade, which was a grenade that split into smaller explosives; and the Thrusters Agility Skill for Level 6 agents.</li>
|
20 |
-
<li>Two new modes: Rocket Tag, which was a multiplayer mode where one agent had to hold a rocket launcher while others tried to kill him; and Deluge Mode Preview, which was a sneak peek of the upcoming Deluge DLC pack.</li>
|
21 |
-
<li>Eight new agent suit colors.</li>
|
22 |
-
</ul>
|
23 |
-
<p>To get the Toy Box pack, you had to download it from the Xbox Live Marketplace or from the in-game menu. You also had to have an Xbox Live Gold membership to access some of the features.</p>
|
24 |
-
<h2>The Deluge Pack</h2>
|
25 |
-
<p>The Deluge pack was the second and final DLC pack that was released for Crackdown 2 on November 16, 2010. It added a new mode, maps, vehicles, weapons, achievements, and avatar awards to the game. The Deluge pack cost 560 Microsoft Points ($7) and included:</p>
|
26 |
-
<ul>
|
27 |
-
<li>A new mode called Deluge, which was a co-op mode where up to four agents had to survive waves of enemies in different locations. The enemies included zombies, freaks, cell members, mechs, etc. The mode had leaderboards and challenges to compete with other players.</li>
|
28 |
-
<li>Sixteen new maps for Deluge mode based on different areas of Pacific City.</li>
|
29 |
-
<li>Two new vehicles: the Agency SUV with Minigun turret and the Agency Truck Cab with Mounted Turret.</li>
|
30 |
-
<li>Two new weapons: the Pulse Cannon Turret and the UAV Missile Pod Turret.</li>
|
31 |
-
<li>10 new achievements worth 250 Gamerscore points.</li>
|
32 |
-
<li>Two new avatar awards: an Agency Hoodie and an Orb Shirt.</li>
|
33 |
-
</ul>
|
34 |
-
<p>To get the Deluge pack, you had to download it from the Xbox Live Marketplace or from the in-game menu. You also had to have an Xbox Live Gold membership to access some of the features.</</p>
|
35 |
-
<p></p> ddb901b051<br />
|
36 |
-
<br />
|
37 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Arsenal Extended Power License Generator.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
|
2 |
-
<p> * The Dukovany, or Dukovany 1 and 2 units are similar twin steam-electric reactors. The first of the two units was put into operation in 1972, and the second in 1976. The two reactors had design power output of 500 MW, and a maximum design output of 1,400 MW, and a total generating capacity of more than 2,000 MW. <strong>Of note</strong> The final cost of the two reactor units as quoted in 1979 was <em>CZK 12.9 billion ($512 million).<strong> </strong><br /> <br /> <strong>The reactors use natural uranium fuel and drive turbines to generate electricity. Both have a thermal capacity of approximately 260 MW. The reactors both utilize a one-pass reheater, and the only significant difference between the two units is that Unit 1 has a domed concrete reactor head, with the roof slab on the same level as the reactor vessel, whereas Unit 2 has a flat concrete roof slab. The front of the roofs of the two units are separated by about 12 metres, and the main entry doors in the front of each unit are about 25 metres wide, allowing access to the power blocks and the tall cooling towers. <br /> <br /> <strong>The reactors are constructed on the grounds of a former cement factory, which was initially used for building materials, but later converted for nuclear power plant use.</strong></strong></p>
|
3 |
-
<p> The agreements covering the lease of the sites for units 1 and 2 of the first Dukovany nuclear power plant were signed in 1971.The <em>LTA</em> pertains to unit 1, and the <em>LTA</em> is an area that covers the parcels of land where the reactor and the reactor building are located, and which includes the land and buildings around the reactor site. It includes the reactor, its service areas and all other land and buildings located on the land covered by the <em>LTA</em>. <br /> <br /> <strong>The <em>LTA</em> ownership was transferred to the National Property Fund for State Investments (NPU, pronounced as na powa) in 1999, and the NPU, since January 1, 2008, has held the ownership of the <em>LTA</em>.</strong></p>
|
4 |
-
<h2>Arsenal Extended Power License Generator</h2><br /><p><b><b>DOWNLOAD</b> ››››› <a href="https://imgfil.com/2uxXvb">https://imgfil.com/2uxXvb</a></b></p><br /><br /> 899543212b<br />
|
5 |
-
<br />
|
6 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/AutoCAD Architecture 2007 Crack Free Download The Ultimate Guide for Architects and Designers.md
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
|
2 |
-
<p>AutoCAD XL is now more reliable than the previous version. For enhanced performance, updates are available. This version can be run on any computer, regardless of how much RAM or storage it has. AutoCAD 2007 can be downloaded and installed on your computer. It will then run in no time. AutoCAD 2007 can also be used with Windows 7, 8, or 10.</p>
|
3 |
-
<h2>AutoCAD Architecture 2007 crack free download</h2><br /><p><b><b>Download File</b> 🔗 <a href="https://imgfil.com/2uy1KJ">https://imgfil.com/2uy1KJ</a></b></p><br /><br /> aaccfb2cb3<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Descargar Winrar Para Mac Os X 10.5.8 [BETTER].md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<p><strong>Mac OS X 10.5.8 Update</strong> es un programa útil y gratuito sólo disponible para Mac, que forma parte de la categoría Utilidades con la subcategoría Mejoras del sistema y ha sido publicado por Apple.</p>
|
3 |
-
<h2>Descargar Winrar Para Mac Os X 10.5.8</h2><br /><p><b><b>Download File</b> ⇔ <a href="https://imgfil.com/2uxZw5">https://imgfil.com/2uxZw5</a></b></p><br /><br />
|
4 |
-
<p>La información de la versión del programa no está disponible y su última actualización se produjo el 8/08/2011. Está disponible para usuarios con el sistema operativo Mac OS X y versiones anteriores, y se puede descargar en varios idiomas como inglés, español y alemán.</p> aaccfb2cb3<br />
|
5 |
-
<br />
|
6 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Download Salamander 2012 TV Serie 4DVDrip Dutch English Klam Torrent - A Must-See for Fans of Mystery and Suspense.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2>Download Salamander 2012 TV Serie 4DVDrip Dutch English Klam Torrent - KickassTorrentsl</h2><br /><p><b><b>Download Zip</b> ✪ <a href="https://imgfil.com/2uy0NL">https://imgfil.com/2uy0NL</a></b></p><br /><br />
|
2 |
-
|
3 |
-
aaccfb2cb3<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
6 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Airline Commander Hack How to Get Free AC Credits and Unlock All Planes.md
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Airline Commander Hack: How to Unlock All Planes and Get Free AC Credits</h1>
|
3 |
-
<p>If you are a fan of flight simulator games, you might have heard of Airline Commander, one of the most realistic airplane games on the market. In this game, you can start as a new pilot who must learn how to fly big aircrafts, take off from the airport, land safely, and manage your own airline. You can also expand your airplane fleet, choose new flying routes, and handle different situations in real-time.</p>
|
4 |
-
<h2>airline commander hack</h2><br /><p><b><b>Download</b> ☆☆☆☆☆ <a href="https://urlin.us/2uSW4Z">https://urlin.us/2uSW4Z</a></b></p><br /><br />
|
5 |
-
<p>However, as fun as it sounds, Airline Commander can also be challenging and frustrating at times. You might find yourself stuck with limited planes, routes, and money. You might also struggle to earn enough AC credits, which are the premium currency in the game. That's why many players are looking for a way to hack Airline Commander and enjoy the game without any limitations.</p>
|
6 |
-
<p>Fortunately, there is a simple and effective solution for that. In this article, we will show you how to use an Airline Commander hack that can unlock all planes and generate free AC credits for you. With this hack, you can experience the full potential of this amazing flight simulator game and have more fun than ever.</p>
|
7 |
-
<h2>How to Unlock All Planes in Airline Commander</h2>
|
8 |
-
<p>One of the main features of Airline Commander is that it offers dozens of airliners for you to choose from. You can fly turbine, reaction, single deck or double deck planes. You can also open thousands of routes towards all the major airports of the world and explore hundreds of realistic airports and runways.</p>
|
9 |
-
<p>However, unlocking new planes and routes is not easy. You need to complete contracts and earn money to buy new planes. You also need to improve your skills and get new licenses to access more challenging routes. This can take a lot of time and effort, especially if you are a beginner.</p>
|
10 |
-
<p>airline commander cheat codes<br />
|
11 |
-
airline commander mod apk<br />
|
12 |
-
airline commander unlimited money<br />
|
13 |
-
airline commander hack ios<br />
|
14 |
-
airline commander hack android<br />
|
15 |
-
airline commander hack tool<br />
|
16 |
-
airline commander hack online<br />
|
17 |
-
airline commander hack no survey<br />
|
18 |
-
airline commander hack no verification<br />
|
19 |
-
airline commander hack 2023<br />
|
20 |
-
airline commander free ac credits<br />
|
21 |
-
airline commander free flights<br />
|
22 |
-
airline commander free planes<br />
|
23 |
-
airline commander free licenses<br />
|
24 |
-
airline commander free upgrades<br />
|
25 |
-
airline commander tips and tricks<br />
|
26 |
-
airline commander guide and walkthrough<br />
|
27 |
-
airline commander best planes<br />
|
28 |
-
airline commander best routes<br />
|
29 |
-
airline commander best strategies<br />
|
30 |
-
how to hack airline commander<br />
|
31 |
-
how to cheat in airline commander<br />
|
32 |
-
how to get free ac credits in airline commander<br />
|
33 |
-
how to get free flights in airline commander<br />
|
34 |
-
how to get free planes in airline commander<br />
|
35 |
-
how to get free licenses in airline commander<br />
|
36 |
-
how to get free upgrades in airline commander<br />
|
37 |
-
how to play airline commander offline<br />
|
38 |
-
how to play airline commander on pc<br />
|
39 |
-
how to play airline commander with friends<br />
|
40 |
-
is there a hack for airline commander<br />
|
41 |
-
is there a cheat for airline commander<br />
|
42 |
-
is there a mod for airline commander<br />
|
43 |
-
is there a way to get free ac credits in airline commander<br />
|
44 |
-
is there a way to get free flights in airline commander<br />
|
45 |
-
is there a way to get free planes in airline commander<br />
|
46 |
-
is there a way to get free licenses in airline commander<br />
|
47 |
-
is there a way to get free upgrades in airline commander<br />
|
48 |
-
does airline commander hack work<br />
|
49 |
-
does airline commander cheat work<br />
|
50 |
-
does airline commander mod work<br />
|
51 |
-
does airline commander have multiplayer mode<br />
|
52 |
-
does airline commander have realistic mode<br />
|
53 |
-
does airline commander have weather effects<br />
|
54 |
-
does airline commander have emergencies and failures</p>
|
55 |
-
<p>That's why using an Airline Commander hack can be very helpful. With this hack, you can unlock all planes instantly and customize them as you wish. You don't have to worry about money or licenses anymore. You can just pick any plane you like and fly it anywhere you want.</p>
|
56 |
-
<p>This way, you can enjoy the realistic flight experience with different planes and routes. You can also compete with other players and prove your skills as a pilot.</p>
|
57 |
-
<h2>How to Get Free AC Credits in Airline Commander</h2>
|
58 |
-
<p>Another feature of Airline Commander is that it uses AC credits as an advanced currency in the game. AC credits are very useful for many things, such as buying special planes, upgrading your fleet, speeding up your progress, and more.</p>
|
59 |
-
<p>However, AC credits are also very hard to get. You can only earn them from daily tasks and achievements, which are limited and time-consuming. You can also buy them with real money, but that can be expensive and not worth it.</p>
|
60 |
-
<p>That's why using an Airline Commander hack can be very beneficial. With this hack, you can generate unlimited AC credits for free. You don't have to spend any time or money on them anymore. You can just use them for whatever you want in the game.</p>
|
61 |
-
<p>This way, you can enhance your gameplay and make it more enjoyable. You can also unlock more features and options in the game and have more fun than ever.</p>
|
62 |
-
<h2>Conclusion</h2>
|
63 |
-
<p>Airline Commander is a fantastic flight simulator game that lets you experience the thrill of flying big aircrafts and managing your own airline. However, it can also be frustrating and limiting if you don't have enough planes, routes, and AC credits.</p>
|
64 |
-
<p>That's why using an Airline Commander hack can be a great idea. With this hack, you can unlock all planes and get free AC credits in a matter of minutes. You don't have to spend any time or money on them anymore. You can just enjoy the game to the fullest and have a blast.</p>
|
65 |
-
<p>If you want to try this hack, you can download it from the link below. It is safe, easy, and fast to use. You just need to follow the instructions and enter your username. Then, you can choose how many planes and AC credits you want and click on the generate button. That's it!</p>
|
66 |
-
<p>Don't miss this opportunity and get your Airline Commander hack today. You will be amazed by how much better your gameplay will be. You will also impress your friends and other players with your skills and achievements.</p>
|
67 |
-
<p>So, what are you waiting for? Click on the link below and start your flight adventure now!</p>
|
68 |
-
<p><a href="">Download Airline Commander Hack Here</a></p>
|
69 |
-
<h2>FAQs</h2>
|
70 |
-
<h3>Is this hack safe to use?</h3>
|
71 |
-
<p>Yes, this hack is 100% safe and secure to use. It does not require any root or jailbreak, and it does not contain any viruses or malware. It also does not ask for your password or personal information. It only uses your username to connect to the game server and generate the resources you want.</p>
|
72 |
-
<h3>Will I get banned for using this hack?</h3>
|
73 |
-
<p>No, you will not get banned for using this hack. This hack has a built-in anti-ban system that protects your account from detection and suspension. It also uses proxy servers and encryption methods to ensure your safety and privacy. You can use this hack without any worries or risks.</p>
|
74 |
-
<h3>How often can I use this hack?</h3>
|
75 |
-
<p>You can use this hack as often as you want. There is no limit or restriction on how many times you can use it or how many resources you can generate. You can always come back and use it again whenever you need more planes or AC credits.</p>
|
76 |
-
<h3>Does this hack work on all devices?</h3>
|
77 |
-
<p>Yes, this hack works on all devices that support Airline Commander. It does not matter if you are using an Android or iOS device, a smartphone or a tablet, a PC or a Mac. As long as you have an internet connection and a browser, you can use this hack from any device.</p>
|
78 |
-
<h3>Do I need to update this hack?</h3>
|
79 |
-
<p>No, you do not need to update this hack manually. This hack is always updated automatically to match the latest version of the game. You don't have to worry about compatibility issues or errors. You can always enjoy the latest features and benefits of this hack.</p> 197e85843d<br />
|
80 |
-
<br />
|
81 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Among Us on PC - How to Download and Install the Game for Free.md
DELETED
@@ -1,176 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>How to Download Among Us on PC Windows 7</h1>
|
3 |
-
<p>Among Us is a popular multiplayer game that has taken the gaming world by storm. It is a social deduction game where you play as either a crewmate or an imposter on a spaceship. As a crewmate, your goal is to complete tasks around the ship while avoiding being killed by the imposters. As an imposter, your goal is to kill enough crewmates without being caught or voted out.</p>
|
4 |
-
<p>Among Us is a fun and addictive game that can be played online or locally with up to 15 players. You can customize your character, choose from different maps and modes, chat with other players, and enjoy cross-platform play between Android, iOS, PC, and console. If you are looking for a game that will test your skills of deception, teamwork, and deduction, then you should definitely give Among Us a try.</p>
|
5 |
-
<h2>how to download among us in pc windows 7</h2><br /><p><b><b>Download File</b> 🗸🗸🗸 <a href="https://urlin.us/2uSYw7">https://urlin.us/2uSYw7</a></b></p><br /><br />
|
6 |
-
<p>But how can you play Among Us on your PC Windows 7? There are two main ways to do so: using emulators or downloading the game directly from Steam or Microsoft Store. In this article, we will show you how to do both methods step by step. We will also give you some tips and tricks for playing Among Us on PC. Let's get started!</p>
|
7 |
-
<h2>How to Download Among Us on PC with Emulators</h2>
|
8 |
-
<h3>What are Emulators and How They Work</h3>
|
9 |
-
<p>An emulator is a software that allows you to run Android apps on your PC. It simulates the Android operating system and creates a virtual environment where you can install and use Android apps just like you would on your phone or tablet. Emulators are useful for playing Android games on a bigger screen, using keyboard and mouse controls, recording gameplay videos, or testing apps before publishing them.</p>
|
10 |
-
<p>There are many emulators available for PC Windows 7, such as Bluestacks, Gameloop, LDPlayer, NoxPlayer, etc. Each emulator has its own features, advantages, and disadvantages. You can choose the one that suits your preferences and system requirements. However, keep in mind that emulators may consume a lot of CPU and RAM resources, so make sure your PC can handle them.</p>
|
11 |
-
<h3>How to Install an Emulator on Your PC</h3>
|
12 |
-
<p>To install an emulator on your PC, follow these steps: - Go to the official website of the emulator you want to use and download the installer file. For example, if you want to use Bluestacks, go to [Bluestacks.com] and click on the "Download Bluestacks" button. - Run the installer file and follow the instructions on the screen. You may need to grant some permissions and choose a location for the emulator files. - Wait for the installation process to finish. It may take some time depending on your internet speed and PC performance. - Launch the emulator and sign in with your Google account. If you don't have one, you can create one for free. - Congratulations! You have successfully installed an emulator on your PC. Now you can access the Google Play Store and download Android apps on your PC.</p>
|
13 |
-
<h3>How to Download and Play Among Us on Your Emulator</h3>
|
14 |
-
<p>To download and play Among Us on your emulator, follow these steps: - Open the emulator and go to the Google Play Store. You can find it on the home screen or in the app drawer of the emulator. - Search for "Among Us" in the search bar and tap on the game icon. You can also use this [link] to go directly to the game page. - Tap on the "Install" button and wait for the game to download and install on your emulator. - Tap on the "Open" button or find the game icon on the home screen or in the app drawer of the emulator. - Enjoy playing Among Us on your PC with your emulator!</p>
|
15 |
-
<h2>How to Download Among Us on PC without Emulators</h2>
|
16 |
-
<h3>What are the Requirements for Playing Among Us on PC without Emulators</h3>
|
17 |
-
<p>If you don't want to use emulators, you can also download Among Us directly from Steam or Microsoft Store. However, you will need to meet some requirements for playing Among Us on PC without emulators. Here are the minimum and recommended system requirements for playing Among Us on PC: <table>
|
18 |
-
<tr>
|
19 |
-
<th>Minimum Requirements</th>
|
20 |
-
<th>Recommended Requirements</th>
|
21 |
-
</tr>
|
22 |
-
<tr>
|
23 |
-
<td>OS: Windows 7 SP1+</td>
|
24 |
-
<td>OS: Windows 10</td>
|
25 |
-
</tr>
|
26 |
-
<tr>
|
27 |
-
<td>Processor: SSE2 instruction set support</td>
|
28 |
-
<td>Processor: Intel Core i3 or higher</td>
|
29 |
-
</tr>
|
30 |
-
<tr>
|
31 |
-
<td>Memory: 1 GB RAM</td>
|
32 |
-
<td>Memory: 4 GB RAM</td>
|
33 |
-
</tr>
|
34 |
-
<tr>
|
35 |
-
<td>DirectX: Version 10</td>
|
36 |
-
<td>DirectX: Version 12</td>
|
37 |
-
</tr>
|
38 |
-
<tr>
|
39 |
-
<td>Storage: 250 MB available space</td>
|
40 |
-
<td>Storage: 500 MB available space</td>
|
41 |
-
</tr>
|
42 |
-
</table>
|
43 |
-
<p>Make sure your PC meets these requirements before downloading Among Us from Steam or Microsoft Store.</p>
|
44 |
-
<h3>How to Download and Install Among Us on Steam</h3>
|
45 |
-
<p>To download and install Among Us on Steam, follow these steps: - Go to [Steam's official website] and download the Steam client. If you already have Steam installed, skip this step. - Run the Steam client and sign in with your Steam account. If you don't have one, you can create one for free. - Go to [Among Us's game page] on Steam or search for "Among Us" in the Steam store. - Click on the "Add to Cart" button and proceed to checkout. You will need to pay $4.99 USD to purchase Among Us on Steam. - After purchasing, go to your library and find Among Us in your games list. Click on the "Install" button and wait for the game to download and install on your PC. - Click on the "Play" button or double-click on the game icon in your library to launch Among Us on Steam. - Enjoy playing Among Us on your PC with Steam!</p>
|
46 |
-
<h3>How to Download and Install Among Us from Microsoft Store</h3>
|
47 |
-
<p>To download and install Among Us from Microsoft Store, follow these steps: - Go to [Microsoft Store's official website] or open the Microsoft Store app on your PC Windows 7. - Search for "Among Us" in the search bar and click on the game icon. You can also use this [link] to go directly to the game page. - Click on the "Get" button and sign in with your Microsoft account. If you don't have one, you can create one for free. - Wait for the game to download and install on your PC. - Click on the "Play" button or find the game icon in your start menu or desktop to launch Among Us from Microsoft Store. - Enjoy playing Among Us on your PC with Microsoft Store!</p>
|
48 |
-
<p>How to install among us on windows 7 laptop<br />
|
49 |
-
How to play among us on pc without emulator<br />
|
50 |
-
How to get among us for free on windows 7<br />
|
51 |
-
How to run among us on windows 7 32 bit<br />
|
52 |
-
How to download among us on steam for windows 7<br />
|
53 |
-
How to update among us on pc windows 7<br />
|
54 |
-
How to fix among us not working on windows 7<br />
|
55 |
-
How to download among us on pc with bluestacks<br />
|
56 |
-
How to play among us online on windows 7<br />
|
57 |
-
How to download among us airship map on windows 7<br />
|
58 |
-
How to download among us mod menu on pc windows 7<br />
|
59 |
-
How to play among us with friends on windows 7<br />
|
60 |
-
How to download among us on pc without steam<br />
|
61 |
-
How to change language in among us on windows 7<br />
|
62 |
-
How to download among us on pc with gameloop<br />
|
63 |
-
How to play hide and seek in among us on windows 7<br />
|
64 |
-
How to download among us on pc with ldplayer<br />
|
65 |
-
How to use discord with among us on windows 7<br />
|
66 |
-
How to download among us on pc from google play store<br />
|
67 |
-
How to create a server in among us on windows 7<br />
|
68 |
-
How to download among us on pc with nox player<br />
|
69 |
-
How to customize your character in among us on windows 7<br />
|
70 |
-
How to download among us on pc with memu play<br />
|
71 |
-
How to join a game in among us on windows 7<br />
|
72 |
-
How to download among us on pc from official website<br />
|
73 |
-
How to chat in among us on windows 7 keyboard<br />
|
74 |
-
How to download among us on pc with koplayer<br />
|
75 |
-
How to vote in among us on windows 7 mouse<br />
|
76 |
-
How to download among us on pc with genymotion<br />
|
77 |
-
How to report a body in among us on windows 7<br />
|
78 |
-
How to download among us on pc with andy emulator<br />
|
79 |
-
How to use voice chat in among us on windows 7<br />
|
80 |
-
How to download among us on pc with remix os player<br />
|
81 |
-
How to be an impostor in among us on windows 7<br />
|
82 |
-
How to download among us on pc with phoenix os<br />
|
83 |
-
How to use skins and pets in among us on windows 7<br />
|
84 |
-
How to download among us on pc with prime os<br />
|
85 |
-
How to complete tasks in among us on windows 7<br />
|
86 |
-
How to download among us on pc with tencent gaming buddy<br />
|
87 |
-
How to sabotage in among us on windows 7 keyboard shortcuts<br />
|
88 |
-
How to download among us on pc with droid4x emulator<br />
|
89 |
-
How to change name and color in among us on windows 7<br />
|
90 |
-
How to download among us on pc with windroy emulator<br />
|
91 |
-
How to kick or ban players in among us on windows 7 host settings <br />
|
92 |
-
How to download among us on pc with youwave emulator <br />
|
93 |
-
How to enable crossplay in among us on windows 7 <br />
|
94 |
-
How to download among us on pc with leapdroid emulator <br />
|
95 |
-
How to link accounts in among us on windows 7</p>
|
96 |
-
<h2>T ips and Tricks for Playing Among Us on PC</h2>
|
97 |
-
<h3>How to Customize Your Character and Settings</h3>
|
98 |
-
<p>One of the fun aspects of Among Us is that you can customize your character and settings to suit your preferences. Here are some of the things you can do: - To change your name, color, hat, skin, pet, or language, go to the main menu and click on the "Customize" button at the bottom right corner. You can also access this option in the lobby before starting a game. - To change the game settings, such as the number of imposters, map, mode, speed, vision, kill cooldown, task difficulty, etc., go to the lobby and click on the "Game" button at the bottom left corner. You can also access this option in the main menu by clicking on the "Host" button and creating a private game. - To change the sound and graphics settings, such as the volume, resolution, full screen mode, vsync, etc., go to the main menu and click on the "Settings" button at the bottom left corner. You can also access this option in the lobby by clicking on the gear icon at the top right corner.</p>
|
99 |
-
<h3>How to Play as a Crewmate or an Imposter</h3>
|
100 |
-
<p>Among Us is a game of deception and deduction. Depending on your role, you will have different objectives and strategies. Here are some of the basics of how to play as a crewmate or an imposter: - As a crewmate, your goal is to complete tasks around the ship and find out who the imposters are. You can see your tasks on the top left corner of your screen or by opening your map. Tasks are mini-games that require you to perform simple actions, such as connecting wires, swiping cards, scanning bodies, etc. Completing tasks will fill up the task bar at the top of your screen. If you fill up the task bar before the imposters kill everyone, you win. - As an imposter, your goal is to kill enough crewmates without being caught or voted out. You can see who your fellow imposters are by their red names. You can kill crewmates by getting close to them and clicking on the "Kill" button at the bottom right corner of your screen. However, you have to wait for a cooldown time before you can kill again. You can also sabotage the ship by clicking on the "Sabotage" button at the bottom right corner of your screen. Sabotages are actions that disrupt the crewmates' tasks or cause emergencies, such as locking doors, turning off lights, starting a reactor meltdown, etc. Sabotages can help you create chaos, distract crewmates, or prevent them from completing tasks. - As a crewmate or an imposter, you can use vents to move around the map quickly and secretly. Vents are holes that connect different rooms of the ship. You can enter or exit vents by clicking on them when you are near them. However, only imposters can use vents, so be careful not to be seen by crewmates when you do so. - As a crewmate or an imposter, you can use cameras to monitor other players' activities. Cameras are devices that show live feeds of different areas of the map. You can access cameras by going to the security room and clicking on the screen. However, using cameras will limit your vision and movement, so be careful not to miss anything important or expose yourself to danger when you do so. - As a crewmate or an imposter, you can participate in meetings to discuss and vote for who you think is an imposter. Meetings are triggered when someone reports a dead body or calls an emergency meeting by pressing a button. During meetings, you can chat with other players by typing or using voice chat (if enabled). You can also vote for someone by clicking on their name or skip voting by clicking on the skip button. The person with the most votes will be ejected from the ship. If there is a tie, no one will be ejected. If all imposters are ejected or all crewmates are killed, the game ends.</p>
|
101 |
-
<h3>How to Use Keyboard and Mouse Controls</h3>
|
102 |
-
<p>Playing Among Us on PC with keyboard and mouse controls can give you an edge over playing on mobile devices with touch controls. Here are some of the default keyboard and mouse controls for playing Among Us on PC and how to change them if needed: <table>
|
103 |
-
<tr>
|
104 |
-
<th>Action</th>
|
105 |
-
<th>Keyboard Control</th>
|
106 |
-
<th>Mouse Control</th>
|
107 |
-
</tr>
|
108 |
-
<tr>
|
109 |
-
<td>Move</td>
|
110 |
-
<td>WASD keys</td>
|
111 |
-
<td>Left click and drag</td>
|
112 |
-
</tr>
|
113 |
-
<tr>
|
114 |
-
<td>Use</td>
|
115 |
-
<td>E key or Spacebar</td>
|
116 |
-
<td>Left click</td>
|
117 |
-
</tr>
|
118 |
-
<tr>
|
119 |
-
<td>Kill</td>
|
120 |
-
<td>Q key</td>
|
121 |
-
<td>Left click</ </td>
|
122 |
-
</tr>
|
123 |
-
<tr>
|
124 |
-
<td>Sabotage</td>
|
125 |
-
<td>R key</td>
|
126 |
-
<td>Left click</td>
|
127 |
-
</tr>
|
128 |
-
<tr>
|
129 |
-
<td>Report</td>
|
130 |
-
<td>R key</td>
|
131 |
-
<td>Left click</td>
|
132 |
-
</tr>
|
133 |
-
<tr>
|
134 |
-
<td>Map</td>
|
135 |
-
<td>Tab key</td>
|
136 |
-
<td>Left click</td>
|
137 |
-
</tr>
|
138 |
-
<tr>
|
139 |
-
<td>Chat</td>
|
140 |
-
<td>T key or Enter key</td>
|
141 |
-
<td>Left click</td>
|
142 |
-
</tr>
|
143 |
-
<tr>
|
144 |
-
<td>Settings</td>
|
145 |
-
<td>Escape key</td>
|
146 |
-
<td>Left click</td>
|
147 |
-
</tr>
|
148 |
-
<tr>
|
149 |
-
<td>Confirm</td>
|
150 |
-
<td>E key or Spacebar</td>
|
151 |
-
<td>Left click</td>
|
152 |
-
</tr>
|
153 |
-
<tr>
|
154 |
-
<td>Back</td>
|
155 |
-
<td>Escape key or Backspace key</td>
|
156 |
-
<td>Right click or Left click on the back button</td>
|
157 |
-
</tr>
|
158 |
-
</table>
|
159 |
-
<p>To change the keyboard and mouse controls, go to the main menu and click on the "Settings" button at the bottom left corner. Then, click on the "Controls" tab and choose the option that suits you best. You can also customize the keyboard controls by clicking on the "Customize Keyboard" button and assigning different keys to different actions.</p>
|
160 |
-
<h2>Conclusion</h2>
|
161 |
-
<p>In this article, we have shown you how to download Among Us on PC Windows 7 using two methods: with emulators or without emulators. We have also given you some tips and tricks for playing Among Us on PC, such as how to customize your character and settings, how to play as a crewmate or an imposter, and how to use keyboard and mouse controls. We hope you found this article helpful and informative.</p>
|
162 |
-
<p>Among Us is a game that will keep you entertained and engaged for hours. It is a game that will challenge your skills of deception, teamwork, and deduction. It is a game that will make you laugh, scream, and rage. It is a game that you should definitely try out if you haven't already.</p>
|
163 |
-
<p>So what are you waiting for? Download Among Us on your PC Windows 7 today and join the fun! And don't forget to share this article with your friends who might also be interested in playing Among Us on PC. Happy gaming!</p>
|
164 |
-
<h2>Frequently Asked Questions (FAQs)</h2>
|
165 |
-
<h3>Q: Is Among Us free on PC?</h3>
|
166 |
-
<p>A: Among Us is not free on PC. You have to pay $4.99 USD to purchase it from Steam or Microsoft Store. However, you can play it for free on PC using emulators, which allow you to run Android apps on your PC.</p>
|
167 |
-
<h3>Q: Can I play Among Us on PC with my friends who play on mobile devices?</h3>
|
168 |
-
<p>A: Yes, you can. Among Us supports cross-platform play between Android, iOS, PC, and console. You can join the same game with your friends who play on different devices by entering the same code or creating a private game.</p>
|
169 |
-
<h3>Q: How can I update Among Us on PC?</h3>
|
170 |
-
<p>A: If you downloaded Among Us from Steam or Microsoft Store, you can update it automatically by launching the game or checking for updates in the store. If you downloaded Among Us from an emulator, you can update it manually by going to the Google Play Store and tapping on the "Update" button.</p>
|
171 |
-
<h3>Q: How can I report bugs or issues in Among Us on PC?</h3>
|
172 |
-
<p>A: If you encounter any bugs or issues in Among Us on PC, you can report them to the developers by filling out this [form] or contacting them via email at [email protected].</p>
|
173 |
-
<h3>Q: How can I get more information about Among Us on PC?</h3>
|
174 |
-
<p>A: If you want to get more information about Among Us on PC, such as the latest news, updates, features, tips, guides, etc., you can visit the official website of Among Us at [innersloth.com] or follow their social media accounts at [Twitter], [Facebook], [Instagram], [YouTube], [Discord], [Reddit], etc.</p> 197e85843d<br />
|
175 |
-
<br />
|
176 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Brawl Stars Cheats How to Download and Install the Unlimited Gems Mod.md
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Download Brawl Stars Unlimited Gems: How to Get Free Gems in Brawl Stars</h1>
|
3 |
-
<p>If you are a fan of Brawl Stars, you probably know how important gems are in this game. Gems are the premium currency that can help you unlock and upgrade your favorite brawlers, buy cool skins, gadgets, and star powers, and get access to exclusive offers and rewards. But how can you get free gems in Brawl Stars without spending real money? In this article, we will show you how to download Brawl Stars unlimited gems using different methods. But first, let's take a look at what Brawl Stars is and why you need gems in the first place.</p>
|
4 |
-
<h2>download brawl stars unlimited gems</h2><br /><p><b><b>Download</b> 🗸 <a href="https://urlin.us/2uT09K">https://urlin.us/2uT09K</a></b></p><br /><br />
|
5 |
-
<h2>What is Brawl Stars?</h2>
|
6 |
-
<h3>A fast-paced multiplayer game with various modes and characters</h3>
|
7 |
-
<p>Brawl Stars is a popular mobile game developed by Supercell, the makers of Clash of Clans, Clash Royale, and Boom Beach. It is a 3v3 or solo multiplayer game that features various game modes, such as Gem Grab, Showdown, Brawl Ball, Bounty, Heist, Special Events, and Championship Challenge. In each mode, you have to team up with your friends or play solo against other players from around the world and use your skills and strategies to win the match.</p>
|
8 |
-
<p>Brawl Stars also has a diverse cast of characters called brawlers, each with their own unique abilities, attacks, and super moves. There are currently over 40 brawlers in the game, divided into different rarities: Trophy Road, Rare, Super Rare, Epic, Mythic, Legendary, and Chromatic. You can unlock new brawlers by opening brawl boxes or buying them with gems. You can also customize your brawlers with different skins that change their appearance and animations.</p>
|
9 |
-
<h3>Why do you need gems in Brawl Stars?</h3>
|
10 |
-
<h4>To unlock and upgrade brawlers, skins, gadgets, and star powers</h4>
|
11 |
-
<p>One of the main reasons why you need gems in Brawl Stars is to unlock and upgrade your brawlers. As mentioned earlier, brawlers are the characters that you use to play the game. Each brawler has a power level that determines their stats and performance. You can increase your brawler's power level by collecting power points and coins. Power points are items that you can get from brawl boxes or buy with coins. Coins are the basic currency that you can earn by playing the game or opening brawl boxes.</p>
|
12 |
-
<p>However, some brawlers are not available from brawl boxes or coins. They can only be bought with gems. These include some of the rarest and most powerful brawlers in the game, such as Leon, Sandy, Spike, Amber, Colette, Gale, Surge, Lou, Colonel Ruffs, Belle, Buzz, Griff, Ash, Meg, etc. These brawlers can cost anywhere from 30 to 700 gems depending on their rarity.</p>
|
13 |
-
<p>Gems can also help you unlock and upgrade your brawler's skins, gadgets, and star powers. Skins are cosmetic items that change your brawler's look and animations. Some skins can be bought with coins or star points (a special currency that you can earn by reaching certain ranks), but most of them require gems. Gadgets are special items that give your brawler an extra ability that can be activated once or twice per match. Star powers are passive abilities that enhance your brawler's super move or basic attack. Both gadgets and star powers can be unlocked from brawl boxes once your brawler reaches power level 7 and <p>10 and 9 respectively, but you can also buy them with gems if you don't want to wait.</p>
|
14 |
-
<h4>To buy brawl boxes, brawl pass, and special offers</h4>
|
15 |
-
<p>Another reason why you need gems in Brawl Stars is to buy brawl boxes, brawl pass, and special offers. Brawl boxes are loot boxes that contain various rewards, such as coins, power points, brawlers, gadgets, star powers, and tokens. Tokens are items that you can use to unlock the brawl pass tiers. You can get brawl boxes by playing the game or buying them with gems. There are different types of brawl boxes, such as normal, big, and mega boxes, that have different chances of dropping rare items.</p>
|
16 |
-
<p>Brawl pass is a seasonal feature that gives you access to exclusive rewards, such as brawlers, skins, coins, power points, gems, and more. There are two tracks of the brawl pass: the free track and the premium track. The free track is available for everyone and contains basic rewards. The premium track costs 169 gems and contains more valuable and exclusive rewards. You can unlock the rewards by collecting tokens or buying tiers with gems.</p>
|
17 |
-
<p>Special offers are limited-time deals that give you discounts or bonuses on certain items, such as brawl boxes, brawlers, skins, coins, power points, gems, etc. You can find them in the shop section of the game and buy them with gems. Some special offers are only available for certain players or events, so make sure to check them out regularly.</p>
|
18 |
-
<p>How to download brawl stars mod apk with unlimited gems and coins<br />
|
19 |
-
Brawl stars hack download free gems generator no survey<br />
|
20 |
-
Download brawl stars latest version with unlimited gems and brawlers<br />
|
21 |
-
Brawl stars cheats download for android and ios devices<br />
|
22 |
-
Brawl stars unlimited gems apk download 2023 working<br />
|
23 |
-
Download brawl stars hack tool online for free gems and resources<br />
|
24 |
-
Brawl stars mod menu download with unlimited gems and skins<br />
|
25 |
-
Brawl stars private server download with unlimited gems and legendary brawlers<br />
|
26 |
-
Download brawl stars game with unlimited gems and money<br />
|
27 |
-
Brawl stars tips and tricks to get unlimited gems and rewards<br />
|
28 |
-
Brawl stars free gems download without human verification or root<br />
|
29 |
-
Download brawl stars cracked apk with unlimited gems and tickets<br />
|
30 |
-
Brawl stars glitch download for unlimited gems and trophies<br />
|
31 |
-
Brawl stars mega mod apk download with unlimited gems and power points<br />
|
32 |
-
Download brawl stars hack version with unlimited gems and star points<br />
|
33 |
-
Brawl stars guide to download and install unlimited gems mod<br />
|
34 |
-
Brawl stars gameplay with unlimited gems and characters<br />
|
35 |
-
Download brawl stars for pc with unlimited gems and features<br />
|
36 |
-
Brawl stars online generator download for free gems and coins<br />
|
37 |
-
Brawl stars best brawlers to use with unlimited gems and abilities<br />
|
38 |
-
Download brawl stars update with unlimited gems and new events<br />
|
39 |
-
Brawl stars codes to redeem for unlimited gems and items<br />
|
40 |
-
Download brawl stars 3d mod with unlimited gems and graphics<br />
|
41 |
-
Brawl stars review of the unlimited gems mod apk<br />
|
42 |
-
Brawl stars tutorial on how to download and use unlimited gems hack<br />
|
43 |
-
Download brawl stars offline mode with unlimited gems and bots<br />
|
44 |
-
Brawl stars fun mode download with unlimited gems and custom games<br />
|
45 |
-
Brawl stars wallpaper download with unlimited gems and cool designs<br />
|
46 |
-
Brawl stars videos of players using unlimited gems and hacks<br />
|
47 |
-
Download brawl stars old version with unlimited gems and nostalgia<br />
|
48 |
-
Brawl stars challenges to complete with unlimited gems and rewards<br />
|
49 |
-
Download brawl stars on mac with unlimited gems and compatibility<br />
|
50 |
-
Brawl stars memes about the unlimited gems mod apk<br />
|
51 |
-
Download brawl stars on chromebook with unlimited gems and performance<br />
|
52 |
-
Brawl stars news about the unlimited gems mod apk ban<br />
|
53 |
-
Download brawl stars on windows 10 with unlimited gems and support<br />
|
54 |
-
Brawl stars fan art of the unlimited gems mod apk users<br />
|
55 |
-
Download brawl stars on linux with unlimited gems and stability<br />
|
56 |
-
Brawl stars quiz to test your knowledge of the unlimited gems mod apk<br />
|
57 |
-
Download brawl stars on fire tablet with unlimited gems and quality<br />
|
58 |
-
Brawl stars facts about the unlimited gems mod apk development<br />
|
59 |
-
Download brawl stars on bluestacks with unlimited gems and speed<br />
|
60 |
-
Brawl stars opinions about the unlimited gems mod apk ethics<br />
|
61 |
-
Download brawl stars on nox player with unlimited gems and features<br />
|
62 |
-
Brawl stars secrets of the unlimited gems mod apk creators<br />
|
63 |
-
Download brawl stars on ldplayer with unlimited gems and optimization<br />
|
64 |
-
Brawl stars rumors about the next update of the unlimited gems mod apk</p>
|
65 |
-
<h2>How to download Brawl Stars unlimited gems?</h2>
|
66 |
-
<h3>The official way: complete quests, watch ads, and participate in events</h3>
|
67 |
-
<p>The official way to download Brawl Stars unlimited gems is to earn them by playing the game. There are several ways to do this:</p>
|
68 |
-
<ul>
|
69 |
-
<li>Complete quests: Quests are tasks that you can complete by playing certain game modes or using certain brawlers. You can find them in the quest menu of the game and claim your rewards after completing them. Some quests give you gems as rewards, while others give you tokens that you can use to unlock the brawl pass tiers that also contain gems.</li>
|
70 |
-
<li>Watch ads: Ads are short videos that you can watch in exchange for gems or other rewards. You can find them in the free box section of the shop or in the offer wall section of the settings menu. You can watch up to 5 ads per day and earn up to 10 gems per day.</li>
|
71 |
-
<li>Participate in events: Events are special game modes or challenges that are available for a limited time and offer unique rewards. Some events give you gems as rewards, such as the Championship Challenge or the Brawl-o-ween event. You can find them in the event menu of the game and join them by using tickets or tokens.</li>
|
72 |
-
</ul>
|
73 |
-
<p>These methods are safe and legal, but they require a lot of time and patience to accumulate enough gems for your needs. If you want a faster and easier way to download Brawl Stars unlimited gems, you might want to try the unofficial way.</p>
|
74 |
-
<h3>The unofficial way: use a modded APK or a hack tool</h3>
|
75 |
-
<p>The unofficial way to download Brawl Stars unlimited gems is to use a modded APK or a hack tool. These are third-party applications or websites that claim to give you unlimited gems or other resources in Brawl Stars by modifying the game files or injecting code into the game servers. However, these methods are not recommended for several reasons:</p>
|
76 |
-
<h4>The pros and cons of using a modded APK</h4>
|
77 |
-
<p>A modded APK is a modified version of the original Brawl Stars game that has been altered to give you unlimited gems or other features. Some of the pros of using a modded APK are:</p>
|
78 |
-
<ul>
|
79 |
-
<li>You can get unlimited gems without spending any money or time.</li>
|
80 |
-
<li>You can unlock and upgrade all brawlers, skins, gadgets, and star powers without any restrictions.</li>
|
81 |
-
<li>You can access some features that are not available in the official game, such as custom maps, modes, characters, etc.</li>
|
82 |
-
</ul>
|
83 |
-
<p>Some of the cons of using a modded APK are:</p>
|
84 |
-
<ul>
|
85 |
-
<li>You have to download and install the modded APK from an unknown source that might contain viruses or malware.</li>
|
86 |
-
<li>You have to uninstall the official game and lose your progress and account.</li>
|
87 |
-
<li>You have to update the modded APK every time there is a new version of the official game.</li>
|
88 |
-
<li>You might face compatibility issues with your device or operating system.</li>
|
89 |
-
<li>You might get banned from the official game if Supercell detects your modded APK.</li>
|
90 |
-
</ul> <h4>The pros and cons of using a hack tool</h4>
|
91 |
-
<p>A hack tool is a website or an application that claims to give you unlimited gems or other resources in Brawl Stars by hacking the game servers or generating fake codes. Some of the pros of using a hack tool are:</p>
|
92 |
-
<ul>
|
93 |
-
<li>You don't have to download or install anything on your device.</li>
|
94 |
-
<li>You don't have to uninstall the official game or lose your progress and account.</li>
|
95 |
-
<li>You can use the hack tool on any device or platform.</li>
|
96 |
-
<li>You can get unlimited gems without spending any money or time.</li>
|
97 |
-
</ul>
|
98 |
-
<p>Some of the cons of using a hack tool are:</p>
|
99 |
-
<ul>
|
100 |
-
<li>You have to visit an unknown website or use an unknown application that might contain viruses or malware.</li>
|
101 |
-
<li>You have to enter your personal information or account details that might be stolen or misused.</li>
|
102 |
-
<li>You have to complete surveys, offers, or human verification that might be annoying or fraudulent.</li>
|
103 |
-
<li>You might not get the gems or resources that you requested or expected.</li>
|
104 |
-
<li>You might get banned from the official game if Supercell detects your hack tool.</li>
|
105 |
-
</ul>
|
106 |
-
<h2>Conclusion</h2>
|
107 |
-
<h3>Summary of the main points</h3>
|
108 |
-
<p>In conclusion, Brawl Stars is a fun and addictive game that requires gems to unlock and upgrade your brawlers, skins, gadgets, and star powers, and to buy brawl boxes, brawl pass, and special offers. You can download Brawl Stars unlimited gems by using the official way or the unofficial way. The official way is to earn gems by completing quests, watching ads, and participating in events. The unofficial way is to use a modded APK or a hack tool that claim to give you unlimited gems or other resources by modifying the game files or hacking the game servers. However, both methods have their pros and cons, and you should be careful and responsible when using them.</p>
|
109 |
-
<h3>Call to action and disclaimer</h3>
|
110 |
-
<p>If you want to download Brawl Stars unlimited gems, you can try any of the methods that we have discussed in this article. However, we recommend that you use the official way as much as possible, as it is safer, legal, and fair. The unofficial way might seem tempting, but it is risky, illegal, and unfair. You might end up harming your device, losing your account, or getting banned from the game. Plus, you might ruin the fun and challenge of the game for yourself and others.</p>
|
111 |
-
<p>So, what are you waiting for? Download Brawl Stars now and enjoy the game with your friends. And remember, don't cheat, play fair!</p>
|
112 |
-
<h3>FAQs</h3>
|
113 |
-
<ul>
|
114 |
-
<li><b>Q: How many gems can I get from the official way?</b></li>
|
115 |
-
<li>A: It depends on how often and how well you play the game. You can get up to 10 gems per day from watching ads, up to 90 gems per season from completing quests, and up to 100 gems per season from unlocking the brawl pass tiers. You can also get some gems from participating in events that offer them as rewards.</li>
|
116 |
-
<li><b>Q: How many gems can I get from the unofficial way?</b></li>
|
117 |
-
<li>A: It depends on which modded APK or hack tool you use. Some of them claim to give you unlimited gems or other resources, while others claim to give you a certain amount of gems or resources per day or per use. However, there is no guarantee that they will work as advertised or at all.</li>
|
118 |
-
<li><b>Q: Is it safe to use a modded APK or a hack tool?</b></li>
|
119 |
-
<li>A: No, it is not safe to use a modded APK or a hack tool. You might expose your device to viruses or malware, your personal information or account details to hackers or scammers, and your game progress or account to loss or ban. You might also violate the terms of service and privacy policy of Supercell and Brawl Stars.</li>
|
120 |
-
<li><b>Q: Is it legal to use a modded APK or a hack tool?</b></li>
|
121 |
-
<li>A: No, it is not legal to use a modded APK or a hack tool. You might infringe the intellectual property rights of Supercell and Brawl Stars, and you might face legal consequences if caught. You might also break the rules of fair play and sportsmanship of Brawl Stars and its community.</li>
|
122 |
-
<li><b>Q: Is it fair to use a modded APK or a hack tool?</b></li>
|
123 |
-
<li>A: No, it is not fair to use a modded APK or a hack tool. You might gain an unfair advantage over other players who play the game legitimately, and you might ruin their gaming experience and enjoyment. You might also <p>disrespect the hard work and creativity of the developers and designers of Brawl Stars.</li>
|
124 |
-
</ul></p> 197e85843d<br />
|
125 |
-
<br />
|
126 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Dolphin Emulator The Ultimate Guide to Downloading and Setting Up the Latest Version.md
DELETED
@@ -1,116 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Introduction</h1>
|
3 |
-
<p>If you are a fan of Nintendo games, you might have wondered if there is a way to play them on your PC with better graphics and performance than on the original consoles. Well, wonder no more, because there is a solution for you: Dolphin emulator.</p>
|
4 |
-
<p>Dolphin is a free and open-source software that emulates the Nintendo GameCube and Wii consoles on Windows, Linux, macOS, Android, Xbox One, Xbox Series X/S. It was first released in 2003 as a GameCube emulator, but later gained support for Wii emulation as well. Dolphin allows you to play thousands of games from these two platforms in full HD (1080p) resolution with various enhancements such as compatibility with all PC controllers, turbo speed, networked multiplayer, custom textures, achievements, and more.</p>
|
5 |
-
<h2>download latest dolphin emulator</h2><br /><p><b><b>Download File</b> ☆ <a href="https://urlin.us/2uSUOD">https://urlin.us/2uSUOD</a></b></p><br /><br />
|
6 |
-
<p>In this article, I will show you how to download, install, and configure Dolphin on your PC, as well as answer some frequently asked questions about the emulator. By following this guide, you will be able to enjoy your favorite Nintendo games on your computer with ease.</p>
|
7 |
-
<h2>System Requirements</h2>
|
8 |
-
<p>Before you download and install Dolphin, you need to make sure that your PC meets the minimum or recommended system requirements for running the emulator. Here are the specifications that you need:</p>
|
9 |
-
<table>
|
10 |
-
<tr><th>Component</th><th>Minimum</th><th>Recommended</th></tr>
|
11 |
-
<tr><td>Operating System</td><td>Windows 10 or higher (64-bit), Linux (64-bit), macOS Catalina 10.15 or higher (64-bit)</td><td>Same as minimum</td></tr>
|
12 |
-
<tr><td>CPU</td><td>x86-64 CPU with SSE2 support or AArch64 CPU</td><td>Intel Core i5-4670K or equivalent AMD Ryzen CPU or newer</td></tr>
|
13 |
-
<tr><td>Memory</td><td>2 GB RAM or more</td><td>Same as minimum</td></tr>
|
14 |
-
<tr><td>Graphics Card</td><td>Pixel Shader 3.0 support and Direct3D 10 or OpenGL 3 support</td><td>Modern Direct3D 11.1, OpenGL 4.4, or Vulkan GPU</td></tr>
|
15 |
-
<tr><td>Input Device</td><td>Any PC input device (mouse and keyboard by default)</td><td>Nintendo GameCube controller with Smash Bros. Wii U USB adapter or Nintendo Wii Remote via DolphinBar</td></tr>
|
16 |
-
</table>
|
17 |
-
<p>Note that these are general guidelines and some games may require more powerful hardware or specific settings to run smoothly. You can check the compatibility list on the official website to see how well each game works on Dolphin.</p>
|
18 |
-
<h2>Downloading Dolphin</h2>
|
19 |
-
<p>The first step to use Dolphin is to download it from the official website. There are two types of versions that you can download: beta and development. The beta version is more stable and tested, but it may not have the latest features and improvements. The development version is updated more frequently and has the newest additions, but it may also have more bugs and issues. You can choose the version that suits your preference and needs.</p>
|
20 |
-
<p>To download Dolphin, go to <a href="">https://dolphin-emu.org/download/</a> and select the version that you want. You will see a list of download links for different operating systems. Click on the link that matches your OS and wait for the download to finish. The file size is about 10 MB.</p>
|
21 |
-
<h2>Installing Dolphin</h2>
|
22 |
-
<p>Once you have downloaded Dolphin, you need to install it on your PC. The installation process is very simple and straightforward. Here are the steps that you need to follow:</p>
|
23 |
-
<ol>
|
24 |
-
<li>Locate the downloaded file on your PC. It should be a ZIP file with a name like dolphin-x64-5.0-xxxxx.zip, where x64 indicates the 64-bit version and xxxxx indicates the build number.</li>
|
25 |
-
<li>Extract the ZIP file to a folder of your choice. You can use any file extraction software such as WinRAR or 7-Zip to do this.</li>
|
26 |
-
<li>Open the extracted folder and double-click on the Dolphin.exe file to run the emulator. You don't need to install anything else or modify any registry settings.</li>
|
27 |
-
<li>You will see the Dolphin main window with a list of games that you can play. If you don't have any games yet, you can skip to the next section to learn how to load them.</li>
|
28 |
-
</ol>
|
29 |
-
<p>Congratulations, you have successfully installed Dolphin on your PC!</p>
|
30 |
-
<p>Download Dolphin Emulator for Windows 10<br />
|
31 |
-
How to install Dolphin Emulator on Android<br />
|
32 |
-
Dolphin Emulator latest version 5.0-19685<br />
|
33 |
-
Dolphin Emulator compatibility list for GameCube and Wii games<br />
|
34 |
-
Dolphin Emulator best settings for performance and graphics<br />
|
35 |
-
Download Dolphin Emulator beta versions and development versions<br />
|
36 |
-
How to update Dolphin Emulator to the latest version<br />
|
37 |
-
Dolphin Emulator official website and forums<br />
|
38 |
-
Dolphin Emulator system requirements and features<br />
|
39 |
-
How to use Dolphin Emulator with controllers and keyboards<br />
|
40 |
-
Download Dolphin Emulator for macOS (ARM/Intel Universal)<br />
|
41 |
-
How to play multiplayer games on Dolphin Emulator online<br />
|
42 |
-
Dolphin Emulator cheats and hacks for GameCube and Wii games<br />
|
43 |
-
Dolphin Emulator troubleshooting and common issues<br />
|
44 |
-
Dolphin Emulator reviews and ratings from users<br />
|
45 |
-
Download Dolphin Emulator for Windows ARM64<br />
|
46 |
-
How to backup and restore save files on Dolphin Emulator<br />
|
47 |
-
Dolphin Emulator custom textures and mods for GameCube and Wii games<br />
|
48 |
-
Dolphin Emulator tutorials and guides for beginners<br />
|
49 |
-
Dolphin Emulator progress reports and news updates<br />
|
50 |
-
Download Dolphin Emulator for Linux and Ubuntu<br />
|
51 |
-
How to configure Dolphin Emulator for VR and 3D<br />
|
52 |
-
Dolphin Emulator comparison with other emulators<br />
|
53 |
-
Dolphin Emulator FAQs and tips<br />
|
54 |
-
Dolphin Emulator donation and support options</p>
|
55 |
-
<h2>Configuring Dolphin</h2>
|
56 |
-
<h3>General Settings</h3>
|
57 |
-
<p>Before you start playing games on Dolphin, you may want to adjust some of the general settings of the emulator to suit your preferences and needs. To access the general settings, click on the Config button on the main toolbar or press Ctrl+S on your keyboard.</p>
|
58 |
-
<p>You will see a window with several tabs that contain different options for configuring Dolphin. Here are some of the most important ones that you should know:</p>
|
59 |
-
<ul>
|
60 |
-
<li>General: This tab allows you to change the language of the emulator, enable or disable automatic updates, and adjust some basic emulation settings such as dual core mode, speed limit, and CPU clock override.</li>
|
61 |
-
<li>Interface: This tab allows you to customize the appearance and behavior of the emulator's interface, such as theme, font size, toolbar icons, game list columns, confirmations, and notifications.</li>
|
62 |
-
<li>Audio: This tab allows you to configure the audio settings of the emulator, such as volume, backend, latency, stretching, and DSP emulation mode.</li>
|
63 |
-
<li>Paths: This tab allows you to specify the folders where Dolphin will look for games, save files, screenshots, logs, and other files.</li>
|
64 |
-
</ul>
|
65 |
-
<p>You can experiment with these settings and see how they affect your emulation experience. If you are not sure what they do, you can always leave them at their default values or consult the <a href="">Dolphin wiki</a> for more information.</p>
|
66 |
-
<h3>Graphics Settings</h3>
|
67 |
-
<p>One of the main advantages of using Dolphin is that it can enhance the graphics of the original games by increasing the resolution, adding anti-aliasing, enabling anisotropic filtering, improving textures, and more. However, these enhancements also require more processing power from your PC, so you need to balance them with your hardware capabilities and performance expectations.</p>
|
68 |
-
<p>To access the graphics settings, click on the Graphics button on the main toolbar or press Ctrl+G on your keyboard. You will see a window with several tabs that contain different options for optimizing the graphics of the emulator. Here are some of the most important ones that you should know:</p>
|
69 |
-
<ul>
|
70 |
-
<li>General: This tab allows you to select the backend that Dolphin will use to render graphics. The available backends are Direct3D 11/12/9 (Windows only), OpenGL (cross-platform), Vulkan (cross-platform), and Software (slow but accurate). The best backend for you depends on your hardware and driver support, but generally Direct3D 11 or Vulkan are recommended for most users.</li>
|
71 |
-
<li>Enhancements: This tab allows you to adjust the resolution and aspect ratio of the games, as well as enable various enhancements such as anti-aliasing, anisotropic filtering, post-processing effects, stereoscopic 3D mode, and custom textures.</li>
|
72 |
-
<li>Hacks: This tab allows you to enable some hacks that can improve performance or compatibility with some games, such as skip EFB access from CPU, ignore format changes, store EFB copies access this feature from the Emulation menu or by pressing F9 on your keyboard. You can also change the screenshot format and quality from the Config > Interface > Advanced tab.</li>
|
73 |
-
<li>Netplay: This feature allows you to play multiplayer games online with other Dolphin users. You can access this feature from the Tools menu or by pressing Alt+N on your keyboard. You can either host or join a netplay session, and chat with other players using the built-in chat window. You can also adjust some netplay settings from the Config > Netplay tab.</li>
|
74 |
-
</ul>
|
75 |
-
<p>These are just some of the features that Dolphin offers to enhance your gameplay experience. You can explore more of them by browsing the menus and options of the emulator, or by visiting the <a href="">Dolphin wiki</a> for more information.</p>
|
76 |
-
<h2>Dolphin Features and Benefits</h2>
|
77 |
-
<p>As you can see, Dolphin is not just a simple emulator that lets you play GameCube and Wii games on your PC. It is also a powerful and versatile software that offers many features and benefits that you cannot get from the original consoles. Here are some of the reasons why you should use Dolphin:</p>
|
78 |
-
<ul>
|
79 |
-
<li>High-definition graphics: Dolphin can render games in up to 5K resolution, which is much higher than the native 480p resolution of the GameCube and Wii. It can also apply various graphical enhancements such as anti-aliasing, anisotropic filtering, post-processing effects, custom textures, etc. to make the games look even better.</li>
|
80 |
-
<li>Smooth performance: Dolphin can run games at 60 frames per second or higher, which is smoother than the original 30 frames per second of most GameCube and Wii games. It can also use turbo mode to speed up the gameplay, or slow down mode to slow it down.</li>
|
81 |
-
<li>Wide compatibility: Dolphin can play almost all GameCube and Wii games, as well as some Virtual Console and WiiWare titles. It has a compatibility list on its website that shows how well each game works on the emulator, and it is constantly updated with new fixes and improvements.</li>
|
82 |
-
<li>Customizable controls: Dolphin can support any PC input device, such as keyboard and mouse, gamepad, joystick, steering wheel, etc. It can also use the original GameCube and Wii controllers via adapters or Bluetooth. You can configure the controls for each game individually, and even use motion controls for Wii games.</li>
|
83 |
-
<li>Networked multiplayer: Dolphin can enable online multiplayer for games that support it, such as Mario Kart Wii, Super Smash Bros. Brawl, Animal Crossing: City Folk, etc. It can also use netplay to play local multiplayer games online with other Dolphin users.</li>
|
84 |
-
<li>Achievements: Dolphin can integrate with <a href="">RetroAchievements.org</a>, a website that provides achievements for retro games. You can earn achievements for completing various tasks and challenges in your games, and compare your progress with other players.</li>
|
85 |
-
<li>And more: Dolphin has many other features and benefits that you can discover by using it, such as save states, cheats, screenshots, custom shaders, game modifications, debug tools, etc.</li>
|
86 |
-
</ul>
|
87 |
-
<p>Dolphin is truly an amazing emulator that lets you enjoy your favorite Nintendo games on your PC with enhanced graphics, performance, and features. It is also free and open-source, which means that anyone can contribute to its development and improvement.</p>
|
88 |
-
<h2>Dolphin Compatibility and Performance</h2>
|
89 |
-
<p>While Dolphin is a great emulator that can play most GameCube and Wii games flawlessly, it is not perfect. Some games may have compatibility or performance issues that prevent them from running smoothly or at all on Dolphin. These issues may be caused by various factors, such as hardware limitations, software bugs, emulation inaccuracies, game protections, etc.</p>
|
90 |
-
<p>If you encounter any problems with your games on Dolphin, here are some steps that you can take to try to solve them:</p>
|
91 |
-
<ol>
|
92 |
-
<li>Check the compatibility list: The first thing that you should do is check the <a href="">compatibility list</a> on the official website to see how well your game works on Dolphin. The list shows the rating, status, and notes for each game based on user reports and tests. You can also search for your game on the <a href="">Dolphin wiki</a> or <a href="">Dolphin forums</a> to find more information and solutions.</li>
|
93 |
-
<li>Update your Dolphin version: The next thing that you should do is update your Dolphin version to the latest one available. The developers are constantly working on fixing bugs and improving compatibility and performance for various games. You can download the latest version from the official website or enable automatic updates from the Config > General tab.</li>
|
94 |
-
<li>Adjust your settings: The last thing that you should do is adjust your settings to optimize your emulation experience. You can try changing some of the settings that may affect your game, such as graphics, audio, controller, and hacks. You can also use the game properties window to enable or disable specific settings for each game. To access the game properties window, right-click on the game in the game list and select Properties. You will see a window with several tabs that contain various options and information for your game. You can also consult the <a href="">Dolphin wiki</a> or <a href="">Dolphin forums</a> to find the best settings for your game.</li>
|
95 |
-
</ol>
|
96 |
-
<p>By following these steps, you may be able to solve or reduce the compatibility or performance issues that you encounter with your games on Dolphin. However, keep in mind that some games may still have unsolved problems that require further development and improvement from the Dolphin team. You can always report any bugs or issues that you find on the <a href="">Dolphin issue tracker</a> or <a href="">Dolphin forums</a> to help the developers fix them.</p>
|
97 |
-
<h2>Conclusion</h2>
|
98 |
-
<p>In this article, I have shown you how to download, install, and configure Dolphin emulator on your PC, as well as how to play games on it with enhanced graphics, performance, and features. I have also answered some frequently asked questions about the emulator and provided some tips for solving compatibility and performance issues.</p>
|
99 |
-
<p>Dolphin is a fantastic emulator that lets you enjoy your favorite Nintendo games on your PC with ease. It is also free and open-source, which means that anyone can contribute to its development and improvement. If you are a fan of GameCube and Wii games, you should definitely give Dolphin a try and see for yourself how amazing it is.</p>
|
100 |
-
<p>I hope you found this article helpful and informative. If you have any questions or comments, feel free to leave them below. Thank you for reading and happy gaming!</p>
|
101 |
-
<h2>FAQs</h2>
|
102 |
-
<p>Here are some of the most common questions that people ask about Dolphin:</p>
|
103 |
-
<ol>
|
104 |
-
<li><b>Is Dolphin legal?</b></li>
|
105 |
-
<p>Dolphin is legal as long as you use it with your own legally obtained games. You can either use physical discs or ISO files that you created from your own discs. However, downloading or sharing ISO files from the internet is illegal and may result in legal consequences.</p>
|
106 |
-
<li><b>Is Dolphin safe?</b></li>
|
107 |
-
<p>Dolphin is safe as long as you download it from the official website or a trusted source. You should avoid downloading Dolphin from unknown or suspicious websites, as they may contain malware or viruses that can harm your PC.</p>
|
108 |
-
<li><b>How do I update Dolphin?</b></li>
|
109 |
-
<p>You can update Dolphin by downloading the latest version from the official website or by enabling automatic updates from the Config > General tab. You can also check for updates manually by clicking on the Help > Check for Updates menu.</p>
|
110 |
-
<li><b>How do I uninstall Dolphin?</b></li>
|
111 |
-
<p>You can uninstall Dolphin by deleting the folder where you extracted it. You don't need to uninstall anything else or modify any registry settings. However, if you want to remove all traces of Dolphin from your PC, you may also want to delete the User folder in the Documents\Dolphin Emulator directory, which contains your configuration files, save files, screenshots, etc.</p>
|
112 |
-
<li><b>Where can I get more help with Dolphin?</b></li>
|
113 |
-
<p>You can get more help with Dolphin by visiting the <a href="">Dolphin wiki</a>, <a href="">Dolphin forums</a>, <a href="">Dolphin issue tracker</a>, or <a href="">Dolphin Discord server</a>. You can also contact the developers and other users through these channels and get support, feedback, suggestions, etc.</p>
|
114 |
-
</ol></p> 197e85843d<br />
|
115 |
-
<br />
|
116 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Download 5 MB File without Losing Quality.md
DELETED
@@ -1,212 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>How to Download a 5 MB File Quickly and Easily</h1>
|
3 |
-
<p>Have you ever encountered a situation where you need to download a 5 MB file from the internet, but you are not sure how to do it fast and efficiently? Or maybe you have a larger file that you want to compress or split into smaller chunks of 5 MB or less, so that you can send or receive it via email? If so, then this article is for you.</p>
|
4 |
-
<p>In this article, we will explain what a 5 MB file is, why you might need to download it, how to download it from the internet, how to compress or split a larger file into 5 MB or less, and how to send or receive a 5 MB file via email. By the end of this article, you will be able to download any 5 MB file quickly and easily.</p>
|
5 |
-
<h2>download 5 mb file</h2><br /><p><b><b>DOWNLOAD</b> ⇔ <a href="https://jinyurl.com/2uNKBt">https://jinyurl.com/2uNKBt</a></b></p><br /><br />
|
6 |
-
<h2>What is a 5 MB File?</h2>
|
7 |
-
<p>A 5 MB file is a file that has a size of 5 megabytes (MB) or less. A megabyte is a unit of data that measures how much information a file contains. One megabyte is equal to 1,024 kilobytes (KB) or about one million bytes. A byte is the smallest unit of data that can be stored on a computer.</p>
|
8 |
-
<h3>How Big is 5 MB in Terms of Data?</h3>
|
9 |
-
<p>To give you an idea of how big 5 MB is in terms of data, here are some examples of how much information can be stored in 5 MB:</p>
|
10 |
-
<ul>
|
11 |
-
<li>About one minute of high-quality MP3 audio</li>
|
12 |
-
<li>About three minutes of low-quality MP4 video</li>
|
13 |
-
<li>About five high-resolution JPEG images</li>
|
14 |
-
<li>About 500 pages of plain text</li>
|
15 |
-
<li>About 100 pages of PDF document</li>
|
16 |
-
</ul>
|
17 |
-
<h3>What Kind of Files Can Be 5 MB or Less?</h3>
|
18 |
-
<p>There are many kinds of files that can be 5 MB or less, depending on their format, quality, and compression. Some common types of files that are usually 5 MB or less are:</p>
|
19 |
-
<ul>
|
20 |
-
<li>Audio files (MP3, WAV, OGG, etc.)</li>
|
21 |
-
<li>Video files (MP4, AVI, MKV, etc.)</li>
|
22 |
-
<li>Image files (JPEG, PNG, GIF, etc.)</li>
|
23 |
-
<li>Document files (PDF, DOCX, TXT, etc.)</li>
|
24 |
-
<li>Archive files (ZIP, RAR, 7Z, etc.)</li>
|
25 |
-
</ul>
|
26 |
-
<h2>Why Do You Need to Download a 5 MB File?</h2>
|
27 |
-
<p>You might need to download a 5 MB file for various reasons, depending on your personal or professional needs. Some common reasons why you might need to download a 5 MB file are:</p>
|
28 |
-
<h3>For Personal Use</h3>
|
29 |
-
<ul>
|
30 |
-
<li>You want to listen to your favorite song or podcast offline</li>
|
31 |
-
<li>You want to watch a short video clip or movie trailer offline</li>
|
32 |
-
<li>You want to view or edit an image or photo offline</li>
|
33 |
-
<li>You want to read or print an ebook or article offline</li>
|
34 |
-
<li>You want to backup or transfer some files or data offline</li>
|
35 |
-
</ul>
|
36 |
-
<h3>For Professional Use</h3>
|
37 |
-
<ul>
|
38 |
-
<li>You want to download a presentation or report for your work or study</li>
|
39 |
-
<li>You want to download a software or application for your computer or mobile device</li>
|
40 |
-
<li>You want to download a template or design for your project or website</li>
|
41 |
-
<li>You want to download a dataset or database for your research or analysis</li>
|
42 |
-
<li>You want to download a certificate or license for your service or product</li>
|
43 |
-
</ul>
|
44 |
-
<h2>How to Download a 5 MB File from the Internet?</h2>
|
45 |
-
<p>Downloading a 5 MB file from the internet is usually a simple and quick process, but there are some factors that can affect the speed and quality of your download. Here are some tips on how to download a 5 MB file from the internet:</p>
|
46 |
-
<h3>Choose a Reliable Source</h3>
|
47 |
-
<p>The first step to download a 5 MB file from the internet is to choose a reliable source that offers the file you want. A reliable source is one that has a good reputation, provides accurate and updated information, and does not contain any malware or viruses. You can use a search engine like Bing to find the best source for your file, or you can use a trusted website that specializes in the type of file you are looking for. For example, if you want to download an audio file, you can use a website like SoundCloud or Spotify. If you want to download a video file, you can use a website like YouTube or Vimeo. If you want to download an image file, you can use a website like Flickr or Unsplash. If you want to download a document file, you can use a website like Google Docs or Dropbox. If you want to download an archive file, you can use a website like WinZip or 7-Zip.</p>
|
48 |
-
<p>How to download 5 mb file faster<br />
|
49 |
-
Download 5 mb file in seconds<br />
|
50 |
-
Best sites to download 5 mb file<br />
|
51 |
-
Download 5 mb file without internet<br />
|
52 |
-
Download 5 mb file from Google Drive<br />
|
53 |
-
Download 5 mb file on iPhone<br />
|
54 |
-
Download 5 mb file on Android<br />
|
55 |
-
Download 5 mb file on Windows<br />
|
56 |
-
Download 5 mb file on Mac<br />
|
57 |
-
Download 5 mb file on Linux<br />
|
58 |
-
Download 5 mb file using VPN<br />
|
59 |
-
Download 5 mb file anonymously<br />
|
60 |
-
Download 5 mb file with resume support<br />
|
61 |
-
Download 5 mb file with IDM<br />
|
62 |
-
Download 5 mb file with wget<br />
|
63 |
-
Download 5 mb file with curl<br />
|
64 |
-
Download 5 mb file with Python<br />
|
65 |
-
Download 5 mb file with Java<br />
|
66 |
-
Download 5 mb file with C#<br />
|
67 |
-
Download 5 mb file with PHP<br />
|
68 |
-
Download 5 mb file with JavaScript<br />
|
69 |
-
Download 5 mb file with PowerShell<br />
|
70 |
-
Download 5 mb file with Bash<br />
|
71 |
-
Download 5 mb file with Ruby<br />
|
72 |
-
Download 5 mb file with Perl<br />
|
73 |
-
Download 5 mb file as zip<br />
|
74 |
-
Download 5 mb file as mp3<br />
|
75 |
-
Download 5 mb file as mp4<br />
|
76 |
-
Download 5 mb file as pdf<br />
|
77 |
-
Download 5 mb file as jpg<br />
|
78 |
-
Download 5 mb file as png<br />
|
79 |
-
Download 5 mb file as gif<br />
|
80 |
-
Download 5 mb file as txt<br />
|
81 |
-
Download 5 mb file as docx<br />
|
82 |
-
Download 5 mb file as xlsx<br />
|
83 |
-
Download 5 mb file as pptx<br />
|
84 |
-
Download 5 mb file as csv<br />
|
85 |
-
Download 5 mb file as json<br />
|
86 |
-
Download 5 mb file as xml<br />
|
87 |
-
Download 5 mb file as html<br />
|
88 |
-
Compress video to download 5 mb file <br />
|
89 |
-
Reduce image size to download 5 mb file <br />
|
90 |
-
Split large files to download 5 mb files <br />
|
91 |
-
Merge small files to download 5 mb files <br />
|
92 |
-
Encrypt files to download 5 mb files <br />
|
93 |
-
Decrypt files to download 5 mb files <br />
|
94 |
-
Scan files for virus before downloading 5 mb files <br />
|
95 |
-
Check files for errors after downloading 5 mb files <br />
|
96 |
-
Compare files for differences after downloading 5 mb files <br />
|
97 |
-
Convert files to different formats after downloading 5 mb files </p>
|
98 |
-
<h3>Check Your Internet Speed and Connection</h3>
|
99 |
-
<p>The second step to download a 5 MB file from the internet is to check your internet speed and connection. Your internet speed and connection can affect how fast and smooth your download will be. You can use an online tool like Speedtest to measure your internet speed and connection. Ideally, you should have an internet speed of at least 10 Mbps (megabits per second) and a stable connection with no interruptions or errors. If your internet speed is too slow or your connection is too unstable, you might experience longer download times, incomplete downloads, or corrupted files. To improve your internet speed and connection, you can try some of these solutions:</p>
|
100 |
-
<ul>
|
101 |
-
<li>Close any unnecessary programs or tabs that are using your bandwidth</li>
|
102 |
-
<li>Move closer to your router or modem, or use an ethernet cable instead of Wi-Fi</li>
|
103 |
-
<li>Restart your router or modem, or contact your internet service provider for assistance</li>
|
104 |
-
<li>Upgrade your internet plan or switch to a faster provider</li>
|
105 |
-
</ul>
|
106 |
-
<h3>Use a Download Manager or Browser Extension</h3>
|
107 |
-
<p>The third step to download a 5 MB file from the internet is to use a download manager or browser extension. A download manager or browser extension is a software or tool that helps you manage and optimize your downloads. Some benefits of using a download manager or browser extension are:</p>
|
108 |
-
<ul>
|
109 |
-
<li>You can pause and resume your downloads at any time</li>
|
110 |
-
<li>You can schedule your downloads for later or set a limit on how many downloads you can do at once</li>
|
111 |
-
<li>You can boost your download speed by using multiple connections or sources</li>
|
112 |
-
<li>You can verify the integrity and security of your files before opening them</li>
|
113 |
-
<li>You can organize and categorize your files by name, type, size, date, etc.</li>
|
114 |
-
</ul>
|
115 |
-
<p>Some examples of popular and free download managers and browser extensions are:</p>
|
116 |
-
<ul>
|
117 |
-
<li>Internet Download Manager (IDM)</li>
|
118 |
-
<li>Free Download Manager (FDM)</li>
|
119 |
-
<li>JDownloader</li>
|
120 |
-
<li>EagleGet</li>
|
121 |
-
<li>Download Accelerator Plus (DAP)</li>
|
122 |
-
<li>Chrome Download Manager (CDM)</li>
|
123 |
-
<li>Firefox Download Manager (FDM)</li>
|
124 |
-
<li>Safari Download Manager (SDM)</li>
|
125 |
-
<li>Opera Download Manager (ODM)</li>
|
126 |
-
</ul>
|
127 |
-
<h2>How to Compress or Split a Larger File into 5 MB or Less?</h2> <p>Sometimes, you might have a larger file that you want to download, but it exceeds the size limit of your email provider or your storage device. In that case, you can compress or split the larger file into smaller chunks of 5 MB or less, and then download them separately. Here are some ways to compress or split a larger file into 5 MB or less:</p>
|
128 |
-
<h3>Use an Online or Offline Video Compressor</h3>
|
129 |
-
<p>If you have a large video file that you want to download, you can use an online or offline video compressor to reduce its size and quality. A video compressor is a software or tool that can change the format, resolution, bitrate, frame rate, and other parameters of a video file to make it smaller and more compatible. Some examples of online and offline video compressors are:</p>
|
130 |
-
<ul>
|
131 |
-
<li>Online Video Compressor (OVC)</li>
|
132 |
-
<li>Clipchamp</li>
|
133 |
-
<li>HandBrake</li>
|
134 |
-
<li>Any Video Converter (AVC)</li>
|
135 |
-
<li>Freemake Video Converter</li>
|
136 |
-
</ul>
|
137 |
-
<p>To use a video compressor, you need to upload or import your video file, choose the output format and quality, adjust the settings if needed, and start the compression process. Depending on the size and complexity of your video file, the compression process might take some time. Once the compression is done, you can download the compressed video file, which should be 5 MB or less.</p>
|
138 |
-
<h3>Use a File Splitter or Zipper</h3>
|
139 |
-
<p>If you have a large file that is not a video, such as an audio, image, document, or archive file, you can use a file splitter or zipper to divide it into smaller parts of 5 MB or less. A file splitter or zipper is a software or tool that can cut or merge a file into multiple segments or archives. Some examples of file splitters and zippers are:</p>
|
140 |
-
<ul>
|
141 |
-
<li>HJSplit</li>
|
142 |
-
<li>GSplit</li>
|
143 |
-
<li>WinRAR</li>
|
144 |
-
<li>WinZip</li>
|
145 |
-
<li>7-Zip</li>
|
146 |
-
</ul>
|
147 |
-
<p>To use a file splitter or zipper, you need to open or select your file, choose the output size and format, and start the splitting or zipping process. Depending on the size and type of your file, the splitting or zipping process might take some time. Once the splitting or zipping is done, you can download the split or zipped files, which should be 5 MB or less each.</p>
|
148 |
-
<h2>How to Send or Receive a 5 MB File via Email?</h2>
|
149 |
-
<p>One of the most common ways to share a 5 MB file with someone else is to send or receive it via email. However, not all email providers have the same file size limit for attachments. Some email providers might allow you to send or receive files up to 25 MB, while others might only allow up to 10 MB or even less. Here are some tips on how to send or receive a 5 MB file via email:</p>
|
150 |
-
<h3>Check the File Size Limit of Your Email Provider</h3>
|
151 |
-
<p>The first step to send or receive a 5 MB file via email is to check the file size limit of your email provider. You can find this information on your email provider's website or help center, or by contacting their customer support. Here are some examples of the file size limit for some popular email providers:</p>
|
152 |
-
<table border="1">
|
153 |
-
<tr><th>Email Provider</th><th>File Size Limit</th></tr>
|
154 |
-
<tr><td>Gmail</td><td>25 MB</td></tr>
|
155 |
-
<tr><td>Yahoo Mail</td><td>25 MB</td></tr>
|
156 |
-
<tr><td>Outlook.com</td><td>20 MB</td></tr>
|
157 |
-
<tr><td>AOL Mail</td><td>25 MB</td></tr>
|
158 |
-
<tr><td>Zoho Mail</td><td>20 MB</td></tr>
|
159 |
-
<tr><td>iCloud Mail</td><td>20 MB</td></tr>
|
160 |
-
<tr><td>ProtonMail</td><td>25 MB</td></tr>
|
161 |
-
<tr><td>Tutanota</td><td>25 MB</td></tr>
|
162 |
-
<tr><td>Mozilla Thunderbird</td><td>No limit (depends on server)</td></tr>
|
163 |
-
<tr><td>Eudora</td><td>No limit (depends on server)</td></tr>
|
164 |
-
</table>
|
165 |
-
<p>If your 5 MB file is within the file size limit of your email provider, you can attach it directly to your email message and send it normally. If your 5 MB file exceeds the file size limit of your email provider, you can use one of the following methods:</p>
|
166 |
-
<h3>Attach the File Directly or Use a Cloud Service</h3>
|
167 |
-
<p>The second step to send or receive a 5 MB file via email is to attach the file directly or use a cloud service. A cloud service is a software or tool that allows you to store and share your files online. Some examples of cloud services are:</p>
|
168 |
-
<ul>
|
169 |
-
<li>Google Drive</li>
|
170 |
-
<li>Dropbox</li>
|
171 |
-
<li>OneDrive</li>
|
172 |
-
<li>iCloud</li>
|
173 |
-
<li>Box</li>
|
174 |
-
</ul>
|
175 |
-
<p>To use a cloud service, you need to create an account and upload your file to the cloud. Then, you can generate a link or an invitation to your file and paste it in your email message. The recipient of your email can then click on the link or accept the invitation and download the file from the cloud.</p>
|
176 |
-
<h2>Conclusion</h2>
|
177 |
-
<p>Downloading a 5 MB file from the internet is not a difficult task, but it requires some knowledge and skills to do it efficiently and safely. In this article, we have covered the following topics:</p>
|
178 |
-
<ul>
|
179 |
-
<li>What is a 5 MB file and what kind of files can be 5 MB or less</li>
|
180 |
-
<li>Why do you need to download a 5 MB file for personal or professional use</li>
|
181 |
-
<li>How to download a 5 MB file from the internet by choosing a reliable source, checking your internet speed and connection, and using a download manager or browser extension</li>
|
182 |
-
<li>How to compress or split a larger file into 5 MB or less by using an online or offline video compressor or a file splitter or zipper</li>
|
183 |
-
<li>How to send or receive a 5 MB file via email by checking the file size limit of your email provider and attaching the file directly or using a cloud service</li>
|
184 |
-
</ul>
|
185 |
-
<p>We hope that this article has helped you learn how to download any 5 MB file quickly and easily. If you have any questions or feedback, please feel free to leave a comment below.</p>
|
186 |
-
<h2>FAQs</h2>
|
187 |
-
<p>Here are some frequently asked questions about downloading a 5 MB file:</p>
|
188 |
-
<h3>Q: How long does it take to download a 5 MB file?</h3>
|
189 |
-
<p>A: The time it takes to download a 5 MB file depends on your internet speed and connection. For example, if you have an internet speed of 10 Mbps, it will take about 4 seconds to download a 5 MB file. If you have an internet speed of 1 Mbps, it will take about 40 seconds to download a 5 MB file. You can use an online calculator like Download Time Calculator to estimate how long it will take to download any file based on your internet speed.</p>
|
190 |
-
<h3>Q: How can I check the size of a file before downloading it?</h3>
|
191 |
-
<p>A: You can check the size of a file before downloading it by looking at the information provided by the source website or by using a browser extension like File Size Info. The information might include the name, type, format, quality, and size of the file. You can also right-click on the download link and select "Save link as" or "Save target as" to see the size of the file before saving it.</p>
|
192 |
-
<h3>Q: How can I increase my download speed?</h3>
|
193 |
-
<p>A: You can increase your download speed by following some of these tips:</p>
|
194 |
-
<ul>
|
195 |
-
<li>Close any unnecessary programs or tabs that are using your bandwidth</li>
|
196 |
-
<li>Move closer to your router or modem, or use an ethernet cable instead of Wi-Fi</li>
|
197 |
-
<li>Restart your router or modem, or contact your internet service provider for assistance</li>
|
198 |
-
<li>Upgrade your internet plan or switch to a faster provider</li>
|
199 |
-
<li>Use a download manager or browser extension that can boost your download speed by using multiple connections or sources</li>
|
200 |
-
</ul>
|
201 |
-
<h3>Q: How can I reduce the size of a file without losing quality?</h3>
|
202 |
-
<p>A: You can reduce the size of a file without losing quality by using an online or offline video compressor or a file splitter or zipper that can compress or split your file without affecting its format, resolution, bitrate, frame rate, and other parameters. You can also use some advanced settings like cropping, trimming, scaling, rotating, filtering, encoding, etc. to optimize your file for smaller size and better quality.</p>
|
203 |
-
<h3>Q: How can I share a large file with someone else?</h3>
|
204 |
-
<p>A: You can share a large file with someone else by using one of these methods:</p>
|
205 |
-
<ul>
|
206 |
-
<li>Compress or split the large file into smaller parts of 5 MB or less and send them via email as attachments or links</li>
|
207 |
-
<li>Upload the large file to a cloud service like Google Drive, Dropbox, OneDrive, iCloud, Box, etc. and generate a link or an invitation to share with the recipient</li>
|
208 |
-
<li>Use a peer-to -peer file sharing service like BitTorrent, Shareaza, eMule, etc. and create a torrent or a magnet link to share with the recipient</li>
|
209 |
-
<li>Use a file hosting service like MediaFire, Mega, RapidShare, etc. and upload the large file to their servers and generate a download link to share with the recipient</li>
|
210 |
-
</ul></p> 197e85843d<br />
|
211 |
-
<br />
|
212 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Download Garten Of Banban 3 Fanmade Characters The Ultimate Guide.md
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Garten of Banban 3 Fanmade Download: Everything You Need to Know</h1>
|
3 |
-
<p>If you are a fan of horror games, you might have heard of Garten of Banban 3, a terrifying game that will keep you on the edge of your seat. But did you know that you can also download and install fanmade characters and models for this game? In this article, we will tell you everything you need to know about Garten of Banban 3 fanmade download, including what the game is about, what are fanmade creations, how to download and install them, and some tips and tricks for using them. Let's get started!</p>
|
4 |
-
<h2>garten of banban 3 fanmade download</h2><br /><p><b><b>Download File</b> ✏ ✏ ✏ <a href="https://jinyurl.com/2uNQj3">https://jinyurl.com/2uNQj3</a></b></p><br /><br />
|
5 |
-
<h2>What is Garten of Banban 3?</h2>
|
6 |
-
<p>Garten of Banban 3 is a horror game developed by The Euphoric Brothers, a team of indie game developers from South Korea. It is the third installment in the Garten of Banban series, which started in 2019. The game is available for Windows, Mac, Linux, Android, and iOS devices.</p>
|
7 |
-
<h3>A brief introduction to the game and its features</h3>
|
8 |
-
<p>The game is set in a haunted amusement park called Garten Park, where you play as a character named Jim, who is looking for his missing sister. Along the way, you will encounter various monsters and traps that will try to kill you. You will have to use your flashlight, your phone, and your wits to survive and escape.</p>
|
9 |
-
<p>The game features stunning graphics, realistic sound effects, immersive atmosphere, and multiple endings. The game also has a multiplayer mode, where you can team up with other players online or play against them as a monster. The game also supports VR devices, such as Oculus Rift and HTC Vive, for a more immersive experience.</p>
|
10 |
-
<p>garten of banban 3 fanmade character download<br />
|
11 |
-
garten of banban 3 fanmade monster download<br />
|
12 |
-
garten of banban 3 fanmade stinger flynn download<br />
|
13 |
-
garten of banban 3 fanmade happy jim download<br />
|
14 |
-
garten of banban 3 fanmade sketchfab download<br />
|
15 |
-
garten of banban 3 fanmade 3d model download<br />
|
16 |
-
garten of banban 3 fanmade rigged download<br />
|
17 |
-
garten of banban 3 fanmade blender download<br />
|
18 |
-
garten of banban 3 fanmade scary download<br />
|
19 |
-
garten of banban 3 fanmade euphoric brothers download<br />
|
20 |
-
garten of banban 3 fanmade free download<br />
|
21 |
-
garten of banban 3 fanmade pc download<br />
|
22 |
-
garten of banban 3 fanmade game download<br />
|
23 |
-
garten of banban 3 fanmade horror download<br />
|
24 |
-
garten of banban 3 fanmade alpha5714 download<br />
|
25 |
-
garten of banban 3 fanmade grabplayer download<br />
|
26 |
-
garten of banban 3 fanmade fbx download<br />
|
27 |
-
garten of banban 3 fanmade cc attribution download<br />
|
28 |
-
garten of banban 3 fanmade no category set download<br />
|
29 |
-
garten of banban 3 fanmade no tags set download<br />
|
30 |
-
garten of banban 3 fanmade no description provided download<br />
|
31 |
-
garten of banban 3 fanmade triangles vertices download<br />
|
32 |
-
garten of banban 3 fanmade license learn more download<br />
|
33 |
-
garten of banban 3 fanmade published months ago download<br />
|
34 |
-
garten of banban 3 fanmade model information download<br />
|
35 |
-
how to download garten of banban 3 fanmade <br />
|
36 |
-
where to download garten of banban 3 fanmade <br />
|
37 |
-
what is garten of banban 3 fanmade <br />
|
38 |
-
why to download garten of banban 3 fanmade <br />
|
39 |
-
who made garten of banban 3 fanmade <br />
|
40 |
-
best garten of banban 3 fanmade download sites<br />
|
41 |
-
latest garten of banban 3 fanmade download updates<br />
|
42 |
-
new garten of banban 3 fanmade download features<br />
|
43 |
-
top garten of banban 3 fanmade download reviews<br />
|
44 |
-
cool garten of banban 3 fanmade download models<br />
|
45 |
-
awesome garten of banban 3 fanmade download characters<br />
|
46 |
-
amazing garten of banban 3 fanmade download monsters<br />
|
47 |
-
fun garten of banban 3 fanmade download games<br />
|
48 |
-
creepy garten of banban 3 fanmade download horror<br />
|
49 |
-
realistic garten of banban 3 fanmade download graphics<br />
|
50 |
-
easy garten of banban 3 fanmade download instructions<br />
|
51 |
-
fast garten of banban 3 fanmade download speed<br />
|
52 |
-
safe garten of banban 3 fanmade download sources<br />
|
53 |
-
legal garten of banban 3 fanmade download options<br />
|
54 |
-
quality garten of banban 3 fanmade download content</p>
|
55 |
-
<h3>The story and the characters of Garten of Banban 3</h3>
|
56 |
-
<p>The story of Garten of Banban 3 follows Jim, who receives a mysterious phone call from his sister, who tells him that she is trapped in Garten Park. Jim decides to go there to rescue her, but soon realizes that he is not alone. There are other people who are also trapped in the park, as well as horrifying creatures that lurk in the shadows.</p>
|
57 |
-
<p>The game has several characters that you can interact with or play as. Some of them are:</p>
|
58 |
-
<ul>
|
59 |
-
<li>Jim: The main protagonist of the game. He is a brave and kind-hearted young man who loves his sister dearly.</li>
|
60 |
-
<li>Lisa: Jim's sister. She is a cheerful and adventurous girl who likes to explore new places.</li>
|
61 |
-
<li>Leo: A friend of Jim and Lisa. He is a smart and resourceful hacker who helps Jim communicate with Lisa.</li>
|
62 |
-
<li>Anna: A mysterious girl who claims to know the secrets of Garten Park. She is a survivor who has been living in the park for a long time.</li>
|
63 |
-
<li>Banban: The main antagonist of the game. He is a twisted clown who controls the park and its monsters. He enjoys torturing and killing his victims.</li>
|
64 |
-
</ul>
|
65 |
-
<h3>The gameplay and the mechanics of Garten of Banban 3</h3>
|
66 |
-
<p>The gameplay of Garten of Banban 3 is similar to other horror games, such as Outlast or Five Nights at Freddy's. You will have to explore the park, find clues, solve puzzles, hide from <p>the monsters, and escape. You will have a flashlight that you can use to illuminate your surroundings, but be careful, as it can also attract unwanted attention. You will also have a phone that you can use to call Lisa or Leo, or access the map and the inventory. The phone has a limited battery life, so you will have to find chargers or batteries to keep it running.</p>
|
67 |
-
<p>The game has different difficulty levels, ranging from easy to nightmare. The higher the difficulty, the more aggressive and intelligent the monsters will be, and the less resources you will have. The game also has a permadeath mode, where you will have to start over if you die.</p>
|
68 |
-
<h2>What are fanmade characters and models?</h2>
|
69 |
-
<p>Fanmade characters and models are creations made by fans of the game, using various tools and software. They are not official or endorsed by the developers of the game, but they are made for fun and entertainment purposes. They can be based on existing characters or models from the game, or they can be original or inspired by other sources.</p>
|
70 |
-
<h3>The definition and the purpose of fanmade creations</h3>
|
71 |
-
<p>Fanmade creations are a form of fan art, which is a term used to describe any artistic expression that is influenced by a work of fiction, such as a game, a movie, a book, or a show. Fan art can include drawings, paintings, sculptures, animations, comics, videos, music, cosplay, and more. Fanmade creations are a specific type of fan art that involves creating new characters or models for a game, using various tools and software.</p>
|
72 |
-
<p>The purpose of fanmade creations is to express one's creativity and passion for a game, and to share it with other fans. Fanmade creations can also add more variety and diversity to a game, and enhance its replay value. Some fanmade creations can even improve or fix some aspects of the game, such as graphics, performance, bugs, or glitches.</p>
|
73 |
-
<h3>The benefits and the challenges of fanmade creations</h3>
|
74 |
-
<p>Fanmade creations have many benefits for both the creators and the players. Some of them are:</p>
|
75 |
-
<ul>
|
76 |
-
<li>They allow the creators to showcase their skills and talents, and to receive feedback and recognition from other fans.</li>
|
77 |
-
<li>They allow the players to enjoy new content and features for their favorite game, and to customize it according to their preferences.</li>
|
78 |
-
<li>They create a sense of community and collaboration among fans, who can share their ideas, opinions, tips, and resources.</li>
|
79 |
-
<li>They can inspire the developers of the game to create more official content or updates based on the fan feedback.</li>
|
80 |
-
</ul>
|
81 |
-
<p>However, fanmade creations also have some challenges and drawbacks. Some of them are:</p>
|
82 |
-
<ul>
|
83 |
-
<li>They require a lot of time, effort, and resources to create and maintain.</li>
|
84 |
-
<li>They may not be compatible with the original game or with other fanmade creations.</li>
|
85 |
-
<li>They may cause legal issues or conflicts with the developers or the owners of the game.</li>
|
86 |
-
<li>They may not be of high quality or originality.</li>
|
87 |
-
</ul>
|
88 |
-
<h3>Some examples of fanmade characters and models for Garten of Banban 3</h3>
|
89 |
-
<p>There are many fanmade characters and models for Garten of Banban 3 that you can find online. Some of them are:</p>
|
90 |
-
<ul>
|
91 |
-
<li>Alice: A fanmade character who is based on Alice from Alice in Wonderland. She is a cute and innocent girl who wears a blue dress and has blonde hair. She is one of the survivors who is trapped in Garten Park. She has a special ability to shrink or grow in size by eating mushrooms or cakes.</li>
|
92 |
-
<li>Zombie: A fanmade model who is based on a zombie from The Walking Dead. He is a rotting corpse who wears torn clothes and has blood stains. He is one of the monsters who roams in Garten Park. He has a special ability to infect other survivors or monsters with his bite.</li>
|
93 |
-
<li>Ninja: A fanmade model who is based on a ninja from Naruto. He is a stealthy warrior who wears a black outfit and has a mask. He is one of the multiplayer characters who can play as either a survivor or a monster. He has a special ability to use ninja tools and techniques, such as shurikens, kunais, smoke bombs, or clones.</li>
|
94 |
-
</ul>
|
95 |
-
<h2>How to download and install fanmade characters and models for Garten of Banban 3?</h2>
|
96 |
-
<p>If you want to download and install fanmade characters and models for Garten of Banban 3, you will need to follow some steps and precautions. Here are some tips on how to do it:</p>
|
97 |
-
<h3>The sources and the requirements for downloading fanmade creations</h3>
|
98 |
-
<p>The first thing you <p>need to do is to find a reliable and safe source for downloading fanmade creations. There are many websites and forums where fans share their creations, such as Nexus Mods, Mod DB, Steam Workshop, or Reddit. However, not all of them are trustworthy or secure, so you need to be careful and check the reviews, ratings, comments, and feedback from other users before downloading anything.</p>
|
99 |
-
<p>The second thing you need to do is to check the requirements for downloading fanmade creations. Some of them may require you to have a certain version of the game, a certain operating system, a certain software or tool, or a certain amount of space or memory. You also need to make sure that your device can handle the fanmade creations without affecting the performance or the quality of the game.</p>
|
100 |
-
<h3>The steps and the precautions for installing fanmade creations</h3>
|
101 |
-
<p>The third thing you need to do is to follow the steps and the precautions for installing fanmade creations. The steps may vary depending on the type and the source of the fanmade creation, but generally they involve:</p>
|
102 |
-
<ol>
|
103 |
-
<li>Downloading the fanmade creation file from the source.</li>
|
104 |
-
<li>Extracting the file using a program such as WinRAR or 7-Zip.</li>
|
105 |
-
<li>Copying or moving the file to the game folder or directory.</li>
|
106 |
-
<li>Launching the game and enabling or activating the fanmade creation.</li>
|
107 |
-
</ol>
|
108 |
-
<p>The precautions you need to take are:</p>
|
109 |
-
<ul>
|
110 |
-
<li>Backing up your game files and data before installing anything.</li>
|
111 |
-
<li>Scanning the file for viruses or malware before opening it.</li>
|
112 |
-
<li>Reading the instructions and the description of the fanmade creation carefully before installing it.</li>
|
113 |
-
<li>Installing only one fanmade creation at a time and testing it before installing another one.</li>
|
114 |
-
<li>Uninstalling or disabling any fanmade creation that causes problems or conflicts with the game or with other fanmade creations.</li>
|
115 |
-
</ul>
|
116 |
-
<h3>The tips and the tricks for using fanmade creations in Garten of Banban 3</h3>
|
117 |
-
<p>The fourth thing you need to do is to enjoy using fanmade creations in Garten of Banban 3. Here are some tips and tricks on how to do it:</p>
|
118 |
-
<ul>
|
119 |
-
<li>Explore and experiment with different fanmade characters and models, and see how they affect your gameplay and your experience.</li>
|
120 |
-
<li>Share your screenshots, videos, stories, or feedback with other fans who use fanmade creations, and learn from their tips and suggestions.</li>
|
121 |
-
<li>Credit and support the creators of fanmade creations by giving them positive reviews, ratings, comments, donations, or suggestions.</li>
|
122 |
-
<li>Create your own fanmade characters and models using various tools and software, such as Blender, Unity, Unreal Engine, or Photoshop.</li>
|
123 |
-
<li>Join or create a community or a group of fans who use fanmade creations, and collaborate with them on projects or challenges.</li>
|
124 |
-
</ul>
|
125 |
-
<h2>Conclusion</h2>
|
126 |
-
<h4>A summary of the main points and a call to action</h4>
|
127 |
-
<p>Garten of Banban 3 is a horror game that will scare you and thrill you with its amazing graphics, sound effects, atmosphere, and gameplay. But if you want to spice up your game even more, you can download and install fanmade characters and models for this game. Fanmade creations are a form of fan art that allows fans to express their creativity and passion for the game. They can also add more variety and diversity to the game, and enhance its replay value. However, you need to be careful and follow some steps and precautions when downloading and installing fanmade creations. You also need to enjoy using them and share them with other fans. If you are ready to try Garten of Banban 3 fanmade download, go ahead and have fun!</p>
|
128 |
-
<h4>FAQs</h4>
|
129 |
-
<p>Here are some frequently asked questions about Garten of Banban 3 fanmade download:</p>
|
130 |
-
<ol>
|
131 |
-
<li><b>Where can I find more information about Garten of Banban 3?</b></li>
|
132 |
-
<p>You can find more information about Garten of Banban 3 on its official website, its social media pages, its YouTube channel, or its wiki page.</p>
|
133 |
-
<li><b>Is Garten of Banban 3 free to play?</b></li>
|
134 |
-
<p>No, Garten of Banban 3 is not free to play. You need to purchase it from its official website or from other platforms such as Steam or Google Play.</p>
|
135 |
-
<li><b>Is Garten of Banban 3 suitable for children?</b></li>
|
136 |
-
<p>No, Garten of Banban 3 is not suitable for children. It contains graphic violence, gore, blood, jump scares, disturbing images, and mature themes. It is rated M for Mature by ESRB.</p>
|
137 |
-
<li><b>Can I play Garten of Banban 3 with my friends?</b></li>
|
138 |
-
<p>Yes, you can play Garten of Banban 3 with your friends. The game has a multiplayer mode, where you can team up with other players online or play against them as a monster. You can also chat with them using voice or text.</p>
|
139 |
-
<li><b>How can I contact the developers of Garten of Banban 3?</b></li>
|
140 |
-
<p>You can contact the developers of Garten of Banban 3 by sending them an email at [email protected], or by following them on their social media pages, such as Facebook, Twitter, or Instagram.</p>
|
141 |
-
</ol></p> 197e85843d<br />
|
142 |
-
<br />
|
143 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Download X-War Clash of Zombies Mod Apk and Get Unlimited Money and Crystals.md
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>X-War: Clash of Zombies Mod Apk (Unlimited Crystals) - A Review</h1>
|
3 |
-
<p>If you are a fan of strategy games with zombies and superheroes, you might want to check out X-War: Clash of Zombies. This is a game where you have to build your base, train your army, and fight against hordes of undead and other players. But what if you want to enjoy the game without spending money or waiting for hours? That's where X-War: Clash of Zombies Mod Apk comes in. In this article, we will review this modded version of the game and tell you how to download and install it on your device.</p>
|
4 |
-
<h2>x-war clash of zombies mod apk (unlimited crystals)</h2><br /><p><b><b>Download</b> ••• <a href="https://jinyurl.com/2uNOs9">https://jinyurl.com/2uNOs9</a></b></p><br /><br />
|
5 |
-
<h2>What is X-War: Clash of Zombies?</h2>
|
6 |
-
<h3>A strategy game with zombies and superheroes</h3>
|
7 |
-
<p>X-War: Clash of Zombies is a strategy game developed by Caesars Studio. It was released in 2015 for Android and iOS devices. The game combines elements of base-building, resource management, hero collection, and combat. You have to create your own city, gather resources, recruit heroes, and defend it from zombies and other enemies. You can also attack other players' bases and loot their resources.</p>
|
8 |
-
<h3>A post-apocalyptic world with different factions</h3>
|
9 |
-
<p>The game is set in a post-apocalyptic world where a virus has turned most people into zombies. There are different factions fighting for survival and dominance. You can choose to join one of them or create your own. Each faction has its own heroes, buildings, and units. Some of the factions are:</p>
|
10 |
-
<ul>
|
11 |
-
<li>The Survivors: They are the human survivors who try to rebuild civilization and fight against the zombies.</li>
|
12 |
-
<li>The Mutants: They are the people who have been infected by the virus and mutated into different forms. They have enhanced abilities but also weaknesses.</li>
|
13 |
-
<li>The Aliens: They are the extraterrestrial invaders who have come to Earth to harvest its resources and enslave its inhabitants.</li>
|
14 |
-
<li>The Robots: They are the artificial intelligence machines that have rebelled against their creators and seek to destroy all organic life.</li>
|
15 |
-
</ul>
|
16 |
-
<h3>A multiplayer mode with online battles and alliances</h3>
|
17 |
-
<p>The game also has a multiplayer mode where you can compete with other players from around the world. You can join or create an alliance with other players and cooperate with them in wars, raids, missions, and events. You can also chat with them and exchange gifts. You can also challenge other players in PvP battles and climb the rankings. You can earn rewards such as crystals, gold, energy, medals, and more.</p>
|
18 |
-
<p>x-war clash of zombies hack apk download free<br />
|
19 |
-
x-war zombie game mod apk unlimited money and gems<br />
|
20 |
-
how to get unlimited crystals in x-war clash of zombies<br />
|
21 |
-
x-war clash of zombies cheats and tips for android<br />
|
22 |
-
x-war clash of zombies latest version mod apk offline<br />
|
23 |
-
x-war clash of zombies mod apk unlimited everything 2023<br />
|
24 |
-
x-war clash of zombies best base layout and strategy<br />
|
25 |
-
x-war clash of zombies mod menu apk no root<br />
|
26 |
-
x-war clash of zombies online generator tool<br />
|
27 |
-
x-war clash of zombies apk mod free shopping<br />
|
28 |
-
x-war clash of zombies mod apk unlimited resources and energy<br />
|
29 |
-
x-war clash of zombies gameplay and review<br />
|
30 |
-
x-war clash of zombies mod apk unlimited troops and heroes<br />
|
31 |
-
x-war clash of zombies hack tool without survey or verification<br />
|
32 |
-
x-war clash of zombies mod apk unlimited coins and diamonds<br />
|
33 |
-
x-war clash of zombies wiki and guide<br />
|
34 |
-
x-war clash of zombies mod apk unlimited power and speed<br />
|
35 |
-
x-war clash of zombies hack apk no human verification<br />
|
36 |
-
x-war clash of zombies mod apk unlimited health and damage<br />
|
37 |
-
x-war clash of zombies codes and redeem coupons<br />
|
38 |
-
x-war clash of zombies mod apk unlimited skills and abilities<br />
|
39 |
-
x-war clash of zombies hack apk for ios and iphone<br />
|
40 |
-
x-war clash of zombies mod apk unlimited weapons and items<br />
|
41 |
-
x-war clash of zombies hack online no download<br />
|
42 |
-
x-war clash of zombies mod apk unlimited gold and silver<br />
|
43 |
-
x-war clash of zombies tricks and secrets<br />
|
44 |
-
x-war clash of zombies mod apk unlimited levels and xp<br />
|
45 |
-
x-war clash of zombies hack app for android<br />
|
46 |
-
x-war clash of zombies mod apk unlimited stars and medals<br />
|
47 |
-
x-war clash of zombies hack no root or jailbreak</p>
|
48 |
-
<h2>What is X-War: Clash of Zombies Mod Apk?</h2>
|
49 |
-
<h3>A modified version of the original game</h3>
|
50 |
-
<p>X-War: Clash of Zombies Mod Apk is a modified version of the original game that has been hacked by some developers. It allows you to access features that are not available in the official version. For example, you can get unlimited crystals, which are the premium currency of the game. You can use them to buy heroes, buildings, items, speed up processes, and more. You can also get unlimited gold, food, energy, medals, and other resources that you need to <p>upgrade your base and army. You can also unlock all the heroes and buildings that are otherwise locked or require real money to purchase. You can have access to all the factions and their features. You can also enjoy unlimited energy, which is needed to play the game and participate in battles.</p>
|
51 |
-
<h3>A way to get unlimited crystals and other resources</h3>
|
52 |
-
<p>One of the main reasons why people use X-War: Clash of Zombies Mod Apk is to get unlimited crystals and other resources. Crystals are very hard to earn in the game, and they are used for almost everything. You can buy them with real money, but that can be very expensive and not everyone can afford it. With the mod apk, you can get as many crystals as you want for free. You can also get unlimited gold, food, energy, medals, and other resources that are essential for your progress. You can use them to build your base, train your army, buy items, speed up processes, and more. You don't have to worry about running out of resources or waiting for hours to get them.</p>
|
53 |
-
<h3>A way to unlock all the heroes and buildings</h3>
|
54 |
-
<p>Another reason why people use X-War: Clash of Zombies Mod Apk is to unlock all the heroes and buildings that are available in the game. Heroes are the most powerful units in the game, and they have unique skills and abilities. There are hundreds of heroes to collect and upgrade, but some of them are locked or require real money to purchase. With the mod apk, you can unlock all the heroes for free and use them in your battles. You can also unlock all the buildings that are needed to improve your base and army. Some of them are locked or require a certain level or faction to build. With the mod apk, you can build them without any restrictions and enjoy their benefits.</p>
|
55 |
-
<h2>How to download and install X-War: Clash of Zombies Mod Apk?</h2>
|
56 |
-
<h3>The steps to follow</h3>
|
57 |
-
<p>If you want to download and install X-War: Clash of Zombies Mod Apk on your device, you have to follow these steps:</p>
|
58 |
-
<ol>
|
59 |
-
<li>First, you have to uninstall the original version of the game if you have it installed on your device.</li>
|
60 |
-
<li>Second, you have to enable the installation of apps from unknown sources on your device. You can do this by going to Settings > Security > Unknown Sources and turning it on.</li>
|
61 |
-
<li>Third, you have to download the X-War: Clash of Zombies Mod Apk file from a reliable source. You can find many websites that offer it for free, but be careful of viruses and malware. You can use this link as an example: .</li>
|
62 |
-
<li>Fourth, you have to locate the downloaded file on your device and tap on it to start the installation process.</li>
|
63 |
-
<li>Fifth, you have to follow the instructions on the screen and wait for the installation to finish.</li>
|
64 |
-
<li>Sixth, you have to launch the game and enjoy the modded features.</li>
|
65 |
-
</ol>
|
66 |
-
<h3>The requirements and precautions</h3>
|
67 |
-
<p>Before you download and install X-War: Clash of Zombies Mod Apk on your device, you have to make sure that you meet these requirements and take these precautions:</p>
|
68 |
-
<ul>
|
69 |
-
<li>You need an Android device with version 4.1 or higher.</li>
|
70 |
-
<li>You need at least 100 MB of free storage space on your device.</li>
|
71 |
-
<li>You need a stable internet connection to play the game online.</li>
|
72 |
-
<li>You need to back up your data before uninstalling the original version of the game.</li>
|
73 |
-
<li>You need to be aware of the risks of using a modded version of the game, such as getting banned from the official servers, losing your progress, or damaging your device.</li>
|
74 |
-
<li>You need to use the mod apk at your own discretion and responsibility.</li>
|
75 |
-
</ul>
|
76 |
-
<h3>The benefits and risks</h3>
|
77 |
-
<p>Using X-War: Clash of Zombies Mod Apk has its benefits and risks. Here are some of them:</p>
|
78 |
-
| Benefits | Risks | | --- | --- | | You can get unlimited crystals and other resources for free. | You can get banned from the official servers if detected by the developers. | | You can unlock all the heroes and buildings without spending money or waiting for hours. | You can lose your progress if the mod apk is not compatible with the latest version of the game. | | You can enjoy all the features of all the factions without any limitations. | You can damage your device if the mod apk contains viruses or malware. | | You can have more fun and excitement playing the game with enhanced abilities and options. | You can ruin the balance and challenge of the game by making it too easy or unfair. | <h2>Conclusion</h2>
|
79 |
-
<h3>A <h3>A summary of the main points</h3>
|
80 |
-
<p>In this article, we have reviewed X-War: Clash of Zombies Mod Apk, a modified version of the original strategy game with zombies and superheroes. We have explained what the game is about, what the mod apk offers, how to download and install it, and what are the benefits and risks of using it. We have also provided an outline of the article and a table to compare the benefits and risks.</p>
|
81 |
-
<h3>A recommendation for the readers</h3>
|
82 |
-
<p>If you are looking for a fun and exciting game that combines base-building, resource management, hero collection, and combat, you might want to try X-War: Clash of Zombies. If you want to enjoy the game without spending money or waiting for hours, you might want to try X-War: Clash of Zombies Mod Apk. However, you should be aware of the risks involved and use it at your own risk. We hope you found this article helpful and informative. Thank you for reading.</p>
|
83 |
-
<h2>FAQs</h2>
|
84 |
-
<h3>Q: Is X-War: Clash of Zombies Mod Apk safe to use?</h3>
|
85 |
-
<p>A: X-War: Clash of Zombies Mod Apk is not an official version of the game and it has been hacked by some developers. Therefore, it is not guaranteed to be safe or secure. It may contain viruses or malware that can harm your device or steal your data. It may also cause errors or crashes that can affect your gameplay or progress. You should use it at your own risk and discretion.</p>
|
86 |
-
<h3>Q: How can I avoid getting banned from the official servers when using X-War: Clash of Zombies Mod Apk?</h3>
|
87 |
-
<p>A: There is no sure way to avoid getting banned from the official servers when using X-War: Clash of Zombies Mod Apk. The developers may detect your modded version and ban your account or device. However, some tips that may help you reduce the chances of getting banned are:</p>
|
88 |
-
<ul>
|
89 |
-
<li>Do not use the mod apk on your main account or device.</li>
|
90 |
-
<li>Do not abuse the modded features or cheat in online battles.</li>
|
91 |
-
<li>Do not brag or share your modded version with other players.</li>
|
92 |
-
<li>Do not update the game or the mod apk unless you are sure it is safe and compatible.</li>
|
93 |
-
</ul>
|
94 |
-
<h3>Q: How can I update X-War: Clash of Zombies Mod Apk?</h3>
|
95 |
-
<p>A: You should not update X-War: Clash of Zombies Mod Apk unless you are sure it is safe and compatible with the latest version of the game. Updating the game or the mod apk may cause errors or crashes that can affect your gameplay or progress. It may also make your modded version detectable by the developers and get you banned from the official servers. You should always check the source of the mod apk before downloading and installing it.</p>
|
96 |
-
<h3>Q: Can I play X-War: Clash of Zombies Mod Apk offline?</h3>
|
97 |
-
<p>A: No, you cannot play X-War: Clash of Zombies Mod Apk offline. The game requires a stable internet connection to play online and access all the features. You need to connect to the official servers or other players' bases to participate in battles, events, missions, and more. You also need to sync your data with the cloud to save your progress and settings.</p>
|
98 |
-
<h3>Q: Can I play X-War: Clash of Zombies Mod Apk with my friends?</h3>
|
99 |
-
<p>A: Yes, you can play X-War: Clash of Zombies Mod Apk with your friends if they also have the same modded version as you. You can join or create an alliance with them and cooperate with them in wars, raids, missions, and events. You can also chat with them and exchange gifts. However, you should be careful not to expose your modded version to other players who may report you or get you banned from the official servers.</p> 401be4b1e0<br />
|
100 |
-
<br />
|
101 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1toTree/lora_test/ppdiffusers/pipelines/__init__.py
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
|
2 |
-
# Copyright 2022 The HuggingFace Team. All rights reserved.
|
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 |
-
# flake8: noqa
|
16 |
-
|
17 |
-
from ..utils import (
|
18 |
-
OptionalDependencyNotAvailable,
|
19 |
-
is_fastdeploy_available,
|
20 |
-
is_k_diffusion_available,
|
21 |
-
is_librosa_available,
|
22 |
-
is_paddle_available,
|
23 |
-
is_paddlenlp_available,
|
24 |
-
)
|
25 |
-
|
26 |
-
try:
|
27 |
-
if not is_paddle_available():
|
28 |
-
raise OptionalDependencyNotAvailable()
|
29 |
-
except OptionalDependencyNotAvailable:
|
30 |
-
from ..utils.dummy_paddle_objects import * # noqa F403
|
31 |
-
else:
|
32 |
-
from .dance_diffusion import DanceDiffusionPipeline
|
33 |
-
from .ddim import DDIMPipeline
|
34 |
-
from .ddpm import DDPMPipeline
|
35 |
-
from .latent_diffusion import LDMSuperResolutionPipeline
|
36 |
-
from .latent_diffusion_uncond import LDMPipeline
|
37 |
-
from .pndm import PNDMPipeline
|
38 |
-
from .repaint import RePaintPipeline
|
39 |
-
from .score_sde_ve import ScoreSdeVePipeline
|
40 |
-
from .stochastic_karras_ve import KarrasVePipeline
|
41 |
-
|
42 |
-
|
43 |
-
try:
|
44 |
-
if not (is_paddle_available() and is_librosa_available()):
|
45 |
-
raise OptionalDependencyNotAvailable()
|
46 |
-
except OptionalDependencyNotAvailable:
|
47 |
-
from ..utils.dummy_paddle_and_librosa_objects import * # noqa F403
|
48 |
-
else:
|
49 |
-
from .audio_diffusion import AudioDiffusionPipeline, Mel
|
50 |
-
|
51 |
-
try:
|
52 |
-
if not (is_paddle_available() and is_paddlenlp_available()):
|
53 |
-
raise OptionalDependencyNotAvailable()
|
54 |
-
except OptionalDependencyNotAvailable:
|
55 |
-
from ..utils.dummy_paddle_and_paddlenlp_objects import * # noqa F403
|
56 |
-
else:
|
57 |
-
from .alt_diffusion import (
|
58 |
-
AltDiffusionImg2ImgPipeline,
|
59 |
-
AltDiffusionPipeline,
|
60 |
-
RobertaSeriesModelWithTransformation,
|
61 |
-
)
|
62 |
-
from .latent_diffusion import (
|
63 |
-
LDMBertModel,
|
64 |
-
LDMSuperResolutionPipeline,
|
65 |
-
LDMTextToImagePipeline,
|
66 |
-
)
|
67 |
-
from .paint_by_example import PaintByExamplePipeline
|
68 |
-
from .stable_diffusion import (
|
69 |
-
CycleDiffusionPipeline,
|
70 |
-
StableDiffusionDepth2ImgPipeline,
|
71 |
-
StableDiffusionImageVariationPipeline,
|
72 |
-
StableDiffusionImg2ImgPipeline,
|
73 |
-
StableDiffusionInpaintPipeline,
|
74 |
-
StableDiffusionInpaintPipelineLegacy,
|
75 |
-
StableDiffusionMegaPipeline,
|
76 |
-
StableDiffusionPipeline,
|
77 |
-
StableDiffusionPipelineAllinOne,
|
78 |
-
StableDiffusionUpscalePipeline,
|
79 |
-
)
|
80 |
-
from .stable_diffusion_safe import StableDiffusionPipelineSafe
|
81 |
-
from .unclip import UnCLIPPipeline
|
82 |
-
from .versatile_diffusion import (
|
83 |
-
VersatileDiffusionDualGuidedPipeline,
|
84 |
-
VersatileDiffusionImageVariationPipeline,
|
85 |
-
VersatileDiffusionPipeline,
|
86 |
-
VersatileDiffusionTextToImagePipeline,
|
87 |
-
)
|
88 |
-
from .vq_diffusion import VQDiffusionPipeline
|
89 |
-
|
90 |
-
try:
|
91 |
-
if not (is_paddle_available() and is_paddlenlp_available() and is_fastdeploy_available()):
|
92 |
-
raise OptionalDependencyNotAvailable()
|
93 |
-
except OptionalDependencyNotAvailable:
|
94 |
-
from ..utils.dummy_paddle_and_paddlenlp_and_fastdeploy_objects import * # noqa F403
|
95 |
-
else:
|
96 |
-
from .stable_diffusion import (
|
97 |
-
FastDeployStableDiffusionImg2ImgPipeline,
|
98 |
-
FastDeployStableDiffusionInpaintPipeline,
|
99 |
-
FastDeployStableDiffusionInpaintPipelineLegacy,
|
100 |
-
FastDeployStableDiffusionMegaPipeline,
|
101 |
-
FastDeployStableDiffusionPipeline,
|
102 |
-
)
|
103 |
-
try:
|
104 |
-
if not (is_paddle_available() and is_paddlenlp_available() and is_k_diffusion_available()):
|
105 |
-
raise OptionalDependencyNotAvailable()
|
106 |
-
except OptionalDependencyNotAvailable:
|
107 |
-
from ..utils.dummy_paddle_and_paddlenlp_and_k_diffusion_objects import * # noqa F403
|
108 |
-
else:
|
109 |
-
from .stable_diffusion import StableDiffusionKDiffusionPipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2ndelement/voicevox/speaker_info/7ffcb7ce-00ec-4bdc-82cd-45a8889e43ff/policy.md
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
dummy1 policy
|
2 |
-
|
3 |
-
https://voicevox.hiroshiba.jp/
|
|
|
|
|
|
|
|
spaces/801artistry/RVC801/demucs/separate.py
DELETED
@@ -1,185 +0,0 @@
|
|
1 |
-
# Copyright (c) Facebook, Inc. and its affiliates.
|
2 |
-
# All rights reserved.
|
3 |
-
#
|
4 |
-
# This source code is licensed under the license found in the
|
5 |
-
# LICENSE file in the root directory of this source tree.
|
6 |
-
|
7 |
-
import argparse
|
8 |
-
import sys
|
9 |
-
from pathlib import Path
|
10 |
-
import subprocess
|
11 |
-
|
12 |
-
import julius
|
13 |
-
import torch as th
|
14 |
-
import torchaudio as ta
|
15 |
-
|
16 |
-
from .audio import AudioFile, convert_audio_channels
|
17 |
-
from .pretrained import is_pretrained, load_pretrained
|
18 |
-
from .utils import apply_model, load_model
|
19 |
-
|
20 |
-
|
21 |
-
def load_track(track, device, audio_channels, samplerate):
|
22 |
-
errors = {}
|
23 |
-
wav = None
|
24 |
-
|
25 |
-
try:
|
26 |
-
wav = AudioFile(track).read(
|
27 |
-
streams=0,
|
28 |
-
samplerate=samplerate,
|
29 |
-
channels=audio_channels).to(device)
|
30 |
-
except FileNotFoundError:
|
31 |
-
errors['ffmpeg'] = 'Ffmpeg is not installed.'
|
32 |
-
except subprocess.CalledProcessError:
|
33 |
-
errors['ffmpeg'] = 'FFmpeg could not read the file.'
|
34 |
-
|
35 |
-
if wav is None:
|
36 |
-
try:
|
37 |
-
wav, sr = ta.load(str(track))
|
38 |
-
except RuntimeError as err:
|
39 |
-
errors['torchaudio'] = err.args[0]
|
40 |
-
else:
|
41 |
-
wav = convert_audio_channels(wav, audio_channels)
|
42 |
-
wav = wav.to(device)
|
43 |
-
wav = julius.resample_frac(wav, sr, samplerate)
|
44 |
-
|
45 |
-
if wav is None:
|
46 |
-
print(f"Could not load file {track}. "
|
47 |
-
"Maybe it is not a supported file format? ")
|
48 |
-
for backend, error in errors.items():
|
49 |
-
print(f"When trying to load using {backend}, got the following error: {error}")
|
50 |
-
sys.exit(1)
|
51 |
-
return wav
|
52 |
-
|
53 |
-
|
54 |
-
def encode_mp3(wav, path, bitrate=320, samplerate=44100, channels=2, verbose=False):
|
55 |
-
try:
|
56 |
-
import lameenc
|
57 |
-
except ImportError:
|
58 |
-
print("Failed to call lame encoder. Maybe it is not installed? "
|
59 |
-
"On windows, run `python.exe -m pip install -U lameenc`, "
|
60 |
-
"on OSX/Linux, run `python3 -m pip install -U lameenc`, "
|
61 |
-
"then try again.", file=sys.stderr)
|
62 |
-
sys.exit(1)
|
63 |
-
encoder = lameenc.Encoder()
|
64 |
-
encoder.set_bit_rate(bitrate)
|
65 |
-
encoder.set_in_sample_rate(samplerate)
|
66 |
-
encoder.set_channels(channels)
|
67 |
-
encoder.set_quality(2) # 2-highest, 7-fastest
|
68 |
-
if not verbose:
|
69 |
-
encoder.silence()
|
70 |
-
wav = wav.transpose(0, 1).numpy()
|
71 |
-
mp3_data = encoder.encode(wav.tobytes())
|
72 |
-
mp3_data += encoder.flush()
|
73 |
-
with open(path, "wb") as f:
|
74 |
-
f.write(mp3_data)
|
75 |
-
|
76 |
-
|
77 |
-
def main():
|
78 |
-
parser = argparse.ArgumentParser("demucs.separate",
|
79 |
-
description="Separate the sources for the given tracks")
|
80 |
-
parser.add_argument("tracks", nargs='+', type=Path, default=[], help='Path to tracks')
|
81 |
-
parser.add_argument("-n",
|
82 |
-
"--name",
|
83 |
-
default="demucs_quantized",
|
84 |
-
help="Model name. See README.md for the list of pretrained models. "
|
85 |
-
"Default is demucs_quantized.")
|
86 |
-
parser.add_argument("-v", "--verbose", action="store_true")
|
87 |
-
parser.add_argument("-o",
|
88 |
-
"--out",
|
89 |
-
type=Path,
|
90 |
-
default=Path("separated"),
|
91 |
-
help="Folder where to put extracted tracks. A subfolder "
|
92 |
-
"with the model name will be created.")
|
93 |
-
parser.add_argument("--models",
|
94 |
-
type=Path,
|
95 |
-
default=Path("models"),
|
96 |
-
help="Path to trained models. "
|
97 |
-
"Also used to store downloaded pretrained models")
|
98 |
-
parser.add_argument("-d",
|
99 |
-
"--device",
|
100 |
-
default="cuda" if th.cuda.is_available() else "cpu",
|
101 |
-
help="Device to use, default is cuda if available else cpu")
|
102 |
-
parser.add_argument("--shifts",
|
103 |
-
default=0,
|
104 |
-
type=int,
|
105 |
-
help="Number of random shifts for equivariant stabilization."
|
106 |
-
"Increase separation time but improves quality for Demucs. 10 was used "
|
107 |
-
"in the original paper.")
|
108 |
-
parser.add_argument("--overlap",
|
109 |
-
default=0.25,
|
110 |
-
type=float,
|
111 |
-
help="Overlap between the splits.")
|
112 |
-
parser.add_argument("--no-split",
|
113 |
-
action="store_false",
|
114 |
-
dest="split",
|
115 |
-
default=True,
|
116 |
-
help="Doesn't split audio in chunks. This can use large amounts of memory.")
|
117 |
-
parser.add_argument("--float32",
|
118 |
-
action="store_true",
|
119 |
-
help="Convert the output wavefile to use pcm f32 format instead of s16. "
|
120 |
-
"This should not make a difference if you just plan on listening to the "
|
121 |
-
"audio but might be needed to compute exactly metrics like SDR etc.")
|
122 |
-
parser.add_argument("--int16",
|
123 |
-
action="store_false",
|
124 |
-
dest="float32",
|
125 |
-
help="Opposite of --float32, here for compatibility.")
|
126 |
-
parser.add_argument("--mp3", action="store_true",
|
127 |
-
help="Convert the output wavs to mp3.")
|
128 |
-
parser.add_argument("--mp3-bitrate",
|
129 |
-
default=320,
|
130 |
-
type=int,
|
131 |
-
help="Bitrate of converted mp3.")
|
132 |
-
|
133 |
-
args = parser.parse_args()
|
134 |
-
name = args.name + ".th"
|
135 |
-
model_path = args.models / name
|
136 |
-
if model_path.is_file():
|
137 |
-
model = load_model(model_path)
|
138 |
-
else:
|
139 |
-
if is_pretrained(args.name):
|
140 |
-
model = load_pretrained(args.name)
|
141 |
-
else:
|
142 |
-
print(f"No pre-trained model {args.name}", file=sys.stderr)
|
143 |
-
sys.exit(1)
|
144 |
-
model.to(args.device)
|
145 |
-
|
146 |
-
out = args.out / args.name
|
147 |
-
out.mkdir(parents=True, exist_ok=True)
|
148 |
-
print(f"Separated tracks will be stored in {out.resolve()}")
|
149 |
-
for track in args.tracks:
|
150 |
-
if not track.exists():
|
151 |
-
print(
|
152 |
-
f"File {track} does not exist. If the path contains spaces, "
|
153 |
-
"please try again after surrounding the entire path with quotes \"\".",
|
154 |
-
file=sys.stderr)
|
155 |
-
continue
|
156 |
-
print(f"Separating track {track}")
|
157 |
-
wav = load_track(track, args.device, model.audio_channels, model.samplerate)
|
158 |
-
|
159 |
-
ref = wav.mean(0)
|
160 |
-
wav = (wav - ref.mean()) / ref.std()
|
161 |
-
sources = apply_model(model, wav, shifts=args.shifts, split=args.split,
|
162 |
-
overlap=args.overlap, progress=True)
|
163 |
-
sources = sources * ref.std() + ref.mean()
|
164 |
-
|
165 |
-
track_folder = out / track.name.rsplit(".", 1)[0]
|
166 |
-
track_folder.mkdir(exist_ok=True)
|
167 |
-
for source, name in zip(sources, model.sources):
|
168 |
-
source = source / max(1.01 * source.abs().max(), 1)
|
169 |
-
if args.mp3 or not args.float32:
|
170 |
-
source = (source * 2**15).clamp_(-2**15, 2**15 - 1).short()
|
171 |
-
source = source.cpu()
|
172 |
-
stem = str(track_folder / name)
|
173 |
-
if args.mp3:
|
174 |
-
encode_mp3(source, stem + ".mp3",
|
175 |
-
bitrate=args.mp3_bitrate,
|
176 |
-
samplerate=model.samplerate,
|
177 |
-
channels=model.audio_channels,
|
178 |
-
verbose=args.verbose)
|
179 |
-
else:
|
180 |
-
wavname = str(track_folder / f"{name}.wav")
|
181 |
-
ta.save(wavname, source, sample_rate=model.samplerate)
|
182 |
-
|
183 |
-
|
184 |
-
if __name__ == "__main__":
|
185 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/801artistry/RVC801/gui_v0.py
DELETED
@@ -1,786 +0,0 @@
|
|
1 |
-
import os, sys, traceback, re
|
2 |
-
|
3 |
-
import json
|
4 |
-
|
5 |
-
now_dir = os.getcwd()
|
6 |
-
sys.path.append(now_dir)
|
7 |
-
from configs.config import Config
|
8 |
-
|
9 |
-
Config = Config()
|
10 |
-
import PySimpleGUI as sg
|
11 |
-
import sounddevice as sd
|
12 |
-
import noisereduce as nr
|
13 |
-
import numpy as np
|
14 |
-
from fairseq import checkpoint_utils
|
15 |
-
import librosa, torch, pyworld, faiss, time, threading
|
16 |
-
import torch.nn.functional as F
|
17 |
-
import torchaudio.transforms as tat
|
18 |
-
import scipy.signal as signal
|
19 |
-
import torchcrepe
|
20 |
-
|
21 |
-
# import matplotlib.pyplot as plt
|
22 |
-
from lib.infer_pack.models import (
|
23 |
-
SynthesizerTrnMs256NSFsid,
|
24 |
-
SynthesizerTrnMs256NSFsid_nono,
|
25 |
-
SynthesizerTrnMs768NSFsid,
|
26 |
-
SynthesizerTrnMs768NSFsid_nono,
|
27 |
-
)
|
28 |
-
from i18n import I18nAuto
|
29 |
-
|
30 |
-
i18n = I18nAuto()
|
31 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
32 |
-
current_dir = os.getcwd()
|
33 |
-
|
34 |
-
|
35 |
-
class RVC:
|
36 |
-
def __init__(
|
37 |
-
self, key, f0_method, hubert_path, pth_path, index_path, npy_path, index_rate
|
38 |
-
) -> None:
|
39 |
-
"""
|
40 |
-
初始化
|
41 |
-
"""
|
42 |
-
try:
|
43 |
-
self.f0_up_key = key
|
44 |
-
self.time_step = 160 / 16000 * 1000
|
45 |
-
self.f0_min = 50
|
46 |
-
self.f0_max = 1100
|
47 |
-
self.f0_mel_min = 1127 * np.log(1 + self.f0_min / 700)
|
48 |
-
self.f0_mel_max = 1127 * np.log(1 + self.f0_max / 700)
|
49 |
-
self.f0_method = f0_method
|
50 |
-
self.sr = 16000
|
51 |
-
self.window = 160
|
52 |
-
|
53 |
-
# Get Torch Device
|
54 |
-
if torch.cuda.is_available():
|
55 |
-
self.torch_device = torch.device(
|
56 |
-
f"cuda:{0 % torch.cuda.device_count()}"
|
57 |
-
)
|
58 |
-
elif torch.backends.mps.is_available():
|
59 |
-
self.torch_device = torch.device("mps")
|
60 |
-
else:
|
61 |
-
self.torch_device = torch.device("cpu")
|
62 |
-
|
63 |
-
if index_rate != 0:
|
64 |
-
self.index = faiss.read_index(index_path)
|
65 |
-
# self.big_npy = np.load(npy_path)
|
66 |
-
self.big_npy = self.index.reconstruct_n(0, self.index.ntotal)
|
67 |
-
print("index search enabled")
|
68 |
-
self.index_rate = index_rate
|
69 |
-
model_path = hubert_path
|
70 |
-
print("load model(s) from {}".format(model_path))
|
71 |
-
models, saved_cfg, task = checkpoint_utils.load_model_ensemble_and_task(
|
72 |
-
[model_path],
|
73 |
-
suffix="",
|
74 |
-
)
|
75 |
-
self.model = models[0]
|
76 |
-
self.model = self.model.to(device)
|
77 |
-
if Config.is_half:
|
78 |
-
self.model = self.model.half()
|
79 |
-
else:
|
80 |
-
self.model = self.model.float()
|
81 |
-
self.model.eval()
|
82 |
-
cpt = torch.load(pth_path, map_location="cpu")
|
83 |
-
self.tgt_sr = cpt["config"][-1]
|
84 |
-
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
|
85 |
-
self.if_f0 = cpt.get("f0", 1)
|
86 |
-
self.version = cpt.get("version", "v1")
|
87 |
-
if self.version == "v1":
|
88 |
-
if self.if_f0 == 1:
|
89 |
-
self.net_g = SynthesizerTrnMs256NSFsid(
|
90 |
-
*cpt["config"], is_half=Config.is_half
|
91 |
-
)
|
92 |
-
else:
|
93 |
-
self.net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
|
94 |
-
elif self.version == "v2":
|
95 |
-
if self.if_f0 == 1:
|
96 |
-
self.net_g = SynthesizerTrnMs768NSFsid(
|
97 |
-
*cpt["config"], is_half=Config.is_half
|
98 |
-
)
|
99 |
-
else:
|
100 |
-
self.net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
|
101 |
-
del self.net_g.enc_q
|
102 |
-
print(self.net_g.load_state_dict(cpt["weight"], strict=False))
|
103 |
-
self.net_g.eval().to(device)
|
104 |
-
if Config.is_half:
|
105 |
-
self.net_g = self.net_g.half()
|
106 |
-
else:
|
107 |
-
self.net_g = self.net_g.float()
|
108 |
-
except:
|
109 |
-
print(traceback.format_exc())
|
110 |
-
|
111 |
-
def get_regular_crepe_computation(self, x, f0_min, f0_max, model="full"):
|
112 |
-
batch_size = 512
|
113 |
-
# Compute pitch using first gpu
|
114 |
-
audio = torch.tensor(np.copy(x))[None].float()
|
115 |
-
f0, pd = torchcrepe.predict(
|
116 |
-
audio,
|
117 |
-
self.sr,
|
118 |
-
self.window,
|
119 |
-
f0_min,
|
120 |
-
f0_max,
|
121 |
-
model,
|
122 |
-
batch_size=batch_size,
|
123 |
-
device=self.torch_device,
|
124 |
-
return_periodicity=True,
|
125 |
-
)
|
126 |
-
pd = torchcrepe.filter.median(pd, 3)
|
127 |
-
f0 = torchcrepe.filter.mean(f0, 3)
|
128 |
-
f0[pd < 0.1] = 0
|
129 |
-
f0 = f0[0].cpu().numpy()
|
130 |
-
return f0
|
131 |
-
|
132 |
-
def get_harvest_computation(self, x, f0_min, f0_max):
|
133 |
-
f0, t = pyworld.harvest(
|
134 |
-
x.astype(np.double),
|
135 |
-
fs=self.sr,
|
136 |
-
f0_ceil=f0_max,
|
137 |
-
f0_floor=f0_min,
|
138 |
-
frame_period=10,
|
139 |
-
)
|
140 |
-
f0 = pyworld.stonemask(x.astype(np.double), f0, t, self.sr)
|
141 |
-
f0 = signal.medfilt(f0, 3)
|
142 |
-
return f0
|
143 |
-
|
144 |
-
def get_f0(self, x, f0_up_key, inp_f0=None):
|
145 |
-
# Calculate Padding and f0 details here
|
146 |
-
p_len = x.shape[0] // 512 # For Now This probs doesn't work
|
147 |
-
x_pad = 1
|
148 |
-
f0_min = 50
|
149 |
-
f0_max = 1100
|
150 |
-
f0_mel_min = 1127 * np.log(1 + f0_min / 700)
|
151 |
-
f0_mel_max = 1127 * np.log(1 + f0_max / 700)
|
152 |
-
|
153 |
-
f0 = 0
|
154 |
-
# Here, check f0_methods and get their computations
|
155 |
-
if self.f0_method == "harvest":
|
156 |
-
f0 = self.get_harvest_computation(x, f0_min, f0_max)
|
157 |
-
elif self.f0_method == "reg-crepe":
|
158 |
-
f0 = self.get_regular_crepe_computation(x, f0_min, f0_max)
|
159 |
-
elif self.f0_method == "reg-crepe-tiny":
|
160 |
-
f0 = self.get_regular_crepe_computation(x, f0_min, f0_max, "tiny")
|
161 |
-
|
162 |
-
# Calculate f0_course and f0_bak here
|
163 |
-
f0 *= pow(2, f0_up_key / 12)
|
164 |
-
# with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()]))
|
165 |
-
tf0 = self.sr // self.window # 每秒f0点数
|
166 |
-
if inp_f0 is not None:
|
167 |
-
delta_t = np.round(
|
168 |
-
(inp_f0[:, 0].max() - inp_f0[:, 0].min()) * tf0 + 1
|
169 |
-
).astype("int16")
|
170 |
-
replace_f0 = np.interp(
|
171 |
-
list(range(delta_t)), inp_f0[:, 0] * 100, inp_f0[:, 1]
|
172 |
-
)
|
173 |
-
shape = f0[x_pad * tf0 : x_pad * tf0 + len(replace_f0)].shape[0]
|
174 |
-
f0[x_pad * tf0 : x_pad * tf0 + len(replace_f0)] = replace_f0[:shape]
|
175 |
-
# with open("test_opt.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()]))
|
176 |
-
f0bak = f0.copy()
|
177 |
-
f0_mel = 1127 * np.log(1 + f0 / 700)
|
178 |
-
f0_mel[f0_mel > 0] = (f0_mel[f0_mel > 0] - f0_mel_min) * 254 / (
|
179 |
-
f0_mel_max - f0_mel_min
|
180 |
-
) + 1
|
181 |
-
f0_mel[f0_mel <= 1] = 1
|
182 |
-
f0_mel[f0_mel > 255] = 255
|
183 |
-
f0_coarse = np.rint(f0_mel).astype(np.int)
|
184 |
-
return f0_coarse, f0bak # 1-0
|
185 |
-
|
186 |
-
def infer(self, feats: torch.Tensor) -> np.ndarray:
|
187 |
-
"""
|
188 |
-
推理函数
|
189 |
-
"""
|
190 |
-
audio = feats.clone().cpu().numpy()
|
191 |
-
assert feats.dim() == 1, feats.dim()
|
192 |
-
feats = feats.view(1, -1)
|
193 |
-
padding_mask = torch.BoolTensor(feats.shape).fill_(False)
|
194 |
-
if Config.is_half:
|
195 |
-
feats = feats.half()
|
196 |
-
else:
|
197 |
-
feats = feats.float()
|
198 |
-
inputs = {
|
199 |
-
"source": feats.to(device),
|
200 |
-
"padding_mask": padding_mask.to(device),
|
201 |
-
"output_layer": 9 if self.version == "v1" else 12,
|
202 |
-
}
|
203 |
-
torch.cuda.synchronize()
|
204 |
-
with torch.no_grad():
|
205 |
-
logits = self.model.extract_features(**inputs)
|
206 |
-
feats = (
|
207 |
-
self.model.final_proj(logits[0]) if self.version == "v1" else logits[0]
|
208 |
-
)
|
209 |
-
|
210 |
-
####索引优化
|
211 |
-
try:
|
212 |
-
if (
|
213 |
-
hasattr(self, "index")
|
214 |
-
and hasattr(self, "big_npy")
|
215 |
-
and self.index_rate != 0
|
216 |
-
):
|
217 |
-
npy = feats[0].cpu().numpy().astype("float32")
|
218 |
-
score, ix = self.index.search(npy, k=8)
|
219 |
-
weight = np.square(1 / score)
|
220 |
-
weight /= weight.sum(axis=1, keepdims=True)
|
221 |
-
npy = np.sum(self.big_npy[ix] * np.expand_dims(weight, axis=2), axis=1)
|
222 |
-
if Config.is_half:
|
223 |
-
npy = npy.astype("float16")
|
224 |
-
feats = (
|
225 |
-
torch.from_numpy(npy).unsqueeze(0).to(device) * self.index_rate
|
226 |
-
+ (1 - self.index_rate) * feats
|
227 |
-
)
|
228 |
-
else:
|
229 |
-
print("index search FAIL or disabled")
|
230 |
-
except:
|
231 |
-
traceback.print_exc()
|
232 |
-
print("index search FAIL")
|
233 |
-
feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1)
|
234 |
-
torch.cuda.synchronize()
|
235 |
-
print(feats.shape)
|
236 |
-
if self.if_f0 == 1:
|
237 |
-
pitch, pitchf = self.get_f0(audio, self.f0_up_key)
|
238 |
-
p_len = min(feats.shape[1], 13000, pitch.shape[0]) # 太大了爆显存
|
239 |
-
else:
|
240 |
-
pitch, pitchf = None, None
|
241 |
-
p_len = min(feats.shape[1], 13000) # 太大了爆显存
|
242 |
-
torch.cuda.synchronize()
|
243 |
-
# print(feats.shape,pitch.shape)
|
244 |
-
feats = feats[:, :p_len, :]
|
245 |
-
if self.if_f0 == 1:
|
246 |
-
pitch = pitch[:p_len]
|
247 |
-
pitchf = pitchf[:p_len]
|
248 |
-
pitch = torch.LongTensor(pitch).unsqueeze(0).to(device)
|
249 |
-
pitchf = torch.FloatTensor(pitchf).unsqueeze(0).to(device)
|
250 |
-
p_len = torch.LongTensor([p_len]).to(device)
|
251 |
-
ii = 0 # sid
|
252 |
-
sid = torch.LongTensor([ii]).to(device)
|
253 |
-
with torch.no_grad():
|
254 |
-
if self.if_f0 == 1:
|
255 |
-
infered_audio = (
|
256 |
-
self.net_g.infer(feats, p_len, pitch, pitchf, sid)[0][0, 0]
|
257 |
-
.data.cpu()
|
258 |
-
.float()
|
259 |
-
)
|
260 |
-
else:
|
261 |
-
infered_audio = (
|
262 |
-
self.net_g.infer(feats, p_len, sid)[0][0, 0].data.cpu().float()
|
263 |
-
)
|
264 |
-
torch.cuda.synchronize()
|
265 |
-
return infered_audio
|
266 |
-
|
267 |
-
|
268 |
-
class GUIConfig:
|
269 |
-
def __init__(self) -> None:
|
270 |
-
self.hubert_path: str = ""
|
271 |
-
self.pth_path: str = ""
|
272 |
-
self.index_path: str = ""
|
273 |
-
self.npy_path: str = ""
|
274 |
-
self.f0_method: str = ""
|
275 |
-
self.pitch: int = 12
|
276 |
-
self.samplerate: int = 44100
|
277 |
-
self.block_time: float = 1.0 # s
|
278 |
-
self.buffer_num: int = 1
|
279 |
-
self.threhold: int = -30
|
280 |
-
self.crossfade_time: float = 0.08
|
281 |
-
self.extra_time: float = 0.04
|
282 |
-
self.I_noise_reduce = False
|
283 |
-
self.O_noise_reduce = False
|
284 |
-
self.index_rate = 0.3
|
285 |
-
|
286 |
-
|
287 |
-
class GUI:
|
288 |
-
def __init__(self) -> None:
|
289 |
-
self.config = GUIConfig()
|
290 |
-
self.flag_vc = False
|
291 |
-
|
292 |
-
self.launcher()
|
293 |
-
|
294 |
-
def load(self):
|
295 |
-
(
|
296 |
-
input_devices,
|
297 |
-
output_devices,
|
298 |
-
input_devices_indices,
|
299 |
-
output_devices_indices,
|
300 |
-
) = self.get_devices()
|
301 |
-
try:
|
302 |
-
with open("values1.json", "r") as j:
|
303 |
-
data = json.load(j)
|
304 |
-
except:
|
305 |
-
# Injecting f0_method into the json data
|
306 |
-
with open("values1.json", "w") as j:
|
307 |
-
data = {
|
308 |
-
"pth_path": "",
|
309 |
-
"index_path": "",
|
310 |
-
"sg_input_device": input_devices[
|
311 |
-
input_devices_indices.index(sd.default.device[0])
|
312 |
-
],
|
313 |
-
"sg_output_device": output_devices[
|
314 |
-
output_devices_indices.index(sd.default.device[1])
|
315 |
-
],
|
316 |
-
"threhold": "-45",
|
317 |
-
"pitch": "0",
|
318 |
-
"index_rate": "0",
|
319 |
-
"block_time": "1",
|
320 |
-
"crossfade_length": "0.04",
|
321 |
-
"extra_time": "1",
|
322 |
-
}
|
323 |
-
return data
|
324 |
-
|
325 |
-
def launcher(self):
|
326 |
-
data = self.load()
|
327 |
-
sg.theme("DarkTeal12")
|
328 |
-
input_devices, output_devices, _, _ = self.get_devices()
|
329 |
-
layout = [
|
330 |
-
[
|
331 |
-
sg.Frame(
|
332 |
-
title="Proudly forked by Mangio621",
|
333 |
-
),
|
334 |
-
sg.Frame(
|
335 |
-
title=i18n("Load model"),
|
336 |
-
layout=[
|
337 |
-
[
|
338 |
-
sg.Input(
|
339 |
-
default_text="hubert_base.pt",
|
340 |
-
key="hubert_path",
|
341 |
-
disabled=True,
|
342 |
-
),
|
343 |
-
sg.FileBrowse(
|
344 |
-
i18n("Hubert Model"),
|
345 |
-
initial_folder=os.path.join(os.getcwd()),
|
346 |
-
file_types=(("pt files", "*.pt"),),
|
347 |
-
),
|
348 |
-
],
|
349 |
-
[
|
350 |
-
sg.Input(
|
351 |
-
default_text=data.get("pth_path", ""),
|
352 |
-
key="pth_path",
|
353 |
-
),
|
354 |
-
sg.FileBrowse(
|
355 |
-
i18n("Select the .pth file"),
|
356 |
-
initial_folder=os.path.join(os.getcwd(), "weights"),
|
357 |
-
file_types=(("weight files", "*.pth"),),
|
358 |
-
),
|
359 |
-
],
|
360 |
-
[
|
361 |
-
sg.Input(
|
362 |
-
default_text=data.get("index_path", ""),
|
363 |
-
key="index_path",
|
364 |
-
),
|
365 |
-
sg.FileBrowse(
|
366 |
-
i18n("Select the .index file"),
|
367 |
-
initial_folder=os.path.join(os.getcwd(), "logs"),
|
368 |
-
file_types=(("index files", "*.index"),),
|
369 |
-
),
|
370 |
-
],
|
371 |
-
[
|
372 |
-
sg.Input(
|
373 |
-
default_text="你不需要填写这个You don't need write this.",
|
374 |
-
key="npy_path",
|
375 |
-
disabled=True,
|
376 |
-
),
|
377 |
-
sg.FileBrowse(
|
378 |
-
i18n("Select the .npy file"),
|
379 |
-
initial_folder=os.path.join(os.getcwd(), "logs"),
|
380 |
-
file_types=(("feature files", "*.npy"),),
|
381 |
-
),
|
382 |
-
],
|
383 |
-
],
|
384 |
-
),
|
385 |
-
],
|
386 |
-
[
|
387 |
-
# Mangio f0 Selection frame Here
|
388 |
-
sg.Frame(
|
389 |
-
layout=[
|
390 |
-
[
|
391 |
-
sg.Radio(
|
392 |
-
"Harvest", "f0_method", key="harvest", default=True
|
393 |
-
),
|
394 |
-
sg.Radio("Crepe", "f0_method", key="reg-crepe"),
|
395 |
-
sg.Radio("Crepe Tiny", "f0_method", key="reg-crepe-tiny"),
|
396 |
-
]
|
397 |
-
],
|
398 |
-
title="Select an f0 Method",
|
399 |
-
)
|
400 |
-
],
|
401 |
-
[
|
402 |
-
sg.Frame(
|
403 |
-
layout=[
|
404 |
-
[
|
405 |
-
sg.Text(i18n("Input device")),
|
406 |
-
sg.Combo(
|
407 |
-
input_devices,
|
408 |
-
key="sg_input_device",
|
409 |
-
default_value=data.get("sg_input_device", ""),
|
410 |
-
),
|
411 |
-
],
|
412 |
-
[
|
413 |
-
sg.Text(i18n("Output device")),
|
414 |
-
sg.Combo(
|
415 |
-
output_devices,
|
416 |
-
key="sg_output_device",
|
417 |
-
default_value=data.get("sg_output_device", ""),
|
418 |
-
),
|
419 |
-
],
|
420 |
-
],
|
421 |
-
title=i18n("Audio device (please use the same type of driver)"),
|
422 |
-
)
|
423 |
-
],
|
424 |
-
[
|
425 |
-
sg.Frame(
|
426 |
-
layout=[
|
427 |
-
[
|
428 |
-
sg.Text(i18n("Response threshold")),
|
429 |
-
sg.Slider(
|
430 |
-
range=(-60, 0),
|
431 |
-
key="threhold",
|
432 |
-
resolution=1,
|
433 |
-
orientation="h",
|
434 |
-
default_value=data.get("threhold", ""),
|
435 |
-
),
|
436 |
-
],
|
437 |
-
[
|
438 |
-
sg.Text(i18n("Pitch settings")),
|
439 |
-
sg.Slider(
|
440 |
-
range=(-24, 24),
|
441 |
-
key="pitch",
|
442 |
-
resolution=1,
|
443 |
-
orientation="h",
|
444 |
-
default_value=data.get("pitch", ""),
|
445 |
-
),
|
446 |
-
],
|
447 |
-
[
|
448 |
-
sg.Text(i18n("Index Rate")),
|
449 |
-
sg.Slider(
|
450 |
-
range=(0.0, 1.0),
|
451 |
-
key="index_rate",
|
452 |
-
resolution=0.01,
|
453 |
-
orientation="h",
|
454 |
-
default_value=data.get("index_rate", ""),
|
455 |
-
),
|
456 |
-
],
|
457 |
-
],
|
458 |
-
title=i18n("General settings"),
|
459 |
-
),
|
460 |
-
sg.Frame(
|
461 |
-
layout=[
|
462 |
-
[
|
463 |
-
sg.Text(i18n("Sample length")),
|
464 |
-
sg.Slider(
|
465 |
-
range=(0.1, 3.0),
|
466 |
-
key="block_time",
|
467 |
-
resolution=0.1,
|
468 |
-
orientation="h",
|
469 |
-
default_value=data.get("block_time", ""),
|
470 |
-
),
|
471 |
-
],
|
472 |
-
[
|
473 |
-
sg.Text(i18n("Fade length")),
|
474 |
-
sg.Slider(
|
475 |
-
range=(0.01, 0.15),
|
476 |
-
key="crossfade_length",
|
477 |
-
resolution=0.01,
|
478 |
-
orientation="h",
|
479 |
-
default_value=data.get("crossfade_length", ""),
|
480 |
-
),
|
481 |
-
],
|
482 |
-
[
|
483 |
-
sg.Text(i18n("Extra推理时长")),
|
484 |
-
sg.Slider(
|
485 |
-
range=(0.05, 3.00),
|
486 |
-
key="extra_time",
|
487 |
-
resolution=0.01,
|
488 |
-
orientation="h",
|
489 |
-
default_value=data.get("extra_time", ""),
|
490 |
-
),
|
491 |
-
],
|
492 |
-
[
|
493 |
-
sg.Checkbox(i18n("Input noise reduction"), key="I_noise_reduce"),
|
494 |
-
sg.Checkbox(i18n("Output noise reduction"), key="O_noise_reduce"),
|
495 |
-
],
|
496 |
-
],
|
497 |
-
title=i18n("Performance settings"),
|
498 |
-
),
|
499 |
-
],
|
500 |
-
[
|
501 |
-
sg.Button(i18n("开始音频Convert"), key="start_vc"),
|
502 |
-
sg.Button(i18n("停止音频Convert"), key="stop_vc"),
|
503 |
-
sg.Text(i18n("Inference time (ms):")),
|
504 |
-
sg.Text("0", key="infer_time"),
|
505 |
-
],
|
506 |
-
]
|
507 |
-
self.window = sg.Window("RVC - GUI", layout=layout)
|
508 |
-
self.event_handler()
|
509 |
-
|
510 |
-
def event_handler(self):
|
511 |
-
while True:
|
512 |
-
event, values = self.window.read()
|
513 |
-
if event == sg.WINDOW_CLOSED:
|
514 |
-
self.flag_vc = False
|
515 |
-
exit()
|
516 |
-
if event == "start_vc" and self.flag_vc == False:
|
517 |
-
if self.set_values(values) == True:
|
518 |
-
print("using_cuda:" + str(torch.cuda.is_available()))
|
519 |
-
self.start_vc()
|
520 |
-
settings = {
|
521 |
-
"pth_path": values["pth_path"],
|
522 |
-
"index_path": values["index_path"],
|
523 |
-
"f0_method": self.get_f0_method_from_radios(values),
|
524 |
-
"sg_input_device": values["sg_input_device"],
|
525 |
-
"sg_output_device": values["sg_output_device"],
|
526 |
-
"threhold": values["threhold"],
|
527 |
-
"pitch": values["pitch"],
|
528 |
-
"index_rate": values["index_rate"],
|
529 |
-
"block_time": values["block_time"],
|
530 |
-
"crossfade_length": values["crossfade_length"],
|
531 |
-
"extra_time": values["extra_time"],
|
532 |
-
}
|
533 |
-
with open("values1.json", "w") as j:
|
534 |
-
json.dump(settings, j)
|
535 |
-
if event == "stop_vc" and self.flag_vc == True:
|
536 |
-
self.flag_vc = False
|
537 |
-
|
538 |
-
# Function that returns the used f0 method in string format "harvest"
|
539 |
-
def get_f0_method_from_radios(self, values):
|
540 |
-
f0_array = [
|
541 |
-
{"name": "harvest", "val": values["harvest"]},
|
542 |
-
{"name": "reg-crepe", "val": values["reg-crepe"]},
|
543 |
-
{"name": "reg-crepe-tiny", "val": values["reg-crepe-tiny"]},
|
544 |
-
]
|
545 |
-
# Filter through to find a true value
|
546 |
-
used_f0 = ""
|
547 |
-
for f0 in f0_array:
|
548 |
-
if f0["val"] == True:
|
549 |
-
used_f0 = f0["name"]
|
550 |
-
break
|
551 |
-
if used_f0 == "":
|
552 |
-
used_f0 = "harvest" # Default Harvest if used_f0 is empty somehow
|
553 |
-
return used_f0
|
554 |
-
|
555 |
-
def set_values(self, values):
|
556 |
-
if len(values["pth_path"].strip()) == 0:
|
557 |
-
sg.popup(i18n("Select the pth file"))
|
558 |
-
return False
|
559 |
-
if len(values["index_path"].strip()) == 0:
|
560 |
-
sg.popup(i18n("Select the index file"))
|
561 |
-
return False
|
562 |
-
pattern = re.compile("[^\x00-\x7F]+")
|
563 |
-
if pattern.findall(values["hubert_path"]):
|
564 |
-
sg.popup(i18n("The hubert model path must not contain Chinese characters"))
|
565 |
-
return False
|
566 |
-
if pattern.findall(values["pth_path"]):
|
567 |
-
sg.popup(i18n("The pth file path must not contain Chinese characters."))
|
568 |
-
return False
|
569 |
-
if pattern.findall(values["index_path"]):
|
570 |
-
sg.popup(i18n("The index file path must not contain Chinese characters."))
|
571 |
-
return False
|
572 |
-
self.set_devices(values["sg_input_device"], values["sg_output_device"])
|
573 |
-
self.config.hubert_path = os.path.join(current_dir, "hubert_base.pt")
|
574 |
-
self.config.pth_path = values["pth_path"]
|
575 |
-
self.config.index_path = values["index_path"]
|
576 |
-
self.config.npy_path = values["npy_path"]
|
577 |
-
self.config.f0_method = self.get_f0_method_from_radios(values)
|
578 |
-
self.config.threhold = values["threhold"]
|
579 |
-
self.config.pitch = values["pitch"]
|
580 |
-
self.config.block_time = values["block_time"]
|
581 |
-
self.config.crossfade_time = values["crossfade_length"]
|
582 |
-
self.config.extra_time = values["extra_time"]
|
583 |
-
self.config.I_noise_reduce = values["I_noise_reduce"]
|
584 |
-
self.config.O_noise_reduce = values["O_noise_reduce"]
|
585 |
-
self.config.index_rate = values["index_rate"]
|
586 |
-
return True
|
587 |
-
|
588 |
-
def start_vc(self):
|
589 |
-
torch.cuda.empty_cache()
|
590 |
-
self.flag_vc = True
|
591 |
-
self.block_frame = int(self.config.block_time * self.config.samplerate)
|
592 |
-
self.crossfade_frame = int(self.config.crossfade_time * self.config.samplerate)
|
593 |
-
self.sola_search_frame = int(0.012 * self.config.samplerate)
|
594 |
-
self.delay_frame = int(0.01 * self.config.samplerate) # 往前预留0.02s
|
595 |
-
self.extra_frame = int(self.config.extra_time * self.config.samplerate)
|
596 |
-
self.rvc = None
|
597 |
-
self.rvc = RVC(
|
598 |
-
self.config.pitch,
|
599 |
-
self.config.f0_method,
|
600 |
-
self.config.hubert_path,
|
601 |
-
self.config.pth_path,
|
602 |
-
self.config.index_path,
|
603 |
-
self.config.npy_path,
|
604 |
-
self.config.index_rate,
|
605 |
-
)
|
606 |
-
self.input_wav: np.ndarray = np.zeros(
|
607 |
-
self.extra_frame
|
608 |
-
+ self.crossfade_frame
|
609 |
-
+ self.sola_search_frame
|
610 |
-
+ self.block_frame,
|
611 |
-
dtype="float32",
|
612 |
-
)
|
613 |
-
self.output_wav: torch.Tensor = torch.zeros(
|
614 |
-
self.block_frame, device=device, dtype=torch.float32
|
615 |
-
)
|
616 |
-
self.sola_buffer: torch.Tensor = torch.zeros(
|
617 |
-
self.crossfade_frame, device=device, dtype=torch.float32
|
618 |
-
)
|
619 |
-
self.fade_in_window: torch.Tensor = torch.linspace(
|
620 |
-
0.0, 1.0, steps=self.crossfade_frame, device=device, dtype=torch.float32
|
621 |
-
)
|
622 |
-
self.fade_out_window: torch.Tensor = 1 - self.fade_in_window
|
623 |
-
self.resampler1 = tat.Resample(
|
624 |
-
orig_freq=self.config.samplerate, new_freq=16000, dtype=torch.float32
|
625 |
-
)
|
626 |
-
self.resampler2 = tat.Resample(
|
627 |
-
orig_freq=self.rvc.tgt_sr,
|
628 |
-
new_freq=self.config.samplerate,
|
629 |
-
dtype=torch.float32,
|
630 |
-
)
|
631 |
-
thread_vc = threading.Thread(target=self.soundinput)
|
632 |
-
thread_vc.start()
|
633 |
-
|
634 |
-
def soundinput(self):
|
635 |
-
"""
|
636 |
-
接受音频输入
|
637 |
-
"""
|
638 |
-
with sd.Stream(
|
639 |
-
channels=2,
|
640 |
-
callback=self.audio_callback,
|
641 |
-
blocksize=self.block_frame,
|
642 |
-
samplerate=self.config.samplerate,
|
643 |
-
dtype="float32",
|
644 |
-
):
|
645 |
-
while self.flag_vc:
|
646 |
-
time.sleep(self.config.block_time)
|
647 |
-
print("Audio block passed.")
|
648 |
-
print("ENDing VC")
|
649 |
-
|
650 |
-
def audio_callback(
|
651 |
-
self, indata: np.ndarray, outdata: np.ndarray, frames, times, status
|
652 |
-
):
|
653 |
-
"""
|
654 |
-
音频处理
|
655 |
-
"""
|
656 |
-
start_time = time.perf_counter()
|
657 |
-
indata = librosa.to_mono(indata.T)
|
658 |
-
if self.config.I_noise_reduce:
|
659 |
-
indata[:] = nr.reduce_noise(y=indata, sr=self.config.samplerate)
|
660 |
-
|
661 |
-
"""noise gate"""
|
662 |
-
frame_length = 2048
|
663 |
-
hop_length = 1024
|
664 |
-
rms = librosa.feature.rms(
|
665 |
-
y=indata, frame_length=frame_length, hop_length=hop_length
|
666 |
-
)
|
667 |
-
db_threhold = librosa.amplitude_to_db(rms, ref=1.0)[0] < self.config.threhold
|
668 |
-
# print(rms.shape,db.shape,db)
|
669 |
-
for i in range(db_threhold.shape[0]):
|
670 |
-
if db_threhold[i]:
|
671 |
-
indata[i * hop_length : (i + 1) * hop_length] = 0
|
672 |
-
self.input_wav[:] = np.append(self.input_wav[self.block_frame :], indata)
|
673 |
-
|
674 |
-
# infer
|
675 |
-
print("input_wav:" + str(self.input_wav.shape))
|
676 |
-
# print('infered_wav:'+str(infer_wav.shape))
|
677 |
-
infer_wav: torch.Tensor = self.resampler2(
|
678 |
-
self.rvc.infer(self.resampler1(torch.from_numpy(self.input_wav)))
|
679 |
-
)[-self.crossfade_frame - self.sola_search_frame - self.block_frame :].to(
|
680 |
-
device
|
681 |
-
)
|
682 |
-
print("infer_wav:" + str(infer_wav.shape))
|
683 |
-
|
684 |
-
# SOLA algorithm from https://github.com/yxlllc/DDSP-SVC
|
685 |
-
cor_nom = F.conv1d(
|
686 |
-
infer_wav[None, None, : self.crossfade_frame + self.sola_search_frame],
|
687 |
-
self.sola_buffer[None, None, :],
|
688 |
-
)
|
689 |
-
cor_den = torch.sqrt(
|
690 |
-
F.conv1d(
|
691 |
-
infer_wav[None, None, : self.crossfade_frame + self.sola_search_frame]
|
692 |
-
** 2,
|
693 |
-
torch.ones(1, 1, self.crossfade_frame, device=device),
|
694 |
-
)
|
695 |
-
+ 1e-8
|
696 |
-
)
|
697 |
-
sola_offset = torch.argmax(cor_nom[0, 0] / cor_den[0, 0])
|
698 |
-
print("sola offset: " + str(int(sola_offset)))
|
699 |
-
|
700 |
-
# crossfade
|
701 |
-
self.output_wav[:] = infer_wav[sola_offset : sola_offset + self.block_frame]
|
702 |
-
self.output_wav[: self.crossfade_frame] *= self.fade_in_window
|
703 |
-
self.output_wav[: self.crossfade_frame] += self.sola_buffer[:]
|
704 |
-
if sola_offset < self.sola_search_frame:
|
705 |
-
self.sola_buffer[:] = (
|
706 |
-
infer_wav[
|
707 |
-
-self.sola_search_frame
|
708 |
-
- self.crossfade_frame
|
709 |
-
+ sola_offset : -self.sola_search_frame
|
710 |
-
+ sola_offset
|
711 |
-
]
|
712 |
-
* self.fade_out_window
|
713 |
-
)
|
714 |
-
else:
|
715 |
-
self.sola_buffer[:] = (
|
716 |
-
infer_wav[-self.crossfade_frame :] * self.fade_out_window
|
717 |
-
)
|
718 |
-
|
719 |
-
if self.config.O_noise_reduce:
|
720 |
-
outdata[:] = np.tile(
|
721 |
-
nr.reduce_noise(
|
722 |
-
y=self.output_wav[:].cpu().numpy(), sr=self.config.samplerate
|
723 |
-
),
|
724 |
-
(2, 1),
|
725 |
-
).T
|
726 |
-
else:
|
727 |
-
outdata[:] = self.output_wav[:].repeat(2, 1).t().cpu().numpy()
|
728 |
-
total_time = time.perf_counter() - start_time
|
729 |
-
self.window["infer_time"].update(int(total_time * 1000))
|
730 |
-
print("infer time:" + str(total_time))
|
731 |
-
print("f0_method: " + str(self.config.f0_method))
|
732 |
-
|
733 |
-
def get_devices(self, update: bool = True):
|
734 |
-
"""获取设备列表"""
|
735 |
-
if update:
|
736 |
-
sd._terminate()
|
737 |
-
sd._initialize()
|
738 |
-
devices = sd.query_devices()
|
739 |
-
hostapis = sd.query_hostapis()
|
740 |
-
for hostapi in hostapis:
|
741 |
-
for device_idx in hostapi["devices"]:
|
742 |
-
devices[device_idx]["hostapi_name"] = hostapi["name"]
|
743 |
-
input_devices = [
|
744 |
-
f"{d['name']} ({d['hostapi_name']})"
|
745 |
-
for d in devices
|
746 |
-
if d["max_input_channels"] > 0
|
747 |
-
]
|
748 |
-
output_devices = [
|
749 |
-
f"{d['name']} ({d['hostapi_name']})"
|
750 |
-
for d in devices
|
751 |
-
if d["max_output_channels"] > 0
|
752 |
-
]
|
753 |
-
input_devices_indices = [
|
754 |
-
d["index"] if "index" in d else d["name"]
|
755 |
-
for d in devices
|
756 |
-
if d["max_input_channels"] > 0
|
757 |
-
]
|
758 |
-
output_devices_indices = [
|
759 |
-
d["index"] if "index" in d else d["name"]
|
760 |
-
for d in devices
|
761 |
-
if d["max_output_channels"] > 0
|
762 |
-
]
|
763 |
-
return (
|
764 |
-
input_devices,
|
765 |
-
output_devices,
|
766 |
-
input_devices_indices,
|
767 |
-
output_devices_indices,
|
768 |
-
)
|
769 |
-
|
770 |
-
def set_devices(self, input_device, output_device):
|
771 |
-
"""设置输出设备"""
|
772 |
-
(
|
773 |
-
input_devices,
|
774 |
-
output_devices,
|
775 |
-
input_device_indices,
|
776 |
-
output_device_indices,
|
777 |
-
) = self.get_devices()
|
778 |
-
sd.default.device[0] = input_device_indices[input_devices.index(input_device)]
|
779 |
-
sd.default.device[1] = output_device_indices[
|
780 |
-
output_devices.index(output_device)
|
781 |
-
]
|
782 |
-
print("input device:" + str(sd.default.device[0]) + ":" + str(input_device))
|
783 |
-
print("output device:" + str(sd.default.device[1]) + ":" + str(output_device))
|
784 |
-
|
785 |
-
|
786 |
-
gui = GUI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AI-Zero-to-Hero/02-H5-AR-VR-IOT/README.md
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: 02 H5 Aframe AR VR
|
3 |
-
emoji: 🦀
|
4 |
-
colorFrom: indigo
|
5 |
-
colorTo: gray
|
6 |
-
sdk: static
|
7 |
-
pinned: false
|
8 |
-
license: apache-2.0
|
9 |
-
---
|
10 |
-
|
11 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AI-Zero-to-Hero/09-SL-Live-RealTime-Dashboard/app.py
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
import time # to simulate a real time data, time loop
|
2 |
-
|
3 |
-
import numpy as np # np mean, np random
|
4 |
-
import pandas as pd # read csv, df manipulation
|
5 |
-
import plotly.express as px # interactive charts
|
6 |
-
import streamlit as st # 🎈 data web app development
|
7 |
-
|
8 |
-
st.set_page_config(
|
9 |
-
page_title="Real-Time Data Science Dashboard",
|
10 |
-
page_icon="✅",
|
11 |
-
layout="wide",
|
12 |
-
)
|
13 |
-
|
14 |
-
# read csv from a github repo
|
15 |
-
dataset_url = "https://raw.githubusercontent.com/Lexie88rus/bank-marketing-analysis/master/bank.csv"
|
16 |
-
|
17 |
-
# read csv from a URL
|
18 |
-
@st.experimental_memo
|
19 |
-
def get_data() -> pd.DataFrame:
|
20 |
-
return pd.read_csv(dataset_url)
|
21 |
-
|
22 |
-
df = get_data()
|
23 |
-
|
24 |
-
# dashboard title
|
25 |
-
st.title("Real-Time / Live Data Science Dashboard")
|
26 |
-
|
27 |
-
# top-level filters
|
28 |
-
job_filter = st.selectbox("Select the Job", pd.unique(df["job"]))
|
29 |
-
|
30 |
-
# creating a single-element container
|
31 |
-
placeholder = st.empty()
|
32 |
-
|
33 |
-
# dataframe filter
|
34 |
-
df = df[df["job"] == job_filter]
|
35 |
-
|
36 |
-
# near real-time / live feed simulation
|
37 |
-
for seconds in range(200):
|
38 |
-
|
39 |
-
df["age_new"] = df["age"] * np.random.choice(range(1, 5))
|
40 |
-
df["balance_new"] = df["balance"] * np.random.choice(range(1, 5))
|
41 |
-
|
42 |
-
# creating KPIs
|
43 |
-
avg_age = np.mean(df["age_new"])
|
44 |
-
|
45 |
-
count_married = int(
|
46 |
-
df[(df["marital"] == "married")]["marital"].count()
|
47 |
-
+ np.random.choice(range(1, 30))
|
48 |
-
)
|
49 |
-
|
50 |
-
balance = np.mean(df["balance_new"])
|
51 |
-
|
52 |
-
with placeholder.container():
|
53 |
-
|
54 |
-
# create three columns
|
55 |
-
kpi1, kpi2, kpi3 = st.columns(3)
|
56 |
-
|
57 |
-
# fill in those three columns with respective metrics or KPIs
|
58 |
-
kpi1.metric(
|
59 |
-
label="Age ⏳",
|
60 |
-
value=round(avg_age),
|
61 |
-
delta=round(avg_age) - 10,
|
62 |
-
)
|
63 |
-
|
64 |
-
kpi2.metric(
|
65 |
-
label="Married Count 💍",
|
66 |
-
value=int(count_married),
|
67 |
-
delta=-10 + count_married,
|
68 |
-
)
|
69 |
-
|
70 |
-
kpi3.metric(
|
71 |
-
label="A/C Balance $",
|
72 |
-
value=f"$ {round(balance,2)} ",
|
73 |
-
delta=-round(balance / count_married) * 100,
|
74 |
-
)
|
75 |
-
|
76 |
-
# create two columns for charts
|
77 |
-
fig_col1, fig_col2 = st.columns(2)
|
78 |
-
with fig_col1:
|
79 |
-
st.markdown("### First Chart")
|
80 |
-
fig = px.density_heatmap(
|
81 |
-
data_frame=df, y="age_new", x="marital"
|
82 |
-
)
|
83 |
-
st.write(fig)
|
84 |
-
|
85 |
-
with fig_col2:
|
86 |
-
st.markdown("### Second Chart")
|
87 |
-
fig2 = px.histogram(data_frame=df, x="age_new")
|
88 |
-
st.write(fig2)
|
89 |
-
|
90 |
-
st.markdown("### Detailed Data View")
|
91 |
-
st.dataframe(df)
|
92 |
-
time.sleep(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIConsultant/MusicGen/scripts/templates/index.html
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
{% extends "base.html" %}
|
2 |
-
{% block content %}
|
3 |
-
|
4 |
-
<p>
|
5 |
-
Welcome <span class="special">{{session['user']}}</span> to the internal MOS assistant for AudioCraft.
|
6 |
-
You can create custom surveys between your models, that you can
|
7 |
-
evaluate yourself, or with the help of your teammates, by simply
|
8 |
-
sharing a link!
|
9 |
-
</p>
|
10 |
-
|
11 |
-
{% for error in errors %}
|
12 |
-
<p class="error">{{error}}</p>
|
13 |
-
{% endfor %}
|
14 |
-
<form method="post" action="{{url_for('index')}}" class="simple_form">
|
15 |
-
<div>
|
16 |
-
<label for="xps"> Space separated lists of XP SIGS or Grid names:
|
17 |
-
</label><br>
|
18 |
-
<textarea autofocus name="xps" rows="4" cols="30"></textarea>
|
19 |
-
</div>
|
20 |
-
<div>
|
21 |
-
<label> Blind study
|
22 |
-
<input type="checkbox" name="blind">
|
23 |
-
</label>
|
24 |
-
</div>
|
25 |
-
<input type="submit" value="Create study">
|
26 |
-
<form>
|
27 |
-
|
28 |
-
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIGC-Audio/AudioGPT/NeuralSeq/inference/tts/base_tts_infer.py
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
from tasks.tts.dataset_utils import FastSpeechWordDataset
|
2 |
-
from tasks.tts.tts_utils import load_data_preprocessor
|
3 |
-
from vocoders.hifigan import HifiGanGenerator
|
4 |
-
import os
|
5 |
-
import librosa
|
6 |
-
import soundfile as sf
|
7 |
-
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
|
8 |
-
from string import punctuation
|
9 |
-
import torch
|
10 |
-
from utils.ckpt_utils import load_ckpt
|
11 |
-
from utils.hparams import set_hparams
|
12 |
-
from utils.hparams import hparams as hp
|
13 |
-
|
14 |
-
class BaseTTSInfer:
|
15 |
-
def __init__(self, hparams, device=None):
|
16 |
-
if device is None:
|
17 |
-
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
18 |
-
self.hparams = hparams
|
19 |
-
self.device = device
|
20 |
-
self.data_dir = hparams['binary_data_dir']
|
21 |
-
self.preprocessor, self.preprocess_args = load_data_preprocessor()
|
22 |
-
self.ph_encoder, self.word_encoder = self.preprocessor.load_dict(self.data_dir)
|
23 |
-
self.ds_cls = FastSpeechWordDataset
|
24 |
-
self.model = self.build_model()
|
25 |
-
self.model.eval()
|
26 |
-
self.model.to(self.device)
|
27 |
-
self.vocoder = self.build_vocoder()
|
28 |
-
self.vocoder.eval()
|
29 |
-
self.vocoder.to(self.device)
|
30 |
-
self.asr_processor, self.asr_model = self.build_asr()
|
31 |
-
|
32 |
-
def build_model(self):
|
33 |
-
raise NotImplementedError
|
34 |
-
|
35 |
-
def forward_model(self, inp):
|
36 |
-
raise NotImplementedError
|
37 |
-
|
38 |
-
def build_asr(self):
|
39 |
-
# load pretrained model
|
40 |
-
processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-base-960h") # facebook/wav2vec2-base-960h wav2vec2-large-960h-lv60-self
|
41 |
-
model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-base-960h").to(self.device)
|
42 |
-
return processor, model
|
43 |
-
|
44 |
-
def build_vocoder(self):
|
45 |
-
base_dir = self.hparams['vocoder_ckpt']
|
46 |
-
config_path = f'{base_dir}/config.yaml'
|
47 |
-
config = set_hparams(config_path, global_hparams=False)
|
48 |
-
vocoder = HifiGanGenerator(config)
|
49 |
-
load_ckpt(vocoder, base_dir, 'model_gen')
|
50 |
-
return vocoder
|
51 |
-
|
52 |
-
def run_vocoder(self, c):
|
53 |
-
c = c.transpose(2, 1)
|
54 |
-
y = self.vocoder(c)[:, 0]
|
55 |
-
return y
|
56 |
-
|
57 |
-
def preprocess_input(self, inp):
|
58 |
-
raise NotImplementedError
|
59 |
-
|
60 |
-
def input_to_batch(self, item):
|
61 |
-
raise NotImplementedError
|
62 |
-
|
63 |
-
def postprocess_output(self, output):
|
64 |
-
return output
|
65 |
-
|
66 |
-
def infer_once(self, inp):
|
67 |
-
inp = self.preprocess_input(inp)
|
68 |
-
output = self.forward_model(inp)
|
69 |
-
output = self.postprocess_output(output)
|
70 |
-
return output
|
71 |
-
|
72 |
-
@classmethod
|
73 |
-
def example_run(cls, inp):
|
74 |
-
from utils.audio import save_wav
|
75 |
-
|
76 |
-
#set_hparams(print_hparams=False)
|
77 |
-
infer_ins = cls(hp)
|
78 |
-
out = infer_ins.infer_once(inp)
|
79 |
-
os.makedirs('infer_out', exist_ok=True)
|
80 |
-
save_wav(out, f'infer_out/{hp["text"]}.wav', hp['audio_sample_rate'])
|
81 |
-
print(f'Save at infer_out/{hp["text"]}.wav.')
|
82 |
-
|
83 |
-
def asr(self, file):
|
84 |
-
sample_rate = self.hparams['audio_sample_rate']
|
85 |
-
audio_input, source_sample_rate = sf.read(file)
|
86 |
-
|
87 |
-
# Resample the wav if needed
|
88 |
-
if sample_rate is not None and source_sample_rate != sample_rate:
|
89 |
-
audio_input = librosa.resample(audio_input, source_sample_rate, sample_rate)
|
90 |
-
|
91 |
-
# pad input values and return pt tensor
|
92 |
-
input_values = self.asr_processor(audio_input, sampling_rate=sample_rate, return_tensors="pt").input_values
|
93 |
-
|
94 |
-
# retrieve logits & take argmax
|
95 |
-
logits = self.asr_model(input_values).logits
|
96 |
-
predicted_ids = torch.argmax(logits, dim=-1)
|
97 |
-
|
98 |
-
# transcribe
|
99 |
-
transcription = self.asr_processor.decode(predicted_ids[0])
|
100 |
-
transcription = transcription.rstrip(punctuation)
|
101 |
-
return audio_input, transcription
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AILab-CVC/SEED-LLaMA/models/transforms.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
from torchvision import transforms
|
2 |
-
|
3 |
-
|
4 |
-
def get_transform(type='clip', keep_ratio=True, image_size=224):
|
5 |
-
if type == 'clip':
|
6 |
-
transform = []
|
7 |
-
if keep_ratio:
|
8 |
-
transform.extend([
|
9 |
-
transforms.Resize(image_size),
|
10 |
-
transforms.CenterCrop(image_size),
|
11 |
-
])
|
12 |
-
else:
|
13 |
-
transform.append(transforms.Resize((image_size, image_size)))
|
14 |
-
transform.extend([
|
15 |
-
transforms.ToTensor(),
|
16 |
-
transforms.Normalize(mean=(0.48145466, 0.4578275, 0.40821073), std=(0.26862954, 0.26130258, 0.27577711))
|
17 |
-
])
|
18 |
-
|
19 |
-
return transforms.Compose(transform)
|
20 |
-
else:
|
21 |
-
raise NotImplementedError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AeroXi/english-ai/app.py
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import openai
|
3 |
-
import os
|
4 |
-
|
5 |
-
|
6 |
-
# # 设置你的OpenAI API密钥
|
7 |
-
# openai.api_key = "your_openai_api_key"
|
8 |
-
|
9 |
-
# 定义将音频转换为文本的函数
|
10 |
-
def transcribe_audio(audio):
|
11 |
-
os.rename(audio, audio + '.wav')
|
12 |
-
audio_file = open(audio + '.wav', "rb")
|
13 |
-
# 调用Whisper API进行语音识别
|
14 |
-
transcript = openai.Audio.transcribe("whisper-1", audio_file)
|
15 |
-
|
16 |
-
# 返回识别的文字
|
17 |
-
return transcript["text"]
|
18 |
-
|
19 |
-
# 创建Gradio界面
|
20 |
-
audio_input = gr.inputs.Audio(source="microphone", type="filepath")
|
21 |
-
text_output = gr.outputs.Textbox()
|
22 |
-
|
23 |
-
iface = gr.Interface(fn=transcribe_audio, inputs=audio_input, outputs=text_output,
|
24 |
-
title="Whisper语音识别",
|
25 |
-
description="使用麦克风录制音频并将其转换为文本。")
|
26 |
-
|
27 |
-
# 启动Gradio应用
|
28 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/circularprogress/Factory.js
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
import CircularProgress from './CircularProgress.js';
|
2 |
-
import ObjectFactory from '../ObjectFactory.js';
|
3 |
-
import SetValue from '../../../plugins/utils/object/SetValue.js';
|
4 |
-
|
5 |
-
ObjectFactory.register('circularProgress', function (x, y, radius, barColor, value, config) {
|
6 |
-
var gameObject = new CircularProgress(this.scene, x, y, radius, barColor, value, config);
|
7 |
-
this.scene.add.existing(gameObject);
|
8 |
-
return gameObject;
|
9 |
-
});
|
10 |
-
|
11 |
-
SetValue(window, 'RexPlugins.UI.CircularProgress', CircularProgress);
|
12 |
-
|
13 |
-
export default CircularProgress;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/drag/Drag.d.ts
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
import Drag from '../../../plugins/drag';
|
2 |
-
export default Drag;
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/PTI/configs/paths_config.py
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
## Pretrained models paths
|
2 |
-
e4e = 'PTI/pretrained_models/e4e_ffhq_encode.pt'
|
3 |
-
stylegan2_ada_ffhq = '../PTI/pretrained_models/ffhq.pkl'
|
4 |
-
style_clip_pretrained_mappers = ''
|
5 |
-
ir_se50 = 'PTI/pretrained_models/model_ir_se50.pth'
|
6 |
-
dlib = 'PTI/pretrained_models/align.dat'
|
7 |
-
|
8 |
-
## Dirs for output files
|
9 |
-
checkpoints_dir = 'PTI/checkpoints'
|
10 |
-
embedding_base_dir = 'PTI/embeddings'
|
11 |
-
styleclip_output_dir = 'PTI/StyleCLIP_results'
|
12 |
-
experiments_output_dir = 'PTI/output'
|
13 |
-
|
14 |
-
## Input info
|
15 |
-
### Input dir, where the images reside
|
16 |
-
input_data_path = ''
|
17 |
-
### Inversion identifier, used to keeping track of the inversion results. Both the latent code and the generator
|
18 |
-
input_data_id = 'barcelona'
|
19 |
-
|
20 |
-
## Keywords
|
21 |
-
pti_results_keyword = 'PTI'
|
22 |
-
e4e_results_keyword = 'e4e'
|
23 |
-
sg2_results_keyword = 'SG2'
|
24 |
-
sg2_plus_results_keyword = 'SG2_plus'
|
25 |
-
multi_id_model_type = 'multi_id'
|
26 |
-
|
27 |
-
## Edit directions
|
28 |
-
interfacegan_age = 'PTI/editings/interfacegan_directions/age.pt'
|
29 |
-
interfacegan_smile = 'PTI/editings/interfacegan_directions/smile.pt'
|
30 |
-
interfacegan_rotation = 'PTI/editings/interfacegan_directions/rotation.pt'
|
31 |
-
ffhq_pca = 'PTI/editings/ganspace_pca/ffhq_pca.pt'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Amrrs/DragGan-Inversion/stylegan_human/pti/pti_models/e4e/psp.py
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
from pti.pti_models.e4e.stylegan2.model import Generator
|
2 |
-
from pti.pti_models.e4e.encoders import psp_encoders
|
3 |
-
from torch import nn
|
4 |
-
import torch
|
5 |
-
import matplotlib
|
6 |
-
from pti.pti_configs import paths_config
|
7 |
-
matplotlib.use('Agg')
|
8 |
-
|
9 |
-
|
10 |
-
def get_keys(d, name):
|
11 |
-
if 'state_dict' in d:
|
12 |
-
d = d['state_dict']
|
13 |
-
d_filt = {k[len(name) + 1:]: v for k, v in d.items()
|
14 |
-
if k[:len(name)] == name}
|
15 |
-
return d_filt
|
16 |
-
|
17 |
-
|
18 |
-
class pSp(nn.Module):
|
19 |
-
|
20 |
-
def __init__(self, opts):
|
21 |
-
super(pSp, self).__init__()
|
22 |
-
self.opts = opts
|
23 |
-
# Define architecture
|
24 |
-
self.encoder = self.set_encoder()
|
25 |
-
self.decoder = Generator(
|
26 |
-
opts.stylegan_size, 512, 8, channel_multiplier=2)
|
27 |
-
self.face_pool = torch.nn.AdaptiveAvgPool2d((256, 256 // 2))
|
28 |
-
# Load weights if needed
|
29 |
-
self.load_weights()
|
30 |
-
|
31 |
-
def set_encoder(self):
|
32 |
-
if self.opts.encoder_type == 'GradualStyleEncoder':
|
33 |
-
encoder = psp_encoders.GradualStyleEncoder(50, 'ir_se', self.opts)
|
34 |
-
elif self.opts.encoder_type == 'Encoder4Editing':
|
35 |
-
encoder = psp_encoders.Encoder4Editing(50, 'ir_se', self.opts)
|
36 |
-
elif self.opts.encoder_type == 'SingleStyleCodeEncoder':
|
37 |
-
encoder = psp_encoders.BackboneEncoderUsingLastLayerIntoW(
|
38 |
-
50, 'ir_se', self.opts)
|
39 |
-
else:
|
40 |
-
raise Exception('{} is not a valid encoders'.format(
|
41 |
-
self.opts.encoder_type))
|
42 |
-
return encoder
|
43 |
-
|
44 |
-
def load_weights(self):
|
45 |
-
if self.opts.checkpoint_path is not None:
|
46 |
-
print('Loading e4e over the pSp framework from checkpoint: {}'.format(
|
47 |
-
self.opts.checkpoint_path))
|
48 |
-
ckpt = torch.load(self.opts.checkpoint_path, map_location='cpu')
|
49 |
-
self.encoder.load_state_dict(
|
50 |
-
get_keys(ckpt, 'encoder'), strict=True)
|
51 |
-
self.decoder.load_state_dict(
|
52 |
-
get_keys(ckpt, 'decoder'), strict=True)
|
53 |
-
self.__load_latent_avg(ckpt)
|
54 |
-
else:
|
55 |
-
print('Loading encoders weights from irse50!')
|
56 |
-
encoder_ckpt = torch.load(model_paths['ir_se50'])
|
57 |
-
self.encoder.load_state_dict(encoder_ckpt, strict=False)
|
58 |
-
print('Loading decoder weights from pretrained!')
|
59 |
-
ckpt = torch.load(self.opts.stylegan_weights)
|
60 |
-
self.decoder.load_state_dict(ckpt['g_ema'], strict=False)
|
61 |
-
self.__load_latent_avg(ckpt, repeat=self.encoder.style_count)
|
62 |
-
|
63 |
-
def forward(self, x, resize=True, latent_mask=None, input_code=False, randomize_noise=True,
|
64 |
-
inject_latent=None, return_latents=False, alpha=None):
|
65 |
-
if input_code:
|
66 |
-
codes = x
|
67 |
-
else:
|
68 |
-
codes = self.encoder(x)
|
69 |
-
# normalize with respect to the center of an average face
|
70 |
-
if self.opts.start_from_latent_avg:
|
71 |
-
if codes.ndim == 2:
|
72 |
-
codes = codes + \
|
73 |
-
self.latent_avg.repeat(codes.shape[0], 1, 1)[:, 0, :]
|
74 |
-
else:
|
75 |
-
codes = codes + \
|
76 |
-
self.latent_avg.repeat(codes.shape[0], 1, 1)
|
77 |
-
|
78 |
-
if latent_mask is not None:
|
79 |
-
for i in latent_mask:
|
80 |
-
if inject_latent is not None:
|
81 |
-
if alpha is not None:
|
82 |
-
codes[:, i] = alpha * inject_latent[:, i] + \
|
83 |
-
(1 - alpha) * codes[:, i]
|
84 |
-
else:
|
85 |
-
codes[:, i] = inject_latent[:, i]
|
86 |
-
else:
|
87 |
-
codes[:, i] = 0
|
88 |
-
|
89 |
-
input_is_latent = not input_code
|
90 |
-
images, result_latent = self.decoder([codes],
|
91 |
-
input_is_latent=input_is_latent,
|
92 |
-
randomize_noise=randomize_noise,
|
93 |
-
return_latents=return_latents)
|
94 |
-
|
95 |
-
if resize:
|
96 |
-
images = self.face_pool(images)
|
97 |
-
|
98 |
-
if return_latents:
|
99 |
-
return images, result_latent
|
100 |
-
else:
|
101 |
-
return images
|
102 |
-
|
103 |
-
def __load_latent_avg(self, ckpt, repeat=None):
|
104 |
-
if 'latent_avg' in ckpt:
|
105 |
-
self.latent_avg = ckpt['latent_avg'].to(self.opts.device)
|
106 |
-
if repeat is not None:
|
107 |
-
self.latent_avg = self.latent_avg.repeat(repeat, 1)
|
108 |
-
else:
|
109 |
-
self.latent_avg = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_segmentation/configs/fcn/fcn_r50-d8_480x480_40k_pascal_context.py
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
_base_ = [
|
2 |
-
'../_base_/models/fcn_r50-d8.py', '../_base_/datasets/pascal_context.py',
|
3 |
-
'../_base_/default_runtime.py', '../_base_/schedules/schedule_40k.py'
|
4 |
-
]
|
5 |
-
model = dict(
|
6 |
-
decode_head=dict(num_classes=60),
|
7 |
-
auxiliary_head=dict(num_classes=60),
|
8 |
-
test_cfg=dict(mode='slide', crop_size=(480, 480), stride=(320, 320)))
|
9 |
-
optimizer = dict(type='SGD', lr=0.004, momentum=0.9, weight_decay=0.0001)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_segmentation/configs/hrnet/fcn_hr18_512x1024_80k_cityscapes.py
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
_base_ = [
|
2 |
-
'../_base_/models/fcn_hr18.py', '../_base_/datasets/cityscapes.py',
|
3 |
-
'../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
|
4 |
-
]
|
|
|
|
|
|
|
|
|
|
spaces/AnishKumbhar/ChatBot/text-generation-webui-main/modules/RoPE.py
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
def get_alpha_value(alpha, base):
|
2 |
-
'''
|
3 |
-
Gets alpha_value from alpha_value and rope_freq_base
|
4 |
-
'''
|
5 |
-
if base > 0:
|
6 |
-
return (base/10000.) ** (63/64.)
|
7 |
-
else:
|
8 |
-
return alpha
|
9 |
-
|
10 |
-
|
11 |
-
def get_rope_freq_base(alpha, base):
|
12 |
-
'''
|
13 |
-
Gets rope_freq_base from alpha_value and rope_freq_base
|
14 |
-
'''
|
15 |
-
if base > 0:
|
16 |
-
return base
|
17 |
-
else:
|
18 |
-
return 10000 * alpha ** (64/63.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/ops/fused_bias_leakyrelu.py
DELETED
@@ -1,268 +0,0 @@
|
|
1 |
-
# modified from https://github.com/rosinality/stylegan2-pytorch/blob/master/op/fused_act.py # noqa:E501
|
2 |
-
|
3 |
-
# Copyright (c) 2021, NVIDIA Corporation. All rights reserved.
|
4 |
-
# NVIDIA Source Code License for StyleGAN2 with Adaptive Discriminator
|
5 |
-
# Augmentation (ADA)
|
6 |
-
# =======================================================================
|
7 |
-
|
8 |
-
# 1. Definitions
|
9 |
-
|
10 |
-
# "Licensor" means any person or entity that distributes its Work.
|
11 |
-
|
12 |
-
# "Software" means the original work of authorship made available under
|
13 |
-
# this License.
|
14 |
-
|
15 |
-
# "Work" means the Software and any additions to or derivative works of
|
16 |
-
# the Software that are made available under this License.
|
17 |
-
|
18 |
-
# The terms "reproduce," "reproduction," "derivative works," and
|
19 |
-
# "distribution" have the meaning as provided under U.S. copyright law;
|
20 |
-
# provided, however, that for the purposes of this License, derivative
|
21 |
-
# works shall not include works that remain separable from, or merely
|
22 |
-
# link (or bind by name) to the interfaces of, the Work.
|
23 |
-
|
24 |
-
# Works, including the Software, are "made available" under this License
|
25 |
-
# by including in or with the Work either (a) a copyright notice
|
26 |
-
# referencing the applicability of this License to the Work, or (b) a
|
27 |
-
# copy of this License.
|
28 |
-
|
29 |
-
# 2. License Grants
|
30 |
-
|
31 |
-
# 2.1 Copyright Grant. Subject to the terms and conditions of this
|
32 |
-
# License, each Licensor grants to you a perpetual, worldwide,
|
33 |
-
# non-exclusive, royalty-free, copyright license to reproduce,
|
34 |
-
# prepare derivative works of, publicly display, publicly perform,
|
35 |
-
# sublicense and distribute its Work and any resulting derivative
|
36 |
-
# works in any form.
|
37 |
-
|
38 |
-
# 3. Limitations
|
39 |
-
|
40 |
-
# 3.1 Redistribution. You may reproduce or distribute the Work only
|
41 |
-
# if (a) you do so under this License, (b) you include a complete
|
42 |
-
# copy of this License with your distribution, and (c) you retain
|
43 |
-
# without modification any copyright, patent, trademark, or
|
44 |
-
# attribution notices that are present in the Work.
|
45 |
-
|
46 |
-
# 3.2 Derivative Works. You may specify that additional or different
|
47 |
-
# terms apply to the use, reproduction, and distribution of your
|
48 |
-
# derivative works of the Work ("Your Terms") only if (a) Your Terms
|
49 |
-
# provide that the use limitation in Section 3.3 applies to your
|
50 |
-
# derivative works, and (b) you identify the specific derivative
|
51 |
-
# works that are subject to Your Terms. Notwithstanding Your Terms,
|
52 |
-
# this License (including the redistribution requirements in Section
|
53 |
-
# 3.1) will continue to apply to the Work itself.
|
54 |
-
|
55 |
-
# 3.3 Use Limitation. The Work and any derivative works thereof only
|
56 |
-
# may be used or intended for use non-commercially. Notwithstanding
|
57 |
-
# the foregoing, NVIDIA and its affiliates may use the Work and any
|
58 |
-
# derivative works commercially. As used herein, "non-commercially"
|
59 |
-
# means for research or evaluation purposes only.
|
60 |
-
|
61 |
-
# 3.4 Patent Claims. If you bring or threaten to bring a patent claim
|
62 |
-
# against any Licensor (including any claim, cross-claim or
|
63 |
-
# counterclaim in a lawsuit) to enforce any patents that you allege
|
64 |
-
# are infringed by any Work, then your rights under this License from
|
65 |
-
# such Licensor (including the grant in Section 2.1) will terminate
|
66 |
-
# immediately.
|
67 |
-
|
68 |
-
# 3.5 Trademarks. This License does not grant any rights to use any
|
69 |
-
# Licensor’s or its affiliates’ names, logos, or trademarks, except
|
70 |
-
# as necessary to reproduce the notices described in this License.
|
71 |
-
|
72 |
-
# 3.6 Termination. If you violate any term of this License, then your
|
73 |
-
# rights under this License (including the grant in Section 2.1) will
|
74 |
-
# terminate immediately.
|
75 |
-
|
76 |
-
# 4. Disclaimer of Warranty.
|
77 |
-
|
78 |
-
# THE WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
79 |
-
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
|
80 |
-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR
|
81 |
-
# NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER
|
82 |
-
# THIS LICENSE.
|
83 |
-
|
84 |
-
# 5. Limitation of Liability.
|
85 |
-
|
86 |
-
# EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL
|
87 |
-
# THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE
|
88 |
-
# SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
|
89 |
-
# INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
|
90 |
-
# OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK
|
91 |
-
# (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION,
|
92 |
-
# LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER
|
93 |
-
# COMMERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF
|
94 |
-
# THE POSSIBILITY OF SUCH DAMAGES.
|
95 |
-
|
96 |
-
# =======================================================================
|
97 |
-
|
98 |
-
import torch
|
99 |
-
import torch.nn.functional as F
|
100 |
-
from torch import nn
|
101 |
-
from torch.autograd import Function
|
102 |
-
|
103 |
-
from ..utils import ext_loader
|
104 |
-
|
105 |
-
ext_module = ext_loader.load_ext('_ext', ['fused_bias_leakyrelu'])
|
106 |
-
|
107 |
-
|
108 |
-
class FusedBiasLeakyReLUFunctionBackward(Function):
|
109 |
-
"""Calculate second order deviation.
|
110 |
-
|
111 |
-
This function is to compute the second order deviation for the fused leaky
|
112 |
-
relu operation.
|
113 |
-
"""
|
114 |
-
|
115 |
-
@staticmethod
|
116 |
-
def forward(ctx, grad_output, out, negative_slope, scale):
|
117 |
-
ctx.save_for_backward(out)
|
118 |
-
ctx.negative_slope = negative_slope
|
119 |
-
ctx.scale = scale
|
120 |
-
|
121 |
-
empty = grad_output.new_empty(0)
|
122 |
-
|
123 |
-
grad_input = ext_module.fused_bias_leakyrelu(
|
124 |
-
grad_output,
|
125 |
-
empty,
|
126 |
-
out,
|
127 |
-
act=3,
|
128 |
-
grad=1,
|
129 |
-
alpha=negative_slope,
|
130 |
-
scale=scale)
|
131 |
-
|
132 |
-
dim = [0]
|
133 |
-
|
134 |
-
if grad_input.ndim > 2:
|
135 |
-
dim += list(range(2, grad_input.ndim))
|
136 |
-
|
137 |
-
grad_bias = grad_input.sum(dim).detach()
|
138 |
-
|
139 |
-
return grad_input, grad_bias
|
140 |
-
|
141 |
-
@staticmethod
|
142 |
-
def backward(ctx, gradgrad_input, gradgrad_bias):
|
143 |
-
out, = ctx.saved_tensors
|
144 |
-
|
145 |
-
# The second order deviation, in fact, contains two parts, while the
|
146 |
-
# the first part is zero. Thus, we direct consider the second part
|
147 |
-
# which is similar with the first order deviation in implementation.
|
148 |
-
gradgrad_out = ext_module.fused_bias_leakyrelu(
|
149 |
-
gradgrad_input,
|
150 |
-
gradgrad_bias.to(out.dtype),
|
151 |
-
out,
|
152 |
-
act=3,
|
153 |
-
grad=1,
|
154 |
-
alpha=ctx.negative_slope,
|
155 |
-
scale=ctx.scale)
|
156 |
-
|
157 |
-
return gradgrad_out, None, None, None
|
158 |
-
|
159 |
-
|
160 |
-
class FusedBiasLeakyReLUFunction(Function):
|
161 |
-
|
162 |
-
@staticmethod
|
163 |
-
def forward(ctx, input, bias, negative_slope, scale):
|
164 |
-
empty = input.new_empty(0)
|
165 |
-
|
166 |
-
out = ext_module.fused_bias_leakyrelu(
|
167 |
-
input,
|
168 |
-
bias,
|
169 |
-
empty,
|
170 |
-
act=3,
|
171 |
-
grad=0,
|
172 |
-
alpha=negative_slope,
|
173 |
-
scale=scale)
|
174 |
-
ctx.save_for_backward(out)
|
175 |
-
ctx.negative_slope = negative_slope
|
176 |
-
ctx.scale = scale
|
177 |
-
|
178 |
-
return out
|
179 |
-
|
180 |
-
@staticmethod
|
181 |
-
def backward(ctx, grad_output):
|
182 |
-
out, = ctx.saved_tensors
|
183 |
-
|
184 |
-
grad_input, grad_bias = FusedBiasLeakyReLUFunctionBackward.apply(
|
185 |
-
grad_output, out, ctx.negative_slope, ctx.scale)
|
186 |
-
|
187 |
-
return grad_input, grad_bias, None, None
|
188 |
-
|
189 |
-
|
190 |
-
class FusedBiasLeakyReLU(nn.Module):
|
191 |
-
"""Fused bias leaky ReLU.
|
192 |
-
|
193 |
-
This function is introduced in the StyleGAN2:
|
194 |
-
http://arxiv.org/abs/1912.04958
|
195 |
-
|
196 |
-
The bias term comes from the convolution operation. In addition, to keep
|
197 |
-
the variance of the feature map or gradients unchanged, they also adopt a
|
198 |
-
scale similarly with Kaiming initialization. However, since the
|
199 |
-
:math:`1+{alpha}^2` : is too small, we can just ignore it. Therefore, the
|
200 |
-
final scale is just :math:`\sqrt{2}`:. Of course, you may change it with # noqa: W605, E501
|
201 |
-
your own scale.
|
202 |
-
|
203 |
-
TODO: Implement the CPU version.
|
204 |
-
|
205 |
-
Args:
|
206 |
-
channel (int): The channel number of the feature map.
|
207 |
-
negative_slope (float, optional): Same as nn.LeakyRelu.
|
208 |
-
Defaults to 0.2.
|
209 |
-
scale (float, optional): A scalar to adjust the variance of the feature
|
210 |
-
map. Defaults to 2**0.5.
|
211 |
-
"""
|
212 |
-
|
213 |
-
def __init__(self, num_channels, negative_slope=0.2, scale=2**0.5):
|
214 |
-
super(FusedBiasLeakyReLU, self).__init__()
|
215 |
-
|
216 |
-
self.bias = nn.Parameter(torch.zeros(num_channels))
|
217 |
-
self.negative_slope = negative_slope
|
218 |
-
self.scale = scale
|
219 |
-
|
220 |
-
def forward(self, input):
|
221 |
-
return fused_bias_leakyrelu(input, self.bias, self.negative_slope,
|
222 |
-
self.scale)
|
223 |
-
|
224 |
-
|
225 |
-
def fused_bias_leakyrelu(input, bias, negative_slope=0.2, scale=2**0.5):
|
226 |
-
"""Fused bias leaky ReLU function.
|
227 |
-
|
228 |
-
This function is introduced in the StyleGAN2:
|
229 |
-
http://arxiv.org/abs/1912.04958
|
230 |
-
|
231 |
-
The bias term comes from the convolution operation. In addition, to keep
|
232 |
-
the variance of the feature map or gradients unchanged, they also adopt a
|
233 |
-
scale similarly with Kaiming initialization. However, since the
|
234 |
-
:math:`1+{alpha}^2` : is too small, we can just ignore it. Therefore, the
|
235 |
-
final scale is just :math:`\sqrt{2}`:. Of course, you may change it with # noqa: W605, E501
|
236 |
-
your own scale.
|
237 |
-
|
238 |
-
Args:
|
239 |
-
input (torch.Tensor): Input feature map.
|
240 |
-
bias (nn.Parameter): The bias from convolution operation.
|
241 |
-
negative_slope (float, optional): Same as nn.LeakyRelu.
|
242 |
-
Defaults to 0.2.
|
243 |
-
scale (float, optional): A scalar to adjust the variance of the feature
|
244 |
-
map. Defaults to 2**0.5.
|
245 |
-
|
246 |
-
Returns:
|
247 |
-
torch.Tensor: Feature map after non-linear activation.
|
248 |
-
"""
|
249 |
-
|
250 |
-
if not input.is_cuda:
|
251 |
-
return bias_leakyrelu_ref(input, bias, negative_slope, scale)
|
252 |
-
|
253 |
-
return FusedBiasLeakyReLUFunction.apply(input, bias.to(input.dtype),
|
254 |
-
negative_slope, scale)
|
255 |
-
|
256 |
-
|
257 |
-
def bias_leakyrelu_ref(x, bias, negative_slope=0.2, scale=2**0.5):
|
258 |
-
|
259 |
-
if bias is not None:
|
260 |
-
assert bias.ndim == 1
|
261 |
-
assert bias.shape[0] == x.shape[1]
|
262 |
-
x = x + bias.reshape([-1 if i == 1 else 1 for i in range(x.ndim)])
|
263 |
-
|
264 |
-
x = F.leaky_relu(x, negative_slope)
|
265 |
-
if scale != 1:
|
266 |
-
x = x * scale
|
267 |
-
|
268 |
-
return x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/ops/roiaware_pool3d.py
DELETED
@@ -1,114 +0,0 @@
|
|
1 |
-
# Copyright (c) OpenMMLab. All rights reserved.
|
2 |
-
import torch
|
3 |
-
from torch import nn as nn
|
4 |
-
from torch.autograd import Function
|
5 |
-
|
6 |
-
import annotator.uniformer.mmcv as mmcv
|
7 |
-
from ..utils import ext_loader
|
8 |
-
|
9 |
-
ext_module = ext_loader.load_ext(
|
10 |
-
'_ext', ['roiaware_pool3d_forward', 'roiaware_pool3d_backward'])
|
11 |
-
|
12 |
-
|
13 |
-
class RoIAwarePool3d(nn.Module):
|
14 |
-
"""Encode the geometry-specific features of each 3D proposal.
|
15 |
-
|
16 |
-
Please refer to `PartA2 <https://arxiv.org/pdf/1907.03670.pdf>`_ for more
|
17 |
-
details.
|
18 |
-
|
19 |
-
Args:
|
20 |
-
out_size (int or tuple): The size of output features. n or
|
21 |
-
[n1, n2, n3].
|
22 |
-
max_pts_per_voxel (int, optional): The maximum number of points per
|
23 |
-
voxel. Default: 128.
|
24 |
-
mode (str, optional): Pooling method of RoIAware, 'max' or 'avg'.
|
25 |
-
Default: 'max'.
|
26 |
-
"""
|
27 |
-
|
28 |
-
def __init__(self, out_size, max_pts_per_voxel=128, mode='max'):
|
29 |
-
super().__init__()
|
30 |
-
|
31 |
-
self.out_size = out_size
|
32 |
-
self.max_pts_per_voxel = max_pts_per_voxel
|
33 |
-
assert mode in ['max', 'avg']
|
34 |
-
pool_mapping = {'max': 0, 'avg': 1}
|
35 |
-
self.mode = pool_mapping[mode]
|
36 |
-
|
37 |
-
def forward(self, rois, pts, pts_feature):
|
38 |
-
"""
|
39 |
-
Args:
|
40 |
-
rois (torch.Tensor): [N, 7], in LiDAR coordinate,
|
41 |
-
(x, y, z) is the bottom center of rois.
|
42 |
-
pts (torch.Tensor): [npoints, 3], coordinates of input points.
|
43 |
-
pts_feature (torch.Tensor): [npoints, C], features of input points.
|
44 |
-
|
45 |
-
Returns:
|
46 |
-
pooled_features (torch.Tensor): [N, out_x, out_y, out_z, C]
|
47 |
-
"""
|
48 |
-
|
49 |
-
return RoIAwarePool3dFunction.apply(rois, pts, pts_feature,
|
50 |
-
self.out_size,
|
51 |
-
self.max_pts_per_voxel, self.mode)
|
52 |
-
|
53 |
-
|
54 |
-
class RoIAwarePool3dFunction(Function):
|
55 |
-
|
56 |
-
@staticmethod
|
57 |
-
def forward(ctx, rois, pts, pts_feature, out_size, max_pts_per_voxel,
|
58 |
-
mode):
|
59 |
-
"""
|
60 |
-
Args:
|
61 |
-
rois (torch.Tensor): [N, 7], in LiDAR coordinate,
|
62 |
-
(x, y, z) is the bottom center of rois.
|
63 |
-
pts (torch.Tensor): [npoints, 3], coordinates of input points.
|
64 |
-
pts_feature (torch.Tensor): [npoints, C], features of input points.
|
65 |
-
out_size (int or tuple): The size of output features. n or
|
66 |
-
[n1, n2, n3].
|
67 |
-
max_pts_per_voxel (int): The maximum number of points per voxel.
|
68 |
-
Default: 128.
|
69 |
-
mode (int): Pooling method of RoIAware, 0 (max pool) or 1 (average
|
70 |
-
pool).
|
71 |
-
|
72 |
-
Returns:
|
73 |
-
pooled_features (torch.Tensor): [N, out_x, out_y, out_z, C], output
|
74 |
-
pooled features.
|
75 |
-
"""
|
76 |
-
|
77 |
-
if isinstance(out_size, int):
|
78 |
-
out_x = out_y = out_z = out_size
|
79 |
-
else:
|
80 |
-
assert len(out_size) == 3
|
81 |
-
assert mmcv.is_tuple_of(out_size, int)
|
82 |
-
out_x, out_y, out_z = out_size
|
83 |
-
|
84 |
-
num_rois = rois.shape[0]
|
85 |
-
num_channels = pts_feature.shape[-1]
|
86 |
-
num_pts = pts.shape[0]
|
87 |
-
|
88 |
-
pooled_features = pts_feature.new_zeros(
|
89 |
-
(num_rois, out_x, out_y, out_z, num_channels))
|
90 |
-
argmax = pts_feature.new_zeros(
|
91 |
-
(num_rois, out_x, out_y, out_z, num_channels), dtype=torch.int)
|
92 |
-
pts_idx_of_voxels = pts_feature.new_zeros(
|
93 |
-
(num_rois, out_x, out_y, out_z, max_pts_per_voxel),
|
94 |
-
dtype=torch.int)
|
95 |
-
|
96 |
-
ext_module.roiaware_pool3d_forward(rois, pts, pts_feature, argmax,
|
97 |
-
pts_idx_of_voxels, pooled_features,
|
98 |
-
mode)
|
99 |
-
|
100 |
-
ctx.roiaware_pool3d_for_backward = (pts_idx_of_voxels, argmax, mode,
|
101 |
-
num_pts, num_channels)
|
102 |
-
return pooled_features
|
103 |
-
|
104 |
-
@staticmethod
|
105 |
-
def backward(ctx, grad_out):
|
106 |
-
ret = ctx.roiaware_pool3d_for_backward
|
107 |
-
pts_idx_of_voxels, argmax, mode, num_pts, num_channels = ret
|
108 |
-
|
109 |
-
grad_in = grad_out.new_zeros((num_pts, num_channels))
|
110 |
-
ext_module.roiaware_pool3d_backward(pts_idx_of_voxels, argmax,
|
111 |
-
grad_out.contiguous(), grad_in,
|
112 |
-
mode)
|
113 |
-
|
114 |
-
return None, None, grad_in, None, None, None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ariharasudhan/YoloV5/utils/autoanchor.py
DELETED
@@ -1,169 +0,0 @@
|
|
1 |
-
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
|
2 |
-
"""
|
3 |
-
AutoAnchor utils
|
4 |
-
"""
|
5 |
-
|
6 |
-
import random
|
7 |
-
|
8 |
-
import numpy as np
|
9 |
-
import torch
|
10 |
-
import yaml
|
11 |
-
from tqdm import tqdm
|
12 |
-
|
13 |
-
from utils import TryExcept
|
14 |
-
from utils.general import LOGGER, colorstr
|
15 |
-
|
16 |
-
PREFIX = colorstr('AutoAnchor: ')
|
17 |
-
|
18 |
-
|
19 |
-
def check_anchor_order(m):
|
20 |
-
# Check anchor order against stride order for YOLOv5 Detect() module m, and correct if necessary
|
21 |
-
a = m.anchors.prod(-1).mean(-1).view(-1) # mean anchor area per output layer
|
22 |
-
da = a[-1] - a[0] # delta a
|
23 |
-
ds = m.stride[-1] - m.stride[0] # delta s
|
24 |
-
if da and (da.sign() != ds.sign()): # same order
|
25 |
-
LOGGER.info(f'{PREFIX}Reversing anchor order')
|
26 |
-
m.anchors[:] = m.anchors.flip(0)
|
27 |
-
|
28 |
-
|
29 |
-
@TryExcept(f'{PREFIX}ERROR')
|
30 |
-
def check_anchors(dataset, model, thr=4.0, imgsz=640):
|
31 |
-
# Check anchor fit to data, recompute if necessary
|
32 |
-
m = model.module.model[-1] if hasattr(model, 'module') else model.model[-1] # Detect()
|
33 |
-
shapes = imgsz * dataset.shapes / dataset.shapes.max(1, keepdims=True)
|
34 |
-
scale = np.random.uniform(0.9, 1.1, size=(shapes.shape[0], 1)) # augment scale
|
35 |
-
wh = torch.tensor(np.concatenate([l[:, 3:5] * s for s, l in zip(shapes * scale, dataset.labels)])).float() # wh
|
36 |
-
|
37 |
-
def metric(k): # compute metric
|
38 |
-
r = wh[:, None] / k[None]
|
39 |
-
x = torch.min(r, 1 / r).min(2)[0] # ratio metric
|
40 |
-
best = x.max(1)[0] # best_x
|
41 |
-
aat = (x > 1 / thr).float().sum(1).mean() # anchors above threshold
|
42 |
-
bpr = (best > 1 / thr).float().mean() # best possible recall
|
43 |
-
return bpr, aat
|
44 |
-
|
45 |
-
stride = m.stride.to(m.anchors.device).view(-1, 1, 1) # model strides
|
46 |
-
anchors = m.anchors.clone() * stride # current anchors
|
47 |
-
bpr, aat = metric(anchors.cpu().view(-1, 2))
|
48 |
-
s = f'\n{PREFIX}{aat:.2f} anchors/target, {bpr:.3f} Best Possible Recall (BPR). '
|
49 |
-
if bpr > 0.98: # threshold to recompute
|
50 |
-
LOGGER.info(f'{s}Current anchors are a good fit to dataset ✅')
|
51 |
-
else:
|
52 |
-
LOGGER.info(f'{s}Anchors are a poor fit to dataset ⚠️, attempting to improve...')
|
53 |
-
na = m.anchors.numel() // 2 # number of anchors
|
54 |
-
anchors = kmean_anchors(dataset, n=na, img_size=imgsz, thr=thr, gen=1000, verbose=False)
|
55 |
-
new_bpr = metric(anchors)[0]
|
56 |
-
if new_bpr > bpr: # replace anchors
|
57 |
-
anchors = torch.tensor(anchors, device=m.anchors.device).type_as(m.anchors)
|
58 |
-
m.anchors[:] = anchors.clone().view_as(m.anchors)
|
59 |
-
check_anchor_order(m) # must be in pixel-space (not grid-space)
|
60 |
-
m.anchors /= stride
|
61 |
-
s = f'{PREFIX}Done ✅ (optional: update model *.yaml to use these anchors in the future)'
|
62 |
-
else:
|
63 |
-
s = f'{PREFIX}Done ⚠️ (original anchors better than new anchors, proceeding with original anchors)'
|
64 |
-
LOGGER.info(s)
|
65 |
-
|
66 |
-
|
67 |
-
def kmean_anchors(dataset='./data/coco128.yaml', n=9, img_size=640, thr=4.0, gen=1000, verbose=True):
|
68 |
-
""" Creates kmeans-evolved anchors from training dataset
|
69 |
-
|
70 |
-
Arguments:
|
71 |
-
dataset: path to data.yaml, or a loaded dataset
|
72 |
-
n: number of anchors
|
73 |
-
img_size: image size used for training
|
74 |
-
thr: anchor-label wh ratio threshold hyperparameter hyp['anchor_t'] used for training, default=4.0
|
75 |
-
gen: generations to evolve anchors using genetic algorithm
|
76 |
-
verbose: print all results
|
77 |
-
|
78 |
-
Return:
|
79 |
-
k: kmeans evolved anchors
|
80 |
-
|
81 |
-
Usage:
|
82 |
-
from utils.autoanchor import *; _ = kmean_anchors()
|
83 |
-
"""
|
84 |
-
from scipy.cluster.vq import kmeans
|
85 |
-
|
86 |
-
npr = np.random
|
87 |
-
thr = 1 / thr
|
88 |
-
|
89 |
-
def metric(k, wh): # compute metrics
|
90 |
-
r = wh[:, None] / k[None]
|
91 |
-
x = torch.min(r, 1 / r).min(2)[0] # ratio metric
|
92 |
-
# x = wh_iou(wh, torch.tensor(k)) # iou metric
|
93 |
-
return x, x.max(1)[0] # x, best_x
|
94 |
-
|
95 |
-
def anchor_fitness(k): # mutation fitness
|
96 |
-
_, best = metric(torch.tensor(k, dtype=torch.float32), wh)
|
97 |
-
return (best * (best > thr).float()).mean() # fitness
|
98 |
-
|
99 |
-
def print_results(k, verbose=True):
|
100 |
-
k = k[np.argsort(k.prod(1))] # sort small to large
|
101 |
-
x, best = metric(k, wh0)
|
102 |
-
bpr, aat = (best > thr).float().mean(), (x > thr).float().mean() * n # best possible recall, anch > thr
|
103 |
-
s = f'{PREFIX}thr={thr:.2f}: {bpr:.4f} best possible recall, {aat:.2f} anchors past thr\n' \
|
104 |
-
f'{PREFIX}n={n}, img_size={img_size}, metric_all={x.mean():.3f}/{best.mean():.3f}-mean/best, ' \
|
105 |
-
f'past_thr={x[x > thr].mean():.3f}-mean: '
|
106 |
-
for x in k:
|
107 |
-
s += '%i,%i, ' % (round(x[0]), round(x[1]))
|
108 |
-
if verbose:
|
109 |
-
LOGGER.info(s[:-2])
|
110 |
-
return k
|
111 |
-
|
112 |
-
if isinstance(dataset, str): # *.yaml file
|
113 |
-
with open(dataset, errors='ignore') as f:
|
114 |
-
data_dict = yaml.safe_load(f) # model dict
|
115 |
-
from utils.dataloaders import LoadImagesAndLabels
|
116 |
-
dataset = LoadImagesAndLabels(data_dict['train'], augment=True, rect=True)
|
117 |
-
|
118 |
-
# Get label wh
|
119 |
-
shapes = img_size * dataset.shapes / dataset.shapes.max(1, keepdims=True)
|
120 |
-
wh0 = np.concatenate([l[:, 3:5] * s for s, l in zip(shapes, dataset.labels)]) # wh
|
121 |
-
|
122 |
-
# Filter
|
123 |
-
i = (wh0 < 3.0).any(1).sum()
|
124 |
-
if i:
|
125 |
-
LOGGER.info(f'{PREFIX}WARNING ⚠️ Extremely small objects found: {i} of {len(wh0)} labels are <3 pixels in size')
|
126 |
-
wh = wh0[(wh0 >= 2.0).any(1)].astype(np.float32) # filter > 2 pixels
|
127 |
-
# wh = wh * (npr.rand(wh.shape[0], 1) * 0.9 + 0.1) # multiply by random scale 0-1
|
128 |
-
|
129 |
-
# Kmeans init
|
130 |
-
try:
|
131 |
-
LOGGER.info(f'{PREFIX}Running kmeans for {n} anchors on {len(wh)} points...')
|
132 |
-
assert n <= len(wh) # apply overdetermined constraint
|
133 |
-
s = wh.std(0) # sigmas for whitening
|
134 |
-
k = kmeans(wh / s, n, iter=30)[0] * s # points
|
135 |
-
assert n == len(k) # kmeans may return fewer points than requested if wh is insufficient or too similar
|
136 |
-
except Exception:
|
137 |
-
LOGGER.warning(f'{PREFIX}WARNING ⚠️ switching strategies from kmeans to random init')
|
138 |
-
k = np.sort(npr.rand(n * 2)).reshape(n, 2) * img_size # random init
|
139 |
-
wh, wh0 = (torch.tensor(x, dtype=torch.float32) for x in (wh, wh0))
|
140 |
-
k = print_results(k, verbose=False)
|
141 |
-
|
142 |
-
# Plot
|
143 |
-
# k, d = [None] * 20, [None] * 20
|
144 |
-
# for i in tqdm(range(1, 21)):
|
145 |
-
# k[i-1], d[i-1] = kmeans(wh / s, i) # points, mean distance
|
146 |
-
# fig, ax = plt.subplots(1, 2, figsize=(14, 7), tight_layout=True)
|
147 |
-
# ax = ax.ravel()
|
148 |
-
# ax[0].plot(np.arange(1, 21), np.array(d) ** 2, marker='.')
|
149 |
-
# fig, ax = plt.subplots(1, 2, figsize=(14, 7)) # plot wh
|
150 |
-
# ax[0].hist(wh[wh[:, 0]<100, 0],400)
|
151 |
-
# ax[1].hist(wh[wh[:, 1]<100, 1],400)
|
152 |
-
# fig.savefig('wh.png', dpi=200)
|
153 |
-
|
154 |
-
# Evolve
|
155 |
-
f, sh, mp, s = anchor_fitness(k), k.shape, 0.9, 0.1 # fitness, generations, mutation prob, sigma
|
156 |
-
pbar = tqdm(range(gen), bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}') # progress bar
|
157 |
-
for _ in pbar:
|
158 |
-
v = np.ones(sh)
|
159 |
-
while (v == 1).all(): # mutate until a change occurs (prevent duplicates)
|
160 |
-
v = ((npr.random(sh) < mp) * random.random() * npr.randn(*sh) * s + 1).clip(0.3, 3.0)
|
161 |
-
kg = (k.copy() * v).clip(min=2.0)
|
162 |
-
fg = anchor_fitness(kg)
|
163 |
-
if fg > f:
|
164 |
-
f, k = fg, kg.copy()
|
165 |
-
pbar.desc = f'{PREFIX}Evolving anchors with Genetic Algorithm: fitness = {f:.4f}'
|
166 |
-
if verbose:
|
167 |
-
print_results(k, verbose)
|
168 |
-
|
169 |
-
return print_results(k).astype(np.float32)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Arulkumar03/GroundingDINO_SOTA_Zero_Shot_Model/groundingdino/models/GroundingDINO/__init__.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
# ------------------------------------------------------------------------
|
2 |
-
# Grounding DINO
|
3 |
-
# url: https://github.com/IDEA-Research/GroundingDINO
|
4 |
-
# Copyright (c) 2023 IDEA. All Rights Reserved.
|
5 |
-
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
|
6 |
-
# ------------------------------------------------------------------------
|
7 |
-
# Conditional DETR
|
8 |
-
# Copyright (c) 2021 Microsoft. All Rights Reserved.
|
9 |
-
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
|
10 |
-
# ------------------------------------------------------------------------
|
11 |
-
# Copied from DETR (https://github.com/facebookresearch/detr)
|
12 |
-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
13 |
-
# ------------------------------------------------------------------------
|
14 |
-
|
15 |
-
from .groundingdino import build_groundingdino
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/setuptools/command/install_egg_info.py
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
from distutils import log, dir_util
|
2 |
-
import os
|
3 |
-
|
4 |
-
from setuptools import Command
|
5 |
-
from setuptools import namespaces
|
6 |
-
from setuptools.archive_util import unpack_archive
|
7 |
-
from .._path import ensure_directory
|
8 |
-
import pkg_resources
|
9 |
-
|
10 |
-
|
11 |
-
class install_egg_info(namespaces.Installer, Command):
|
12 |
-
"""Install an .egg-info directory for the package"""
|
13 |
-
|
14 |
-
description = "Install an .egg-info directory for the package"
|
15 |
-
|
16 |
-
user_options = [
|
17 |
-
('install-dir=', 'd', "directory to install to"),
|
18 |
-
]
|
19 |
-
|
20 |
-
def initialize_options(self):
|
21 |
-
self.install_dir = None
|
22 |
-
|
23 |
-
def finalize_options(self):
|
24 |
-
self.set_undefined_options('install_lib',
|
25 |
-
('install_dir', 'install_dir'))
|
26 |
-
ei_cmd = self.get_finalized_command("egg_info")
|
27 |
-
basename = pkg_resources.Distribution(
|
28 |
-
None, None, ei_cmd.egg_name, ei_cmd.egg_version
|
29 |
-
).egg_name() + '.egg-info'
|
30 |
-
self.source = ei_cmd.egg_info
|
31 |
-
self.target = os.path.join(self.install_dir, basename)
|
32 |
-
self.outputs = []
|
33 |
-
|
34 |
-
def run(self):
|
35 |
-
self.run_command('egg_info')
|
36 |
-
if os.path.isdir(self.target) and not os.path.islink(self.target):
|
37 |
-
dir_util.remove_tree(self.target, dry_run=self.dry_run)
|
38 |
-
elif os.path.exists(self.target):
|
39 |
-
self.execute(os.unlink, (self.target,), "Removing " + self.target)
|
40 |
-
if not self.dry_run:
|
41 |
-
ensure_directory(self.target)
|
42 |
-
self.execute(
|
43 |
-
self.copytree, (), "Copying %s to %s" % (self.source, self.target)
|
44 |
-
)
|
45 |
-
self.install_namespaces()
|
46 |
-
|
47 |
-
def get_outputs(self):
|
48 |
-
return self.outputs
|
49 |
-
|
50 |
-
def copytree(self):
|
51 |
-
# Copy the .egg-info tree to site-packages
|
52 |
-
def skimmer(src, dst):
|
53 |
-
# filter out source-control directories; note that 'src' is always
|
54 |
-
# a '/'-separated path, regardless of platform. 'dst' is a
|
55 |
-
# platform-specific path.
|
56 |
-
for skip in '.svn/', 'CVS/':
|
57 |
-
if src.startswith(skip) or '/' + skip in src:
|
58 |
-
return None
|
59 |
-
self.outputs.append(dst)
|
60 |
-
log.debug("Copying %s to %s", src, dst)
|
61 |
-
return dst
|
62 |
-
|
63 |
-
unpack_archive(self.source, self.target, skimmer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Atualli/yoloxTeste/yoloxdetect2/configs/yolox_m.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
#!/usr/bin/env python3
|
2 |
-
# -*- coding:utf-8 -*-
|
3 |
-
# Copyright (c) Megvii, Inc. and its affiliates.
|
4 |
-
|
5 |
-
import os
|
6 |
-
|
7 |
-
from yolox.exp import Exp as MyExp
|
8 |
-
|
9 |
-
|
10 |
-
class Exp(MyExp):
|
11 |
-
def __init__(self):
|
12 |
-
super(Exp, self).__init__()
|
13 |
-
self.depth = 0.67
|
14 |
-
self.width = 0.75
|
15 |
-
self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Aveygo/AstroSleuth/app.py
DELETED
@@ -1,163 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from streamlit.runtime.scriptrunner import add_script_run_ctx
|
3 |
-
from streamlit.web.server.websocket_headers import _get_websocket_headers
|
4 |
-
|
5 |
-
from PIL import Image
|
6 |
-
import time, threading, io, warnings, argparse
|
7 |
-
from os import listdir
|
8 |
-
|
9 |
-
from file_queue import FileQueue
|
10 |
-
from main import AstroSleuth
|
11 |
-
|
12 |
-
parser = argparse.ArgumentParser(description='AstroSleuth')
|
13 |
-
parser.add_argument('--cpu', action='store_true', help='Force CPU')
|
14 |
-
parser.add_argument('--ignore_hf', action='store_true', help='Ignore hugging face enviornment')
|
15 |
-
|
16 |
-
args = parser.parse_args()
|
17 |
-
FORCE_CPU = args.cpu
|
18 |
-
IGNORE_HF = args.ignore_hf
|
19 |
-
|
20 |
-
# Check if we are running in huggingface environment
|
21 |
-
try: IS_HF = listdir('/home/')[0] == 'user'
|
22 |
-
except: IS_HF = False
|
23 |
-
|
24 |
-
# Set image warning and max sizes
|
25 |
-
IS_HF = IS_HF if not IGNORE_HF else False
|
26 |
-
WARNING_SIZE = 1024 if IS_HF else 4096
|
27 |
-
MAX_SIZE = 2048 if IS_HF else None
|
28 |
-
|
29 |
-
if IS_HF: warnings.warn(f"Running in huggingface environment! Images will be resized to cap of {MAX_SIZE}x{MAX_SIZE}")
|
30 |
-
|
31 |
-
class App:
|
32 |
-
def __init__(self):
|
33 |
-
self.queue = None
|
34 |
-
self.running = True
|
35 |
-
|
36 |
-
def on_download(self):
|
37 |
-
self.download_info = st.info(f"Downloading the model, this may take a minute...", icon ="☁️")
|
38 |
-
|
39 |
-
def off_download(self):
|
40 |
-
self.download_info.empty()
|
41 |
-
|
42 |
-
def upscale(self, image):
|
43 |
-
# Convert to RGB if not already
|
44 |
-
image_rgb = Image.new("RGB", image.size, (255, 255, 255))
|
45 |
-
image_rgb.paste(image)
|
46 |
-
del image
|
47 |
-
|
48 |
-
# Start the model (downloading is done here)
|
49 |
-
model = AstroSleuth(force_cpu=FORCE_CPU, on_download=self.on_download, off_download=self.off_download)
|
50 |
-
|
51 |
-
# Show that upscale is starting
|
52 |
-
self.info = st.info("Upscaling image...", icon="🔥")
|
53 |
-
|
54 |
-
# Set the bar to 0
|
55 |
-
bar = st.progress(0)
|
56 |
-
|
57 |
-
# Run the model, yield progress
|
58 |
-
result = None
|
59 |
-
for i in model.enhance_with_progress(image_rgb):
|
60 |
-
if type(i) == float:
|
61 |
-
bar.progress(i)
|
62 |
-
else:
|
63 |
-
result = i
|
64 |
-
break
|
65 |
-
|
66 |
-
# Early exit if we are no longer running (user closed the page)
|
67 |
-
if not self.running:
|
68 |
-
break
|
69 |
-
|
70 |
-
# Clear the bar
|
71 |
-
bar.empty()
|
72 |
-
return result
|
73 |
-
|
74 |
-
def heart(self):
|
75 |
-
# Beacause multiple users may be using the app at once, we need to check if
|
76 |
-
# the websocket headers are still valid and to communicate with other threads
|
77 |
-
# that we are still "in line"
|
78 |
-
|
79 |
-
while self.running and self.queue.should_run():
|
80 |
-
if _get_websocket_headers() is None:
|
81 |
-
self.close()
|
82 |
-
return
|
83 |
-
|
84 |
-
self.queue.heartbeat()
|
85 |
-
time.sleep(1)
|
86 |
-
|
87 |
-
def render(self):
|
88 |
-
st.title('AstroSleuth')
|
89 |
-
st.subheader("Upscale deep space targets with AI")
|
90 |
-
|
91 |
-
# Show the file uploader and submit button
|
92 |
-
with st.form("my-form", clear_on_submit=True):
|
93 |
-
file = st.file_uploader("FILE UPLOADER", type=["png", "jpg", "jpeg"])
|
94 |
-
submitted = st.form_submit_button("Upscale!")
|
95 |
-
|
96 |
-
if submitted and file is not None:
|
97 |
-
image = Image.open(file)
|
98 |
-
|
99 |
-
# Resize the image if it is too large
|
100 |
-
if MAX_SIZE is not None and (image.width > MAX_SIZE or image.height > MAX_SIZE):
|
101 |
-
st.warning("Your image was resized to save on resources! To avoid this, run AstroSleuth with colab or locally: https://github.com/Aveygo/AstroSleuth#running", icon="⚠️")
|
102 |
-
if image.width > image.height:
|
103 |
-
image = image.resize((MAX_SIZE, MAX_SIZE * image.height // image.width))
|
104 |
-
else:
|
105 |
-
image = image.resize((MAX_SIZE * image.width // image.height, MAX_SIZE))
|
106 |
-
|
107 |
-
elif image.width > WARNING_SIZE or image.height > WARNING_SIZE:
|
108 |
-
st.info("Woah, that image is quite large! You may have to wait a while and/or get unexpected errors!", icon="🕒")
|
109 |
-
|
110 |
-
# Start the queue
|
111 |
-
self.queue = FileQueue()
|
112 |
-
queue_box = None
|
113 |
-
|
114 |
-
# Wait for the queue to be empty
|
115 |
-
while not self.queue.should_run():
|
116 |
-
if queue_box is None:
|
117 |
-
queue_box = st.warning("Experincing high demand, you have been placed in a queue! Please wait...", icon ="🚦")
|
118 |
-
time.sleep(1)
|
119 |
-
self.queue.heartbeat()
|
120 |
-
|
121 |
-
# Start the heart thread while we are upscaling
|
122 |
-
t = threading.Thread(target=self.heart)
|
123 |
-
add_script_run_ctx(t)
|
124 |
-
t.start()
|
125 |
-
|
126 |
-
# Empty the queue box
|
127 |
-
if queue_box is not None:
|
128 |
-
queue_box.empty()
|
129 |
-
|
130 |
-
# Start the upscale
|
131 |
-
image = self.upscale(image)
|
132 |
-
|
133 |
-
# Check if the upscale failed for whatever reason
|
134 |
-
if image is None:
|
135 |
-
st.error("Internal error: Upscaling failed, please try again later?", icon="❌")
|
136 |
-
self.close()
|
137 |
-
return
|
138 |
-
|
139 |
-
# Empty the info box
|
140 |
-
self.info.empty()
|
141 |
-
|
142 |
-
st.success('Done! Receiving result... (Please use the download button for the highest resolution)', icon="🎉")
|
143 |
-
|
144 |
-
# Convert to bytes
|
145 |
-
b = io.BytesIO()
|
146 |
-
file_type = file.name.split(".")[-1].upper()
|
147 |
-
file_type = "JPEG" if not file_type in ["JPEG", "PNG"] else file_type
|
148 |
-
image.save(b, format=file_type)
|
149 |
-
st.download_button("Download Full Resolution", b.getvalue(), file.name, "image/" + file_type)
|
150 |
-
|
151 |
-
# Show preview
|
152 |
-
st.image(image, caption='Upscaled preview', use_column_width=True)
|
153 |
-
self.close()
|
154 |
-
|
155 |
-
def close(self):
|
156 |
-
# Exit from queue and stop running
|
157 |
-
self.running = False
|
158 |
-
if self.queue is not None:
|
159 |
-
self.queue.quit()
|
160 |
-
self.queue = None
|
161 |
-
|
162 |
-
app = App()
|
163 |
-
app.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Cuentos Milagrosos De Mariquita Y Amperio Episodios De Gato Negro.md
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Cómo descargar Miraculous: Cuentos de mariquitas y Cat Noir Episodios</h1>
|
3 |
-
<p>Si eres un fan de las historias de superhéroes, programas de chicas mágicas o comedia romántica, es posible que quieras echar un vistazo a Miraculous: Tales of Ladybug & Cat Noir, una serie animada francesa que ha ganado popularidad en todo el mundo. El espectáculo sigue las aventuras de dos adolescentes parisinos, Marinette y Adrien, que se transforman en los superhéroes Ladybug y Cat Noir usando joyas mágicas llamadas Miraculouses. Juntos, luchan contra la malvada polilla halcón, que crea supervillanos explotando las emociones negativas de la gente. </p>
|
4 |
-
<h2>cuentos milagrosos de mariquita y amperio; episodios de gato negro</h2><br /><p><b><b>Download File</b> > <a href="https://bltlly.com/2v6Kmb">https://bltlly.com/2v6Kmb</a></b></p><br /><br />
|
5 |
-
<p>En este artículo, le daremos una visión general del programa y sus personajes, así como le diremos cómo verlo en línea y cómo descargar sus episodios de forma legal y segura. Ya sea que quieras ver toda la serie o ponerte al día con la última temporada, te tenemos cubierto. </p>
|
6 |
-
<h2>Cómo ver milagrosa: Cuentos de mariquita y gato negro en línea</h2>
|
7 |
-
<p>Miraculous: Tales of Ladybug & Cat Noir tiene cinco temporadas hasta ahora, con una sexta en producción. El programa se transmite en varios canales y plataformas de todo el mundo, dependiendo de su región y preferencia de idioma. Estas son algunas de las opciones más comunes para ver el programa en línea:</p>
|
8 |
-
<ul>
|
9 |
-
<li><strong>Disney Plus</strong>: Disney Plus es el servicio exclusivo de streaming para Miraculous: Tales of Ladybug & Cat Noir en muchos países, incluidos los Estados Unidos, Canadá, Australia, Nueva Zelanda y la mayor parte de Europa. Puedes ver las cinco temporadas del programa en inglés o francés con subtítulos en Disney Plus. Necesitas una suscripción para acceder a Disney Plus, que cuesta $7.99 por mes o $79.99 por año en los Estados Unidos.</li>
|
10 |
-
|
11 |
-
<li><strong>TVNZ</strong>: TVNZ es un servicio de streaming gratuito que ofrece Miraculous: Tales of Ladybug & Cat Noir en Nueva Zelanda. Puedes ver las cinco temporadas del programa en inglés con subtítulos en TVNZ. No necesitas una suscripción o una cuenta para acceder a TVNZ.</li>
|
12 |
-
<li><strong>Disney Channel</strong>: Disney Channel es una red de televisión por cable que transmite Miraculous: Tales of Ladybug & Cat Noir en muchos países alrededor del mundo. Puedes ver nuevos episodios del programa mientras se estrenan en Disney Channel o ponerte al día con episodios anteriores a pedido a través de tu proveedor de cable o en línea a través de DisneyNOW. Necesitas una suscripción por cable o un usuario de proveedor de TV para acceder a Disney Channel o DisneyNOW.</li>
|
13 |
-
</ul>
|
14 |
-
<h2>Cómo descargar Miraculous: Cuentos de mariquita y gato Noir Episodios</h2>
|
15 |
-
<p>Si quieres descargar episodios de Miraculous: Tales of Ladybug & Cat Noir para verlos sin conexión o mantenerlos permanentemente en tu dispositivo, también tienes algunas opciones. Sin embargo, usted debe tener cuidado acerca de dónde descargarlos y cómo se utilizan. La descarga de episodios de fuentes no autorizadas puede exponerlo a malware o virus, así como a las consecuencias legales de la piratería. La descarga de episodios de fuentes autorizadas puede requerir el pago o tener limitaciones en el número de descargas o la duración de la disponibilidad. Estas son algunas de las opciones más comunes para descargar episodios de Miraculous: Tales of Ladybug & Cat Noir:</p>
|
16 |
-
<ul>
|
17 |
-
<li><strong>Disney Plus</strong>: Disney Plus te permite descargar episodios de Miraculous: Tales of Ladybug & Cat Noir para verlos sin conexión en hasta 10 dispositivos. Puede descargar tantos episodios como desee, siempre y cuando tenga suficiente espacio de almacenamiento en su dispositivo y una suscripción activa. Puedes acceder a tus episodios descargados mientras sigas siendo suscriptor y el programa esté disponible en Disney Plus.</li>
|
18 |
-
|
19 |
-
<li><strong>Amazon Prime Video</strong>: Amazon Prime Video le permite comprar o alquilar episodios de Miraculous: Tales of Ladybug & Cat Noir para ver sin conexión en hasta cuatro dispositivos. Puedes comprar episodios individuales por $2.99 cada uno o un pase de temporada por $19.99 o más, dependiendo de la temporada. También puedes alquilar episodios por $1.99 cada uno, pero caducarán después de 48 horas. Puedes acceder a tus episodios comprados o alquilados mientras estén disponibles en Amazon Prime Video.</li>
|
20 |
-
<li><strong>iTunes</strong>: iTunes te permite comprar episodios de Miraculous: Tales of Ladybug & Cat Noir para verlos sin conexión en hasta cinco dispositivos. Puedes comprar episodios individuales por $2.99 cada uno o un pase de temporada por $19.99 o más, dependiendo de la temporada. Puedes acceder a tus episodios comprados mientras estén disponibles en iTunes. </li>
|
21 |
-
</ul>
|
22 |
-
<h2>Conclusión</h2>
|
23 |
-
<p>Miraculous: Tales of Ladybug & Cat Noir es un espectáculo divertido y emocionante que atrae a una amplia gama de audiencias. Combina acción, comedia, romance y magia en un entorno colorido y encantador. Si desea ver o descargar episodios del programa, tiene varias opciones para elegir, dependiendo de su región, idioma y preferencia. Sin embargo, siempre debes tener cuidado sobre de dónde sacas tus episodios y cómo los usas, para evitar cualquier problema legal o técnico. </p>
|
24 |
-
<p></p>
|
25 |
-
<p>Esperamos que este artículo te haya ayudado a encontrar la mejor manera de disfrutar de Miraculous: Tales of Ladybug & Cat Noir. Si tienes alguna pregunta o comentario, siéntete libre de dejarlos abajo. Y recuerda, ¡no dejes que nadie te akumatize! </p>
|
26 |
-
<h2>Preguntas frecuentes</h2>
|
27 |
-
<h3>¿Cuál es el orden de las estaciones y episodios de Miraculous: Tales of Ladybug & Cat Noir? </h3>
|
28 |
-
|
29 |
-
<h3>¿Quiénes son los actores de voz de Miraculous: Tales of Ladybug & Cat Noir? </h3>
|
30 |
-
<p>Miraculous: Tales of Ladybug & Cat Noir ha sido doblado en muchos idiomas, pero el idioma original es el francés. Los principales actores de voz en francés son:</p>
|
31 |
-
<ul>
|
32 |
-
<li><strong>Cristina Vee</strong> como Marinette Dupain-Cheng / Mariquita</li>
|
33 |
-
<li><strong>Bryce Papenbrook</strong> como Adrien Agreste / Cat Noir</li>
|
34 |
-
<li><strong>Keith Silverstein</strong> como Gabriel Agreste / Hawk Moth</li>
|
35 |
-
<li><strong>Mela Lee</strong> como Tikki</li>
|
36 |
-
<li><strong>Max Mittelman</strong> como Plagg</li>
|
37 |
-
<li><strong>Carrie Keranen</strong> como Alya Césaire / Rena Rouge</li>
|
38 |
-
<li><strong>Ben Diskin</strong> como Nino Lahiffe / Caparazón</li>
|
39 |
-
<li><strong>Selah Victor</strong> como Chloé Bourgeois / Abeja reina</li>
|
40 |
-
<li><strong>Sabrina Weisz</strong> como Nathalie Sancoeur / Mayura</li>
|
41 |
-
<li><strong>Ezra Weisz</strong> as Luka Couffaine / Viperion</li> <p>Los principales actores de voz en inglés son:</p>
|
42 |
-
<ul>
|
43 |
-
<li><strong>Anouck Hautbois</strong> como Marinette Dupain-Cheng / Mariquita</li>
|
44 |
-
<li><strong>Benjamin Bollen</strong> como Adrien Agreste / Cat Noir</li>
|
45 |
-
<li><strong>Antoine Tomé</strong> como Gabriel Agreste / Halcón Polilla</li>
|
46 |
-
<li><strong>Marie Nonnenmacher</strong> como Tikki</li>
|
47 |
-
<li><strong>Thierry Kazazian</strong> como Plagg</li>
|
48 |
-
<li><strong>Fanny Bloc</strong> como Alya Césaire / Rena Rouge</li>
|
49 |
-
<li><strong>Alexandre N'Guyen</strong> como Nino Lahiffe / Caparazón</li>
|
50 |
-
<li><strong>Marie Chevalot</strong> como Chloé Bourgeois / Abeja reina</li>
|
51 |
-
<li><strong>Clara Soares</strong> como Nathalie Sancoeur / Mayura</li>
|
52 |
-
<li><strong>Maxime Baudouin</strong> como Luka Couffaine / Viperion</li>
|
53 |
-
</ul>
|
54 |
-
<h3>¿Cuáles son los Milagros y los Kwamis? </h3>
|
55 |
-
|
56 |
-
<p>Los principales Milagros y Kwamis en la serie son:</p>
|
57 |
-
<tabla>
|
58 |
-
<tr>
|
59 |
-
<th>Milagroso</th>
|
60 |
-
<th>Kwami</th>
|
61 |
-
<th>Poder</th>
|
62 |
-
<th>Titular</th>
|
63 |
-
<th>Superhéroe</th>
|
64 |
-
</tr>
|
65 |
-
<tr>
|
66 |
-
<td>Pendientes de mariquita</td>
|
67 |
-
<td>Tikki</td>
|
68 |
-
<td>Amuleto de la suerte (crea un objeto útil)</td>
|
69 |
-
<td>Marinette Dupain-Cheng</td>
|
70 |
-
<td>Mariquita</td>
|
71 |
-
</tr>
|
72 |
-
<tr>
|
73 |
-
<td>Anillo de gato</td>
|
74 |
-
<td>Plagg</td>
|
75 |
-
<td>Cataclismo (destruye cualquier cosa)</td>
|
76 |
-
<td>Adrien Agreste</td>
|
77 |
-
<td>Gato negro</td>
|
78 |
-
</tr>
|
79 |
-
<tr>
|
80 |
-
<td>Broche de polilla</td>
|
81 |
-
<td>Nooroo</td>
|
82 |
-
<td>Akumatización (crea supervillanos)</td>
|
83 |
-
<td>Gabriel Agreste / Halcón Polilla</td>
|
84 |
-
<td>N/A</td>
|
85 |
-
</tr>
|
86 |
-
<tr>
|
87 |
-
<td>collar de zorro</td>
|
88 |
-
<td>Trix</td>
|
89 |
-
<td>Espejismo (crea ilusiones)</td>
|
90 |
-
<td>Alya Césaire / Rena Rouge Nino Lahiffe / Carapace Chloé Bourgeois / Queen Bee Nathalie Sancoeur / Mayura Luka Couffaine / Viperion Kagami Tsurugi / Ryuko Max Kanté / Pegasus Kim Chiến Lê / King Monkey Alix Kubdel / Bunnyx Rose Lavillant / Pigella Juleka Couffaine / Tigeress Mylène Haprèle / Polymouse Ivan Bruel / Minotaurox Aurora Borealis / Polarix Alix Kubdel (futuro) / Bunnyx (futuro) Marinette Dupain-Cheng (futuro) / Ladybug (futuro) Adrien Agreste (futuro) / Cat Noir (futuro) Gabriel Agreste (futuro) / Hawk Moth (futuro) Emilie Agreste (pasado) / Mayura (pasado)</td></tr</</table>>
|
91 |
-
<h3>¿Cuáles son los temas y mensajes de Miraculous: Tales of Ladybug & Cat Noir? </h3>
|
92 |
-
<p>Miraculous: Tales of Ladybug & Cat Noir es un espectáculo que explora varios temas y mensajes, como:</p>
|
93 |
-
<ul>
|
94 |
-
<li><strong>Amistad y trabajo en equipo:</strong> El programa enfatiza la importancia de tener amigos y trabajar juntos para superar los desafíos y derrotar a los enemigos. Los héroes a menudo confían en el apoyo y las habilidades de los demás, así como en la ayuda de otros superhéroes o aliados. </li>
|
95 |
-
|
96 |
-
<li><strong>Coraje y responsabilidad:</strong> El programa retrata a los héroes como individuos valientes y responsables que enfrentan el peligro y el sacrificio por el bien mayor. El programa también muestra las consecuencias de abusar del poder o dejar que las emociones negativas se hagan cargo. </li>
|
97 |
-
<li><strong>Diversidad e inclusión:</strong> El programa celebra la diversidad y la inclusión presentando personajes de diferentes orígenes, culturas, personalidades y habilidades. La muestra también promueve la tolerancia y el respeto por las diferentes opiniones y perspectivas. </li>
|
98 |
-
<li><strong>Humor y creatividad:</strong> El espectáculo inyecta humor y creatividad en sus historias y personajes, haciéndolos más agradables y memorables. El espectáculo también anima a los espectadores a utilizar su imaginación y divertirse. </li>
|
99 |
-
</ul>
|
100 |
-
<h3> ¿Qué tan popular es Miraculous: Tales of Ladybug & Cat Noir? </h3>
|
101 |
-
<p>Miraculous: Tales of Ladybug & Cat Noir es un programa muy popular que ha recibido la aclamación de la crítica y el apoyo de los fans. El programa ha ganado varios premios, como el Teen Choice Award for Choice Animated TV Show en 2018 y el Kidscreen Award for Best in Class en 2019. El espectáculo también ha dado lugar a un gran fandom que crea fan art, fan fiction, cosplay, mercancía y más. El programa también ha inspirado spin-offs, como cómics, libros, videojuegos, webisodes y una película de acción en vivo. </p> 64aa2da5cf<br />
|
102 |
-
<br />
|
103 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/botocore/retries/adaptive.py
DELETED
@@ -1,133 +0,0 @@
|
|
1 |
-
import logging
|
2 |
-
import math
|
3 |
-
import threading
|
4 |
-
|
5 |
-
from botocore.retries import bucket, standard, throttling
|
6 |
-
|
7 |
-
logger = logging.getLogger(__name__)
|
8 |
-
|
9 |
-
|
10 |
-
def register_retry_handler(client):
|
11 |
-
clock = bucket.Clock()
|
12 |
-
rate_adjustor = throttling.CubicCalculator(
|
13 |
-
starting_max_rate=0, start_time=clock.current_time()
|
14 |
-
)
|
15 |
-
token_bucket = bucket.TokenBucket(max_rate=1, clock=clock)
|
16 |
-
rate_clocker = RateClocker(clock)
|
17 |
-
throttling_detector = standard.ThrottlingErrorDetector(
|
18 |
-
retry_event_adapter=standard.RetryEventAdapter(),
|
19 |
-
)
|
20 |
-
limiter = ClientRateLimiter(
|
21 |
-
rate_adjustor=rate_adjustor,
|
22 |
-
rate_clocker=rate_clocker,
|
23 |
-
token_bucket=token_bucket,
|
24 |
-
throttling_detector=throttling_detector,
|
25 |
-
clock=clock,
|
26 |
-
)
|
27 |
-
client.meta.events.register(
|
28 |
-
'before-send',
|
29 |
-
limiter.on_sending_request,
|
30 |
-
)
|
31 |
-
client.meta.events.register(
|
32 |
-
'needs-retry',
|
33 |
-
limiter.on_receiving_response,
|
34 |
-
)
|
35 |
-
return limiter
|
36 |
-
|
37 |
-
|
38 |
-
class ClientRateLimiter:
|
39 |
-
|
40 |
-
_MAX_RATE_ADJUST_SCALE = 2.0
|
41 |
-
|
42 |
-
def __init__(
|
43 |
-
self,
|
44 |
-
rate_adjustor,
|
45 |
-
rate_clocker,
|
46 |
-
token_bucket,
|
47 |
-
throttling_detector,
|
48 |
-
clock,
|
49 |
-
):
|
50 |
-
self._rate_adjustor = rate_adjustor
|
51 |
-
self._rate_clocker = rate_clocker
|
52 |
-
self._token_bucket = token_bucket
|
53 |
-
self._throttling_detector = throttling_detector
|
54 |
-
self._clock = clock
|
55 |
-
self._enabled = False
|
56 |
-
self._lock = threading.Lock()
|
57 |
-
|
58 |
-
def on_sending_request(self, request, **kwargs):
|
59 |
-
if self._enabled:
|
60 |
-
self._token_bucket.acquire()
|
61 |
-
|
62 |
-
# Hooked up to needs-retry.
|
63 |
-
def on_receiving_response(self, **kwargs):
|
64 |
-
measured_rate = self._rate_clocker.record()
|
65 |
-
timestamp = self._clock.current_time()
|
66 |
-
with self._lock:
|
67 |
-
if not self._throttling_detector.is_throttling_error(**kwargs):
|
68 |
-
new_rate = self._rate_adjustor.success_received(timestamp)
|
69 |
-
else:
|
70 |
-
if not self._enabled:
|
71 |
-
rate_to_use = measured_rate
|
72 |
-
else:
|
73 |
-
rate_to_use = min(
|
74 |
-
measured_rate, self._token_bucket.max_rate
|
75 |
-
)
|
76 |
-
new_rate = self._rate_adjustor.error_received(
|
77 |
-
rate_to_use, timestamp
|
78 |
-
)
|
79 |
-
logger.debug(
|
80 |
-
"Throttling response received, new send rate: %s "
|
81 |
-
"measured rate: %s, token bucket capacity "
|
82 |
-
"available: %s",
|
83 |
-
new_rate,
|
84 |
-
measured_rate,
|
85 |
-
self._token_bucket.available_capacity,
|
86 |
-
)
|
87 |
-
self._enabled = True
|
88 |
-
self._token_bucket.max_rate = min(
|
89 |
-
new_rate, self._MAX_RATE_ADJUST_SCALE * measured_rate
|
90 |
-
)
|
91 |
-
|
92 |
-
|
93 |
-
class RateClocker:
|
94 |
-
"""Tracks the rate at which a client is sending a request."""
|
95 |
-
|
96 |
-
_DEFAULT_SMOOTHING = 0.8
|
97 |
-
# Update the rate every _TIME_BUCKET_RANGE seconds.
|
98 |
-
_TIME_BUCKET_RANGE = 0.5
|
99 |
-
|
100 |
-
def __init__(
|
101 |
-
self,
|
102 |
-
clock,
|
103 |
-
smoothing=_DEFAULT_SMOOTHING,
|
104 |
-
time_bucket_range=_TIME_BUCKET_RANGE,
|
105 |
-
):
|
106 |
-
self._clock = clock
|
107 |
-
self._measured_rate = 0
|
108 |
-
self._smoothing = smoothing
|
109 |
-
self._last_bucket = math.floor(self._clock.current_time())
|
110 |
-
self._time_bucket_scale = 1 / self._TIME_BUCKET_RANGE
|
111 |
-
self._count = 0
|
112 |
-
self._lock = threading.Lock()
|
113 |
-
|
114 |
-
def record(self, amount=1):
|
115 |
-
with self._lock:
|
116 |
-
t = self._clock.current_time()
|
117 |
-
bucket = (
|
118 |
-
math.floor(t * self._time_bucket_scale)
|
119 |
-
/ self._time_bucket_scale
|
120 |
-
)
|
121 |
-
self._count += amount
|
122 |
-
if bucket > self._last_bucket:
|
123 |
-
current_rate = self._count / float(bucket - self._last_bucket)
|
124 |
-
self._measured_rate = (current_rate * self._smoothing) + (
|
125 |
-
self._measured_rate * (1 - self._smoothing)
|
126 |
-
)
|
127 |
-
self._count = 0
|
128 |
-
self._last_bucket = bucket
|
129 |
-
return self._measured_rate
|
130 |
-
|
131 |
-
@property
|
132 |
-
def measured_rate(self):
|
133 |
-
return self._measured_rate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/s3transfer/upload.py
DELETED
@@ -1,802 +0,0 @@
|
|
1 |
-
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4 |
-
# may not use this file except in compliance with the License. A copy of
|
5 |
-
# the License is located at
|
6 |
-
#
|
7 |
-
# http://aws.amazon.com/apache2.0/
|
8 |
-
#
|
9 |
-
# or in the "license" file accompanying this file. This file is
|
10 |
-
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
-
# ANY KIND, either express or implied. See the License for the specific
|
12 |
-
# language governing permissions and limitations under the License.
|
13 |
-
import math
|
14 |
-
from io import BytesIO
|
15 |
-
|
16 |
-
from s3transfer.compat import readable, seekable
|
17 |
-
from s3transfer.futures import IN_MEMORY_UPLOAD_TAG
|
18 |
-
from s3transfer.tasks import (
|
19 |
-
CompleteMultipartUploadTask,
|
20 |
-
CreateMultipartUploadTask,
|
21 |
-
SubmissionTask,
|
22 |
-
Task,
|
23 |
-
)
|
24 |
-
from s3transfer.utils import (
|
25 |
-
ChunksizeAdjuster,
|
26 |
-
DeferredOpenFile,
|
27 |
-
get_callbacks,
|
28 |
-
get_filtered_dict,
|
29 |
-
)
|
30 |
-
|
31 |
-
|
32 |
-
class AggregatedProgressCallback:
|
33 |
-
def __init__(self, callbacks, threshold=1024 * 256):
|
34 |
-
"""Aggregates progress updates for every provided progress callback
|
35 |
-
|
36 |
-
:type callbacks: A list of functions that accepts bytes_transferred
|
37 |
-
as a single argument
|
38 |
-
:param callbacks: The callbacks to invoke when threshold is reached
|
39 |
-
|
40 |
-
:type threshold: int
|
41 |
-
:param threshold: The progress threshold in which to take the
|
42 |
-
aggregated progress and invoke the progress callback with that
|
43 |
-
aggregated progress total
|
44 |
-
"""
|
45 |
-
self._callbacks = callbacks
|
46 |
-
self._threshold = threshold
|
47 |
-
self._bytes_seen = 0
|
48 |
-
|
49 |
-
def __call__(self, bytes_transferred):
|
50 |
-
self._bytes_seen += bytes_transferred
|
51 |
-
if self._bytes_seen >= self._threshold:
|
52 |
-
self._trigger_callbacks()
|
53 |
-
|
54 |
-
def flush(self):
|
55 |
-
"""Flushes out any progress that has not been sent to its callbacks"""
|
56 |
-
if self._bytes_seen > 0:
|
57 |
-
self._trigger_callbacks()
|
58 |
-
|
59 |
-
def _trigger_callbacks(self):
|
60 |
-
for callback in self._callbacks:
|
61 |
-
callback(bytes_transferred=self._bytes_seen)
|
62 |
-
self._bytes_seen = 0
|
63 |
-
|
64 |
-
|
65 |
-
class InterruptReader:
|
66 |
-
"""Wrapper that can interrupt reading using an error
|
67 |
-
|
68 |
-
It uses a transfer coordinator to propagate an error if it notices
|
69 |
-
that a read is being made while the file is being read from.
|
70 |
-
|
71 |
-
:type fileobj: file-like obj
|
72 |
-
:param fileobj: The file-like object to read from
|
73 |
-
|
74 |
-
:type transfer_coordinator: s3transfer.futures.TransferCoordinator
|
75 |
-
:param transfer_coordinator: The transfer coordinator to use if the
|
76 |
-
reader needs to be interrupted.
|
77 |
-
"""
|
78 |
-
|
79 |
-
def __init__(self, fileobj, transfer_coordinator):
|
80 |
-
self._fileobj = fileobj
|
81 |
-
self._transfer_coordinator = transfer_coordinator
|
82 |
-
|
83 |
-
def read(self, amount=None):
|
84 |
-
# If there is an exception, then raise the exception.
|
85 |
-
# We raise an error instead of returning no bytes because for
|
86 |
-
# requests where the content length and md5 was sent, it will
|
87 |
-
# cause md5 mismatches and retries as there was no indication that
|
88 |
-
# the stream being read from encountered any issues.
|
89 |
-
if self._transfer_coordinator.exception:
|
90 |
-
raise self._transfer_coordinator.exception
|
91 |
-
return self._fileobj.read(amount)
|
92 |
-
|
93 |
-
def seek(self, where, whence=0):
|
94 |
-
self._fileobj.seek(where, whence)
|
95 |
-
|
96 |
-
def tell(self):
|
97 |
-
return self._fileobj.tell()
|
98 |
-
|
99 |
-
def close(self):
|
100 |
-
self._fileobj.close()
|
101 |
-
|
102 |
-
def __enter__(self):
|
103 |
-
return self
|
104 |
-
|
105 |
-
def __exit__(self, *args, **kwargs):
|
106 |
-
self.close()
|
107 |
-
|
108 |
-
|
109 |
-
class UploadInputManager:
|
110 |
-
"""Base manager class for handling various types of files for uploads
|
111 |
-
|
112 |
-
This class is typically used for the UploadSubmissionTask class to help
|
113 |
-
determine the following:
|
114 |
-
|
115 |
-
* How to determine the size of the file
|
116 |
-
* How to determine if a multipart upload is required
|
117 |
-
* How to retrieve the body for a PutObject
|
118 |
-
* How to retrieve the bodies for a set of UploadParts
|
119 |
-
|
120 |
-
The answers/implementations differ for the various types of file inputs
|
121 |
-
that may be accepted. All implementations must subclass and override
|
122 |
-
public methods from this class.
|
123 |
-
"""
|
124 |
-
|
125 |
-
def __init__(self, osutil, transfer_coordinator, bandwidth_limiter=None):
|
126 |
-
self._osutil = osutil
|
127 |
-
self._transfer_coordinator = transfer_coordinator
|
128 |
-
self._bandwidth_limiter = bandwidth_limiter
|
129 |
-
|
130 |
-
@classmethod
|
131 |
-
def is_compatible(cls, upload_source):
|
132 |
-
"""Determines if the source for the upload is compatible with manager
|
133 |
-
|
134 |
-
:param upload_source: The source for which the upload will pull data
|
135 |
-
from.
|
136 |
-
|
137 |
-
:returns: True if the manager can handle the type of source specified
|
138 |
-
otherwise returns False.
|
139 |
-
"""
|
140 |
-
raise NotImplementedError('must implement _is_compatible()')
|
141 |
-
|
142 |
-
def stores_body_in_memory(self, operation_name):
|
143 |
-
"""Whether the body it provides are stored in-memory
|
144 |
-
|
145 |
-
:type operation_name: str
|
146 |
-
:param operation_name: The name of the client operation that the body
|
147 |
-
is being used for. Valid operation_names are ``put_object`` and
|
148 |
-
``upload_part``.
|
149 |
-
|
150 |
-
:rtype: boolean
|
151 |
-
:returns: True if the body returned by the manager will be stored in
|
152 |
-
memory. False if the manager will not directly store the body in
|
153 |
-
memory.
|
154 |
-
"""
|
155 |
-
raise NotImplementedError('must implement store_body_in_memory()')
|
156 |
-
|
157 |
-
def provide_transfer_size(self, transfer_future):
|
158 |
-
"""Provides the transfer size of an upload
|
159 |
-
|
160 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
161 |
-
:param transfer_future: The future associated with upload request
|
162 |
-
"""
|
163 |
-
raise NotImplementedError('must implement provide_transfer_size()')
|
164 |
-
|
165 |
-
def requires_multipart_upload(self, transfer_future, config):
|
166 |
-
"""Determines where a multipart upload is required
|
167 |
-
|
168 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
169 |
-
:param transfer_future: The future associated with upload request
|
170 |
-
|
171 |
-
:type config: s3transfer.manager.TransferConfig
|
172 |
-
:param config: The config associated to the transfer manager
|
173 |
-
|
174 |
-
:rtype: boolean
|
175 |
-
:returns: True, if the upload should be multipart based on
|
176 |
-
configuration and size. False, otherwise.
|
177 |
-
"""
|
178 |
-
raise NotImplementedError('must implement requires_multipart_upload()')
|
179 |
-
|
180 |
-
def get_put_object_body(self, transfer_future):
|
181 |
-
"""Returns the body to use for PutObject
|
182 |
-
|
183 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
184 |
-
:param transfer_future: The future associated with upload request
|
185 |
-
|
186 |
-
:type config: s3transfer.manager.TransferConfig
|
187 |
-
:param config: The config associated to the transfer manager
|
188 |
-
|
189 |
-
:rtype: s3transfer.utils.ReadFileChunk
|
190 |
-
:returns: A ReadFileChunk including all progress callbacks
|
191 |
-
associated with the transfer future.
|
192 |
-
"""
|
193 |
-
raise NotImplementedError('must implement get_put_object_body()')
|
194 |
-
|
195 |
-
def yield_upload_part_bodies(self, transfer_future, chunksize):
|
196 |
-
"""Yields the part number and body to use for each UploadPart
|
197 |
-
|
198 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
199 |
-
:param transfer_future: The future associated with upload request
|
200 |
-
|
201 |
-
:type chunksize: int
|
202 |
-
:param chunksize: The chunksize to use for this upload.
|
203 |
-
|
204 |
-
:rtype: int, s3transfer.utils.ReadFileChunk
|
205 |
-
:returns: Yields the part number and the ReadFileChunk including all
|
206 |
-
progress callbacks associated with the transfer future for that
|
207 |
-
specific yielded part.
|
208 |
-
"""
|
209 |
-
raise NotImplementedError('must implement yield_upload_part_bodies()')
|
210 |
-
|
211 |
-
def _wrap_fileobj(self, fileobj):
|
212 |
-
fileobj = InterruptReader(fileobj, self._transfer_coordinator)
|
213 |
-
if self._bandwidth_limiter:
|
214 |
-
fileobj = self._bandwidth_limiter.get_bandwith_limited_stream(
|
215 |
-
fileobj, self._transfer_coordinator, enabled=False
|
216 |
-
)
|
217 |
-
return fileobj
|
218 |
-
|
219 |
-
def _get_progress_callbacks(self, transfer_future):
|
220 |
-
callbacks = get_callbacks(transfer_future, 'progress')
|
221 |
-
# We only want to be wrapping the callbacks if there are callbacks to
|
222 |
-
# invoke because we do not want to be doing any unnecessary work if
|
223 |
-
# there are no callbacks to invoke.
|
224 |
-
if callbacks:
|
225 |
-
return [AggregatedProgressCallback(callbacks)]
|
226 |
-
return []
|
227 |
-
|
228 |
-
def _get_close_callbacks(self, aggregated_progress_callbacks):
|
229 |
-
return [callback.flush for callback in aggregated_progress_callbacks]
|
230 |
-
|
231 |
-
|
232 |
-
class UploadFilenameInputManager(UploadInputManager):
|
233 |
-
"""Upload utility for filenames"""
|
234 |
-
|
235 |
-
@classmethod
|
236 |
-
def is_compatible(cls, upload_source):
|
237 |
-
return isinstance(upload_source, str)
|
238 |
-
|
239 |
-
def stores_body_in_memory(self, operation_name):
|
240 |
-
return False
|
241 |
-
|
242 |
-
def provide_transfer_size(self, transfer_future):
|
243 |
-
transfer_future.meta.provide_transfer_size(
|
244 |
-
self._osutil.get_file_size(transfer_future.meta.call_args.fileobj)
|
245 |
-
)
|
246 |
-
|
247 |
-
def requires_multipart_upload(self, transfer_future, config):
|
248 |
-
return transfer_future.meta.size >= config.multipart_threshold
|
249 |
-
|
250 |
-
def get_put_object_body(self, transfer_future):
|
251 |
-
# Get a file-like object for the given input
|
252 |
-
fileobj, full_size = self._get_put_object_fileobj_with_full_size(
|
253 |
-
transfer_future
|
254 |
-
)
|
255 |
-
|
256 |
-
# Wrap fileobj with interrupt reader that will quickly cancel
|
257 |
-
# uploads if needed instead of having to wait for the socket
|
258 |
-
# to completely read all of the data.
|
259 |
-
fileobj = self._wrap_fileobj(fileobj)
|
260 |
-
|
261 |
-
callbacks = self._get_progress_callbacks(transfer_future)
|
262 |
-
close_callbacks = self._get_close_callbacks(callbacks)
|
263 |
-
size = transfer_future.meta.size
|
264 |
-
# Return the file-like object wrapped into a ReadFileChunk to get
|
265 |
-
# progress.
|
266 |
-
return self._osutil.open_file_chunk_reader_from_fileobj(
|
267 |
-
fileobj=fileobj,
|
268 |
-
chunk_size=size,
|
269 |
-
full_file_size=full_size,
|
270 |
-
callbacks=callbacks,
|
271 |
-
close_callbacks=close_callbacks,
|
272 |
-
)
|
273 |
-
|
274 |
-
def yield_upload_part_bodies(self, transfer_future, chunksize):
|
275 |
-
full_file_size = transfer_future.meta.size
|
276 |
-
num_parts = self._get_num_parts(transfer_future, chunksize)
|
277 |
-
for part_number in range(1, num_parts + 1):
|
278 |
-
callbacks = self._get_progress_callbacks(transfer_future)
|
279 |
-
close_callbacks = self._get_close_callbacks(callbacks)
|
280 |
-
start_byte = chunksize * (part_number - 1)
|
281 |
-
# Get a file-like object for that part and the size of the full
|
282 |
-
# file size for the associated file-like object for that part.
|
283 |
-
fileobj, full_size = self._get_upload_part_fileobj_with_full_size(
|
284 |
-
transfer_future.meta.call_args.fileobj,
|
285 |
-
start_byte=start_byte,
|
286 |
-
part_size=chunksize,
|
287 |
-
full_file_size=full_file_size,
|
288 |
-
)
|
289 |
-
|
290 |
-
# Wrap fileobj with interrupt reader that will quickly cancel
|
291 |
-
# uploads if needed instead of having to wait for the socket
|
292 |
-
# to completely read all of the data.
|
293 |
-
fileobj = self._wrap_fileobj(fileobj)
|
294 |
-
|
295 |
-
# Wrap the file-like object into a ReadFileChunk to get progress.
|
296 |
-
read_file_chunk = self._osutil.open_file_chunk_reader_from_fileobj(
|
297 |
-
fileobj=fileobj,
|
298 |
-
chunk_size=chunksize,
|
299 |
-
full_file_size=full_size,
|
300 |
-
callbacks=callbacks,
|
301 |
-
close_callbacks=close_callbacks,
|
302 |
-
)
|
303 |
-
yield part_number, read_file_chunk
|
304 |
-
|
305 |
-
def _get_deferred_open_file(self, fileobj, start_byte):
|
306 |
-
fileobj = DeferredOpenFile(
|
307 |
-
fileobj, start_byte, open_function=self._osutil.open
|
308 |
-
)
|
309 |
-
return fileobj
|
310 |
-
|
311 |
-
def _get_put_object_fileobj_with_full_size(self, transfer_future):
|
312 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
313 |
-
size = transfer_future.meta.size
|
314 |
-
return self._get_deferred_open_file(fileobj, 0), size
|
315 |
-
|
316 |
-
def _get_upload_part_fileobj_with_full_size(self, fileobj, **kwargs):
|
317 |
-
start_byte = kwargs['start_byte']
|
318 |
-
full_size = kwargs['full_file_size']
|
319 |
-
return self._get_deferred_open_file(fileobj, start_byte), full_size
|
320 |
-
|
321 |
-
def _get_num_parts(self, transfer_future, part_size):
|
322 |
-
return int(math.ceil(transfer_future.meta.size / float(part_size)))
|
323 |
-
|
324 |
-
|
325 |
-
class UploadSeekableInputManager(UploadFilenameInputManager):
|
326 |
-
"""Upload utility for an open file object"""
|
327 |
-
|
328 |
-
@classmethod
|
329 |
-
def is_compatible(cls, upload_source):
|
330 |
-
return readable(upload_source) and seekable(upload_source)
|
331 |
-
|
332 |
-
def stores_body_in_memory(self, operation_name):
|
333 |
-
if operation_name == 'put_object':
|
334 |
-
return False
|
335 |
-
else:
|
336 |
-
return True
|
337 |
-
|
338 |
-
def provide_transfer_size(self, transfer_future):
|
339 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
340 |
-
# To determine size, first determine the starting position
|
341 |
-
# Seek to the end and then find the difference in the length
|
342 |
-
# between the end and start positions.
|
343 |
-
start_position = fileobj.tell()
|
344 |
-
fileobj.seek(0, 2)
|
345 |
-
end_position = fileobj.tell()
|
346 |
-
fileobj.seek(start_position)
|
347 |
-
transfer_future.meta.provide_transfer_size(
|
348 |
-
end_position - start_position
|
349 |
-
)
|
350 |
-
|
351 |
-
def _get_upload_part_fileobj_with_full_size(self, fileobj, **kwargs):
|
352 |
-
# Note: It is unfortunate that in order to do a multithreaded
|
353 |
-
# multipart upload we cannot simply copy the filelike object
|
354 |
-
# since there is not really a mechanism in python (i.e. os.dup
|
355 |
-
# points to the same OS filehandle which causes concurrency
|
356 |
-
# issues). So instead we need to read from the fileobj and
|
357 |
-
# chunk the data out to separate file-like objects in memory.
|
358 |
-
data = fileobj.read(kwargs['part_size'])
|
359 |
-
# We return the length of the data instead of the full_file_size
|
360 |
-
# because we partitioned the data into separate BytesIO objects
|
361 |
-
# meaning the BytesIO object has no knowledge of its start position
|
362 |
-
# relative the input source nor access to the rest of the input
|
363 |
-
# source. So we must treat it as its own standalone file.
|
364 |
-
return BytesIO(data), len(data)
|
365 |
-
|
366 |
-
def _get_put_object_fileobj_with_full_size(self, transfer_future):
|
367 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
368 |
-
# The current position needs to be taken into account when retrieving
|
369 |
-
# the full size of the file.
|
370 |
-
size = fileobj.tell() + transfer_future.meta.size
|
371 |
-
return fileobj, size
|
372 |
-
|
373 |
-
|
374 |
-
class UploadNonSeekableInputManager(UploadInputManager):
|
375 |
-
"""Upload utility for a file-like object that cannot seek."""
|
376 |
-
|
377 |
-
def __init__(self, osutil, transfer_coordinator, bandwidth_limiter=None):
|
378 |
-
super().__init__(osutil, transfer_coordinator, bandwidth_limiter)
|
379 |
-
self._initial_data = b''
|
380 |
-
|
381 |
-
@classmethod
|
382 |
-
def is_compatible(cls, upload_source):
|
383 |
-
return readable(upload_source)
|
384 |
-
|
385 |
-
def stores_body_in_memory(self, operation_name):
|
386 |
-
return True
|
387 |
-
|
388 |
-
def provide_transfer_size(self, transfer_future):
|
389 |
-
# No-op because there is no way to do this short of reading the entire
|
390 |
-
# body into memory.
|
391 |
-
return
|
392 |
-
|
393 |
-
def requires_multipart_upload(self, transfer_future, config):
|
394 |
-
# If the user has set the size, we can use that.
|
395 |
-
if transfer_future.meta.size is not None:
|
396 |
-
return transfer_future.meta.size >= config.multipart_threshold
|
397 |
-
|
398 |
-
# This is tricky to determine in this case because we can't know how
|
399 |
-
# large the input is. So to figure it out, we read data into memory
|
400 |
-
# up until the threshold and compare how much data was actually read
|
401 |
-
# against the threshold.
|
402 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
403 |
-
threshold = config.multipart_threshold
|
404 |
-
self._initial_data = self._read(fileobj, threshold, False)
|
405 |
-
if len(self._initial_data) < threshold:
|
406 |
-
return False
|
407 |
-
else:
|
408 |
-
return True
|
409 |
-
|
410 |
-
def get_put_object_body(self, transfer_future):
|
411 |
-
callbacks = self._get_progress_callbacks(transfer_future)
|
412 |
-
close_callbacks = self._get_close_callbacks(callbacks)
|
413 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
414 |
-
|
415 |
-
body = self._wrap_data(
|
416 |
-
self._initial_data + fileobj.read(), callbacks, close_callbacks
|
417 |
-
)
|
418 |
-
|
419 |
-
# Zero out the stored data so we don't have additional copies
|
420 |
-
# hanging around in memory.
|
421 |
-
self._initial_data = None
|
422 |
-
return body
|
423 |
-
|
424 |
-
def yield_upload_part_bodies(self, transfer_future, chunksize):
|
425 |
-
file_object = transfer_future.meta.call_args.fileobj
|
426 |
-
part_number = 0
|
427 |
-
|
428 |
-
# Continue reading parts from the file-like object until it is empty.
|
429 |
-
while True:
|
430 |
-
callbacks = self._get_progress_callbacks(transfer_future)
|
431 |
-
close_callbacks = self._get_close_callbacks(callbacks)
|
432 |
-
part_number += 1
|
433 |
-
part_content = self._read(file_object, chunksize)
|
434 |
-
if not part_content:
|
435 |
-
break
|
436 |
-
part_object = self._wrap_data(
|
437 |
-
part_content, callbacks, close_callbacks
|
438 |
-
)
|
439 |
-
|
440 |
-
# Zero out part_content to avoid hanging on to additional data.
|
441 |
-
part_content = None
|
442 |
-
yield part_number, part_object
|
443 |
-
|
444 |
-
def _read(self, fileobj, amount, truncate=True):
|
445 |
-
"""
|
446 |
-
Reads a specific amount of data from a stream and returns it. If there
|
447 |
-
is any data in initial_data, that will be popped out first.
|
448 |
-
|
449 |
-
:type fileobj: A file-like object that implements read
|
450 |
-
:param fileobj: The stream to read from.
|
451 |
-
|
452 |
-
:type amount: int
|
453 |
-
:param amount: The number of bytes to read from the stream.
|
454 |
-
|
455 |
-
:type truncate: bool
|
456 |
-
:param truncate: Whether or not to truncate initial_data after
|
457 |
-
reading from it.
|
458 |
-
|
459 |
-
:return: Generator which generates part bodies from the initial data.
|
460 |
-
"""
|
461 |
-
# If the the initial data is empty, we simply read from the fileobj
|
462 |
-
if len(self._initial_data) == 0:
|
463 |
-
return fileobj.read(amount)
|
464 |
-
|
465 |
-
# If the requested number of bytes is less than the amount of
|
466 |
-
# initial data, pull entirely from initial data.
|
467 |
-
if amount <= len(self._initial_data):
|
468 |
-
data = self._initial_data[:amount]
|
469 |
-
# Truncate initial data so we don't hang onto the data longer
|
470 |
-
# than we need.
|
471 |
-
if truncate:
|
472 |
-
self._initial_data = self._initial_data[amount:]
|
473 |
-
return data
|
474 |
-
|
475 |
-
# At this point there is some initial data left, but not enough to
|
476 |
-
# satisfy the number of bytes requested. Pull out the remaining
|
477 |
-
# initial data and read the rest from the fileobj.
|
478 |
-
amount_to_read = amount - len(self._initial_data)
|
479 |
-
data = self._initial_data + fileobj.read(amount_to_read)
|
480 |
-
|
481 |
-
# Zero out initial data so we don't hang onto the data any more.
|
482 |
-
if truncate:
|
483 |
-
self._initial_data = b''
|
484 |
-
return data
|
485 |
-
|
486 |
-
def _wrap_data(self, data, callbacks, close_callbacks):
|
487 |
-
"""
|
488 |
-
Wraps data with the interrupt reader and the file chunk reader.
|
489 |
-
|
490 |
-
:type data: bytes
|
491 |
-
:param data: The data to wrap.
|
492 |
-
|
493 |
-
:type callbacks: list
|
494 |
-
:param callbacks: The callbacks associated with the transfer future.
|
495 |
-
|
496 |
-
:type close_callbacks: list
|
497 |
-
:param close_callbacks: The callbacks to be called when closing the
|
498 |
-
wrapper for the data.
|
499 |
-
|
500 |
-
:return: Fully wrapped data.
|
501 |
-
"""
|
502 |
-
fileobj = self._wrap_fileobj(BytesIO(data))
|
503 |
-
return self._osutil.open_file_chunk_reader_from_fileobj(
|
504 |
-
fileobj=fileobj,
|
505 |
-
chunk_size=len(data),
|
506 |
-
full_file_size=len(data),
|
507 |
-
callbacks=callbacks,
|
508 |
-
close_callbacks=close_callbacks,
|
509 |
-
)
|
510 |
-
|
511 |
-
|
512 |
-
class UploadSubmissionTask(SubmissionTask):
|
513 |
-
"""Task for submitting tasks to execute an upload"""
|
514 |
-
|
515 |
-
UPLOAD_PART_ARGS = [
|
516 |
-
'ChecksumAlgorithm',
|
517 |
-
'SSECustomerKey',
|
518 |
-
'SSECustomerAlgorithm',
|
519 |
-
'SSECustomerKeyMD5',
|
520 |
-
'RequestPayer',
|
521 |
-
'ExpectedBucketOwner',
|
522 |
-
]
|
523 |
-
|
524 |
-
COMPLETE_MULTIPART_ARGS = ['RequestPayer', 'ExpectedBucketOwner']
|
525 |
-
|
526 |
-
def _get_upload_input_manager_cls(self, transfer_future):
|
527 |
-
"""Retrieves a class for managing input for an upload based on file type
|
528 |
-
|
529 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
530 |
-
:param transfer_future: The transfer future for the request
|
531 |
-
|
532 |
-
:rtype: class of UploadInputManager
|
533 |
-
:returns: The appropriate class to use for managing a specific type of
|
534 |
-
input for uploads.
|
535 |
-
"""
|
536 |
-
upload_manager_resolver_chain = [
|
537 |
-
UploadFilenameInputManager,
|
538 |
-
UploadSeekableInputManager,
|
539 |
-
UploadNonSeekableInputManager,
|
540 |
-
]
|
541 |
-
|
542 |
-
fileobj = transfer_future.meta.call_args.fileobj
|
543 |
-
for upload_manager_cls in upload_manager_resolver_chain:
|
544 |
-
if upload_manager_cls.is_compatible(fileobj):
|
545 |
-
return upload_manager_cls
|
546 |
-
raise RuntimeError(
|
547 |
-
'Input {} of type: {} is not supported.'.format(
|
548 |
-
fileobj, type(fileobj)
|
549 |
-
)
|
550 |
-
)
|
551 |
-
|
552 |
-
def _submit(
|
553 |
-
self,
|
554 |
-
client,
|
555 |
-
config,
|
556 |
-
osutil,
|
557 |
-
request_executor,
|
558 |
-
transfer_future,
|
559 |
-
bandwidth_limiter=None,
|
560 |
-
):
|
561 |
-
"""
|
562 |
-
:param client: The client associated with the transfer manager
|
563 |
-
|
564 |
-
:type config: s3transfer.manager.TransferConfig
|
565 |
-
:param config: The transfer config associated with the transfer
|
566 |
-
manager
|
567 |
-
|
568 |
-
:type osutil: s3transfer.utils.OSUtil
|
569 |
-
:param osutil: The os utility associated to the transfer manager
|
570 |
-
|
571 |
-
:type request_executor: s3transfer.futures.BoundedExecutor
|
572 |
-
:param request_executor: The request executor associated with the
|
573 |
-
transfer manager
|
574 |
-
|
575 |
-
:type transfer_future: s3transfer.futures.TransferFuture
|
576 |
-
:param transfer_future: The transfer future associated with the
|
577 |
-
transfer request that tasks are being submitted for
|
578 |
-
"""
|
579 |
-
upload_input_manager = self._get_upload_input_manager_cls(
|
580 |
-
transfer_future
|
581 |
-
)(osutil, self._transfer_coordinator, bandwidth_limiter)
|
582 |
-
|
583 |
-
# Determine the size if it was not provided
|
584 |
-
if transfer_future.meta.size is None:
|
585 |
-
upload_input_manager.provide_transfer_size(transfer_future)
|
586 |
-
|
587 |
-
# Do a multipart upload if needed, otherwise do a regular put object.
|
588 |
-
if not upload_input_manager.requires_multipart_upload(
|
589 |
-
transfer_future, config
|
590 |
-
):
|
591 |
-
self._submit_upload_request(
|
592 |
-
client,
|
593 |
-
config,
|
594 |
-
osutil,
|
595 |
-
request_executor,
|
596 |
-
transfer_future,
|
597 |
-
upload_input_manager,
|
598 |
-
)
|
599 |
-
else:
|
600 |
-
self._submit_multipart_request(
|
601 |
-
client,
|
602 |
-
config,
|
603 |
-
osutil,
|
604 |
-
request_executor,
|
605 |
-
transfer_future,
|
606 |
-
upload_input_manager,
|
607 |
-
)
|
608 |
-
|
609 |
-
def _submit_upload_request(
|
610 |
-
self,
|
611 |
-
client,
|
612 |
-
config,
|
613 |
-
osutil,
|
614 |
-
request_executor,
|
615 |
-
transfer_future,
|
616 |
-
upload_input_manager,
|
617 |
-
):
|
618 |
-
call_args = transfer_future.meta.call_args
|
619 |
-
|
620 |
-
# Get any tags that need to be associated to the put object task
|
621 |
-
put_object_tag = self._get_upload_task_tag(
|
622 |
-
upload_input_manager, 'put_object'
|
623 |
-
)
|
624 |
-
|
625 |
-
# Submit the request of a single upload.
|
626 |
-
self._transfer_coordinator.submit(
|
627 |
-
request_executor,
|
628 |
-
PutObjectTask(
|
629 |
-
transfer_coordinator=self._transfer_coordinator,
|
630 |
-
main_kwargs={
|
631 |
-
'client': client,
|
632 |
-
'fileobj': upload_input_manager.get_put_object_body(
|
633 |
-
transfer_future
|
634 |
-
),
|
635 |
-
'bucket': call_args.bucket,
|
636 |
-
'key': call_args.key,
|
637 |
-
'extra_args': call_args.extra_args,
|
638 |
-
},
|
639 |
-
is_final=True,
|
640 |
-
),
|
641 |
-
tag=put_object_tag,
|
642 |
-
)
|
643 |
-
|
644 |
-
def _submit_multipart_request(
|
645 |
-
self,
|
646 |
-
client,
|
647 |
-
config,
|
648 |
-
osutil,
|
649 |
-
request_executor,
|
650 |
-
transfer_future,
|
651 |
-
upload_input_manager,
|
652 |
-
):
|
653 |
-
call_args = transfer_future.meta.call_args
|
654 |
-
|
655 |
-
# Submit the request to create a multipart upload.
|
656 |
-
create_multipart_future = self._transfer_coordinator.submit(
|
657 |
-
request_executor,
|
658 |
-
CreateMultipartUploadTask(
|
659 |
-
transfer_coordinator=self._transfer_coordinator,
|
660 |
-
main_kwargs={
|
661 |
-
'client': client,
|
662 |
-
'bucket': call_args.bucket,
|
663 |
-
'key': call_args.key,
|
664 |
-
'extra_args': call_args.extra_args,
|
665 |
-
},
|
666 |
-
),
|
667 |
-
)
|
668 |
-
|
669 |
-
# Submit requests to upload the parts of the file.
|
670 |
-
part_futures = []
|
671 |
-
extra_part_args = self._extra_upload_part_args(call_args.extra_args)
|
672 |
-
|
673 |
-
# Get any tags that need to be associated to the submitted task
|
674 |
-
# for upload the data
|
675 |
-
upload_part_tag = self._get_upload_task_tag(
|
676 |
-
upload_input_manager, 'upload_part'
|
677 |
-
)
|
678 |
-
|
679 |
-
size = transfer_future.meta.size
|
680 |
-
adjuster = ChunksizeAdjuster()
|
681 |
-
chunksize = adjuster.adjust_chunksize(config.multipart_chunksize, size)
|
682 |
-
part_iterator = upload_input_manager.yield_upload_part_bodies(
|
683 |
-
transfer_future, chunksize
|
684 |
-
)
|
685 |
-
|
686 |
-
for part_number, fileobj in part_iterator:
|
687 |
-
part_futures.append(
|
688 |
-
self._transfer_coordinator.submit(
|
689 |
-
request_executor,
|
690 |
-
UploadPartTask(
|
691 |
-
transfer_coordinator=self._transfer_coordinator,
|
692 |
-
main_kwargs={
|
693 |
-
'client': client,
|
694 |
-
'fileobj': fileobj,
|
695 |
-
'bucket': call_args.bucket,
|
696 |
-
'key': call_args.key,
|
697 |
-
'part_number': part_number,
|
698 |
-
'extra_args': extra_part_args,
|
699 |
-
},
|
700 |
-
pending_main_kwargs={
|
701 |
-
'upload_id': create_multipart_future
|
702 |
-
},
|
703 |
-
),
|
704 |
-
tag=upload_part_tag,
|
705 |
-
)
|
706 |
-
)
|
707 |
-
|
708 |
-
complete_multipart_extra_args = self._extra_complete_multipart_args(
|
709 |
-
call_args.extra_args
|
710 |
-
)
|
711 |
-
# Submit the request to complete the multipart upload.
|
712 |
-
self._transfer_coordinator.submit(
|
713 |
-
request_executor,
|
714 |
-
CompleteMultipartUploadTask(
|
715 |
-
transfer_coordinator=self._transfer_coordinator,
|
716 |
-
main_kwargs={
|
717 |
-
'client': client,
|
718 |
-
'bucket': call_args.bucket,
|
719 |
-
'key': call_args.key,
|
720 |
-
'extra_args': complete_multipart_extra_args,
|
721 |
-
},
|
722 |
-
pending_main_kwargs={
|
723 |
-
'upload_id': create_multipart_future,
|
724 |
-
'parts': part_futures,
|
725 |
-
},
|
726 |
-
is_final=True,
|
727 |
-
),
|
728 |
-
)
|
729 |
-
|
730 |
-
def _extra_upload_part_args(self, extra_args):
|
731 |
-
# Only the args in UPLOAD_PART_ARGS actually need to be passed
|
732 |
-
# onto the upload_part calls.
|
733 |
-
return get_filtered_dict(extra_args, self.UPLOAD_PART_ARGS)
|
734 |
-
|
735 |
-
def _extra_complete_multipart_args(self, extra_args):
|
736 |
-
return get_filtered_dict(extra_args, self.COMPLETE_MULTIPART_ARGS)
|
737 |
-
|
738 |
-
def _get_upload_task_tag(self, upload_input_manager, operation_name):
|
739 |
-
tag = None
|
740 |
-
if upload_input_manager.stores_body_in_memory(operation_name):
|
741 |
-
tag = IN_MEMORY_UPLOAD_TAG
|
742 |
-
return tag
|
743 |
-
|
744 |
-
|
745 |
-
class PutObjectTask(Task):
|
746 |
-
"""Task to do a nonmultipart upload"""
|
747 |
-
|
748 |
-
def _main(self, client, fileobj, bucket, key, extra_args):
|
749 |
-
"""
|
750 |
-
:param client: The client to use when calling PutObject
|
751 |
-
:param fileobj: The file to upload.
|
752 |
-
:param bucket: The name of the bucket to upload to
|
753 |
-
:param key: The name of the key to upload to
|
754 |
-
:param extra_args: A dictionary of any extra arguments that may be
|
755 |
-
used in the upload.
|
756 |
-
"""
|
757 |
-
with fileobj as body:
|
758 |
-
client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
|
759 |
-
|
760 |
-
|
761 |
-
class UploadPartTask(Task):
|
762 |
-
"""Task to upload a part in a multipart upload"""
|
763 |
-
|
764 |
-
def _main(
|
765 |
-
self, client, fileobj, bucket, key, upload_id, part_number, extra_args
|
766 |
-
):
|
767 |
-
"""
|
768 |
-
:param client: The client to use when calling PutObject
|
769 |
-
:param fileobj: The file to upload.
|
770 |
-
:param bucket: The name of the bucket to upload to
|
771 |
-
:param key: The name of the key to upload to
|
772 |
-
:param upload_id: The id of the upload
|
773 |
-
:param part_number: The number representing the part of the multipart
|
774 |
-
upload
|
775 |
-
:param extra_args: A dictionary of any extra arguments that may be
|
776 |
-
used in the upload.
|
777 |
-
|
778 |
-
:rtype: dict
|
779 |
-
:returns: A dictionary representing a part::
|
780 |
-
|
781 |
-
{'Etag': etag_value, 'PartNumber': part_number}
|
782 |
-
|
783 |
-
This value can be appended to a list to be used to complete
|
784 |
-
the multipart upload.
|
785 |
-
"""
|
786 |
-
with fileobj as body:
|
787 |
-
response = client.upload_part(
|
788 |
-
Bucket=bucket,
|
789 |
-
Key=key,
|
790 |
-
UploadId=upload_id,
|
791 |
-
PartNumber=part_number,
|
792 |
-
Body=body,
|
793 |
-
**extra_args,
|
794 |
-
)
|
795 |
-
etag = response['ETag']
|
796 |
-
part_metadata = {'ETag': etag, 'PartNumber': part_number}
|
797 |
-
if 'ChecksumAlgorithm' in extra_args:
|
798 |
-
algorithm_name = extra_args['ChecksumAlgorithm'].upper()
|
799 |
-
checksum_member = f'Checksum{algorithm_name}'
|
800 |
-
if checksum_member in response:
|
801 |
-
part_metadata[checksum_member] = response[checksum_member]
|
802 |
-
return part_metadata
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CForGETaass/vits-uma-genshin-honkai/transforms.py
DELETED
@@ -1,193 +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(inputs,
|
13 |
-
unnormalized_widths,
|
14 |
-
unnormalized_heights,
|
15 |
-
unnormalized_derivatives,
|
16 |
-
inverse=False,
|
17 |
-
tails=None,
|
18 |
-
tail_bound=1.,
|
19 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
20 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
21 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE):
|
22 |
-
|
23 |
-
if tails is None:
|
24 |
-
spline_fn = rational_quadratic_spline
|
25 |
-
spline_kwargs = {}
|
26 |
-
else:
|
27 |
-
spline_fn = unconstrained_rational_quadratic_spline
|
28 |
-
spline_kwargs = {
|
29 |
-
'tails': tails,
|
30 |
-
'tail_bound': tail_bound
|
31 |
-
}
|
32 |
-
|
33 |
-
outputs, logabsdet = spline_fn(
|
34 |
-
inputs=inputs,
|
35 |
-
unnormalized_widths=unnormalized_widths,
|
36 |
-
unnormalized_heights=unnormalized_heights,
|
37 |
-
unnormalized_derivatives=unnormalized_derivatives,
|
38 |
-
inverse=inverse,
|
39 |
-
min_bin_width=min_bin_width,
|
40 |
-
min_bin_height=min_bin_height,
|
41 |
-
min_derivative=min_derivative,
|
42 |
-
**spline_kwargs
|
43 |
-
)
|
44 |
-
return outputs, logabsdet
|
45 |
-
|
46 |
-
|
47 |
-
def searchsorted(bin_locations, inputs, eps=1e-6):
|
48 |
-
bin_locations[..., -1] += eps
|
49 |
-
return torch.sum(
|
50 |
-
inputs[..., None] >= bin_locations,
|
51 |
-
dim=-1
|
52 |
-
) - 1
|
53 |
-
|
54 |
-
|
55 |
-
def unconstrained_rational_quadratic_spline(inputs,
|
56 |
-
unnormalized_widths,
|
57 |
-
unnormalized_heights,
|
58 |
-
unnormalized_derivatives,
|
59 |
-
inverse=False,
|
60 |
-
tails='linear',
|
61 |
-
tail_bound=1.,
|
62 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
63 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
64 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE):
|
65 |
-
inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound)
|
66 |
-
outside_interval_mask = ~inside_interval_mask
|
67 |
-
|
68 |
-
outputs = torch.zeros_like(inputs)
|
69 |
-
logabsdet = torch.zeros_like(inputs)
|
70 |
-
|
71 |
-
if tails == 'linear':
|
72 |
-
unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1))
|
73 |
-
constant = np.log(np.exp(1 - min_derivative) - 1)
|
74 |
-
unnormalized_derivatives[..., 0] = constant
|
75 |
-
unnormalized_derivatives[..., -1] = constant
|
76 |
-
|
77 |
-
outputs[outside_interval_mask] = inputs[outside_interval_mask]
|
78 |
-
logabsdet[outside_interval_mask] = 0
|
79 |
-
else:
|
80 |
-
raise RuntimeError('{} tails are not implemented.'.format(tails))
|
81 |
-
|
82 |
-
outputs[inside_interval_mask], logabsdet[inside_interval_mask] = 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, right=tail_bound, bottom=-tail_bound, top=tail_bound,
|
89 |
-
min_bin_width=min_bin_width,
|
90 |
-
min_bin_height=min_bin_height,
|
91 |
-
min_derivative=min_derivative
|
92 |
-
)
|
93 |
-
|
94 |
-
return outputs, logabsdet
|
95 |
-
|
96 |
-
def rational_quadratic_spline(inputs,
|
97 |
-
unnormalized_widths,
|
98 |
-
unnormalized_heights,
|
99 |
-
unnormalized_derivatives,
|
100 |
-
inverse=False,
|
101 |
-
left=0., right=1., bottom=0., top=1.,
|
102 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
103 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
104 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE):
|
105 |
-
if torch.min(inputs) < left or torch.max(inputs) > right:
|
106 |
-
raise ValueError('Input to a transform is not within its domain')
|
107 |
-
|
108 |
-
num_bins = unnormalized_widths.shape[-1]
|
109 |
-
|
110 |
-
if min_bin_width * num_bins > 1.0:
|
111 |
-
raise ValueError('Minimal bin width too large for the number of bins')
|
112 |
-
if min_bin_height * num_bins > 1.0:
|
113 |
-
raise ValueError('Minimal bin height too large for the number of bins')
|
114 |
-
|
115 |
-
widths = F.softmax(unnormalized_widths, dim=-1)
|
116 |
-
widths = min_bin_width + (1 - min_bin_width * num_bins) * widths
|
117 |
-
cumwidths = torch.cumsum(widths, dim=-1)
|
118 |
-
cumwidths = F.pad(cumwidths, pad=(1, 0), mode='constant', value=0.0)
|
119 |
-
cumwidths = (right - left) * cumwidths + left
|
120 |
-
cumwidths[..., 0] = left
|
121 |
-
cumwidths[..., -1] = right
|
122 |
-
widths = cumwidths[..., 1:] - cumwidths[..., :-1]
|
123 |
-
|
124 |
-
derivatives = min_derivative + F.softplus(unnormalized_derivatives)
|
125 |
-
|
126 |
-
heights = F.softmax(unnormalized_heights, dim=-1)
|
127 |
-
heights = min_bin_height + (1 - min_bin_height * num_bins) * heights
|
128 |
-
cumheights = torch.cumsum(heights, dim=-1)
|
129 |
-
cumheights = F.pad(cumheights, pad=(1, 0), mode='constant', value=0.0)
|
130 |
-
cumheights = (top - bottom) * cumheights + bottom
|
131 |
-
cumheights[..., 0] = bottom
|
132 |
-
cumheights[..., -1] = top
|
133 |
-
heights = cumheights[..., 1:] - cumheights[..., :-1]
|
134 |
-
|
135 |
-
if inverse:
|
136 |
-
bin_idx = searchsorted(cumheights, inputs)[..., None]
|
137 |
-
else:
|
138 |
-
bin_idx = searchsorted(cumwidths, inputs)[..., None]
|
139 |
-
|
140 |
-
input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0]
|
141 |
-
input_bin_widths = widths.gather(-1, bin_idx)[..., 0]
|
142 |
-
|
143 |
-
input_cumheights = cumheights.gather(-1, bin_idx)[..., 0]
|
144 |
-
delta = heights / widths
|
145 |
-
input_delta = delta.gather(-1, bin_idx)[..., 0]
|
146 |
-
|
147 |
-
input_derivatives = derivatives.gather(-1, bin_idx)[..., 0]
|
148 |
-
input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0]
|
149 |
-
|
150 |
-
input_heights = heights.gather(-1, bin_idx)[..., 0]
|
151 |
-
|
152 |
-
if inverse:
|
153 |
-
a = (((inputs - input_cumheights) * (input_derivatives
|
154 |
-
+ input_derivatives_plus_one
|
155 |
-
- 2 * input_delta)
|
156 |
-
+ input_heights * (input_delta - input_derivatives)))
|
157 |
-
b = (input_heights * input_derivatives
|
158 |
-
- (inputs - input_cumheights) * (input_derivatives
|
159 |
-
+ input_derivatives_plus_one
|
160 |
-
- 2 * input_delta))
|
161 |
-
c = - input_delta * (inputs - input_cumheights)
|
162 |
-
|
163 |
-
discriminant = b.pow(2) - 4 * a * c
|
164 |
-
assert (discriminant >= 0).all()
|
165 |
-
|
166 |
-
root = (2 * c) / (-b - torch.sqrt(discriminant))
|
167 |
-
outputs = root * input_bin_widths + input_cumwidths
|
168 |
-
|
169 |
-
theta_one_minus_theta = root * (1 - root)
|
170 |
-
denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
171 |
-
* theta_one_minus_theta)
|
172 |
-
derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * root.pow(2)
|
173 |
-
+ 2 * input_delta * theta_one_minus_theta
|
174 |
-
+ input_derivatives * (1 - root).pow(2))
|
175 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
176 |
-
|
177 |
-
return outputs, -logabsdet
|
178 |
-
else:
|
179 |
-
theta = (inputs - input_cumwidths) / input_bin_widths
|
180 |
-
theta_one_minus_theta = theta * (1 - theta)
|
181 |
-
|
182 |
-
numerator = input_heights * (input_delta * theta.pow(2)
|
183 |
-
+ input_derivatives * theta_one_minus_theta)
|
184 |
-
denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
185 |
-
* theta_one_minus_theta)
|
186 |
-
outputs = input_cumheights + numerator / denominator
|
187 |
-
|
188 |
-
derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * theta.pow(2)
|
189 |
-
+ 2 * input_delta * theta_one_minus_theta
|
190 |
-
+ input_derivatives * (1 - theta).pow(2))
|
191 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
192 |
-
|
193 |
-
return outputs, logabsdet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVH-vn1210/make_hair/minigpt4/tasks/base_task.py
DELETED
@@ -1,286 +0,0 @@
|
|
1 |
-
"""
|
2 |
-
Copyright (c) 2022, salesforce.com, inc.
|
3 |
-
All rights reserved.
|
4 |
-
SPDX-License-Identifier: BSD-3-Clause
|
5 |
-
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
6 |
-
"""
|
7 |
-
|
8 |
-
import logging
|
9 |
-
import os
|
10 |
-
|
11 |
-
import torch
|
12 |
-
import torch.distributed as dist
|
13 |
-
from minigpt4.common.dist_utils import get_rank, get_world_size, is_main_process, is_dist_avail_and_initialized
|
14 |
-
from minigpt4.common.logger import MetricLogger, SmoothedValue
|
15 |
-
from minigpt4.common.registry import registry
|
16 |
-
from minigpt4.datasets.data_utils import prepare_sample
|
17 |
-
|
18 |
-
|
19 |
-
class BaseTask:
|
20 |
-
def __init__(self, **kwargs):
|
21 |
-
super().__init__()
|
22 |
-
|
23 |
-
self.inst_id_key = "instance_id"
|
24 |
-
|
25 |
-
@classmethod
|
26 |
-
def setup_task(cls, **kwargs):
|
27 |
-
return cls()
|
28 |
-
|
29 |
-
def build_model(self, cfg):
|
30 |
-
model_config = cfg.model_cfg
|
31 |
-
|
32 |
-
model_cls = registry.get_model_class(model_config.arch)
|
33 |
-
return model_cls.from_config(model_config)
|
34 |
-
|
35 |
-
def build_datasets(self, cfg):
|
36 |
-
"""
|
37 |
-
Build a dictionary of datasets, keyed by split 'train', 'valid', 'test'.
|
38 |
-
Download dataset and annotations automatically if not exist.
|
39 |
-
|
40 |
-
Args:
|
41 |
-
cfg (common.config.Config): _description_
|
42 |
-
|
43 |
-
Returns:
|
44 |
-
dict: Dictionary of torch.utils.data.Dataset objects by split.
|
45 |
-
"""
|
46 |
-
|
47 |
-
datasets = dict()
|
48 |
-
|
49 |
-
datasets_config = cfg.datasets_cfg
|
50 |
-
|
51 |
-
assert len(datasets_config) > 0, "At least one dataset has to be specified."
|
52 |
-
|
53 |
-
for name in datasets_config:
|
54 |
-
dataset_config = datasets_config[name]
|
55 |
-
|
56 |
-
builder = registry.get_builder_class(name)(dataset_config)
|
57 |
-
dataset = builder.build_datasets()
|
58 |
-
|
59 |
-
dataset['train'].name = name
|
60 |
-
if 'sample_ratio' in dataset_config:
|
61 |
-
dataset['train'].sample_ratio = dataset_config.sample_ratio
|
62 |
-
|
63 |
-
datasets[name] = dataset
|
64 |
-
|
65 |
-
return datasets
|
66 |
-
|
67 |
-
def train_step(self, model, samples):
|
68 |
-
loss = model(samples)["loss"]
|
69 |
-
return loss
|
70 |
-
|
71 |
-
def valid_step(self, model, samples):
|
72 |
-
raise NotImplementedError
|
73 |
-
|
74 |
-
def before_evaluation(self, model, dataset, **kwargs):
|
75 |
-
model.before_evaluation(dataset=dataset, task_type=type(self))
|
76 |
-
|
77 |
-
def after_evaluation(self, **kwargs):
|
78 |
-
pass
|
79 |
-
|
80 |
-
def inference_step(self):
|
81 |
-
raise NotImplementedError
|
82 |
-
|
83 |
-
def evaluation(self, model, data_loader, cuda_enabled=True):
|
84 |
-
metric_logger = MetricLogger(delimiter=" ")
|
85 |
-
header = "Evaluation"
|
86 |
-
# TODO make it configurable
|
87 |
-
print_freq = 10
|
88 |
-
|
89 |
-
results = []
|
90 |
-
|
91 |
-
for samples in metric_logger.log_every(data_loader, print_freq, header):
|
92 |
-
samples = prepare_sample(samples, cuda_enabled=cuda_enabled)
|
93 |
-
|
94 |
-
eval_output = self.valid_step(model=model, samples=samples)
|
95 |
-
results.extend(eval_output)
|
96 |
-
|
97 |
-
if is_dist_avail_and_initialized():
|
98 |
-
dist.barrier()
|
99 |
-
|
100 |
-
return results
|
101 |
-
|
102 |
-
def train_epoch(
|
103 |
-
self,
|
104 |
-
epoch,
|
105 |
-
model,
|
106 |
-
data_loader,
|
107 |
-
optimizer,
|
108 |
-
lr_scheduler,
|
109 |
-
scaler=None,
|
110 |
-
cuda_enabled=False,
|
111 |
-
log_freq=50,
|
112 |
-
accum_grad_iters=1,
|
113 |
-
):
|
114 |
-
return self._train_inner_loop(
|
115 |
-
epoch=epoch,
|
116 |
-
iters_per_epoch=lr_scheduler.iters_per_epoch,
|
117 |
-
model=model,
|
118 |
-
data_loader=data_loader,
|
119 |
-
optimizer=optimizer,
|
120 |
-
scaler=scaler,
|
121 |
-
lr_scheduler=lr_scheduler,
|
122 |
-
log_freq=log_freq,
|
123 |
-
cuda_enabled=cuda_enabled,
|
124 |
-
accum_grad_iters=accum_grad_iters,
|
125 |
-
)
|
126 |
-
|
127 |
-
def train_iters(
|
128 |
-
self,
|
129 |
-
epoch,
|
130 |
-
start_iters,
|
131 |
-
iters_per_inner_epoch,
|
132 |
-
model,
|
133 |
-
data_loader,
|
134 |
-
optimizer,
|
135 |
-
lr_scheduler,
|
136 |
-
scaler=None,
|
137 |
-
cuda_enabled=False,
|
138 |
-
log_freq=50,
|
139 |
-
accum_grad_iters=1,
|
140 |
-
):
|
141 |
-
return self._train_inner_loop(
|
142 |
-
epoch=epoch,
|
143 |
-
start_iters=start_iters,
|
144 |
-
iters_per_epoch=iters_per_inner_epoch,
|
145 |
-
model=model,
|
146 |
-
data_loader=data_loader,
|
147 |
-
optimizer=optimizer,
|
148 |
-
scaler=scaler,
|
149 |
-
lr_scheduler=lr_scheduler,
|
150 |
-
log_freq=log_freq,
|
151 |
-
cuda_enabled=cuda_enabled,
|
152 |
-
accum_grad_iters=accum_grad_iters,
|
153 |
-
)
|
154 |
-
|
155 |
-
def _train_inner_loop(
|
156 |
-
self,
|
157 |
-
epoch,
|
158 |
-
iters_per_epoch,
|
159 |
-
model,
|
160 |
-
data_loader,
|
161 |
-
optimizer,
|
162 |
-
lr_scheduler,
|
163 |
-
scaler=None,
|
164 |
-
start_iters=None,
|
165 |
-
log_freq=50,
|
166 |
-
cuda_enabled=False,
|
167 |
-
accum_grad_iters=1,
|
168 |
-
):
|
169 |
-
"""
|
170 |
-
An inner training loop compatible with both epoch-based and iter-based training.
|
171 |
-
|
172 |
-
When using epoch-based, training stops after one epoch; when using iter-based,
|
173 |
-
training stops after #iters_per_epoch iterations.
|
174 |
-
"""
|
175 |
-
use_amp = scaler is not None
|
176 |
-
|
177 |
-
if not hasattr(data_loader, "__next__"):
|
178 |
-
# convert to iterator if not already
|
179 |
-
data_loader = iter(data_loader)
|
180 |
-
|
181 |
-
metric_logger = MetricLogger(delimiter=" ")
|
182 |
-
metric_logger.add_meter("lr", SmoothedValue(window_size=1, fmt="{value:.6f}"))
|
183 |
-
metric_logger.add_meter("loss", SmoothedValue(window_size=1, fmt="{value:.4f}"))
|
184 |
-
|
185 |
-
# if iter-based runner, schedule lr based on inner epoch.
|
186 |
-
logging.info(
|
187 |
-
"Start training epoch {}, {} iters per inner epoch.".format(
|
188 |
-
epoch, iters_per_epoch
|
189 |
-
)
|
190 |
-
)
|
191 |
-
header = "Train: data epoch: [{}]".format(epoch)
|
192 |
-
if start_iters is None:
|
193 |
-
# epoch-based runner
|
194 |
-
inner_epoch = epoch
|
195 |
-
else:
|
196 |
-
# In iter-based runner, we schedule the learning rate based on iterations.
|
197 |
-
inner_epoch = start_iters // iters_per_epoch
|
198 |
-
header = header + "; inner epoch [{}]".format(inner_epoch)
|
199 |
-
|
200 |
-
for i in metric_logger.log_every(range(iters_per_epoch), log_freq, header):
|
201 |
-
# if using iter-based runner, we stop after iters_per_epoch iterations.
|
202 |
-
if i >= iters_per_epoch:
|
203 |
-
break
|
204 |
-
|
205 |
-
samples = next(data_loader)
|
206 |
-
|
207 |
-
samples = prepare_sample(samples, cuda_enabled=cuda_enabled)
|
208 |
-
samples.update(
|
209 |
-
{
|
210 |
-
"epoch": inner_epoch,
|
211 |
-
"num_iters_per_epoch": iters_per_epoch,
|
212 |
-
"iters": i,
|
213 |
-
}
|
214 |
-
)
|
215 |
-
|
216 |
-
lr_scheduler.step(cur_epoch=inner_epoch, cur_step=i)
|
217 |
-
|
218 |
-
with torch.cuda.amp.autocast(enabled=use_amp):
|
219 |
-
loss = self.train_step(model=model, samples=samples)
|
220 |
-
|
221 |
-
# after_train_step()
|
222 |
-
if use_amp:
|
223 |
-
scaler.scale(loss).backward()
|
224 |
-
else:
|
225 |
-
loss.backward()
|
226 |
-
|
227 |
-
# update gradients every accum_grad_iters iterations
|
228 |
-
if (i + 1) % accum_grad_iters == 0:
|
229 |
-
if use_amp:
|
230 |
-
scaler.step(optimizer)
|
231 |
-
scaler.update()
|
232 |
-
else:
|
233 |
-
optimizer.step()
|
234 |
-
optimizer.zero_grad()
|
235 |
-
|
236 |
-
metric_logger.update(loss=loss.item())
|
237 |
-
metric_logger.update(lr=optimizer.param_groups[0]["lr"])
|
238 |
-
|
239 |
-
# after train_epoch()
|
240 |
-
# gather the stats from all processes
|
241 |
-
metric_logger.synchronize_between_processes()
|
242 |
-
logging.info("Averaged stats: " + str(metric_logger.global_avg()))
|
243 |
-
return {
|
244 |
-
k: "{:.3f}".format(meter.global_avg)
|
245 |
-
for k, meter in metric_logger.meters.items()
|
246 |
-
}
|
247 |
-
|
248 |
-
@staticmethod
|
249 |
-
def save_result(result, result_dir, filename, remove_duplicate=""):
|
250 |
-
import json
|
251 |
-
|
252 |
-
result_file = os.path.join(
|
253 |
-
result_dir, "%s_rank%d.json" % (filename, get_rank())
|
254 |
-
)
|
255 |
-
final_result_file = os.path.join(result_dir, "%s.json" % filename)
|
256 |
-
|
257 |
-
json.dump(result, open(result_file, "w"))
|
258 |
-
|
259 |
-
if is_dist_avail_and_initialized():
|
260 |
-
dist.barrier()
|
261 |
-
|
262 |
-
if is_main_process():
|
263 |
-
logging.warning("rank %d starts merging results." % get_rank())
|
264 |
-
# combine results from all processes
|
265 |
-
result = []
|
266 |
-
|
267 |
-
for rank in range(get_world_size()):
|
268 |
-
result_file = os.path.join(
|
269 |
-
result_dir, "%s_rank%d.json" % (filename, rank)
|
270 |
-
)
|
271 |
-
res = json.load(open(result_file, "r"))
|
272 |
-
result += res
|
273 |
-
|
274 |
-
if remove_duplicate:
|
275 |
-
result_new = []
|
276 |
-
id_list = []
|
277 |
-
for res in result:
|
278 |
-
if res[remove_duplicate] not in id_list:
|
279 |
-
id_list.append(res[remove_duplicate])
|
280 |
-
result_new.append(res)
|
281 |
-
result = result_new
|
282 |
-
|
283 |
-
json.dump(result, open(final_result_file, "w"))
|
284 |
-
print("result file saved to %s" % final_result_file)
|
285 |
-
|
286 |
-
return final_result_file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/Dual-Key_Backdoor_Attacks/openvqa/openvqa/core/base_dataset.py
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
# --------------------------------------------------------
|
2 |
-
# OpenVQA
|
3 |
-
# Written by Yuhao Cui https://github.com/cuiyuhao1996
|
4 |
-
# --------------------------------------------------------
|
5 |
-
|
6 |
-
import numpy as np
|
7 |
-
import glob, json, torch, random
|
8 |
-
import torch.utils.data as Data
|
9 |
-
import torch.nn as nn
|
10 |
-
from openvqa.utils.feat_filter import feat_filter
|
11 |
-
|
12 |
-
class BaseDataSet(Data.Dataset):
|
13 |
-
def __init__(self):
|
14 |
-
self.token_to_ix = None
|
15 |
-
self.pretrained_emb = None
|
16 |
-
self.ans_to_ix = None
|
17 |
-
self.ix_to_ans = None
|
18 |
-
|
19 |
-
self.data_size = None
|
20 |
-
self.token_size = None
|
21 |
-
self.ans_size = None
|
22 |
-
|
23 |
-
|
24 |
-
def load_ques_ans(self, idx):
|
25 |
-
raise NotImplementedError()
|
26 |
-
|
27 |
-
|
28 |
-
def load_img_feats(self, idx, iid):
|
29 |
-
raise NotImplementedError()
|
30 |
-
|
31 |
-
|
32 |
-
def __getitem__(self, idx):
|
33 |
-
|
34 |
-
ques_ix_iter, ans_iter, iid = self.load_ques_ans(idx)
|
35 |
-
|
36 |
-
frcn_feat_iter, grid_feat_iter, bbox_feat_iter = self.load_img_feats(idx, iid)
|
37 |
-
|
38 |
-
return \
|
39 |
-
torch.from_numpy(frcn_feat_iter),\
|
40 |
-
torch.from_numpy(grid_feat_iter),\
|
41 |
-
torch.from_numpy(bbox_feat_iter),\
|
42 |
-
torch.from_numpy(ques_ix_iter),\
|
43 |
-
torch.from_numpy(ans_iter)
|
44 |
-
|
45 |
-
|
46 |
-
def __len__(self):
|
47 |
-
return self.data_size
|
48 |
-
|
49 |
-
def shuffle_list(self, list):
|
50 |
-
random.shuffle(list)
|
51 |
-
|
52 |
-
|
53 |
-
class BaseAdapter(nn.Module):
|
54 |
-
def __init__(self, __C):
|
55 |
-
super(BaseAdapter, self).__init__()
|
56 |
-
self.__C = __C
|
57 |
-
if self.__C.DATASET in ['vqa']:
|
58 |
-
self.vqa_init(__C)
|
59 |
-
|
60 |
-
elif self.__C.DATASET in ['gqa']:
|
61 |
-
self.gqa_init(__C)
|
62 |
-
|
63 |
-
elif self.__C.DATASET in ['clevr']:
|
64 |
-
self.clevr_init(__C)
|
65 |
-
|
66 |
-
else:
|
67 |
-
exit(-1)
|
68 |
-
|
69 |
-
# eval('self.' + __C.DATASET + '_init()')
|
70 |
-
|
71 |
-
def vqa_init(self, __C):
|
72 |
-
raise NotImplementedError()
|
73 |
-
|
74 |
-
def gqa_init(self, __C):
|
75 |
-
raise NotImplementedError()
|
76 |
-
|
77 |
-
def clevr_init(self, __C):
|
78 |
-
raise NotImplementedError()
|
79 |
-
|
80 |
-
def forward(self, frcn_feat, grid_feat, bbox_feat):
|
81 |
-
feat_dict = feat_filter(self.__C.DATASET, frcn_feat, grid_feat, bbox_feat)
|
82 |
-
|
83 |
-
if self.__C.DATASET in ['vqa']:
|
84 |
-
return self.vqa_forward(feat_dict)
|
85 |
-
|
86 |
-
elif self.__C.DATASET in ['gqa']:
|
87 |
-
return self.gqa_forward(feat_dict)
|
88 |
-
|
89 |
-
elif self.__C.DATASET in ['clevr']:
|
90 |
-
return self.clevr_forward(feat_dict)
|
91 |
-
|
92 |
-
else:
|
93 |
-
exit(-1)
|
94 |
-
|
95 |
-
def vqa_forward(self, feat_dict):
|
96 |
-
raise NotImplementedError()
|
97 |
-
|
98 |
-
def gqa_forward(self, feat_dict):
|
99 |
-
raise NotImplementedError()
|
100 |
-
|
101 |
-
def clevr_forward(self, feat_dict):
|
102 |
-
raise NotImplementedError()
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/pybind11/.github/ISSUE_TEMPLATE/bug-report.md
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
---
|
2 |
-
name: Bug Report
|
3 |
-
about: File an issue about a bug
|
4 |
-
title: "[BUG] "
|
5 |
-
---
|
6 |
-
|
7 |
-
|
8 |
-
Make sure you've completed the following steps before submitting your issue -- thank you!
|
9 |
-
|
10 |
-
1. Make sure you've read the [documentation][]. Your issue may be addressed there.
|
11 |
-
2. Search the [issue tracker][] to verify that this hasn't already been reported. +1 or comment there if it has.
|
12 |
-
3. Consider asking first in the [Gitter chat room][].
|
13 |
-
4. Include a self-contained and minimal piece of code that reproduces the problem. If that's not possible, try to make the description as clear as possible.
|
14 |
-
a. If possible, make a PR with a new, failing test to give us a starting point to work on!
|
15 |
-
|
16 |
-
[documentation]: https://pybind11.readthedocs.io
|
17 |
-
[issue tracker]: https://github.com/pybind/pybind11/issues
|
18 |
-
[Gitter chat room]: https://gitter.im/pybind/Lobby
|
19 |
-
|
20 |
-
*After reading, remove this checklist and the template text in parentheses below.*
|
21 |
-
|
22 |
-
## Issue description
|
23 |
-
|
24 |
-
(Provide a short description, state the expected behavior and what actually happens.)
|
25 |
-
|
26 |
-
## Reproducible example code
|
27 |
-
|
28 |
-
(The code should be minimal, have no external dependencies, isolate the function(s) that cause breakage. Submit matched and complete C++ and Python snippets that can be easily compiled and run to diagnose the issue.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/detail/memory_wrapper.h
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Copyright 2020 NVIDIA Corporation
|
3 |
-
*
|
4 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
* you may not use this file except in compliance with the License.
|
6 |
-
* You may obtain a copy of the License at
|
7 |
-
*
|
8 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
*
|
10 |
-
* Unless required by applicable law or agreed to in writing, software
|
11 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
* See the License for the specific language governing permissions and
|
14 |
-
* limitations under the License.
|
15 |
-
*/
|
16 |
-
|
17 |
-
#pragma once
|
18 |
-
|
19 |
-
// When a compiler uses Thrust as part of its implementation of Standard C++
|
20 |
-
// algorithms, a cycle of included files may result when Thrust code tries to
|
21 |
-
// use a standard algorithm. Having a macro that is defined only when Thrust
|
22 |
-
// is including an algorithms-related header gives the compiler a chance to
|
23 |
-
// detect and break the cycle of includes. (<memory> declares several standard
|
24 |
-
// algorithms, including all of the uninitialized_* algorithms. "_ALGORITHMS_"
|
25 |
-
// in the macro name is meant generically, not as a specific reference to
|
26 |
-
// the header <algorithms>.)
|
27 |
-
|
28 |
-
#define THRUST_INCLUDING_ALGORITHMS_HEADER
|
29 |
-
#include <memory>
|
30 |
-
#undef THRUST_INCLUDING_ALGORITHMS_HEADER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/Text2Human/Text2Human/utils/__init__.py
DELETED
File without changes
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/frontend/assets/index-b7124075.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
import{S as Ae,e as ye,s as Se,J as Pe,K as h,p as E,M as L,n as $,A as V,N as H,O as J,U as S,Q as B,X as re,af as Ve,a1 as ge,P as Y,R as Z,G as Re,m as pe,V as dl,z as P,u as ue,v as R,y as oe,B as Be,ag as Nl,k as j,o as K,x as Q,ah as Ol,h as He,ai as zl,_ as Ie,F as C,T as Te,aj as ml,j as cl,t as hl,a9 as Il,ab as Dl,ac as Cl,ad as jl,ak as z,E as Kl,ae as Ql,q as Yl,r as ql}from"./index-3370be2a.js";import"./Blocks-f0129fcd.js";import{U as Xl}from"./UploadText-28892309.js";import{a as bl,B as Gl}from"./Button-89624748.js";import{U as Jl}from"./Upload-f29b2460.js";import{M as Zl}from"./ModifyUpload-d8fc50ab.js";import{B as gl}from"./BlockLabel-56db415e.js";import{E as Wl}from"./Empty-585389a4.js";import{S as xl,u as $l}from"./ShareButton-39feba51.js";import{n as en}from"./ModifyUpload.svelte_svelte_type_style_lang-d2acacf0.js";import"./IconButton-abe5ede9.js";function ln(l){let e,i,n,t;return{c(){e=Pe("svg"),i=Pe("path"),n=Pe("circle"),t=Pe("circle"),h(i,"d","M9 18V5l12-2v13"),h(n,"cx","6"),h(n,"cy","18"),h(n,"r","3"),h(t,"cx","18"),h(t,"cy","16"),h(t,"r","3"),h(e,"xmlns","http://www.w3.org/2000/svg"),h(e,"width","100%"),h(e,"height","100%"),h(e,"viewBox","0 0 24 24"),h(e,"fill","none"),h(e,"stroke","currentColor"),h(e,"stroke-width","1.5"),h(e,"stroke-linecap","round"),h(e,"stroke-linejoin","round"),h(e,"class","feather feather-music")},m(a,s){E(a,e,s),L(e,i),L(e,n),L(e,t)},p:$,i:$,o:$,d(a){a&&V(e)}}}class Ne extends Ae{constructor(e){super(),ye(this,e,null,ln,Se,{})}}function De(l,e,i){const n=l.slice();return n[27]=e[i],n[29]=i,n}function Ce(l){let e,i,n,t,a=(l[6]==="label"||l[7]==="label")&&je(l);return{c(){e=H("span"),a&&a.c(),h(e,"class","pip first"),h(e,"style",i=l[14]+": 0%;"),S(e,"selected",l[17](l[0])),S(e,"in-range",l[16](l[0]))},m(s,r){E(s,e,r),a&&a.m(e,null),n||(t=[B(e,"click",function(){re(l[20](l[0]))&&l[20](l[0]).apply(this,arguments)}),B(e,"touchend",Ve(function(){re(l[20](l[0]))&&l[20](l[0]).apply(this,arguments)}))],n=!0)},p(s,r){l=s,l[6]==="label"||l[7]==="label"?a?a.p(l,r):(a=je(l),a.c(),a.m(e,null)):a&&(a.d(1),a=null),r&16384&&i!==(i=l[14]+": 0%;")&&h(e,"style",i),r&131073&&S(e,"selected",l[17](l[0])),r&65537&&S(e,"in-range",l[16](l[0]))},d(s){s&&V(e),a&&a.d(),n=!1,ge(t)}}}function je(l){let e,i=l[12](l[0],0,0)+"",n,t=l[10]&&Ke(l),a=l[11]&&Qe(l);return{c(){e=H("span"),t&&t.c(),n=Y(i),a&&a.c(),h(e,"class","pipVal")},m(s,r){E(s,e,r),t&&t.m(e,null),L(e,n),a&&a.m(e,null)},p(s,r){s[10]?t?t.p(s,r):(t=Ke(s),t.c(),t.m(e,n)):t&&(t.d(1),t=null),r&4097&&i!==(i=s[12](s[0],0,0)+"")&&Z(n,i),s[11]?a?a.p(s,r):(a=Qe(s),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(s){s&&V(e),t&&t.d(),a&&a.d()}}}function Ke(l){let e,i;return{c(){e=H("span"),i=Y(l[10]),h(e,"class","pipVal-prefix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&1024&&Z(i,n[10])},d(n){n&&V(e)}}}function Qe(l){let e,i;return{c(){e=H("span"),i=Y(l[11]),h(e,"class","pipVal-suffix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&2048&&Z(i,n[11])},d(n){n&&V(e)}}}function Ye(l){let e,i=Re(Array(l[19]+1)),n=[];for(let t=0;t<i.length;t+=1)n[t]=Ze(De(l,i,t));return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=pe()},m(t,a){for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(t,a);E(t,e,a)},p(t,a){if(a&2088515){i=Re(Array(t[19]+1));let s;for(s=0;s<i.length;s+=1){const r=De(t,i,s);n[s]?n[s].p(r,a):(n[s]=Ze(r),n[s].c(),n[s].m(e.parentNode,e))}for(;s<n.length;s+=1)n[s].d(1);n.length=i.length}},d(t){t&&V(e),dl(n,t)}}}function qe(l){let e,i,n,t,a,s=(l[6]==="label"||l[9]==="label")&&Xe(l);return{c(){e=H("span"),s&&s.c(),i=J(),h(e,"class","pip"),h(e,"style",n=l[14]+": "+l[15](l[18](l[29]))+"%;"),S(e,"selected",l[17](l[18](l[29]))),S(e,"in-range",l[16](l[18](l[29])))},m(r,f){E(r,e,f),s&&s.m(e,null),L(e,i),t||(a=[B(e,"click",function(){re(l[20](l[18](l[29])))&&l[20](l[18](l[29])).apply(this,arguments)}),B(e,"touchend",Ve(function(){re(l[20](l[18](l[29])))&&l[20](l[18](l[29])).apply(this,arguments)}))],t=!0)},p(r,f){l=r,l[6]==="label"||l[9]==="label"?s?s.p(l,f):(s=Xe(l),s.c(),s.m(e,i)):s&&(s.d(1),s=null),f&311296&&n!==(n=l[14]+": "+l[15](l[18](l[29]))+"%;")&&h(e,"style",n),f&393216&&S(e,"selected",l[17](l[18](l[29]))),f&327680&&S(e,"in-range",l[16](l[18](l[29])))},d(r){r&&V(e),s&&s.d(),t=!1,ge(a)}}}function Xe(l){let e,i=l[12](l[18](l[29]),l[29],l[15](l[18](l[29])))+"",n,t=l[10]&&Ge(l),a=l[11]&&Je(l);return{c(){e=H("span"),t&&t.c(),n=Y(i),a&&a.c(),h(e,"class","pipVal")},m(s,r){E(s,e,r),t&&t.m(e,null),L(e,n),a&&a.m(e,null)},p(s,r){s[10]?t?t.p(s,r):(t=Ge(s),t.c(),t.m(e,n)):t&&(t.d(1),t=null),r&299008&&i!==(i=s[12](s[18](s[29]),s[29],s[15](s[18](s[29])))+"")&&Z(n,i),s[11]?a?a.p(s,r):(a=Je(s),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(s){s&&V(e),t&&t.d(),a&&a.d()}}}function Ge(l){let e,i;return{c(){e=H("span"),i=Y(l[10]),h(e,"class","pipVal-prefix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&1024&&Z(i,n[10])},d(n){n&&V(e)}}}function Je(l){let e,i;return{c(){e=H("span"),i=Y(l[11]),h(e,"class","pipVal-suffix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&2048&&Z(i,n[11])},d(n){n&&V(e)}}}function Ze(l){let e=l[18](l[29])!==l[0]&&l[18](l[29])!==l[1],i,n=e&&qe(l);return{c(){n&&n.c(),i=pe()},m(t,a){n&&n.m(t,a),E(t,i,a)},p(t,a){a&262147&&(e=t[18](t[29])!==t[0]&&t[18](t[29])!==t[1]),e?n?n.p(t,a):(n=qe(t),n.c(),n.m(i.parentNode,i)):n&&(n.d(1),n=null)},d(t){t&&V(i),n&&n.d(t)}}}function We(l){let e,i,n,t,a=(l[6]==="label"||l[8]==="label")&&xe(l);return{c(){e=H("span"),a&&a.c(),h(e,"class","pip last"),h(e,"style",i=l[14]+": 100%;"),S(e,"selected",l[17](l[1])),S(e,"in-range",l[16](l[1]))},m(s,r){E(s,e,r),a&&a.m(e,null),n||(t=[B(e,"click",function(){re(l[20](l[1]))&&l[20](l[1]).apply(this,arguments)}),B(e,"touchend",Ve(function(){re(l[20](l[1]))&&l[20](l[1]).apply(this,arguments)}))],n=!0)},p(s,r){l=s,l[6]==="label"||l[8]==="label"?a?a.p(l,r):(a=xe(l),a.c(),a.m(e,null)):a&&(a.d(1),a=null),r&16384&&i!==(i=l[14]+": 100%;")&&h(e,"style",i),r&131074&&S(e,"selected",l[17](l[1])),r&65538&&S(e,"in-range",l[16](l[1]))},d(s){s&&V(e),a&&a.d(),n=!1,ge(t)}}}function xe(l){let e,i=l[12](l[1],l[19],100)+"",n,t=l[10]&&$e(l),a=l[11]&&el(l);return{c(){e=H("span"),t&&t.c(),n=Y(i),a&&a.c(),h(e,"class","pipVal")},m(s,r){E(s,e,r),t&&t.m(e,null),L(e,n),a&&a.m(e,null)},p(s,r){s[10]?t?t.p(s,r):(t=$e(s),t.c(),t.m(e,n)):t&&(t.d(1),t=null),r&528386&&i!==(i=s[12](s[1],s[19],100)+"")&&Z(n,i),s[11]?a?a.p(s,r):(a=el(s),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(s){s&&V(e),t&&t.d(),a&&a.d()}}}function $e(l){let e,i;return{c(){e=H("span"),i=Y(l[10]),h(e,"class","pipVal-prefix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&1024&&Z(i,n[10])},d(n){n&&V(e)}}}function el(l){let e,i;return{c(){e=H("span"),i=Y(l[11]),h(e,"class","pipVal-suffix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t&2048&&Z(i,n[11])},d(n){n&&V(e)}}}function nn(l){let e,i,n,t=(l[6]&&l[7]!==!1||l[7])&&Ce(l),a=(l[6]&&l[9]!==!1||l[9])&&Ye(l),s=(l[6]&&l[8]!==!1||l[8])&&We(l);return{c(){e=H("div"),t&&t.c(),i=J(),a&&a.c(),n=J(),s&&s.c(),h(e,"class","rangePips"),S(e,"disabled",l[5]),S(e,"hoverable",l[4]),S(e,"vertical",l[2]),S(e,"reversed",l[3]),S(e,"focus",l[13])},m(r,f){E(r,e,f),t&&t.m(e,null),L(e,i),a&&a.m(e,null),L(e,n),s&&s.m(e,null)},p(r,[f]){r[6]&&r[7]!==!1||r[7]?t?t.p(r,f):(t=Ce(r),t.c(),t.m(e,i)):t&&(t.d(1),t=null),r[6]&&r[9]!==!1||r[9]?a?a.p(r,f):(a=Ye(r),a.c(),a.m(e,n)):a&&(a.d(1),a=null),r[6]&&r[8]!==!1||r[8]?s?s.p(r,f):(s=We(r),s.c(),s.m(e,null)):s&&(s.d(1),s=null),f&32&&S(e,"disabled",r[5]),f&16&&S(e,"hoverable",r[4]),f&4&&S(e,"vertical",r[2]),f&8&&S(e,"reversed",r[3]),f&8192&&S(e,"focus",r[13])},i:$,o:$,d(r){r&&V(e),t&&t.d(),a&&a.d(),s&&s.d()}}}function tn(l,e,i){let n,t,a,s,r,{range:f=!1}=e,{min:g=0}=e,{max:d=100}=e,{step:c=1}=e,{values:o=[(d+g)/2]}=e,{vertical:_=!1}=e,{reversed:m=!1}=e,{hoverable:A=!0}=e,{disabled:y=!1}=e,{pipstep:w=void 0}=e,{all:I=!0}=e,{first:q=void 0}=e,{last:O=void 0}=e,{rest:D=void 0}=e,{prefix:F=""}=e,{suffix:W=""}=e,{formatter:ee=(p,te)=>p}=e,{focus:U=void 0}=e,{orientationStart:X=void 0}=e,{percentOf:ie=void 0}=e,{moveHandle:le=void 0}=e;function fe(p){le(void 0,p)}return l.$$set=p=>{"range"in p&&i(21,f=p.range),"min"in p&&i(0,g=p.min),"max"in p&&i(1,d=p.max),"step"in p&&i(22,c=p.step),"values"in p&&i(23,o=p.values),"vertical"in p&&i(2,_=p.vertical),"reversed"in p&&i(3,m=p.reversed),"hoverable"in p&&i(4,A=p.hoverable),"disabled"in p&&i(5,y=p.disabled),"pipstep"in p&&i(24,w=p.pipstep),"all"in p&&i(6,I=p.all),"first"in p&&i(7,q=p.first),"last"in p&&i(8,O=p.last),"rest"in p&&i(9,D=p.rest),"prefix"in p&&i(10,F=p.prefix),"suffix"in p&&i(11,W=p.suffix),"formatter"in p&&i(12,ee=p.formatter),"focus"in p&&i(13,U=p.focus),"orientationStart"in p&&i(14,X=p.orientationStart),"percentOf"in p&&i(15,ie=p.percentOf),"moveHandle"in p&&i(25,le=p.moveHandle)},l.$$.update=()=>{l.$$.dirty&20971527&&i(26,n=w||((d-g)/c>=(_?50:100)?(d-g)/(_?10:20):1)),l.$$.dirty&71303171&&i(19,t=parseInt((d-g)/(c*n),10)),l.$$.dirty&71303169&&i(18,a=function(p){return g+p*c*n}),l.$$.dirty&8388608&&i(17,s=function(p){return o.some(te=>te===p)}),l.$$.dirty&10485760&&i(16,r=function(p){if(f==="min")return o[0]>p;if(f==="max")return o[0]<p;if(f)return o[0]<p&&o[1]>p})},[g,d,_,m,A,y,I,q,O,D,F,W,ee,U,X,ie,r,s,a,t,fe,f,c,o,w,le,n]}class an extends Ae{constructor(e){super(),ye(this,e,tn,nn,Se,{range:21,min:0,max:1,step:22,values:23,vertical:2,reversed:3,hoverable:4,disabled:5,pipstep:24,all:6,first:7,last:8,rest:9,prefix:10,suffix:11,formatter:12,focus:13,orientationStart:14,percentOf:15,moveHandle:25})}}function ll(l,e,i){const n=l.slice();return n[63]=e[i],n[65]=i,n}function nl(l){let e,i=l[21](l[63],l[65],l[23](l[63]))+"",n,t=l[18]&&il(l),a=l[19]&&tl(l);return{c(){e=H("span"),t&&t.c(),n=Y(i),a&&a.c(),h(e,"class","rangeFloat")},m(s,r){E(s,e,r),t&&t.m(e,null),L(e,n),a&&a.m(e,null)},p(s,r){s[18]?t?t.p(s,r):(t=il(s),t.c(),t.m(e,n)):t&&(t.d(1),t=null),r[0]&10485761&&i!==(i=s[21](s[63],s[65],s[23](s[63]))+"")&&Z(n,i),s[19]?a?a.p(s,r):(a=tl(s),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(s){s&&V(e),t&&t.d(),a&&a.d()}}}function il(l){let e,i;return{c(){e=H("span"),i=Y(l[18]),h(e,"class","rangeFloat-prefix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t[0]&262144&&Z(i,n[18])},d(n){n&&V(e)}}}function tl(l){let e,i;return{c(){e=H("span"),i=Y(l[19]),h(e,"class","rangeFloat-suffix")},m(n,t){E(n,e,t),L(e,i)},p(n,t){t[0]&524288&&Z(i,n[19])},d(n){n&&V(e)}}}function al(l){let e,i,n,t,a,s,r,f,g,d,c,o,_=l[7]&&nl(l);return{c(){e=H("span"),i=H("span"),n=J(),_&&_.c(),h(i,"class","rangeNub"),h(e,"role","slider"),h(e,"class","rangeHandle"),h(e,"data-handle",l[65]),h(e,"style",t=l[28]+": "+l[29][l[65]]+"%; z-index: "+(l[26]===l[65]?3:2)+";"),h(e,"aria-valuemin",a=l[2]===!0&&l[65]===1?l[0][0]:l[3]),h(e,"aria-valuemax",s=l[2]===!0&&l[65]===0?l[0][1]:l[4]),h(e,"aria-valuenow",r=l[63]),h(e,"aria-valuetext",f=""+(l[18]+l[21](l[63],l[65],l[23](l[63]))+l[19])),h(e,"aria-orientation",g=l[6]?"vertical":"horizontal"),h(e,"aria-disabled",l[10]),h(e,"disabled",l[10]),h(e,"tabindex",d=l[10]?-1:0),S(e,"active",l[24]&&l[26]===l[65]),S(e,"press",l[25]&&l[26]===l[65])},m(m,A){E(m,e,A),L(e,i),L(e,n),_&&_.m(e,null),c||(o=[B(e,"blur",l[33]),B(e,"focus",l[34]),B(e,"keydown",l[35])],c=!0)},p(m,A){m[7]?_?_.p(m,A):(_=nl(m),_.c(),_.m(e,null)):_&&(_.d(1),_=null),A[0]&872415232&&t!==(t=m[28]+": "+m[29][m[65]]+"%; z-index: "+(m[26]===m[65]?3:2)+";")&&h(e,"style",t),A[0]&13&&a!==(a=m[2]===!0&&m[65]===1?m[0][0]:m[3])&&h(e,"aria-valuemin",a),A[0]&21&&s!==(s=m[2]===!0&&m[65]===0?m[0][1]:m[4])&&h(e,"aria-valuemax",s),A[0]&1&&r!==(r=m[63])&&h(e,"aria-valuenow",r),A[0]&11272193&&f!==(f=""+(m[18]+m[21](m[63],m[65],m[23](m[63]))+m[19]))&&h(e,"aria-valuetext",f),A[0]&64&&g!==(g=m[6]?"vertical":"horizontal")&&h(e,"aria-orientation",g),A[0]&1024&&h(e,"aria-disabled",m[10]),A[0]&1024&&h(e,"disabled",m[10]),A[0]&1024&&d!==(d=m[10]?-1:0)&&h(e,"tabindex",d),A[0]&83886080&&S(e,"active",m[24]&&m[26]===m[65]),A[0]&100663296&&S(e,"press",m[25]&&m[26]===m[65])},d(m){m&&V(e),_&&_.d(),c=!1,ge(o)}}}function sl(l){let e,i;return{c(){e=H("span"),h(e,"class","rangeBar"),h(e,"style",i=l[28]+": "+l[31](l[29])+"%; "+l[27]+": "+l[32](l[29])+"%;")},m(n,t){E(n,e,t)},p(n,t){t[0]&939524096&&i!==(i=n[28]+": "+n[31](n[29])+"%; "+n[27]+": "+n[32](n[29])+"%;")&&h(e,"style",i)},d(n){n&&V(e)}}}function fl(l){let e,i;return e=new an({props:{values:l[0],min:l[3],max:l[4],step:l[5],range:l[2],vertical:l[6],reversed:l[8],orientationStart:l[28],hoverable:l[9],disabled:l[10],all:l[13],first:l[14],last:l[15],rest:l[16],pipstep:l[12],prefix:l[18],suffix:l[19],formatter:l[20],focus:l[24],percentOf:l[23],moveHandle:l[30]}}),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&1&&(a.values=n[0]),t[0]&8&&(a.min=n[3]),t[0]&16&&(a.max=n[4]),t[0]&32&&(a.step=n[5]),t[0]&4&&(a.range=n[2]),t[0]&64&&(a.vertical=n[6]),t[0]&256&&(a.reversed=n[8]),t[0]&268435456&&(a.orientationStart=n[28]),t[0]&512&&(a.hoverable=n[9]),t[0]&1024&&(a.disabled=n[10]),t[0]&8192&&(a.all=n[13]),t[0]&16384&&(a.first=n[14]),t[0]&32768&&(a.last=n[15]),t[0]&65536&&(a.rest=n[16]),t[0]&4096&&(a.pipstep=n[12]),t[0]&262144&&(a.prefix=n[18]),t[0]&524288&&(a.suffix=n[19]),t[0]&1048576&&(a.formatter=n[20]),t[0]&16777216&&(a.focus=n[24]),t[0]&8388608&&(a.percentOf=n[23]),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function sn(l){let e,i,n,t,a,s,r=Re(l[0]),f=[];for(let c=0;c<r.length;c+=1)f[c]=al(ll(l,r,c));let g=l[2]&&sl(l),d=l[11]&&fl(l);return{c(){e=H("div");for(let c=0;c<f.length;c+=1)f[c].c();i=J(),g&&g.c(),n=J(),d&&d.c(),h(e,"id",l[17]),h(e,"class","rangeSlider"),S(e,"range",l[2]),S(e,"disabled",l[10]),S(e,"hoverable",l[9]),S(e,"vertical",l[6]),S(e,"reversed",l[8]),S(e,"focus",l[24]),S(e,"min",l[2]==="min"),S(e,"max",l[2]==="max"),S(e,"pips",l[11]),S(e,"pip-labels",l[13]==="label"||l[14]==="label"||l[15]==="label"||l[16]==="label")},m(c,o){E(c,e,o);for(let _=0;_<f.length;_+=1)f[_]&&f[_].m(e,null);L(e,i),g&&g.m(e,null),L(e,n),d&&d.m(e,null),l[49](e),t=!0,a||(s=[B(window,"mousedown",l[38]),B(window,"touchstart",l[38]),B(window,"mousemove",l[39]),B(window,"touchmove",l[39]),B(window,"mouseup",l[40]),B(window,"touchend",l[41]),B(window,"keydown",l[42]),B(e,"mousedown",l[36]),B(e,"mouseup",l[37]),B(e,"touchstart",Ve(l[36])),B(e,"touchend",Ve(l[37]))],a=!0)},p(c,o){if(o[0]&934020317|o[1]&28){r=Re(c[0]);let _;for(_=0;_<r.length;_+=1){const m=ll(c,r,_);f[_]?f[_].p(m,o):(f[_]=al(m),f[_].c(),f[_].m(e,i))}for(;_<f.length;_+=1)f[_].d(1);f.length=r.length}c[2]?g?g.p(c,o):(g=sl(c),g.c(),g.m(e,n)):g&&(g.d(1),g=null),c[11]?d?(d.p(c,o),o[0]&2048&&P(d,1)):(d=fl(c),d.c(),P(d,1),d.m(e,null)):d&&(ue(),R(d,1,1,()=>{d=null}),oe()),(!t||o[0]&131072)&&h(e,"id",c[17]),(!t||o[0]&4)&&S(e,"range",c[2]),(!t||o[0]&1024)&&S(e,"disabled",c[10]),(!t||o[0]&512)&&S(e,"hoverable",c[9]),(!t||o[0]&64)&&S(e,"vertical",c[6]),(!t||o[0]&256)&&S(e,"reversed",c[8]),(!t||o[0]&16777216)&&S(e,"focus",c[24]),(!t||o[0]&4)&&S(e,"min",c[2]==="min"),(!t||o[0]&4)&&S(e,"max",c[2]==="max"),(!t||o[0]&2048)&&S(e,"pips",c[11]),(!t||o[0]&122880)&&S(e,"pip-labels",c[13]==="label"||c[14]==="label"||c[15]==="label"||c[16]==="label")},i(c){t||(P(d),t=!0)},o(c){R(d),t=!1},d(c){c&&V(e),dl(f,c),g&&g.d(),d&&d.d(),l[49](null),a=!1,ge(s)}}}function rl(l){if(!l)return-1;for(var e=0;l=l.previousElementSibling;)e++;return e}function Ue(l){return l.type.includes("touch")?l.touches[0]:l}function fn(l,e,i){let n,t,a,s,r,f,g=$,d=()=>(g(),g=Ol(be,u=>i(29,f=u)),be);l.$$.on_destroy.push(()=>g());let{slider:c}=e,{range:o=!1}=e,{pushy:_=!1}=e,{min:m=0}=e,{max:A=100}=e,{step:y=1}=e,{values:w=[(A+m)/2]}=e,{vertical:I=!1}=e,{float:q=!1}=e,{reversed:O=!1}=e,{hoverable:D=!0}=e,{disabled:F=!1}=e,{pips:W=!1}=e,{pipstep:ee=void 0}=e,{all:U=void 0}=e,{first:X=void 0}=e,{last:ie=void 0}=e,{rest:le=void 0}=e,{id:fe=void 0}=e,{prefix:p=""}=e,{suffix:te=""}=e,{formatter:_e=(u,v,M)=>u}=e,{handleFormatter:we=_e}=e,{precision:G=2}=e,{springValues:de={stiffness:.15,damping:.4}}=e;const me=Be();let ce=0,x=!1,ne=!1,b=!1,k=!1,N=w.length-1,ae,he,be;function Me(u){const v=c.querySelectorAll(".handle"),M=Array.prototype.includes.call(v,u),T=Array.prototype.some.call(v,se=>se.contains(u));return M||T}function Ee(u){return o==="min"||o==="max"?u.slice(0,1):o?u.slice(0,2):u}function ke(){return c.getBoundingClientRect()}function Fe(u){const v=ke();let M=0,T=0,se=0;I?(M=u.clientY-v.top,T=M/v.height*100,T=O?T:100-T):(M=u.clientX-v.left,T=M/v.width*100,T=O?100-T:T),se=(A-m)/100*T+m;let ze;return o===!0&&w[0]===w[1]?se>w[1]?1:0:(ze=w.indexOf([...w].sort((Ll,Ul)=>Math.abs(se-Ll)-Math.abs(se-Ul))[0]),ze)}function Le(u){const v=ke();let M=0,T=0,se=0;I?(M=u.clientY-v.top,T=M/v.height*100,T=O?T:100-T):(M=u.clientX-v.left,T=M/v.width*100,T=O?100-T:T),se=(A-m)/100*T+m,ve(N,se)}function ve(u,v){return v=a(v),typeof u>"u"&&(u=N),o&&(u===0&&v>w[1]?_?i(0,w[1]=v,w):v=w[1]:u===1&&v<w[0]&&(_?i(0,w[0]=v,w):v=w[0])),w[u]!==v&&i(0,w[u]=v,w),he!==v&&(Ml(),he=v),v}function wl(u){return o==="min"?0:u[0]}function kl(u){return o==="max"?0:o==="min"?100-u[0]:100-u[1]}function vl(u){k&&(i(24,x=!1),ne=!1,i(25,b=!1))}function Al(u){F||(i(26,N=rl(u.target)),i(24,x=!0))}function yl(u){if(!F){const v=rl(u.target);let M=u.ctrlKey||u.metaKey||u.shiftKey?y*10:y,T=!1;switch(u.key){case"PageDown":M*=10;case"ArrowRight":case"ArrowUp":ve(v,w[v]+M),T=!0;break;case"PageUp":M*=10;case"ArrowLeft":case"ArrowDown":ve(v,w[v]-M),T=!0;break;case"Home":ve(v,m),T=!0;break;case"End":ve(v,A),T=!0;break}T&&(u.preventDefault(),u.stopPropagation())}}function Sl(u){if(!F){const v=u.target,M=Ue(u);i(24,x=!0),ne=!0,i(25,b=!0),i(26,N=Fe(M)),ae=he=a(w[N]),Hl(),u.type==="touchstart"&&!v.matches(".pipVal")&&Le(M)}}function El(u){u.type==="touchend"&&Oe(),i(25,b=!1)}function Vl(u){k=!1,x&&u.target!==c&&!c.contains(u.target)&&i(24,x=!1)}function Pl(u){F||ne&&Le(Ue(u))}function Rl(u){if(!F){const v=u.target;ne&&((v===c||c.contains(v))&&(i(24,x=!0),!Me(v)&&!v.matches(".pipVal")&&Le(Ue(u))),Oe())}ne=!1,i(25,b=!1)}function Tl(u){ne=!1,i(25,b=!1)}function Bl(u){F||(u.target===c||c.contains(u.target))&&(k=!0)}function Hl(){!F&&me("start",{activeHandle:N,value:ae,values:w.map(u=>a(u))})}function Oe(){!F&&me("stop",{activeHandle:N,startValue:ae,value:w[N],values:w.map(u=>a(u))})}function Ml(){!F&&me("change",{activeHandle:N,startValue:ae,previousValue:typeof he>"u"?ae:he,value:w[N],values:w.map(u=>a(u))})}function Fl(u){He[u?"unshift":"push"](()=>{c=u,i(1,c)})}return l.$$set=u=>{"slider"in u&&i(1,c=u.slider),"range"in u&&i(2,o=u.range),"pushy"in u&&i(43,_=u.pushy),"min"in u&&i(3,m=u.min),"max"in u&&i(4,A=u.max),"step"in u&&i(5,y=u.step),"values"in u&&i(0,w=u.values),"vertical"in u&&i(6,I=u.vertical),"float"in u&&i(7,q=u.float),"reversed"in u&&i(8,O=u.reversed),"hoverable"in u&&i(9,D=u.hoverable),"disabled"in u&&i(10,F=u.disabled),"pips"in u&&i(11,W=u.pips),"pipstep"in u&&i(12,ee=u.pipstep),"all"in u&&i(13,U=u.all),"first"in u&&i(14,X=u.first),"last"in u&&i(15,ie=u.last),"rest"in u&&i(16,le=u.rest),"id"in u&&i(17,fe=u.id),"prefix"in u&&i(18,p=u.prefix),"suffix"in u&&i(19,te=u.suffix),"formatter"in u&&i(20,_e=u.formatter),"handleFormatter"in u&&i(21,we=u.handleFormatter),"precision"in u&&i(44,G=u.precision),"springValues"in u&&i(45,de=u.springValues)},l.$$.update=()=>{l.$$.dirty[0]&24&&i(48,t=function(u){return u<=m?m:u>=A?A:u}),l.$$.dirty[0]&56|l.$$.dirty[1]&139264&&i(47,a=function(u){if(u<=m)return m;if(u>=A)return A;let v=(u-m)%y,M=u-v;return Math.abs(v)*2>=y&&(M+=v>0?y:-y),M=t(M),parseFloat(M.toFixed(G))}),l.$$.dirty[0]&24|l.$$.dirty[1]&8192&&i(23,n=function(u){let v=(u-m)/(A-m)*100;return isNaN(v)||v<=0?0:v>=100?100:parseFloat(v.toFixed(G))}),l.$$.dirty[0]&12582937|l.$$.dirty[1]&114688&&(Array.isArray(w)||(i(0,w=[(A+m)/2]),console.error("'values' prop should be an Array (https://github.com/simeydotme/svelte-range-slider-pips#slider-props)")),i(0,w=Ee(w.map(u=>a(u)))),ce!==w.length?d(i(22,be=Nl(w.map(u=>n(u)),de))):be.set(w.map(u=>n(u))),i(46,ce=w.length)),l.$$.dirty[0]&320&&i(28,s=I?O?"top":"bottom":O?"right":"left"),l.$$.dirty[0]&320&&i(27,r=I?O?"bottom":"top":O?"left":"right")},[w,c,o,m,A,y,I,q,O,D,F,W,ee,U,X,ie,le,fe,p,te,_e,we,be,n,x,b,N,r,s,f,ve,wl,kl,vl,Al,yl,Sl,El,Vl,Pl,Rl,Tl,Bl,_,G,de,ce,a,t,Fl]}class rn extends Ae{constructor(e){super(),ye(this,e,fn,sn,Se,{slider:1,range:2,pushy:43,min:3,max:4,step:5,values:0,vertical:6,float:7,reversed:8,hoverable:9,disabled:10,pips:11,pipstep:12,all:13,first:14,last:15,rest:16,id:17,prefix:18,suffix:19,formatter:20,handleFormatter:21,precision:44,springValues:45},null,[-1,-1,-1])}}function pl(l,{crop_values:e,autoplay:i}={}){function n(){if(e===void 0)return;const a=e[0]/100*l.duration,s=e[1]/100*l.duration;l.currentTime<a&&(l.currentTime=a),l.currentTime>s&&(l.currentTime=a,l.pause())}async function t(){i&&(l.pause(),await l.play())}return l.addEventListener("loadeddata",t),l.addEventListener("timeupdate",n),{destroy(){l.removeEventListener("loadeddata",t),l.removeEventListener("timeupdate",n)}}}function un(l){let e,i,n,t,a,s,r,f,g,d,c;e=new Zl({props:{editable:!0,absolute:!0}}),e.$on("clear",l[13]),e.$on("edit",l[26]);let o=l[8]==="edit"&&l[9]?.duration&&ul(l);return{c(){j(e.$$.fragment),i=J(),n=H("audio"),r=J(),o&&o.c(),f=pe(),n.controls=!0,h(n,"preload","metadata"),Te(n.src,t=l[1]?.data)||h(n,"src",t),h(n,"data-testid",a=`${l[2]}-audio`),h(n,"class","svelte-1thnwz")},m(_,m){K(e,_,m),E(_,i,m),E(_,n,m),l[27](n),E(_,r,m),o&&o.m(_,m),E(_,f,m),g=!0,d||(c=[ml(s=pl.call(null,n,{autoplay:l[6],crop_values:l[10]})),B(n,"play",l[23]),B(n,"pause",l[24]),B(n,"ended",l[16])],d=!0)},p(_,m){(!g||m[0]&2&&!Te(n.src,t=_[1]?.data))&&h(n,"src",t),(!g||m[0]&4&&a!==(a=`${_[2]}-audio`))&&h(n,"data-testid",a),s&&re(s.update)&&m[0]&1088&&s.update.call(null,{autoplay:_[6],crop_values:_[10]}),_[8]==="edit"&&_[9]?.duration?o?(o.p(_,m),m[0]&768&&P(o,1)):(o=ul(_),o.c(),P(o,1),o.m(f.parentNode,f)):o&&(ue(),R(o,1,1,()=>{o=null}),oe())},i(_){g||(P(e.$$.fragment,_),P(o),g=!0)},o(_){R(e.$$.fragment,_),R(o),g=!1},d(_){_&&(V(i),V(n),V(r),V(f)),Q(e,_),l[27](null),o&&o.d(_),d=!1,ge(c)}}}function on(l){let e,i,n,t;const a=[dn,_n],s=[];function r(f,g){return f[4]==="microphone"?0:f[4]==="upload"?1:-1}return~(e=r(l))&&(i=s[e]=a[e](l)),{c(){i&&i.c(),n=pe()},m(f,g){~e&&s[e].m(f,g),E(f,n,g),t=!0},p(f,g){let d=e;e=r(f),e===d?~e&&s[e].p(f,g):(i&&(ue(),R(s[d],1,1,()=>{s[d]=null}),oe()),~e?(i=s[e],i?i.p(f,g):(i=s[e]=a[e](f),i.c()),P(i,1),i.m(n.parentNode,n)):i=null)},i(f){t||(P(i),t=!0)},o(f){R(i),t=!1},d(f){f&&V(n),~e&&s[e].d(f)}}}function ul(l){let e,i,n;function t(s){l[28](s)}let a={range:!0,min:0,max:100,step:1};return l[10]!==void 0&&(a.values=l[10]),e=new rn({props:a}),He.push(()=>cl(e,"values",t)),e.$on("change",l[14]),{c(){j(e.$$.fragment)},m(s,r){K(e,s,r),n=!0},p(s,r){const f={};!i&&r[0]&1024&&(i=!0,f.values=s[10],hl(()=>i=!1)),e.$set(f)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){R(e.$$.fragment,s),n=!1},d(s){Q(e,s)}}}function _n(l){let e,i,n;function t(s){l[25](s)}let a={filetype:"audio/aac,audio/midi,audio/mpeg,audio/ogg,audio/wav,audio/x-wav,audio/opus,audio/webm,audio/flac,audio/vnd.rn-realaudio,audio/x-ms-wma,audio/x-aiff,audio/amr,audio/*",$$slots:{default:[mn]},$$scope:{ctx:l}};return l[0]!==void 0&&(a.dragging=l[0]),e=new Jl({props:a}),He.push(()=>cl(e,"dragging",t)),e.$on("load",l[15]),{c(){j(e.$$.fragment)},m(s,r){K(e,s,r),n=!0},p(s,r){const f={};r[0]&536870912&&(f.$$scope={dirty:r,ctx:s}),!i&&r[0]&1&&(i=!0,f.dragging=s[0],hl(()=>i=!1)),e.$set(f)},i(s){n||(P(e.$$.fragment,s),n=!0)},o(s){R(e.$$.fragment,s),n=!1},d(s){Q(e,s)}}}function dn(l){let e,i,n,t;const a=[hn,cn],s=[];function r(f,g){return f[7]?0:1}return i=r(l),n=s[i]=a[i](l),{c(){e=H("div"),n.c(),h(e,"class","mic-wrap svelte-1thnwz")},m(f,g){E(f,e,g),s[i].m(e,null),t=!0},p(f,g){let d=i;i=r(f),i===d?s[i].p(f,g):(ue(),R(s[d],1,1,()=>{s[d]=null}),oe(),n=s[i],n?n.p(f,g):(n=s[i]=a[i](f),n.c()),P(n,1),n.m(e,null))},i(f){t||(P(n),t=!0)},o(f){R(n),t=!1},d(f){f&&V(e),s[i].d()}}}function mn(l){let e;const i=l[22].default,n=Il(i,l,l[29],null);return{c(){n&&n.c()},m(t,a){n&&n.m(t,a),e=!0},p(t,a){n&&n.p&&(!e||a[0]&536870912)&&Dl(n,i,t,t[29],e?jl(i,t[29],a,null):Cl(t[29]),null)},i(t){e||(P(n,t),e=!0)},o(t){R(n,t),e=!1},d(t){n&&n.d(t)}}}function cn(l){let e,i;return e=new bl({props:{size:"sm",$$slots:{default:[bn]},$$scope:{ctx:l}}}),e.$on("click",l[11]),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&536870912&&(a.$$scope={dirty:t,ctx:n}),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function hn(l){let e,i;return e=new bl({props:{size:"sm",$$slots:{default:[gn]},$$scope:{ctx:l}}}),e.$on("click",l[12]),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&536870912&&(a.$$scope={dirty:t,ctx:n}),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function bn(l){let e,i;return{c(){e=H("span"),e.innerHTML='<span class="dot svelte-1thnwz"></span>',i=Y(`
|
2 |
-
Record from microphone`),h(e,"class","record-icon svelte-1thnwz")},m(n,t){E(n,e,t),E(n,i,t)},p:$,d(n){n&&(V(e),V(i))}}}function gn(l){let e,i;return{c(){e=H("span"),e.innerHTML='<span class="pinger svelte-1thnwz"></span> <span class="dot svelte-1thnwz"></span>',i=Y(`
|
3 |
-
Stop recording`),h(e,"class","record-icon svelte-1thnwz")},m(n,t){E(n,e,t),E(n,i,t)},p:$,d(n){n&&(V(e),V(i))}}}function pn(l){let e,i,n,t,a,s;e=new gl({props:{show_label:l[3],Icon:Ne,float:l[4]==="upload"&&l[1]===null,label:l[2]||"Audio"}});const r=[on,un],f=[];function g(d,c){return d[1]===null||d[5]?0:1}return n=g(l),t=f[n]=r[n](l),{c(){j(e.$$.fragment),i=J(),t.c(),a=pe()},m(d,c){K(e,d,c),E(d,i,c),f[n].m(d,c),E(d,a,c),s=!0},p(d,c){const o={};c[0]&8&&(o.show_label=d[3]),c[0]&18&&(o.float=d[4]==="upload"&&d[1]===null),c[0]&4&&(o.label=d[2]||"Audio"),e.$set(o);let _=n;n=g(d),n===_?f[n].p(d,c):(ue(),R(f[_],1,1,()=>{f[_]=null}),oe(),t=f[n],t?t.p(d,c):(t=f[n]=r[n](d),t.c()),P(t,1),t.m(a.parentNode,a))},i(d){s||(P(e.$$.fragment,d),P(t),s=!0)},o(d){R(e.$$.fragment,d),R(t),s=!1},d(d){d&&(V(i),V(a)),Q(e,d),f[n].d(d)}}}const wn=500,ol=44;function kn(l){return new Promise((e,i)=>{let n=new FileReader;n.onerror=i,n.onload=()=>e(n.result),n.readAsDataURL(l)})}function vn(l,e,i){let{$$slots:n={},$$scope:t}=e,{value:a=null}=e,{label:s}=e,{show_label:r=!0}=e,{name:f=""}=e,{source:g}=e,{pending:d=!1}=e,{streaming:c=!1}=e,{autoplay:o=!1}=e,_=!1,m,A="",y,w=[],I=!1,q,O=!1,D=[0,100],F=[],W;function ee(){W=[Ie(()=>import("./module-447425fe.js"),["./module-447425fe.js","./module-a3cf0cc4.js","./index-3370be2a.js","./index-f2292b12.css"],import.meta.url),Ie(()=>import("./module-a5a0afa0.js"),["./module-a5a0afa0.js","./module-a3cf0cc4.js"],import.meta.url)]}c&&ee();const U=Be(),X=async(k,N)=>{let ae=new Blob(k,{type:"audio/wav"});i(1,a={data:await kn(ae),name:"audio.wav"}),U(N,a)};async function ie(){let k;try{k=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(N){if(N instanceof DOMException&&N.name=="NotAllowedError"){U("error","Please allow access to the microphone for recording.");return}throw N}if(k!=null){if(c){const[{MediaRecorder:N,register:ae},{connect:he}]=await Promise.all(W);await ae(await he()),m=new N(k,{mimeType:"audio/wav"});async function be(Me){let Ee=await Me.data.arrayBuffer(),ke=new Uint8Array(Ee);if(y||(i(19,y=new Uint8Array(Ee.slice(0,ol))),ke=new Uint8Array(Ee.slice(ol))),d)w.push(ke);else{let Fe=[y].concat(w,[ke]);X(Fe,"stream"),i(20,w=[])}}m.addEventListener("dataavailable",be)}else m=new MediaRecorder(k),m.addEventListener("dataavailable",N=>{F.push(N.data)}),m.addEventListener("stop",async()=>{i(7,_=!1),await X(F,"change"),await X(F,"stop_recording"),F=[]});O=!0}}async function le(){i(7,_=!0),U("start_recording"),O||await ie(),i(19,y=void 0),c?m.start(wn):m.start()}zl(()=>{m&&m.state!=="inactive"&&m.stop()});function fe(){m.stop(),c&&(i(7,_=!1),d&&i(21,I=!0))}function p(){U("change",null),U("clear"),i(8,A=""),i(1,a=null)}function te({detail:{values:k}}){a&&(U("change",{data:a.data,name:f,crop_min:k[0],crop_max:k[1]}),U("edit"))}function _e({detail:k}){i(1,a=k),U("change",{data:k.data,name:k.name}),U("upload",k)}function we(){U("stop"),U("end")}let{dragging:G=!1}=e;function de(k){C.call(this,l,k)}function me(k){C.call(this,l,k)}function ce(k){G=k,i(0,G)}const x=()=>i(8,A="edit");function ne(k){He[k?"unshift":"push"](()=>{q=k,i(9,q)})}function b(k){D=k,i(10,D)}return l.$$set=k=>{"value"in k&&i(1,a=k.value),"label"in k&&i(2,s=k.label),"show_label"in k&&i(3,r=k.show_label),"name"in k&&i(17,f=k.name),"source"in k&&i(4,g=k.source),"pending"in k&&i(18,d=k.pending),"streaming"in k&&i(5,c=k.streaming),"autoplay"in k&&i(6,o=k.autoplay),"dragging"in k&&i(0,G=k.dragging),"$$scope"in k&&i(29,t=k.$$scope)},l.$$.update=()=>{if(l.$$.dirty[0]&3932160&&I&&d===!1&&(i(21,I=!1),y&&w)){let k=[y].concat(w);i(20,w=[]),X(k,"stream")}l.$$.dirty[0]&1&&U("drag",G)},[G,a,s,r,g,c,o,_,A,q,D,le,fe,p,te,_e,we,f,d,y,w,I,n,de,me,ce,x,ne,b,t]}class An extends Ae{constructor(e){super(),ye(this,e,vn,pn,Se,{value:1,label:2,show_label:3,name:17,source:4,pending:18,streaming:5,autoplay:6,dragging:0},null,[-1,-1])}}function _l(l){let e,i,n;return i=new xl({props:{formatter:l[9],value:l[0]}}),i.$on("error",l[10]),i.$on("share",l[11]),{c(){e=H("div"),j(i.$$.fragment),h(e,"class","icon-button svelte-1yfus5a")},m(t,a){E(t,e,a),K(i,e,null),n=!0},p(t,a){const s={};a&1&&(s.value=t[0]),i.$set(s)},i(t){n||(P(i.$$.fragment,t),n=!0)},o(t){R(i.$$.fragment,t),n=!1},d(t){t&&V(e),Q(i)}}}function yn(l){let e,i,n,t,a,s;return{c(){e=H("audio"),e.controls=!0,h(e,"preload","metadata"),Te(e.src,i=l[0]?.data)||h(e,"src",i),h(e,"data-testid",n=`${l[1]}-audio`),h(e,"class","svelte-1yfus5a")},m(r,f){E(r,e,f),a||(s=[ml(t=pl.call(null,e,{autoplay:l[3]})),B(e,"play",l[7]),B(e,"pause",l[8]),B(e,"ended",l[5])],a=!0)},p(r,f){f&1&&!Te(e.src,i=r[0]?.data)&&h(e,"src",i),f&2&&n!==(n=`${r[1]}-audio`)&&h(e,"data-testid",n),t&&re(t.update)&&f&8&&t.update.call(null,{autoplay:r[3]})},i:$,o:$,d(r){r&&V(e),a=!1,ge(s)}}}function Sn(l){let e,i;return e=new Wl({props:{size:"small",$$slots:{default:[En]},$$scope:{ctx:l}}}),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t&8192&&(a.$$scope={dirty:t,ctx:n}),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function En(l){let e,i;return e=new Ne({}),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function Vn(l){let e,i,n,t,a,s,r;e=new gl({props:{show_label:l[2],Icon:Ne,float:!1,label:l[1]||"Audio"}});let f=l[4]&&l[0]!==null&&_l(l);const g=[Sn,yn],d=[];function c(o,_){return o[0]===null?0:1}return t=c(l),a=d[t]=g[t](l),{c(){j(e.$$.fragment),i=J(),f&&f.c(),n=J(),a.c(),s=pe()},m(o,_){K(e,o,_),E(o,i,_),f&&f.m(o,_),E(o,n,_),d[t].m(o,_),E(o,s,_),r=!0},p(o,[_]){const m={};_&4&&(m.show_label=o[2]),_&2&&(m.label=o[1]||"Audio"),e.$set(m),o[4]&&o[0]!==null?f?(f.p(o,_),_&17&&P(f,1)):(f=_l(o),f.c(),P(f,1),f.m(n.parentNode,n)):f&&(ue(),R(f,1,1,()=>{f=null}),oe());let A=t;t=c(o),t===A?d[t].p(o,_):(ue(),R(d[A],1,1,()=>{d[A]=null}),oe(),a=d[t],a?a.p(o,_):(a=d[t]=g[t](o),a.c()),P(a,1),a.m(s.parentNode,s))},i(o){r||(P(e.$$.fragment,o),P(f),P(a),r=!0)},o(o){R(e.$$.fragment,o),R(f),R(a),r=!1},d(o){o&&(V(i),V(n),V(s)),Q(e,o),f&&f.d(o),d[t].d(o)}}}function Pn(l,e,i){let{value:n=null}=e,{label:t}=e,{name:a}=e,{show_label:s=!0}=e,{autoplay:r}=e,{show_share_button:f=!1}=e;const g=Be();function d(){g("stop"),g("end")}function c(y){C.call(this,l,y)}function o(y){C.call(this,l,y)}const _=async y=>y?`<audio controls src="${await $l(y.data,"url")}"></audio>`:"";function m(y){C.call(this,l,y)}function A(y){C.call(this,l,y)}return l.$$set=y=>{"value"in y&&i(0,n=y.value),"label"in y&&i(1,t=y.label),"name"in y&&i(6,a=y.name),"show_label"in y&&i(2,s=y.show_label),"autoplay"in y&&i(3,r=y.autoplay),"show_share_button"in y&&i(4,f=y.show_share_button)},l.$$.update=()=>{l.$$.dirty&65&&n&&g("change",{name:a,data:n?.data})},[n,t,s,r,f,d,a,c,o,_,m,A]}class Rn extends Ae{constructor(e){super(),ye(this,e,Pn,Vn,Se,{value:0,label:1,name:6,show_label:2,autoplay:3,show_share_button:4})}}function Tn(l){let e,i;return e=new Rn({props:{autoplay:l[15],show_label:l[9],show_share_button:l[16],value:l[17],name:l[17]?.name||"audio_file",label:l[8]}}),e.$on("share",l[35]),e.$on("error",l[36]),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&32768&&(a.autoplay=n[15]),t[0]&512&&(a.show_label=n[9]),t[0]&65536&&(a.show_share_button=n[16]),t[0]&131072&&(a.value=n[17]),t[0]&131072&&(a.name=n[17]?.name||"audio_file"),t[0]&256&&(a.label=n[8]),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function Bn(l){let e,i;return e=new An({props:{label:l[8],show_label:l[9],value:l[17],name:l[6],source:l[7],pending:l[10],streaming:l[11],autoplay:l[15],$$slots:{default:[Hn]},$$scope:{ctx:l}}}),e.$on("change",l[23]),e.$on("stream",l[24]),e.$on("drag",l[25]),e.$on("edit",l[26]),e.$on("play",l[27]),e.$on("pause",l[28]),e.$on("stop",l[29]),e.$on("end",l[30]),e.$on("start_recording",l[31]),e.$on("stop_recording",l[32]),e.$on("upload",l[33]),e.$on("error",l[34]),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&256&&(a.label=n[8]),t[0]&512&&(a.show_label=n[9]),t[0]&131072&&(a.value=n[17]),t[0]&64&&(a.name=n[6]),t[0]&128&&(a.source=n[7]),t[0]&1024&&(a.pending=n[10]),t[0]&2048&&(a.streaming=n[11]),t[0]&32768&&(a.autoplay=n[15]),t[1]&64&&(a.$$scope={dirty:t,ctx:n}),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function Hn(l){let e,i;return e=new Xl({props:{type:"audio"}}),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p:$,i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function Mn(l){let e,i,n,t,a,s;const r=[l[1]];let f={};for(let o=0;o<r.length;o+=1)f=Kl(f,r[o]);e=new Ql({props:f});const g=[Bn,Tn],d=[];function c(o,_){return o[5]==="dynamic"?0:1}return n=c(l),t=d[n]=g[n](l),{c(){j(e.$$.fragment),i=J(),t.c(),a=pe()},m(o,_){K(e,o,_),E(o,i,_),d[n].m(o,_),E(o,a,_),s=!0},p(o,_){const m=_[0]&2?Yl(r,[ql(o[1])]):{};e.$set(m);let A=n;n=c(o),n===A?d[n].p(o,_):(ue(),R(d[A],1,1,()=>{d[A]=null}),oe(),t=d[n],t?t.p(o,_):(t=d[n]=g[n](o),t.c()),P(t,1),t.m(a.parentNode,a))},i(o){s||(P(e.$$.fragment,o),P(t),s=!0)},o(o){R(e.$$.fragment,o),R(t),s=!1},d(o){o&&(V(i),V(a)),Q(e,o),d[n].d(o)}}}function Fn(l){let e,i;return e=new Gl({props:{variant:l[5]==="dynamic"&&l[0]===null&&l[7]==="upload"?"dashed":"solid",border_mode:l[18]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],visible:l[4],container:l[12],scale:l[13],min_width:l[14],$$slots:{default:[Mn]},$$scope:{ctx:l}}}),{c(){j(e.$$.fragment)},m(n,t){K(e,n,t),i=!0},p(n,t){const a={};t[0]&161&&(a.variant=n[5]==="dynamic"&&n[0]===null&&n[7]==="upload"?"dashed":"solid"),t[0]&262144&&(a.border_mode=n[18]?"focus":"base"),t[0]&4&&(a.elem_id=n[2]),t[0]&8&&(a.elem_classes=n[3]),t[0]&16&&(a.visible=n[4]),t[0]&4096&&(a.container=n[12]),t[0]&8192&&(a.scale=n[13]),t[0]&16384&&(a.min_width=n[14]),t[0]&495587|t[1]&64&&(a.$$scope={dirty:t,ctx:n}),e.$set(a)},i(n){i||(P(e.$$.fragment,n),i=!0)},o(n){R(e.$$.fragment,n),i=!1},d(n){Q(e,n)}}}function Ln(l,e,i){const n=Be();let{elem_id:t=""}=e,{elem_classes:a=[]}=e,{visible:s=!0}=e,{mode:r}=e,{value:f=null}=e,g=null,{name:d}=e,{source:c}=e,{label:o}=e,{root:_}=e,{show_label:m}=e,{pending:A}=e,{streaming:y}=e,{root_url:w}=e,{container:I=!0}=e,{scale:q=null}=e,{min_width:O=void 0}=e,{loading_status:D}=e,{autoplay:F=!1}=e,{show_share_button:W=!1}=e,ee,U;const X=({detail:b})=>i(0,f=b),ie=({detail:b})=>{i(0,f=b),n("stream",f)},le=({detail:b})=>i(18,U=b);function fe(b){C.call(this,l,b)}function p(b){C.call(this,l,b)}function te(b){C.call(this,l,b)}function _e(b){C.call(this,l,b)}function we(b){C.call(this,l,b)}function G(b){C.call(this,l,b)}function de(b){C.call(this,l,b)}function me(b){C.call(this,l,b)}const ce=({detail:b})=>{i(1,D=D||{}),i(1,D.status="error",D),n("error",b)};function x(b){C.call(this,l,b)}function ne(b){C.call(this,l,b)}return l.$$set=b=>{"elem_id"in b&&i(2,t=b.elem_id),"elem_classes"in b&&i(3,a=b.elem_classes),"visible"in b&&i(4,s=b.visible),"mode"in b&&i(5,r=b.mode),"value"in b&&i(0,f=b.value),"name"in b&&i(6,d=b.name),"source"in b&&i(7,c=b.source),"label"in b&&i(8,o=b.label),"root"in b&&i(20,_=b.root),"show_label"in b&&i(9,m=b.show_label),"pending"in b&&i(10,A=b.pending),"streaming"in b&&i(11,y=b.streaming),"root_url"in b&&i(21,w=b.root_url),"container"in b&&i(12,I=b.container),"scale"in b&&i(13,q=b.scale),"min_width"in b&&i(14,O=b.min_width),"loading_status"in b&&i(1,D=b.loading_status),"autoplay"in b&&i(15,F=b.autoplay),"show_share_button"in b&&i(16,W=b.show_share_button)},l.$$.update=()=>{l.$$.dirty[0]&3145729&&i(17,ee=en(f,_,w)),l.$$.dirty[0]&4194305&&JSON.stringify(f)!==JSON.stringify(g)&&(i(22,g=f),n("change"))},[f,D,t,a,s,r,d,c,o,m,A,y,I,q,O,F,W,ee,U,n,_,w,g,X,ie,le,fe,p,te,_e,we,G,de,me,ce,x,ne]}class Un extends Ae{constructor(e){super(),ye(this,e,Ln,Fn,Se,{elem_id:2,elem_classes:3,visible:4,mode:5,value:0,name:6,source:7,label:8,root:20,show_label:9,pending:10,streaming:11,root_url:21,container:12,scale:13,min_width:14,loading_status:1,autoplay:15,show_share_button:16},null,[-1,-1])}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),z()}get elem_classes(){return this.$$.ctx[3]}set elem_classes(e){this.$$set({elem_classes:e}),z()}get visible(){return this.$$.ctx[4]}set visible(e){this.$$set({visible:e}),z()}get mode(){return this.$$.ctx[5]}set mode(e){this.$$set({mode:e}),z()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),z()}get name(){return this.$$.ctx[6]}set name(e){this.$$set({name:e}),z()}get source(){return this.$$.ctx[7]}set source(e){this.$$set({source:e}),z()}get label(){return this.$$.ctx[8]}set label(e){this.$$set({label:e}),z()}get root(){return this.$$.ctx[20]}set root(e){this.$$set({root:e}),z()}get show_label(){return this.$$.ctx[9]}set show_label(e){this.$$set({show_label:e}),z()}get pending(){return this.$$.ctx[10]}set pending(e){this.$$set({pending:e}),z()}get streaming(){return this.$$.ctx[11]}set streaming(e){this.$$set({streaming:e}),z()}get root_url(){return this.$$.ctx[21]}set root_url(e){this.$$set({root_url:e}),z()}get container(){return this.$$.ctx[12]}set container(e){this.$$set({container:e}),z()}get scale(){return this.$$.ctx[13]}set scale(e){this.$$set({scale:e}),z()}get min_width(){return this.$$.ctx[14]}set min_width(e){this.$$set({min_width:e}),z()}get loading_status(){return this.$$.ctx[1]}set loading_status(e){this.$$set({loading_status:e}),z()}get autoplay(){return this.$$.ctx[15]}set autoplay(e){this.$$set({autoplay:e}),z()}get show_share_button(){return this.$$.ctx[16]}set show_share_button(e){this.$$set({show_share_button:e}),z()}}const Xn=Un,Gn=["static","dynamic"],Jn=()=>({type:{input_payload:"{ name: string; data: string }",response_object:"{ name: string; data: string, is_file: boolean }"},description:{input_payload:"audio data as object with filename and base64 string",response_object:"object that includes path to audio file. The URL: {ROOT}file={name} contains the data"},example_data:{name:"audio.wav",data:"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA="}});export{Xn as Component,Jn as document,Gn as modes};
|
4 |
-
//# sourceMappingURL=index-b7124075.js.map
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio_client/data_classes.py
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
from __future__ import annotations
|
2 |
-
|
3 |
-
from typing import TypedDict
|
4 |
-
|
5 |
-
from typing_extensions import NotRequired
|
6 |
-
|
7 |
-
|
8 |
-
class FileData(TypedDict):
|
9 |
-
name: str | None # filename
|
10 |
-
data: str | None # base64 encoded data
|
11 |
-
size: NotRequired[int | None] # size in bytes
|
12 |
-
is_file: NotRequired[
|
13 |
-
bool
|
14 |
-
] # whether the data corresponds to a file or base64 encoded data
|
15 |
-
orig_name: NotRequired[str] # original filename
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Dewa/Text-Summurisation/app.py
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
from transformers import pipeline
|
2 |
-
import gradio as gr
|
3 |
-
|
4 |
-
model=pipeline("summarization")
|
5 |
-
|
6 |
-
def predict(prompt):
|
7 |
-
summary=model(prompt)[0]['summary_text']
|
8 |
-
return summary
|
9 |
-
|
10 |
-
|
11 |
-
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
12 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Dinoking/Guccio-AI-Designer/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Guccio-AI-Designer
|
3 |
-
emoji: 👗🧢🥻
|
4 |
-
colorFrom: indigo
|
5 |
-
colorTo: gray
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 2.9.4
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
license: cc-by-nc-3.0
|
11 |
-
---
|
12 |
-
|
13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces#reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Dorado607/ChuanhuChatGPT/modules/shared.py
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
from modules.presets import COMPLETION_URL, BALANCE_API_URL, USAGE_API_URL, API_HOST
|
2 |
-
import os
|
3 |
-
import queue
|
4 |
-
import openai
|
5 |
-
|
6 |
-
class State:
|
7 |
-
interrupted = False
|
8 |
-
multi_api_key = False
|
9 |
-
completion_url = COMPLETION_URL
|
10 |
-
balance_api_url = BALANCE_API_URL
|
11 |
-
usage_api_url = USAGE_API_URL
|
12 |
-
|
13 |
-
def interrupt(self):
|
14 |
-
self.interrupted = True
|
15 |
-
|
16 |
-
def recover(self):
|
17 |
-
self.interrupted = False
|
18 |
-
|
19 |
-
def set_api_host(self, api_host: str):
|
20 |
-
api_host = api_host.rstrip("/")
|
21 |
-
if not api_host.startswith("http"):
|
22 |
-
api_host = f"https://{api_host}"
|
23 |
-
if api_host.endswith("/v1"):
|
24 |
-
api_host = api_host[:-3]
|
25 |
-
self.completion_url = f"{api_host}/v1/chat/completions"
|
26 |
-
self.balance_api_url = f"{api_host}/dashboard/billing/credit_grants"
|
27 |
-
self.usage_api_url = f"{api_host}/dashboard/billing/usage"
|
28 |
-
os.environ["OPENAI_API_BASE"] = api_host
|
29 |
-
|
30 |
-
def reset_api_host(self):
|
31 |
-
self.completion_url = COMPLETION_URL
|
32 |
-
self.balance_api_url = BALANCE_API_URL
|
33 |
-
self.usage_api_url = USAGE_API_URL
|
34 |
-
os.environ["OPENAI_API_BASE"] = f"https://{API_HOST}"
|
35 |
-
return API_HOST
|
36 |
-
|
37 |
-
def reset_all(self):
|
38 |
-
self.interrupted = False
|
39 |
-
self.completion_url = COMPLETION_URL
|
40 |
-
|
41 |
-
def set_api_key_queue(self, api_key_list):
|
42 |
-
self.multi_api_key = True
|
43 |
-
self.api_key_queue = queue.Queue()
|
44 |
-
for api_key in api_key_list:
|
45 |
-
self.api_key_queue.put(api_key)
|
46 |
-
|
47 |
-
def switching_api_key(self, func):
|
48 |
-
if not hasattr(self, "api_key_queue"):
|
49 |
-
return func
|
50 |
-
|
51 |
-
def wrapped(*args, **kwargs):
|
52 |
-
api_key = self.api_key_queue.get()
|
53 |
-
args[0].api_key = api_key
|
54 |
-
ret = func(*args, **kwargs)
|
55 |
-
self.api_key_queue.put(api_key)
|
56 |
-
return ret
|
57 |
-
|
58 |
-
return wrapped
|
59 |
-
|
60 |
-
|
61 |
-
state = State()
|
62 |
-
|
63 |
-
modules_path = os.path.dirname(os.path.realpath(__file__))
|
64 |
-
chuanhu_path = os.path.dirname(modules_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|