diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Assassins Creed Iii 103 Skidrow Patch Everything You Need to Know About the Latest Version of the Game.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Assassins Creed Iii 103 Skidrow Patch Everything You Need to Know About the Latest Version of the Game.md
deleted file mode 100644
index fe452252bde2f2e7fba390e6c4182f2cb5471534..0000000000000000000000000000000000000000
--- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Assassins Creed Iii 103 Skidrow Patch Everything You Need to Know About the Latest Version of the Game.md
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
Assassins Creed III 103 Skidrow Patch: Everything You Need to Know
-
If you are a fan of the Assassins Creed series, you might be interested in playing the third installment of the franchise, Assassins Creed III. This game takes you to the American Revolution era, where you can explore the historical events and locations, as well as engage in stealth, combat, and parkour. However, if you want to play this game on your PC, you might encounter some issues and bugs that can ruin your gaming experience. That's why you might want to use the Assassins Creed III 103 Skidrow Patch, which is a crack and update for the game that fixes many problems and adds new features. In this article, we will tell you everything you need to know about this patch, including what it is, how to download and install it, and how to fix common issues and errors with it. Let's get started!
Assassins Creed III is an action-adventure game developed by Ubisoft Montreal and published by Ubisoft in 2012. It is the fifth main game in the Assassins Creed series, and a sequel to Assassins Creed: Revelations. The game follows the story of Desmond Miles, a modern-day assassin who relives the memories of his ancestors through a device called the Animus. In this game, Desmond accesses the memories of Ratonhnhaké:ton, also known as Connor, a half-English, half-Mohawk assassin who fights against the Templars during the American Revolution. The game features an open-world environment that spans various locations in colonial America, such as Boston, New York, the Frontier, and the Caribbean Sea. The game also introduces naval combat, hunting, crafting, and homestead management as new gameplay elements.
-
The main features and improvements of Assassins Creed III
-
Assassins Creed III is considered one of the most ambitious and innovative games in the series, as it offers many new features and improvements over its predecessors. Some of these features are:
-
-
A new engine: The game uses a new engine called Anvil Next, which allows for more realistic graphics, animations, physics, weather effects, and crowd behavior.
-
A new protagonist: The game introduces a new protagonist, Connor, who has a unique fighting style that combines tomahawks, bows, pistols, rope darts, and hidden blades. Connor also has access to various outfits and weapons that reflect his Native American heritage.
-
A new setting: The game explores a new historical period, the American Revolution, which offers a rich and diverse backdrop for the story. The game also features historical figures such as George Washington, Benjamin Franklin, Thomas Jefferson, Samuel Adams, Paul Revere, Charles Lee, and more.
-
A new gameplay mode: The game features a multiplayer mode that allows players to compete against each other in various modes such as deathmatch, domination, wolfpack, manhunt, artifact assault, and more. The multiplayer mode also has a story mode that reveals more about the Templars' plans.
-
-
What is Skidrow?
-
A brief history and background of Skidrow group
-
Skidrow is a group of hackers and crackers who specialize in cracking and releasing games for PC. They are one of the most popular and notorious groups in the scene, as they have cracked hundreds of games since their inception in 1990. Some of their most famous releases include Grand Theft Auto V, The Witcher 3: Wild Hunt, Far Cry 5, and Red Dead Redemption 2. Skidrow is also known for their rivalry with other groups such as Reloaded, Codex, and CPY.
-
Assassins Creed 3 update 1.03 skidrow crack
-How to install Assassins Creed III skidrow patch 103
-Assassins Creed III version 1.03 skidrow download
-Assassins Creed 3 skidrow patch 103 fix
-Assassins Creed III skidrow update 1.03 error
-Download Assassins Creed 3 patch 1.03 skidrow free
-Assassins Creed III skidrow patch 103 not working
-Assassins Creed 3 update 1.03 skidrow torrent
-Assassins Creed III skidrow patch 103 changelog
-Assassins Creed 3 skidrow patch 103 gameplay
-Assassins Creed III version 1.03 skidrow trainer
-Assassins Creed 3 skidrow patch 103 lag
-Assassins Creed III skidrow update 1.03 features
-Assassins Creed 3 patch 1.03 skidrow size
-Assassins Creed III skidrow patch 103 requirements
-Assassins Creed 3 skidrow patch 103 mods
-Assassins Creed III version 1.03 skidrow cheats
-Assassins Creed 3 update 1.03 skidrow review
-Assassins Creed III skidrow patch 103 steam
-Assassins Creed 3 skidrow patch 103 save game
-Assassins Creed III skidrow update 1.03 release date
-Assassins Creed 3 patch 1.03 skidrow keygen
-Assassins Creed III skidrow patch 103 multiplayer
-Assassins Creed 3 skidrow patch 103 graphics
-Assassins Creed III version 1.03 skidrow system requirements
-Assassins Creed 3 update 1.03 skidrow repack
-Assassins Creed III skidrow patch 103 dlc
-Assassins Creed 3 skidrow patch 103 bugs
-Assassins Creed III skidrow update 1.03 performance
-Assassins Creed 3 patch 1.03 skidrow iso
-Assassins Creed III skidrow patch 103 sound
-Assassins Creed 3 skidrow patch 103 resolution
-Assassins Creed III version 1.03 skidrow comparison
-Assassins Creed 3 update 1.03 skidrow rar password
-Assassins Creed III skidrow patch 103 achievements
-Assassins Creed 3 skidrow patch 103 missions
-Assassins Creed III skidrow update 1.03 unlocker
-Assassins Creed 3 patch 1.03 skidrow direct link
-Assassins Creed III skidrow patch 103 characters
-Assassins Creed 3 skidrow patch 103 settings
-Assassins Creed III version 1.03 skidrow crack only
-Assassins Creed 3 update 1.03 skidrow megaupload
-Assassins Creed III skidrow patch 103 screenshots
-Assassins Creed 3 skidrow patch 103 video
-Assassins Creed III skidrow update 1.03 guide
-Assassins Creed iii patch v1.03 with theta crack download free full pc game torrent cracked by reloaded and blackbox repack working link no survey no password no virus no malware no adfly no survey no password no virus no malware no adfly no survey no password no virus no malware no adfly no survey no password no virus no malware no adfly
-
The benefits and risks of using Skidrow cracks and patches
-
Using Skidrow cracks and patches can have some benefits and risks for PC gamers. Some of the benefits are:
-
-
You can play games for free without buying them.
-
You can play games without DRM (digital rights management) restrictions or online activation.
-
You can play games before their official release date or in regions where they are not available.
-
You can play games with mods or cheats that are not supported by the official version.
-
-
Some of the risks are:
-
-
You can expose your PC to viruses or malware that can harm your system or steal your data.
-
You can face legal consequences if you are caught downloading or distributing pirated games.
-
You can miss out on updates or patches that fix bugs or add new content to the games.
-
You can experience compatibility or performance issues with some games or hardware.
-
You can lose access to online features or multiplayer modes that require an official account or connection.
-
-
What is Assassins Creed III 103 Skidrow Patch?
-
A detailed description of the patch and its contents
-
Assassins Creed III 103 Skidrow Patch is a crack and update for Assassins Creed III that was released by Skidrow in 2013. It is also known as Assassins Creed III Update v1.03 + Crack Only Proper-Reloaded. This patch fixes many bugs and glitches that were present in the original version of the game, such as:
-
-
Crashes or freezes during gameplay or cutscenes.
-
Audio or subtitle synchronization issues.
-
Missing textures or models.
-
Incorrect animations or movements.
-
Broken quests or objectives.
-
Infinite loading screens or black screens.
-
-
This patch also adds some new features and improvements to the game, such as:
-
-
A new difficulty level: Nightmare Mode.
-
A new multiplayer map: Saint Pierre.
-
A new multiplayer character: The Siren.
-
A new single-player mission: The Tyranny of King Washington - The Infamy (Part 1).
-
A new single-player outfit: The Captain Kidd's Outfit.
-
A new single-player weapon: The Sawtooth Sword.
-
-
How to download and install the patch correctly
-
To download and install Assassins Creed III 103 Skidrow Patch correctly, you need to follow these steps:
-
-
Download Assassins Creed III 103 Skidrow Patch from a reliable source such as Skidrow Reloaded.
-
Extract the files from the downloaded archive using a program such as WinRAR or 7-Zip.
-
Copy all the files from the Crack folder to your Assassins Creed III installation folder (usually C:\Program Files (x86)\Ubisoft\Assassin's Creed III).
-
Run AC3SP.exe as administrator to start playing the game with the patch applied.
-
-
How to fix common issues and errors with Assassins Creed III 103 Skidrow Patch?
-
A list of possible problems and solutions for the patch users
-
If you encounter any issues or errors while using Assassins Creed III 103 Skidrow Patch, you can try some of these possible solutions:
-
-
Problem
Solution
-
The game does not start or crashes at launch.
- Make sure your PC meets the minimum system requirements for Assassins Creed III. - Make sure you have installed all the necessary drivers for your graphics card. - Make sure you have disabled any antivirus or firewall programs that might interfere with - Try to run the game in compatibility mode for Windows 7 or 8. - Try to update or reinstall DirectX and Microsoft Visual C++ Redistributable. - Try to delete or rename the file AC3SP.ini in your installation folder.
-
The game runs slowly or lags during gameplay.
- Make sure your PC meets the recommended system requirements for Assassins Creed III. - Make sure you have adjusted the graphics settings to suit your PC's capabilities. - Make sure you have closed any background programs that might consume your CPU or RAM. - Make sure you have defragmented your hard drive and cleaned your registry. - Try to lower the resolution or disable some effects such as anti-aliasing, shadows, or reflections.
-
The game does not save or load properly.
- Make sure you have enough free space on your hard drive. - Make sure you have not modified or deleted any game files. - Make sure you have backed up your save files before applying the patch. - Make sure you have run AC3SP.exe as administrator. - Try to delete or rename the folder Ubisoft Game Launcher in C:\Program Files (x86)\Ubisoft.
-
The game does not connect to the internet or multiplayer mode.
- Make sure you have a stable and fast internet connection. - Make sure you have allowed the game through your firewall or router settings. - Make sure you have updated your game to the latest version. - Make sure you have created and logged in to a Ubisoft account. - Try to use a VPN or proxy service to bypass any regional restrictions.
-
The game shows an error message such as "AC3SP.exe has stopped working" or "Ubisoft Game Launcher error code 2".
- Make sure you have followed all the steps in the previous solutions. - Make sure you have downloaded and installed the patch from a trusted source. - Make sure you have copied all the files from the Crack folder correctly. - Try to reinstall the game and the patch from scratch. - Try to contact Skidrow for support and feedback.
-
-
How to contact Skidrow for support and feedback
-
If none of the solutions above work for you, or if you have any questions, suggestions, or feedback for Skidrow, you can try to contact them through their official website, Skidrow Reloaded. There, you can find more information about their releases, updates, news, and comments. You can also join their community and chat with other users who might have similar issues or interests. However, be aware that Skidrow is not an official source of support for Assassins Creed III, and they might not respond to your messages or requests. Therefore, use their services at your own risk and discretion.
-
Conclusion
-
A summary of the main points and a call to action for the readers
-
Assassins Creed III 103 Skidrow Patch is a crack and update for Assassins Creed III that fixes many bugs and glitches and adds new features and improvements to the game. It is a great way to enjoy one of the best games in the Assassins Creed series without spending any money or facing any restrictions. However, it also comes with some risks and challenges that might affect your PC's security or performance. Therefore, before using this patch, make sure you know what you are doing and follow the instructions carefully. If you encounter any problems or errors with this patch, try some of the solutions we provided above, or contact Skidrow for support and feedback. We hope this article was helpful and informative for you. If you liked it, please share it with your friends and fellow gamers. And if you want to play more games like Assassins Creed III, check out our website for more cracks and patches from Skidrow. Thank you for reading!
-
FAQs
-
Here are some frequently asked questions about Assassins Creed III 103 Skidrow Patch:
-
-
Q: Do I need to have Assassins Creed III installed before applying this patch? A: Yes, you need to have Assassins Creed III installed on your PC before applying this patch. You can download Assassins Creed III from Skidrow Reloaded.
-
Q: Do I need to apply any previous patches before applying this patch? A: No, you do not need to apply any previous patches before applying this patch. This patch includes all the previous updates and fixes for Assassins Creed III.
-
Q: Does this patch work with Steam or Uplay versions of Assassins Creed III? A: No, this patch only works with Skidrow version of Assassins Creed III. If you have Steam or Uplay versions of Assassins Creed III, you need to uninstall them and install Skidrow version instead.
-
Q: Does this patch include any DLCs (downloadable content) for Assassins Creed III? A: Yes, this patch includes one DLC for Assassins Creed III: The Tyranny of King Washington - The Infamy (Part 1). This is a single-player mission that explores an alternate history where George Washington becomes a tyrant. You can access this mission from the main menu of the game.
-
Q: Can I play online or multiplayer mode with this patch? A: Yes, you can play online or multiplayer mode with this patch. However, you need to create and log in to a Ubisoft account first. You also need to allow the game through your firewall or router settings. You might also face some lag or connection issues depending on your internet speed and location.
-
- 0a6ba089eb
-
-
\ No newline at end of file
diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Cracked Dc Unlocker Unlimited Credits New Versionl The Latest and Most Powerful Version of DC-Unlocker.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Cracked Dc Unlocker Unlimited Credits New Versionl The Latest and Most Powerful Version of DC-Unlocker.md
deleted file mode 100644
index 0b5d082b9cd52063a9b00cac8a73879fa2d80005..0000000000000000000000000000000000000000
--- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Cracked Dc Unlocker Unlimited Credits New Versionl The Latest and Most Powerful Version of DC-Unlocker.md
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
Cracked DC Unlocker Unlimited Credits New Version
-
Do you want to unlock your modem, router, or phone without paying for credits or waiting for hours? If yes, then you might be interested in Cracked DC Unlocker Unlimited Credits New Version. This is a software that allows you to bypass the limitations of the official DC Unlocker and use it for free and unlimited. But what is DC Unlocker and how does it work? And what are the advantages and disadvantages of using the cracked version? In this article, we will answer these questions and more. We will also show you how to download, install, and use Cracked DC Unlocker Unlimited Credits New Version on your device. So, let's get started!
-
Cracked Dc Unlocker Unlimited Credits New Versionl
DC Unlocker is a software that helps you to unlock various devices such as modems, routers, phones, and dongles from different brands and models. It supports over 6000 devices from Huawei, ZTE, LG, Nokia, Alcatel, Sony, Lenovo, Xiaomi, and more. It can also repair IMEI, firmware, bootloaders, NVM, security area, etc. It is one of the most popular and reliable unlocking tools in the market.
-
A brief introduction to DC Unlocker and its features
-
DC Unlocker was created in 2004 by a team of professionals who wanted to provide a fast and easy solution for unlocking devices. It works by connecting your device to your PC via USB cable and detecting its information automatically. Then, it generates an unlock code or performs a direct unlock depending on the device model. It also has an online server that updates the software regularly with new models and features.
-
Some of the main features of DC Unlocker are:
-
Cracked Dc Unlocker Software Free Download
-Dc Unlocker Patched with Unlimited Credits 2017
-Dc Unlocker Client Software V1.00.0565 Cracked
-How to use Dc Unlocker Cracked Version
-Dc Unlocker Free Read Bootloader Huawei Phones
-Dc Unlocker Free Unlock Huawei Modems
-Dc Unlocker Free Write Firmware Huawei Modems
-Dc Unlocker Cracked Username and Password
-Dc Unlocker Cracked for Qualcomm and Hisilicon Devices
-Dc Unlocker Cracked Latest Version Download
-Dc Unlocker Cracked No Sign in Support
-Dc Unlocker Cracked No Credits Required
-Dc Unlocker Cracked Tested and Working
-Dc Unlocker Cracked XDA Forums
-Dc Unlocker Cracked News Updates and Guides
-Dc Unlocker Cracked for Different Provider SIM
-Dc Unlocker Cracked RAR File Download
-Dc Unlocker Cracked dccrap.exe Download
-Dc Unlocker Cracked for Huawei Smart Phones
-Dc Unlocker Cracked for Huawei Modems
-How to Install Dc Unlocker Cracked Version
-How to Update Dc Unlocker Cracked Version
-How to Fix Errors in Dc Unlocker Cracked Version
-How to Get Free Credits in Dc Unlocker Cracked Version
-How to Bypass Login in Dc Unlocker Cracked Version
-How to Change Language in Dc Unlocker Cracked Version
-How to Support New Models in Dc Unlocker Cracked Version
-How to Reset Counter in Dc Unlocker Cracked Version
-How to Repair IMEI in Dc Unlocker Cracked Version
-How to Backup and Restore Data in Dc Unlocker Cracked Version
-How to Enable Voice Feature in Dc Unlocker Cracked Version
-How to Flash Custom Firmware in Dc Unlocker Cracked Version
-How to Remove FRP Lock in Dc Unlocker Cracked Version
-How to Root and Unroot Devices in Dc Unlocker Cracked Version
-How to Generate Code from IMEI in Dc Unlocker Cracked Version
-How to Calculate Hash Code in Dc Unlocker Cracked Version
-How to Detect Device Automatically in Dc Unlocker Cracked Version
-How to Select COM Port Manually in Dc Unlocker Cracked Version
-How to Scan for Available Ports in Dc Unlocker Cracked Version
-How to Check Device Information in Dc Unlocker Cracked Version
-How to Check Device Status in Dc Unlocker Cracked Version
-How to Check Device Firmware Version in Dc Unlocker Cracked Version
-How to Check Device Hardware Version in Dc Unlocker Cracked Version
-How to Check Device Security Area Backup in Dc Unlocker Cracked Version
-How to Check Device NV Items Backup in Dc Unlocker Cracked Version
-How to Check Device SIM Lock Status in Dc Unlocker Cracked Version
-How to Check Device Network Lock Status in Dc Unlocker Cracked Version
-How to Check Device Bootloader Lock Status in Dc Unlocker Cracked Version
-How to Check Device Warranty Status in Dc Unlocker Cracked Version
-
-
It can unlock devices in a few seconds or minutes without requiring any technical skills or knowledge.
-
It can unlock devices that are not supported by other tools or methods.
-
It can unlock devices that are hard-locked or have a counter blocked by too many wrong codes.
-
It can unlock devices that have customized firmware or software versions.
-
It can unlock devices that have different SIM card sizes or types.
-
It can unlock devices from any network or country.
-
-
How to use DC Unlocker to unlock modems, routers, and phones
-
To use DC Unlocker to unlock your device, you need to follow these steps:
-
-
Download and install DC Unlocker on your PC from the official website: https://www.dc-unlocker.com/
-
Buy credits from the website or from a reseller. You need credits to perform unlocking operations with DC Unlocker. The price of credits depends on the device model and the number of credits required. You can check the price list here: https://www.dc-unlocker.com/buy/user_prices
-
Connect your device to your PC via USB cable. Make sure you have installed the drivers for your device on your PC. You can find the drivers here: https://www.dc-unlocker.com/downloads/drivers
-
Run DC Unlocker as administrator and click on the magnifying glass icon to detect your device.
-
Select your device model from the drop-down menu or leave it as auto-detect.
-
Click on the unlocking tab and choose either unlock or read unlock code depending on your device model.
-
Wait for a few seconds or minutes until the process is completed.
-
Disconnect your device from your PC and insert a different SIM card.
-
Enjoy your unlocked device!
-
-
What is Cracked DC Unlocker Unlimited Credits?
-
Cracked DC Unlocker Unlimited Credits is a modified version of DC Unlocker that allows you to use it without paying for credits or registering an account. It also gives you unlimited credits so you can unlock as many devices as you want. It is created by hackers who crack the original software and bypass its security features.
-
The difference between the official and the cracked version of DC Unlocker
-
The main difference between the official and the cracked version of DC Unlocker is that the official version is legal and safe while the cracked version is illegal and risky. The official version is supported by the developers who update it regularly with new models and features. It also has a customer service that can help you with any issues or questions. The cracked version is not supported by anyone and may contain viruses or malware that can harm your PC or device. It also may not work properly or at all with some models or versions.
-
The benefits and risks of using Cracked DC Unlocker Unlimited Credits
-
The benefits of using Cracked DC Unlocker Unlimited Credits are:
-
-
You can save money by not paying for credits or subscriptions.
-
You can unlock unlimited devices without any restrictions or limitations.
-
You can unlock devices that are not supported by the official version.
-
-
The risks of using Cracked DC Unlocker Unlimited Credits are:
-
-
You may violate the terms and conditions of DC Unlocker and face legal consequences.
-
You may damage your PC or device by installing viruses or malware from unknown sources.
-
You may lose your warranty or support from your device manufacturer or network provider.
-
You may brick your device by using incompatible or outdated software versions.
-
You may lose your data or personal information by exposing them to hackers or third parties.
-
-
Where to download Cracked DC Unlocker Unlimited Credits New Version
-
If you still want to download Cracked DC Unlocker Unlimited Credits New Version despite its risks, you can find it on various websites that offer cracked software. However, we do not recommend or endorse any of these websites as they may contain harmful content or links. Use them at your own risk and discretion. Some examples of these websites are:
How to install and use Cracked DC Unlocker Unlimited Credits New Version
-
The system requirements and compatibility of Cracked DC Unlocker Unlimited Credits New Version
-
To install and use Cracked DC Unlocker Unlimited Credits New Version on your PC, you need to have:
-
-
A Windows operating system (XP/Vista/7/8/10)
-
A minimum of 512 MB RAM
-
A minimum of 100 MB free disk space
-
A USB port and cable for connecting your device
-
A compatible device model (check the list here: https://www.dc-unlocker.com/supported_models_1)
-
-
The step-by-step guide to install and use Cracked DC Unlocker Unlimited Credits New Version
-
To install and use Cracked DC Unlocker Unlimited Credits New Version on your PC, you need to follow these steps:
-
- other source you trust) and extract the zip file to a folder on your PC.
-
Run the setup.exe file as administrator and follow the instructions to install the software on your PC.
-
After the installation is completed, run the DC Unlocker 2 Client.exe file as administrator from the folder where you installed the software.
-
Connect your device to your PC via USB cable. Make sure you have installed the drivers for your device on your PC. You can find the drivers here: https://www.dc-unlocker.com/downloads/drivers
-
Click on the magnifying glass icon to detect your device. You should see a message saying "Found Applications port COMX" where X is a number.
-
Select your device model from the drop-down menu or leave it as auto-detect.
-
Click on the unlocking tab and choose either unlock or read unlock code depending on your device model.
-
Wait for a few seconds or minutes until the process is completed. You should see a message saying "Unlocking, please wait ..." and then "Unlock done".
-
Disconnect your device from your PC and insert a different SIM card.
-
Enjoy your unlocked device!
-
-
The troubleshooting tips and FAQs for Cracked DC Unlocker Unlimited Credits New Version
-
If you encounter any problems or errors while using Cracked DC Unlocker Unlimited Credits New Version, you can try these tips:
-
-
Make sure you have downloaded the latest version of Cracked DC Unlocker Unlimited Credits New Version from a reliable source.
-
Make sure you have installed the software correctly and run it as administrator.
-
Make sure you have installed the drivers for your device on your PC.
-
Make sure you have a stable internet connection and disable any antivirus or firewall programs that may interfere with the software.
-
Make sure you have selected the correct device model and mode from the drop-down menu.
-
Make sure you have enough battery power on your device before starting the unlocking process.
-
If you get an error message saying "Card not found", try to reinstall the software or use a different PC.
-
If you get an error message saying "Server connection error", try to restart the software or use a different internet connection.
-
If you get an error message saying "Unlock failed", try to repeat the process or use a different device model or mode.
-
-
If you have any questions or doubts about Cracked DC Unlocker Unlimited Credits New Version, you can check these FAQs:
-
-
Q: Is Cracked DC Unlocker Unlimited Credits New Version safe to use?
-
A: No, it is not safe to use. It is illegal and risky. It may contain viruses or malware that can harm your PC or device. It may also damage your device or void your warranty. We do not recommend using it at all.
-
Q: Is Cracked DC Unlocker Unlimited Credits New Version free to use?
-
A: Yes, it is free to use. You do not need to pay for credits or subscriptions to use it. However, you may pay a higher price in terms of security and quality. You may also face legal consequences for using it.
-
Q: Does Cracked DC Unlocker Unlimited Credits New Version work with all devices?
-
A: No, it does not work with all devices. It may not support some models or versions that are supported by the official version. It may also not work properly or at all with some devices. You may end up bricking your device by using it.
-
Q: Can I update Cracked DC Unlocker Unlimited Credits New Version?
-
A: No, you cannot update Cracked DC Unlocker Unlimited Credits New Version. It does not have an online server that updates it regularly with new models and features. It may also stop working if you update it manually or automatically.
-
Q: Can I get support for Cracked DC Unlocker Unlimited Credits New Version?
-
A: No, you cannot get support for Cracked DC Unlocker Unlimited Credits New Version. It does not have a customer service that can help you with any issues or questions. You are on your own if you use it.
-
-
Conclusion
-
In conclusion, Cracked DC Unlocker Unlimited Credits New Version is a software that allows you to unlock various devices such as modems, routers, and phones without paying for credits or registering an account. It also gives you unlimited credits so you can unlock as many devices as you want. However, it is illegal and risky to use. It may contain viruses or malware that can harm your PC or device. It may also damage your device or void your warranty. It may not work with all devices or versions. It may not be updated or supported by anyone. We do not recommend using it at all. Instead, we suggest using the official version of DC Unlocker which is legal and safe. It is supported by the developers who update it regularly with new models and features. It also has a customer service that can help you with any issues or questions. You can buy credits from the website or from a reseller at a reasonable price. You can also enjoy other features such as repairing IMEI, firmware, bootloaders, etc. You can download and install DC Unlocker from the official website: https://www.dc-unlocker.com/
-
We hope this article has been helpful and informative for you. If you have any feedback or suggestions, please let us know in the comments below. Thank you for reading!
0a6ba089eb
-
-
\ No newline at end of file
diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Fisiologiaanimalhill.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Fisiologiaanimalhill.md
deleted file mode 100644
index e46144136c7ec7eef51394431030d9eb48debbd0..0000000000000000000000000000000000000000
--- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Fisiologiaanimalhill.md
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
Fisiologia Animal Hill: A Comprehensive Guide to Animal Physiology
-
Fisiologia Animal Hill is a popular textbook that covers the principles and concepts of animal physiology in a clear and engaging way. The book is written by Richard W. Hill, Gordon A. Wyse, and Margaret Anderson, who are experts in the field of comparative physiology. The book is suitable for undergraduate and graduate students who want to learn about the diversity and adaptations of animals in different environments.
In this article, we will provide an overview of the main topics and features of Fisiologia Animal Hill, and explain why it is a valuable resource for anyone interested in animal physiology. We will also share some tips on how to use the book effectively for your studies.
-
What is Fisiologia Animal Hill?
-
Fisiologia Animal Hill is a comprehensive and updated textbook that covers the fundamentals of animal physiology, from molecules to organisms. The book is divided into seven parts, each focusing on a major aspect of animal physiology:
-
-
Part 1: Introduction to Physiology. This part introduces the basic concepts and methods of physiology, such as homeostasis, feedback loops, adaptation, acclimation, and evolution.
-
Part 2: Physiological Processes. This part covers the cellular and molecular mechanisms of physiological processes, such as membrane transport, signal transduction, metabolism, gene expression, and epigenetics.
-
Part 3: Neural and Sensory Physiology. This part explores the structure and function of the nervous system, including neurons, synapses, neurotransmitters, sensory receptors, sensory pathways, and sensory modalities.
-
Part 4: Endocrine Physiology. This part examines the role of hormones in regulating physiological functions, such as growth, development, reproduction, stress response, circadian rhythms, and behavior.
-
Part 5: Muscle Physiology. This part describes the properties and types of muscle tissue, including skeletal muscle, cardiac muscle, and smooth muscle. It also explains how muscles contract and generate force, power, and movement.
-
Part 6: Cardiovascular Physiology. This part analyzes the structure and function of the circulatory system, including blood, blood vessels, heart, cardiac cycle, blood pressure, blood flow, and gas exchange.
-
Part 7: Respiratory Physiology. This part investigates the structure and function of the respiratory system, including lungs, airways, ventilation, diffusion, oxygen transport, carbon dioxide transport, and acid-base balance.
-
-
Each part consists of several chapters that provide detailed explanations and examples of the physiological phenomena and principles. The book also includes numerous figures, tables,
-diagrams
-
-
What are the features of Fisiologia Animal Hill?
-
Fisiologia Animal Hill is not only a comprehensive textbook, but also a user-friendly and interactive learning tool. The book has several features that enhance its readability and usability, such as:
-
-
-
Learning objectives. Each chapter begins with a list of learning objectives that outline the main concepts and skills that students should master after reading the chapter.
-
Key terms. Each chapter highlights the key terms that are essential for understanding the topic. The key terms are also listed at the end of the chapter and defined in the glossary.
-
Concept checks. Each chapter includes several concept checks that test students' comprehension and application of the material. The concept checks are designed to stimulate critical thinking and problem-solving skills.
-
Examples and applications. Each chapter provides numerous examples and applications of animal physiology in different contexts, such as ecology, evolution, medicine, biotechnology, and human health. The examples and applications illustrate the relevance and importance of animal physiology in real-world situations.
-
Experimental approaches. Each chapter introduces some of the experimental methods and techniques that are used to study animal physiology. The experimental approaches show how physiological knowledge is derived from scientific inquiry and evidence.
-
Summary. Each chapter ends with a summary that reviews the main points and take-home messages of the chapter.
-
Questions. Each chapter concludes with a set of questions that assess students' recall, understanding, analysis, synthesis, and evaluation of the material. The questions range from multiple-choice to short-answer to essay questions.
-
Online resources. The book is accompanied by an online platform that offers additional resources for students and instructors, such as animations, videos, quizzes, flashcards, case studies, and instructor's manual.
-
-
These features make Fisiologia Animal Hill a valuable and effective textbook for learning animal physiology.
81aa517590
-
-
\ No newline at end of file
diff --git a/spaces/1gistliPinn/ChatGPT4/Examples/Boeing 737-300 500 CBT - Lufthansa Full Versionl !!HOT!!.md b/spaces/1gistliPinn/ChatGPT4/Examples/Boeing 737-300 500 CBT - Lufthansa Full Versionl !!HOT!!.md
deleted file mode 100644
index 0283d158ad294ed5712e68290a3427554213d3e6..0000000000000000000000000000000000000000
--- a/spaces/1gistliPinn/ChatGPT4/Examples/Boeing 737-300 500 CBT - Lufthansa Full Versionl !!HOT!!.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-In a duo situation, you need to think like a complete rhythm section: comping instrument, ... Boeing 737-300 500 CBT - Lufthansa Full Versionl 1fdad05405
-
-
-
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/2020 Design 12 The Most Trusted Software for Kitchen and Bathroom Designers.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/2020 Design 12 The Most Trusted Software for Kitchen and Bathroom Designers.md
deleted file mode 100644
index f06a3798dbc732d37d542bde821d180cf3c7ea9f..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/2020 Design 12 The Most Trusted Software for Kitchen and Bathroom Designers.md
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
How to Download 2020 Design 12: The Best Kitchen and Bathroom Design Software
-
If you are a kitchen and bathroom designer, you know how important it is to have a reliable and powerful software that can help you create stunning designs for your clients. You need a software that can handle complex layouts, realistic renderings, and online catalogs of manufacturer products. You need a software that can make your design process faster, easier, and more enjoyable. You need 2020 Design Live, the latest version of the most popular kitchen and bathroom design software in North America.
In this article, we will show you how to download 2020 Design 12, the desktop solution of 2020 Design Live, and how to use it to create amazing designs that will impress your clients. We will also answer some of the most frequently asked questions about this software. Let's get started!
-
What is 2020 Design 12?
-
2020 Design 12 is the desktop solution of 2020 Design Live, the kitchen and bathroom design software that runs on both desktop and cloud platforms. It is designed for professional designers who want to have access to the largest selection of manufacturer catalogs, online configurable cabinets, appliances, and plumbing, advanced lighting wizard, SketchUp integration, and more. It is also equipped with all the tools that will help you create photorealistic renderings, 360° panoramas, and detailed floor plans.
-
Features and benefits of 2020 Design 12
-
Some of the features and benefits of using 2020 Design 12 are:
-
-
It has a new 64-bit architecture that allows you to handle large and complex projects with ease.
-
It has a new EZ Render rendering engine that produces high-quality images in minutes.
-
It has a new Cloud Configurator that lets you customize cabinets, appliances, and plumbing online without downloading catalogs.
-
It has a new Shaker Cabinet Door option that adds a modern touch to your designs.
-
It has a new Screen Layout feature that lets you configure your workspace according to your preferences.
-
It has a new Annotation Tool that lets you precisely mark the positions of light fixtures in your designs.
-
It has a new SketchUp Importer that lets you import SketchUp models directly into your designs.
-
It has a new Cabinet Door Replacement feature that lets you change the colors and styles of cabinet doors without changing catalogs.
-
It has a new Catalog Manager that lets you easily manage your catalogs and updates.
-
It has a new Pricing Tool that lets you generate accurate quotes for your clients based on manufacturer prices.
-
It has a new Manager Starter Edition, a business process management application that helps you organize your projects, clients, and orders.
-
It has a new User Interface, with improved icons, menus, toolbars, and dialogs.
-
It has an improved User Experience, with enhanced performance, stability, and usability.
-
It has an improved User Support, with online training, video tips, knowledge center, blogs, webinars, and more.
-
-
Requirements and compatibility of 2020 Design 12
-
To use 2020 Design 12, you need to have the following system requirements and compatibility:
-
download 2020 design live software
-download 2020 design v12 for kitchen and bathroom
-download 2020 design v12 with new rendering engine
-download 2020 design v12 with shaker cabinet doors
-download 2020 design v12 with sketchup integration
-download 2020 design v12 with advanced lighting wizard
-download 2020 design v12 with cloud configurable catalogs
-download 2020 design v12 with manufacturer products
-download 2020 design v12 with 360 panoramas
-download 2020 design v12 with space planning tools
-download 2020 design v12 with decorative cloud items
-download 2020 design v12 with personalization features
-download 2020 design v12 with support and updates
-download 2020 design v12 with free trial option
-download 2020 design v12 with pricing information
-download 2020 design v12 with testimonials and reviews
-download 2020 design v12 with training resources
-download 2020 design v12 with video tips and tutorials
-download 2020 design v12 with webinar recordings
-download 2020 design v12 with knowledge center access
-download 2020 design v12 with blogs and news updates
-download 2020 design v12 with edition comparison chart
-download 2020 design live foundation edition
-download 2020 design live essentials edition
-download 2020 design live premium edition
-how to download 2020 design v12 on windows pc
-how to download 2020 design v12 on mac os
-how to download 2020 design v12 on multiple devices
-how to download 2020 design v12 offline installer
-how to download 2020 design v12 latest version
-how to install and activate 2020 design v12 software
-how to update and upgrade to 2020 design v12 software
-how to uninstall and remove 2020 design v12 software
-how to troubleshoot and fix issues with 2020 design v12 software
-how to contact customer service for 2020 design v12 software
-how to use and learn from 2020 design v12 software
-how to create and share designs with 2020 design v12 software
-how to import and export files with 2020 design v12 software
-how to customize and optimize settings with 2020 design v12 software
-how to access and manage catalogs with 2020 design v12 software
-benefits and features of downloading 2020 design v12 software
-pros and cons of downloading 2020 design v12 software
-alternatives and competitors of downloading 2020 design v12 software
-discounts and coupons for downloading 2020 design v12 software
-requirements and specifications for downloading 2020 design v12 software
-
-
-
Operating System
-
Windows 10 (64-bit)
-
-
-
Processor
-
Intel Core i5 or higher
-
-
-
Memory
-
8 GB RAM or higher
-
-
-
Hard Disk Space
-
10 GB or higher
-
-
-
Graphics Card
-
NVIDIA GeForce GTX 1050 or higher
-
-
-
Internet Connection
-
High-speed broadband connection
-
-
-
Screen Resolution
-
1920 x 1080 or higher
-
-
-
Mouse
-
3-button mouse with scroll wheel
-
-
-
Keyboard
-
Standard keyboard with numeric keypad
-
-
-
Printer
-
Color printer (optional)
-
-
How to download and install 2020 Design 12
-
To download and install 2020 Design 12, you need to have a valid license and an active subscription. You also need to have an account on the 2020 website. If you don't have one, you can create one for free. Here are the steps to download and install 2020 Design 12:
-
Steps to download 2020 Design 12
-
-
Go to the 2020 website and log in with your username and password.
-
Click on the Downloads tab and select 2020 Design Live Desktop Solution (2020 Design 12).
-
Select the language of your choice and click on the Download Now button.
-
A pop-up window will appear asking you to save the file. Choose a location on your computer where you want to save the file and click on the Save File button.
-
The file will start downloading. It may take some time depending on your internet speed. You can check the progress of the download on your browser.
-
Once the download is complete, you will see a message saying that the file is ready to be opened. Click on the Open File button.
-
A security warning may appear asking you if you want to run the file. Click on the Run Anyway button.
-
The 2020 Design 12 installer will launch. Follow the instructions on the screen to complete the installation.
-
You may need to restart your computer after the installation is finished.
-
You can now launch 2020 Design 12 from your desktop or start menu.
Steps to install 2020 Design 12
-
To install 2020 Design 12, you need to have a valid license key and an active subscription. You also need to have an internet connection to activate the software. Here are the steps to install 2020 Design 12:
-
-
After downloading the file, double-click on it to launch the installer.
-
A welcome screen will appear. Click on the Next button.
-
A license agreement screen will appear. Read the terms and conditions and check the box to accept them. Click on the Next button.
-
A destination folder screen will appear. Choose a location on your computer where you want to install the software. You can use the default location or browse for a different one. Click on the Next button.
-
A start menu folder screen will appear. Choose a name for the folder where you want to create shortcuts for the software. You can use the default name or type a different one. Click on the Next button.
-
A ready to install screen will appear. Review your choices and click on the Install button.
-
The installation will begin. It may take some time depending on your computer speed. You can check the progress of the installation on the screen.
-
Once the installation is complete, you will see a message saying that 2020 Design 12 has been successfully installed. Click on the Finish button.
-
The software will launch automatically. You will see a login screen where you need to enter your username and password that you used to create your account on the 2020 website. Click on the Login button.
-
You will see an activation screen where you need to enter your license key that you received when you purchased the software. Click on the Activate button.
-
You will see a confirmation screen saying that your software has been activated. Click on the OK button.
-
You can now start using 2020 Design 12 to create your kitchen and bathroom designs.
How to use 2020 Design 12
-
Now that you have downloaded and installed 2020 Design 12, you are ready to use it to create your kitchen and bathroom designs. 2020 Design 12 is a user-friendly and intuitive software that will guide you through the design process step by step. Here are some tips and tricks for using 2020 Design 12:
-
Tips and tricks for using 2020 Design 12
-
-
Use the Quick Start Wizard to create a new design based on a template or a previous project. You can choose from different styles, layouts, and dimensions.
-
Use the Design Tab to access the main tools and features of the software. You can draw walls, doors, windows, cabinets, appliances, plumbing, lighting, accessories, and more. You can also modify the properties, dimensions, colors, and styles of the items.
-
Use the Catalog Tab to browse and select from thousands of manufacturer products. You can also use the Cloud Configurator to customize the products online without downloading catalogs.
-
Use the Render Tab to generate photorealistic renderings of your designs. You can choose from different modes, such as EZ Render, Raytrace, or Panorama. You can also adjust the lighting, shadows, reflections, and textures of your renderings.
-
Use the Presentation Tab to create detailed floor plans, elevations, perspectives, and reports of your designs. You can also export your designs to PDF, JPG, DWG, or SketchUp formats.
-
Use the Pricing Tab to generate accurate quotes for your clients based on manufacturer prices. You can also apply discounts, taxes, and markups to your quotes.
-
Use the Help Tab to access online training, video tips, knowledge center, blogs, webinars, and more. You can also contact the 2020 support team if you have any questions or issues with the software.
-
-
Examples of designs created with 2020 Design 12
-
To inspire you and show you what you can do with 2020 Design 12, here are some examples of kitchen and bathroom designs created with this software:
-
-
-
-
-
-
-
-
-
-
-
-
-
Conclusion
-
In conclusion, 2020 Design 12 is the best kitchen and bathroom design software that you can use to create stunning designs for your clients. It has a new 64-bit architecture, a new EZ Render rendering engine, a new Cloud Configurator, a new Shaker Cabinet Door option, a new Screen Layout feature, a new Annotation Tool, a new SketchUp Importer, a new Cabinet Door Replacement feature, a new Catalog Manager, a new Pricing Tool, a new Manager Starter Edition, a new User Interface, an improved User Experience, and an improved User Support. It also has access to the largest selection of manufacturer catalogs online.
-
To download 2020 Design 12, you need to have a valid license and an active subscription. You also need to have an account on the 2020 website. You can follow the steps that we have explained in this article to download and install the software. You can also use the tips and tricks that we have shared to use the software effectively. You can also check out the examples of designs that we have shown to inspire you and see what you can do with 2020 Design 12.
-
We hope that this article has helped you learn how to download 2020 Design 12 and how to use it to create amazing kitchen and bathroom designs. If you have any questions or feedback, please feel free to contact us or leave a comment below. We would love to hear from you!
-
FAQs
-
Here are some of the most frequently asked questions about 2020 Design 12:
-
-
How much does 2020 Design 12 cost?
-
2020 Design 12 is available as a subscription-based software. The price depends on the type and duration of the subscription that you choose. You can visit the 2020 website to see the different subscription options and prices.
-
Can I use 2020 Design 12 on a Mac?
-
2020 Design 12 is compatible with Windows 10 (64-bit) operating system only. If you want to use it on a Mac, you need to install a Windows emulator, such as Parallels Desktop or Boot Camp, on your Mac.
-
Can I use 2020 Design 12 offline?
-
2020 Design 12 is a desktop solution that can be used offline. However, you need to have an internet connection to activate the software, download catalogs, use the Cloud Configurator, and access online support.
-
Can I import and export files from other software into 2020 Design 12?
-
Yes, you can import and export files from other software into 2020 Design 12. You can import files in DWG, DXF, SKP, JPG, PNG, BMP, TIF, GIF, PDF, and CSV formats. You can export files in DWG, DXF, SKP, JPG, PNG, BMP, TIF, GIF, PDF, CSV, XML, and HTML formats.
-
Can I share my designs with my clients using 2020 Design 12?
-
Yes, you can share your designs with your clients using 2020 Design 12. You can send them renderings, panoramas, floor plans, elevations, perspectives, and reports via email or social media. You can also use the 2020 Cloud Viewer, a free online tool that lets you share your designs in an interactive way.
- 197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/APKPure 3 The Android App Store that Saves You Time Space and Data.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/APKPure 3 The Android App Store that Saves You Time Space and Data.md
deleted file mode 100644
index bb7e0cb5158febe16897e3f6e116ee1db5ce4778..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/APKPure 3 The Android App Store that Saves You Time Space and Data.md
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
APKPure 3: A Comprehensive Guide
-
If you are an Android user, you might be familiar with Google Play Store, the official app store for Android devices. But did you know that there are other app stores that offer different apps and games that you might not find on Google Play? One of them is APKPure, a popular alternative app store that has been around since 2014.
-
APKPure is a website and an app that allows you to download and install Android apps and games from various sources. You can find apps that are not available in your region, apps that are discontinued or removed from Google Play, apps that have faster updates or older versions, and more. You can also discover new and upcoming apps and games, follow your favorite ones, and join a community of Android enthusiasts.
However, using APKPure also comes with some risks and challenges. Since APKPure is not an official app store, it does not have the same security and quality standards as Google Play. You might encounter apps that are infected with malware or adware, apps that are illegal or infringe copyrights, apps that are outdated or incompatible with your device, and more. You also need to enable unknown sources on your device settings to install apps from APKPure, which can expose you to potential threats.
-
In this article, we will give you a comprehensive guide on APKPure 3, the latest version of the app store. We will cover its features, benefits, drawbacks, alternatives, and more. We will also provide some tips and recommendations on how to use APKPure safely and effectively.
-
Features of APKPure 3
-
APKPure 3 is the latest version of the app store that was released in September 2020. It has some new features and improvements that make it more user-friendly and convenient. Here are some of the features of APKPure 3:
-
-
No region locking: APKPure offers a selection of the best Android apps and games that you can not find in Google Play due to regional restrictions. You can access apps and games from different countries and regions without any limitations.
-
Safe downloading: All apps in APKPure are verified by MD5 hash to ensure their integrity and authenticity. You can also check the digital signature of each app to make sure it matches the original one. APKPure also scans all apps for viruses and malware before uploading them to the app store.
-
Find any app you need: APKPure has a powerful search engine that allows you to find any app or game you want by keywords, categories, tags, ratings, reviews, etc. You can also browse the app store by popular, trending, new, or recommended apps and games.
-
Pause and resume downloads: You can pause and resume your downloads at any time without losing your progress. This is useful if you have a slow or unstable internet connection or if you want to save your data usage.
-
-
Benefits of APKPure 3
-
APKPure 3 has many benefits for Android users who want to explore more apps and games beyond Google Play. Here are some of the benefits of using APKPure 3:
-
apkpure 3 download
-apkpure 3 apk
-apkpure 3 app store
-apkpure 3 update
-apkpure 3 install
-apkpure 3 mod apk
-apkpure 3 for pc
-apkpure 3 for android
-apkpure 3 latest version
-apkpure 3 free download
-apkpure 3 pro apk
-apkpure 3 old version
-apkpure 3 online
-apkpure 3 games
-apkpure 3 app download
-apkpure 3 premium apk
-apkpure 3 downloader
-apkpure 3 for ios
-apkpure 3 beta
-apkpure 3 review
-apkpure 3 alternative
-apkpure 3 modded games
-apkpure 3 cracked apps
-apkpure 3 for firestick
-apkpure 3 lite apk
-apkpure 3 region free apk
-apkpure 3 safe
-apkpure 3 pubg mobile
-apkpure 3 fortnite
-apkpure 3 minecraft
-apkpure 3 gta san andreas
-apkpure 3 roblox
-apkpure 3 among us
-apkpure 3 call of duty mobile
-apkpure 3 clash of clans
-apkpure 3 pokemon go
-apkpure 3 brawl stars
-apkpure 3 free fire
-apkpure 3 subway surfers
-apkpure 3 candy crush saga
-apkpure 3 zoom cloud meetings
-apkpure 3 tiktok
-apkpure 3 instagram
-apkpure 3 whatsapp messenger
-apkpure 3 facebook lite
-apkpure 3 youtube vanced
-apkpure 3 netflix mod apk
-
Access to a wide variety of apps and games: APKPure has a huge collection of apps and games that you can explore and download. You can find apps and games that are not available on Google Play, such as modded, hacked, or patched versions. You can also find apps and games that are exclusive to certain regions or countries, such as China, Japan, Korea, etc.
-
Ability to download older or discontinued versions: APKPure keeps a history of all the versions of the apps and games that it hosts. You can download and install any version you want, even if it is no longer supported or updated by the developer. This is useful if you want to use an app or game that has a feature that was removed or changed in the newer version, or if you have a device that is not compatible with the latest version.
-
Faster updates and releases: APKPure often gets the latest updates and releases of the apps and games before they are available on Google Play. This means you can enjoy the newest features and improvements sooner than other users. You can also enable auto-update for your favorite apps and games, so you don't have to manually check for updates.
-
Open-source nature and customization: APKPure is an open-source app store that allows you to customize it according to your preferences. You can change the theme, language, font size, etc. You can also create your own app store and share it with other users. You can also contribute to the development and improvement of APKPure by reporting bugs, suggesting features, or translating the app.
-
-
Drawbacks of APKPure 3
-
APKPure 3 is not without its drawbacks. As an unofficial app store, it has some risks and challenges that you should be aware of before using it. Here are some of the drawbacks of using APKPure 3:
-
-
Security and legal issues: APKPure does not have the same security and quality standards as Google Play. It does not verify the identity or legitimacy of the app developers or publishers. It also does not have a clear policy or mechanism for dealing with complaints or disputes. This means you might encounter apps that are illegal, infringing, fraudulent, deceptive, harmful, or malicious. You might also violate the terms and conditions of some apps or games by downloading them from APKPure.
-
Potential malware and adware infections: APKPure does scan all the apps for viruses and malware before uploading them to the app store, but it cannot guarantee that they are 100% safe and clean. Some apps might contain hidden malware or adware that can compromise your device's security and performance. Some apps might also display annoying or intrusive ads that can interfere with your user experience.
-
Outdated or incompatible apps: APKPure does not always have the latest or most compatible version of the apps and games. Some apps might be outdated or discontinued by the developer or publisher. Some apps might not work properly on your device due to hardware or software limitations. Some apps might also conflict with other apps or system settings on your device.
-
-
Alternatives to APKPure 3
-
If you are looking for other app stores that offer similar or better features than APKPure 3, you have plenty of options to choose from. Here are some of the best alternatives to APKPure 3:
-
-
-
Name
-
Description
-
Pros
-
Cons
-
-
-
APKMirror
-
A website that hosts free Android apps and games from various sources.
-
- Safe downloading - Ability to get old versions - No account needed
-
- No native Android app - Accepts very few new APKs - No auto-update feature
-
-
-
F-Droid
-
An app store that only offers free and open source Android apps and games.
-
- Privacy focused - Ad-free - No registration required - Crowdsourced - No tracking
-
- Limited selection - No modded or patched apps - Slow updates
-
-
-
Aptoide
-
An app store that allows users to create and manage their own app stores.
-
- Free - Open source version available - Large user base - Customizable
-
- Illegal apps - Not all apps are safe - Most apps are outdated
-
-
-
Aurora Store
-
An app store that allows users to download apps from Google Play anonymously.
-
- Privacy focused - Ad-free - No region locking - No account needed
-
- Not all apps are available - Some apps might not work properly - No auto-update feature
-
-
-
Conclusion
-
APKPure 3 is a great app store for Android users who want to explore more apps and games beyond Google Play. It offers a lot of features, benefits, and options that can enhance your Android experience. However, it also has some drawbacks and risks that you should be careful of before using it. You should always check the source, signature, and permission of the apps you download from APKPure, and use a reliable antivirus or security app to protect your device. You should also respect the rights and policies of the app developers and publishers, and avoid downloading or using illegal or infringing apps.
-
If you are looking for other app stores that offer similar or better features than APKPure 3, you can try APKMirror, F-Droid, Aptoide, or Aurora Store. They are some of the best alternatives to APKPure 3 that you can find online. You can compare their pros and cons and choose the one that suits your needs and preferences.
-
We hope this article has given you a comprehensive guide on APKPure 3 and its alternatives. If you have any questions or feedback, please feel free to leave a comment below. Thank you for reading!
-
FAQs
-
-
Is APKPure safe to use? APKPure is generally safe to use, as it scans all the apps for viruses and malware before uploading them to the app store. However, it cannot guarantee that all the apps are 100% safe and clean, as some apps might contain hidden malware or adware that can harm your device. You should always check the source, signature, and permission of the apps you download from APKPure, and use a reliable antivirus or security app to protect your device.
-
Is APKPure legal? APKPure is not illegal in itself, as it is just a platform that hosts and distributes Android apps and games from various sources. However, some of the apps and games that you can find on APKPure might be illegal or infringing, as they might violate the terms and conditions of the original developers or publishers, or the laws of your country or region. You should always respect the rights and policies of the app developers and publishers, and avoid downloading or using illegal or infringing apps.
-
How to download and install APKPure on Android devices? To download and install APKPure on your Android device, you need to follow these steps: - Go to the official website of APKPure (https://apkpure.com/) and click on the download button. - Once the APK file is downloaded, open it and tap on install. - If you see a warning message that says "For your security, your phone is not allowed to install unknown apps from this source", go to your device settings and enable unknown sources. - Once the installation is complete, open the app and enjoy!
-
How to update apps using APKPure? To update apps using APKPure, you need to follow these steps: - Open the app and tap on the menu icon on the top left corner. - Tap on "My Games & Apps" and then tap on "Updates". - You will see a list of apps that have new updates available. - Tap on the update button next to each app you want to update. - Wait for the download and installation to finish. - Alternatively, you can enable auto-update for your favorite apps by tapping on the menu icon on the top right corner of each app's page.
-
How to uninstall APKPure? To uninstall APKPure from your Android device, you need to follow these steps: - Go to your device settings and tap on "Apps" or "Applications". - Find and tap on "APKPure". - Tap on "Uninstall" and confirm. - You can also uninstall APKPure by long-pressing its icon on your home screen or app drawer and dragging it to the trash bin.
-
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Best Ways to Download YouTube Videos Reddit Users Recommend.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Best Ways to Download YouTube Videos Reddit Users Recommend.md
deleted file mode 100644
index ee2376dc1e1bfe62ec58f96a4a3c28b640399794..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Best Ways to Download YouTube Videos Reddit Users Recommend.md
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
Best Way to Download YouTube Videos Reddit
-
Do you want to download YouTube videos that are posted on Reddit? Maybe you want to watch them offline, share them with your friends, or edit them for your own purposes. Whatever the reason, downloading YouTube videos from Reddit is not as hard as you might think. In this article, we will show you the best tools to download YouTube videos from Reddit, whether you are using a web browser, a mobile device, or a desktop app.
-
Introduction
-
Why download YouTube videos from Reddit?
-
Reddit is one of the most popular social media platforms in the world, with millions of users sharing and discussing all kinds of topics. One of the most common types of content on Reddit is YouTube videos, which can be found in various subreddits, such as r/videos, r/funny, r/educationalvideos, and many more.
Downloading YouTube videos from Reddit can have many benefits, such as:
-
-
You can watch them offline without an internet connection or ads.
-
You can save them on your device or cloud storage for future reference.
-
You can share them with your friends or family via other apps or platforms.
-
You can edit them for your own projects or purposes.
-
-
What are the best tools to download YouTube videos from Reddit?
-
There are many tools that claim to download YouTube videos from Reddit, but not all of them are reliable, safe, or easy to use. Some of them may not work properly, contain malware, or have annoying pop-ups. To help you avoid these problems, we have selected the best tools to download YouTube videos from Reddit, based on their features, performance, and user reviews. We have divided them into three categories: web-based video downloaders, mobile apps, and desktop apps.
-
Web-based video downloaders
-
RedditSave
-
RedditSave is a free website that lets you download videos from any device. And unlike some downloader sites, it saves videos with the audio included. It works with YouTube and many other video platforms that are posted on Reddit.
-
How to use RedditSave
-
-
Go to [Reddit](^1^) and find the post that contains the YouTube video you want to download.
-
Copy the URL of the post by right-clicking on it and selecting "Copy link address".
-
Go to [RedditSave](^5^) and paste the URL in the search box.
-
Click on "Download" and choose the quality and format you want.
-
Click on "Download" again and save the video file on your device.
-
-
Pros and cons of RedditSave
-
-
Pros:
-
-
It is free and easy to use.
-
It supports many video platforms besides YouTube.
-
It downloads videos with sound.
-
It offers different quality and format options.
-
-
Cons:
-
-
It may not work with some private or deleted posts.
-
It may have some ads or pop-ups.
-
-
-
Viddit.red
-
Viddit.red is another free website that allows you to download YouTube videos from Reddit with a simple interface. It also supports other video platforms, such as Vimeo, Dailymotion, Twitch, and more. It downloads videos with sound and offers different quality options.
-
How to use Viddit.red
-
-
Go to [Reddit] and find the post that contains the YouTube video you want to download.
-
Copy the URL of the post by right-clicking on it and selecting "Copy link address".
-
Go to [Viddit.red] and paste the URL in the search box.
-
Click on "Download" and choose the quality you want.
-
Click on "Download" again and save the video file on your device.
-
-
Pros and cons of Viddit.red
-
-
Pros:
-
-
It is free and simple to use.
-
It supports many video platforms besides YouTube.
-
It downloads videos with sound.
-
It offers different quality options.
-
-
Cons:
-
-
It may not work with some private or deleted posts.
-
It may have some ads or pop-ups.
-
-
-
Mobile apps
-
Slide for Reddit
-
If you are using an Android device, you can download YouTube videos from Reddit using Slide for Reddit, a free and open-source app that lets you browse Reddit in a smooth and customizable way. It has a built-in video downloader that works with YouTube and other video platforms. It also has many other features, such as offline mode, night mode, multi-account support, and more.
-
How to use Slide for Reddit
-
-
Download and install Slide for Reddit from [Google Play Store].
-
Open the app and log in to your Reddit account or browse as a guest.
-
Find the post that contains the YouTube video you want to download.
-
Tap on the three-dot menu icon at the top right corner of the post and select "Download content".
-
Select the quality and format you want and tap on "Download".
-
The video file will be saved in your device's gallery or file manager.
-
-
Pros and cons of Slide for Reddit
-
-
Pros:
-
-
It is free and open-source.
-
It has a built-in video downloader that supports many video platforms.
-
It has a smooth and customizable user interface.
-
It has many other features that enhance your Reddit experience.
-
-
Cons:
-
-
It is only available for Android devices.
-
It may not work with some private or deleted posts.
-
-
-
SaveVideo bot
-
If you are using an iOS device, you can download YouTube videos from Reddit using SaveVideo bot, a free Telegram bot that lets you download videos from any website. It works with YouTube and other video platforms that are posted on Reddit. It downloads videos with sound and offers different quality options.
-
How to use SaveVideo bot
-
-
Download and install Telegram from [App Store].
-
Open the app and create an account or log in to your existing account.
-
Go to [Reddit] and find the post that contains the YouTube video you want to download.
-
Copy the URL of the post by tapping on it and selecting "Share" then "Copy".
-
Go to Telegram and search for [@SaveVideoBot] or click on this [link].
-
Paste the URL in the chat box and send it to the bot.
-
The bot will reply with a list of quality options. Tap on the one you want.
-
The bot will send you the video file. Tap on it and select "Save to Camera Roll".
-
-
Pros and cons of SaveVideo bot
-
-
Pros:
-
-
It is free and easy to use.
-
It supports many video platforms besides YouTube.
-
It downloads videos with sound.
-
It offers different quality options.
-
-
Cons: :
-
-
It requires Telegram app and account.
-
It may not work with some private or deleted posts.
-
It may have some ads or pop-ups.
-
-
-
Conclusion
-
Summary of the main points
-
In this article, we have shown you the best way to download YouTube videos from Reddit, using different tools for different devices. We have compared the pros and cons of each tool, and explained how to use them step by step. Whether you want to use a web-based video downloader, a mobile app, or a desktop app, you can find the best option for your needs and preferences.
-
Call to action
-
Now that you know how to download YouTube videos from Reddit, why not give it a try and see for yourself how easy and convenient it is? You can enjoy watching your favorite videos offline, share them with your friends, or edit them for your own purposes. Just remember to respect the rights of the original creators and follow the terms of service of each platform. Happy downloading!
-
How to download youtube videos with sound from reddit
-Reddit video downloader online free
-Best software for downloading youtube videos from reddit
-RedditSave: Download reddit videos with audio
-Stacher: A customizable GUI for YT-DLP
-yt-dlp: A command-line tool for downloading youtube videos
-Slide for Reddit: A mobile app that can download reddit videos
-/u/SaveVideo bot: A reddit bot that can download videos from any subreddit
-Download youtube videos in 1080p from reddit
-How to use FFMPEG to merge video and audio from youtube downloads
-Jdownloader2: A desktop app that can download youtube videos
-How to avoid YT throttling when downloading youtube videos
-How to download your own youtube videos from reddit
-YouTube Premium: A paid service that allows offline viewing of youtube videos
-How to insert "pp" after "youtube" to download videos
-How to setup youtube-dl-gui for downloading youtube videos
-How to use the command line to download youtube videos with yt-dlp
-How to download a portion of a youtube video from reddit
-How to automatically rename the output files of youtube downloads
-How to download videos copied to your clipboard with Stacher
-How to use multi-threading to download multiple youtube videos simultaneously
-How to download playlists from youtube using yt-dlp or Stacher
-How to use the Something Not Working tab in Stacher to troubleshoot issues
-How to choose the best video and audio quality for youtube downloads
-How to use the extra options in Stacher for more customization
-How to install yt-dlp and yt-dlg on Windows, Mac, or Linux
-How to use the -x option in yt-dlp to only download audio from youtube videos
-How to use the /r/youtubedl subreddit for more information and support
-How to use the wikiHow guide on The 7 Best Free Tools to Download Reddit Videos with Sound
-How to use the Business Insider guide on 2 Ways to Download Any Reddit Video
-How to use the /r/software subreddit for more recommendations and reviews on youtube video downloaders
-How to use the GitHub repository of yt-dlp for more details and updates on the tool
-How to use the GitHub repository of yt-dlg for more details and updates on the GUI
-How to use the GitHub repository of jely2002/youtube-dl-gui for another GUI option for yt-dlp or youtube-dl
-How to use the GitHub repository of oleksis/youtube-dl-gui for another GUI option for yt-dlp or youtube-dl
-How to use the Stacher subreddit's Wiki for more instructions and tips on using Stacher
-How to use the Slide for Reddit app's settings and features for downloading reddit videos
-How to use the /u/SaveVideo bot's commands and options for downloading reddit videos
-How to use the Jdownloader2 app's settings and features for downloading youtube videos
-How to use the YouTube Premium app's settings and features for offline viewing of youtube videos
-
FAQs
-
-
Q: Is it legal to download YouTube videos from Reddit?
-
A: It depends on the content and the purpose of downloading. Generally, downloading YouTube videos for personal use is not illegal, as long as you do not distribute or monetize them. However, some videos may be protected by copyright or other laws, and downloading them may violate the rights of the original creators. You should always check the terms of service of each platform and the license of each video before downloading.
-
Q: How can I download YouTube videos from Reddit on a Mac or PC?
-
A: You can use a desktop app, such as 4K Video Downloader, which is compatible with both Mac and PC. It allows you to download YouTube videos from Reddit in high quality and various formats. You can also use a web-based video downloader, such as RedditSave or Viddit.red, which work on any browser and device.
-
Q: How can I download YouTube videos from Reddit without sound?
-
A: You can use a web-based video downloader that offers an option to download videos without sound, such as Viddit.red. Alternatively, you can use a video converter tool, such as Online Video Converter, which lets you remove the audio track from any video file.
-
Q: How can I download YouTube videos from Reddit in MP3 format?
-
A: You can use a web-based video downloader that offers an option to download videos in MP3 format, such as RedditSave. Alternatively, you can use a video converter tool, such as Online Video Converter, which lets you convert any video file to MP3 format.
-
Q: How can I download YouTube videos from Reddit faster?
-
A: You can use a web-based video downloader that offers an option to download videos in lower quality or smaller size, such as RedditSave or Viddit.red. Alternatively, you can use a download manager tool, such as Internet Download Manager, which lets you accelerate and resume your downloads.
-
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Bitcoin Mining Simulator Idle Clicker Tycoon Mod APK.md b/spaces/1phancelerku/anime-remove-background/Bitcoin Mining Simulator Idle Clicker Tycoon Mod APK.md
deleted file mode 100644
index 313ac70070225796e7d1a8a4f7ec350879b598c6..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Bitcoin Mining Simulator Idle Clicker Tycoon Mod APK.md
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
Bitcoin Mining Idle Tycoon Mod APK: A Fun and Educational Game for Crypto Enthusiasts
-
Are you interested in bitcoin mining and cryptocurrency? Do you want to learn how to mine bitcoins, trade them, and grow your virtual business? If yes, then you might want to check out Bitcoin Mining Idle Tycoon Mod APK, a fun and educational game that simulates the process of bitcoin mining. In this article, we will tell you what this game is, how to play it, what are its benefits and challenges, and how to download and install the mod apk version. Read on to find out more.
-
What is Bitcoin Mining Idle Tycoon Mod APK?
-
A brief introduction to the game and its features
-
Bitcoin Mining Idle Tycoon Mod APK is a modified version of Bitcoin Mining Idle Tycoon, a game developed by Ernest Trosclair. The game is an idle clicker tycoon game that lets you start your own bitcoin mining business, hire workers, upgrade your equipment, trade your currency, and get rich. The game has many features that make it realistic and engaging, such as:
Locate the downloaded file on your file manager and tap on it.
-
Follow the installation instructions on the screen.
-
Launch the game and enjoy.
-
-
How to Play Bitcoin Mining Idle Tycoon Mod APK?
-
The basics of bitcoin mining and the game mechanics
-
Bitcoin mining is the process of creating new bitcoins by solving complex mathematical problems that verify transactions on the blockchain
The network, which is a globally distributed public ledger consisting of a giant list of timestamped transactions. The network relies on the consensus of the miners to agree on the current state of the ledger and to prevent double-spending, which is when someone tries to spend the same bitcoin twice.
-
The different upgrades, workers, and equipment available in the game
-
In Bitcoin Mining Idle Tycoon Mod APK, you can upgrade your mining business by hiring more workers, buying better equipment, and increasing your hash rate. The hash rate is the measure of how fast your computer can solve the algorithms and earn bitcoins. The higher your hash rate, the more bitcoins you can mine.
-
Some of the upgrades, workers, and equipment you can get in the game are:
-
bitcoin mining idle tycoon hack apk
-bitcoin mining idle tycoon unlimited coins apk
-bitcoin mining idle tycoon mod apk download
-bitcoin mining idle tycoon cheat apk
-bitcoin mining idle tycoon latest mod apk
-bitcoin mining idle tycoon mod apk android 1
-bitcoin mining idle tycoon mod apk revdl
-bitcoin mining idle tycoon mod apk 4.27.0
-bitcoin mining idle tycoon mod apk free shopping
-bitcoin mining idle tycoon mod apk happymod
-bitcoin mining idle tycoon mod apk 2023
-bitcoin mining idle tycoon mod apk offline
-bitcoin mining idle tycoon mod apk no ads
-bitcoin mining idle tycoon mod apk unlimited money
-bitcoin mining idle tycoon mod apk rexdl
-bitcoin mining idle tycoon mod apk 4.26.0
-bitcoin mining idle tycoon mod apk 4.25.0
-bitcoin mining idle tycoon mod apk 4.24.0
-bitcoin mining idle tycoon mod apk 4.23.0
-bitcoin mining idle tycoon mod apk 4.22.0
-bitcoin mining idle tycoon pro mod apk
-bitcoin mining idle tycoon premium mod apk
-bitcoin mining idle tycoon vip mod apk
-bitcoin mining idle tycoon mega mod apk
-bitcoin mining idle tycoon super mod apk
-download game bitcoin mining idle tycoon mod apk
-download bitcoin mining idle tycoon hack mod apk
-download bitcoin mining idle tycoon cheat mod apk
-download bitcoin mining idle tycoon unlimited money mod apk
-download bitcoin mining idle tycoon latest version mod apk
-how to install bitcoin mining idle tycoon mod apk
-how to play bitcoin mining idle tycoon mod apk
-how to download bitcoin mining idle tycoon mod apk on pc
-how to update bitcoin mining idle tycoon mod apk
-how to get free coins in bitcoin mining idle tycoon mod apk
-best tips for bitcoin mining idle tycoon mod apk
-best strategy for bitcoin mining idle tycoon mod apk
-best guide for bitcoin mining idle tycoon mod apk
-best cheats for bitcoin mining idle tycoon mod apk
-best hacks for bitcoin mining idle tycoon mod apk
-
-
-
Upgrade
-
Description
-
Cost
-
-
-
Worker
-
A person who works on your mining rig and earns bitcoins for you
-
$100
-
-
-
Graphics Card
-
A device that enhances your computer's performance and increases your hash rate
-
$500
-
-
-
Cooling Fan
-
A device that cools down your computer and prevents overheating and damage
-
$200
-
-
-
Power Supply
-
A device that provides electricity to your computer and equipment
-
$300
-
-
-
ASIC Miner
-
A specialized device that is designed for bitcoin mining and has a very high hash rate
-
$10,000
-
-
-
Data Center
-
A large facility that houses many computers and equipment for bitcoin mining
-
$100,000
-
-
-
Solar Panel
-
A device that generates renewable energy from the sun and reduces your electricity cost
-
$50,000
-
-
-
Quantum Computer
A futuristic device that can solve algorithms in seconds and has an enormous hash rate
$1,000,000
The trade market and the strategies to sell or keep mined currency
One of the most important aspects of Bitcoin Mining Idle Tycoon Mod APK is the trade market, where you can sell or keep your mined currency. The trade market shows you the current price of bitcoin in US dollars, as well as the historical price chart. You can choose to sell your bitcoins instantly at the current price, or wait for a better price in the future. However, you also have to consider the risk of price fluctuations and market crashes.
Some of the strategies you can use to sell or keep your mined currency are:
Sell high, buy low: This is a basic principle of trading that means you should sell your bitcoins when the price is high and buy them back when the price is low. This way, you can increase your profits and accumulate more bitcoins.
HODL: This is a slang term that means to hold on to your bitcoins for a long time, regardless of the price changes. This strategy is based on the belief that bitcoin will eventually increase in value and become a global currency. However, this strategy also requires patience and confidence in the future of bitcoin.
Diversify: This is a strategy that means to invest in different types of assets, such as stocks, bonds, gold, or other cryptocurrencies. This way, you can reduce your risk and exposure to bitcoin's volatility and benefit from other opportunities in the market.
What are the Benefits of Bitcoin Mining Idle Tycoon Mod APK?
The educational value of learning about bitcoin mining and cryptocurrency
One of the main benefits of Bitcoin Mining Idle Tycoon Mod APK is that it can teach you about bitcoin mining and cryptocurrency in a fun and interactive way. You can learn about how bitcoin works, how it is created, how it is traded, and how it is secured. You can also learn about the history and evolution of bitcoin, as well as its advantages and disadvantages. By playing this game, you can gain a better understanding of one of the most innovative and influential technologies of our time.
The entertainment value of managing a virtual mining business and getting rich
Another benefit of Bitcoin Mining Idle Tycoon Mod APK is that it can provide you with hours of entertainment and satisfaction. You can enjoy managing your own virtual mining business, hiring workers, buying equipment, upgrading your facilities, and earning bitcoins. You can also compete with other players. in the global leaderboard, and see how you rank among the best bitcoin miners in the world. You can also have fun with the humorous and witty dialogues, graphics, and sound effects in the game. You can feel the thrill of getting rich and achieving your goals in the game.
-
The mod apk features that enhance the gaming experience and remove ads
-
A final benefit of Bitcoin Mining Idle Tycoon Mod APK is that it offers some extra features that enhance the gaming experience and remove ads. The mod apk version gives you unlimited money, which means you can buy any upgrade, worker, or equipment you want without worrying about the cost. You can also modify the advertising gain reward, which means you can get more bitcoins from watching ads. Moreover, you can enjoy the game without any annoying ads that interrupt your gameplay or consume your data.
-
What are the Challenges of Bitcoin Mining Idle Tycoon Mod APK?
-
The increasing difficulty and competition of mining as the game progresses
-
One of the challenges of Bitcoin Mining Idle Tycoon Mod APK is that it becomes more difficult and competitive as the game progresses. The game follows the real-life scenario of bitcoin mining, which means that the algorithms become harder to solve over time, and the reward for each block decreases. This means that you need to invest more money and resources to maintain your hash rate and profits. You also need to compete with other players who are also mining bitcoins and trying to get a share of the limited supply.
-
The risk of cryptojacking and malware from downloading untrusted sources
-
Another challenge of Bitcoin Mining Idle Tycoon Mod APK is that it poses a risk of cryptojacking and malware from downloading untrusted sources. Cryptojacking is a malicious practice where hackers use your device's processing power to mine cryptocurrency without your consent or knowledge. Malware is a software that can harm your device or data by stealing, deleting, encrypting, or spying on them. These threats can affect your device's performance, battery life, security, and privacy. Therefore, you need to be careful when downloading and installing the mod apk version from unknown sources, and always scan your device for any potential infections.
-
The legal and ethical issues of bitcoin mining and its environmental impact
-
A final challenge of Bitcoin Mining Idle Tycoon Mod APK is that it raises some legal and ethical issues of bitcoin mining and its environmental impact. Bitcoin mining is not regulated or controlled by any central authority, which means that it can be used for illegal or unethical purposes, such as money laundering, tax evasion, terrorism financing, or drug trafficking. Bitcoin mining also consumes a lot of electricity and generates a lot of carbon emissions, which contributes to global warming and climate change. Therefore, you need to be aware of these issues and consider their implications when playing this game.
-
Conclusion
-
Bitcoin Mining Idle Tycoon Mod APK is a fun and educational game that simulates the process of bitcoin mining. You can learn how to mine bitcoins, trade them, and grow your virtual business. You can also enjoy managing your own mining business, hiring workers, buying equipment, upgrading your facilities, and earning bitcoins. You can also benefit from the mod apk features that give you unlimited money, modify advertising gain reward, and remove ads. However, you also need to face some challenges, such as the increasing difficulty and competition of mining, the risk of cryptojacking and malware from downloading untrusted sources, and the legal and ethical issues of bitcoin mining and its environmental impact. If you are interested in bitcoin mining and cryptocurrency, you might want to try this game and see how it works.
-
FAQs
-
Q1: Is Bitcoin Mining Idle Tycoon Mod APK safe to download and play?
-
A1: Bitcoin Mining Idle Tycoon Mod APK is generally safe to download and play if you get it from a trusted source. However, there is always a risk of cryptojacking and malware from downloading untrusted sources. Therefore, you should always scan your device for any potential infections before installing the mod apk version.
-
Q2: How much real money can I earn from playing Bitcoin Mining Idle Tycoon Mod APK?
-
A2: Bitcoin Mining Idle Tycoon Mod APK is a game that simulates bitcoin mining. You cannot earn real money from playing this game. The bitcoins you mine in the game are virtual currency that only exist in the game. However, you can learn about how bitcoin mining works in real life by playing this game.
-
Q3: What are some tips and tricks to succeed in Bitcoin Mining Idle Tycoon Mod APK?
-
A3: Some tips and tricks to succeed in Bitcoin Mining Idle Tycoon Mod APK are:
-
-
Hire more workers to increase your hash rate and profits
-
Buy better equipment to improve your performance and efficiency
-
Upgrade your facilities to expand your business and attract more customers
-
Sell your bitcoins at the right time to maximize your earnings
-
Keep an eye on the trade market and the price fluctuations
-
Watch ads to get extra rewards and bonuses
-
Use the mod apk features to get unlimited money and remove ads
-
-
Q4: What are some alternatives to Bitcoin Mining Idle Tycoon Mod APK?
-
A4: Some alternatives to Bitcoin Mining Idle Tycoon Mod APK are:
-
-
Bitcoin Billionaire: A game that lets you tap your screen to mine bitcoins, build a fortune, and invest in various businesses and technologies.
-
Crypto Idle Miner: A game that lets you build your own crypto mining empire, hire managers, upgrade your equipment, and trade various cryptocurrencies.
-
Idle Miner Tycoon: A game that lets you manage your own mining company, mine different resources, hire workers, and optimize your workflow.
-
-
Q5: How can I learn more about bitcoin mining and cryptocurrency?
-
A5: Some ways to learn more about bitcoin mining and cryptocurrency are:
-
-
Read books, articles, blogs, and podcasts about bitcoin and cryptocurrency.
-
Watch videos, documentaries, and tutorials about bitcoin and cryptocurrency.
-
Join online forums, communities, and groups related to bitcoin and cryptocurrency.
-
Take online courses, webinars, or workshops about bitcoin and cryptocurrency.
-
Consult experts, mentors, or advisors who have experience in bitcoin and cryptocurrency.
-
401be4b1e0
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Download Index of Cricket League Mod APK v1.0.5 for Android - Unlimited Coins and Gems.md b/spaces/1phancelerku/anime-remove-background/Download Index of Cricket League Mod APK v1.0.5 for Android - Unlimited Coins and Gems.md
deleted file mode 100644
index b1ca0aa3b502c91f0e6d963b6fda110a0be41543..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Download Index of Cricket League Mod APK v1.0.5 for Android - Unlimited Coins and Gems.md
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
Index of Cricket League Mod APK: How to Download and Play the Best Cricket Game on Your Android Device
-
Introduction
-
If you are a fan of cricket, you must have heard of Cricket League, one of the most popular and realistic cricket games on the Google Play Store. However, if you want to enjoy the game to the fullest, you might need to spend some real money to unlock premium features, such as unlimited coins, all players unlocked, no ads, and more. That's why many people are looking for the modded version of Cricket League, which gives them access to all these benefits for free.
In this article, we will show you how to download and install Cricket League Mod APK on your Android device, and how to play the game with all the features unlocked. We will also answer some frequently asked questions about the game and the modded file. So, without further ado, let's get started!
-
What is Cricket League Mod APK?
-
Cricket League Mod APK is a modified version of the original Cricket League game, which is developed by Gametion Technologies Pvt Ltd. The modded file has been hacked by some third-party developers to provide users with unlimited money, all players unlocked, no ads, and other premium features that are otherwise not available in the official game.
-
With Cricket League Mod APK, you can enjoy playing cricket with your favorite teams and players, without worrying about running out of coins or being interrupted by annoying ads. You can also join different tournaments and leagues, unlock new stadiums and rewards, and experience realistic 3D graphics and sound effects.
-
Why should you download Cricket League Mod APK?
-
There are many reasons why you should download Cricket League Mod APK instead of the original game. Here are some of them:
-
-
You can save your money by getting unlimited coins for free. You can use these coins to buy new players, upgrade your skills, and customize your team.
-
You can unlock all the players in the game, including legendary cricketers like Sachin Tendulkar, Virat Kohli, MS Dhoni, AB de Villiers, and more. You can also create your own dream team with your favorite players.
-
You can play the game without any ads. Ads can be very annoying and distracting when you are playing a game. They can also slow down your device and consume your data. With Cricket League Mod APK, you can enjoy a smooth and ad-free gaming experience.
-
You can access all the modes and tournaments in the game, such as Quick Match, World Cup, IPL, PSL, BBL, CPL, and more. You can also play online with your friends or other players from around the world.
-
You can unlock new stadiums and rewards as you progress in the game. You can play in different venues like Eden Gardens, Wankhede Stadium, Lord's, MCG, SCG, etc. You can also win trophies, medals, badges, and other prizes.
-
You can enjoy realistic 3D graphics and sound effects that make you feel like you are playing in a real cricket match. You can also customize your camera angles, graphics settings, sound effects, etc.
-
-
How to download and install Cricket League Mod APK?
-
Downloading and installing Cricket League Mod APK is very easy and simple. Just follow these steps:
-
Step 1: Find a reliable source for the modded file
-
The first thing you need to do is to find a trustworthy website that provides the modded file for Cricket League. You can use Google or any other search engine to find a reliable source for the modded file. You can also check the reviews and ratings of the website to see if it is safe and secure. Some of the websites that offer Cricket League Mod APK are:
-
-
[APKPure]
-
[APKHome]
-
[ModDroid]
-
[APKDone]
-
-
Make sure you download the latest version of the modded file, which is 1.0.9 as of June 2023.
-
Step 2: Enable unknown sources on your device
-
The next thing you need to do is to enable unknown sources on your device. This will allow you to install apps that are not from the Google Play Store. To do this, follow these steps:
-
Cricket League v1.0.5 mod apk download
-How to install Cricket League mod apk on Android
-Cricket League mod apk unlimited money and coins
-Cricket League 3D multiplayer mod apk latest version
-Cricket League mod apk by Miniclip Com
-Cricket League mod apk free download for Android
-Cricket League mod apk offline mode
-Cricket League mod apk hack and cheats
-Cricket League mod apk with all teams unlocked
-Cricket League mod apk no root required
-Cricket League mod apk with real-time commentary
-Cricket League mod apk with realistic graphics and physics
-Cricket League mod apk with custom tournaments and leagues
-Cricket League mod apk with online leaderboards and achievements
-Cricket League mod apk with easy controls and gameplay
-Cricket League mod apk with different game modes and difficulty levels
-Cricket League mod apk with HD quality sound and music
-Cricket League mod apk with daily rewards and challenges
-Cricket League mod apk with in-app purchases and ads removed
-Cricket League mod apk with bug fixes and performance improvements
-Cricket League mod apk for PC and laptop
-Cricket League mod apk for iOS and iPhone
-Cricket League mod apk for Windows 10 and Mac OS
-Cricket League mod apk for Firestick and Smart TV
-Cricket League mod apk for Chromebook and Linux
-Cricket League mod apk reviews and ratings
-Cricket League mod apk tips and tricks
-Cricket League mod apk FAQs and guides
-Cricket League mod apk features and specifications
-Cricket League mod apk comparison and alternatives
-Download link of Cricket League mod apk file
-How to update Cricket League mod apk to the latest version
-How to uninstall Cricket League mod apk from your device
-How to backup and restore your data in Cricket League mod apk
-How to play Cricket League mod apk with friends online
-How to join a clan or create your own in Cricket League mod apk
-How to customize your avatar and team in Cricket League mod apk
-How to earn more money and coins in Cricket League mod apk
-How to unlock new teams and players in Cricket League mod apk
-How to improve your skills and strategy in Cricket League mod apk
-
-
Go to your device settings and tap on security or privacy.
-
Find the option that says unknown sources or install unknown apps and toggle it on.
-
A warning message will pop up, telling you that installing apps from unknown sources can harm your device. Tap on OK or Allow to proceed.
-
-
You can also enable unknown sources for specific apps, such as your browser or file manager, by tapping on their names and toggling on the option that says allow from this source.
-
Step 3: Download and install the APK file
-
The final step is to download and install the APK file on your device. To do this, follow these steps:
-
-
Open your browser or file manager and go to the website where you downloaded the modded file.
-
Tap on the download button or link and wait for the file to be downloaded.
-
Once the download is complete, tap on the file name or open it with your file manager.
-
A prompt will appear, asking you if you want to install the app. Tap on Install and wait for the installation to finish.
-
Once the installation is done, tap on Open or Done to launch the game or exit the installer.
-
-
Congratulations! You have successfully downloaded and installed Cricket League Mod APK on your Android device. You can now enjoy playing the game with all the features unlocked.
-
How to play Cricket League Mod APK?
-
Playing Cricket League Mod APK is very easy and fun. Here are some tips on how to play the game:
-
Choose your team and players
-
The first thing you need to do is to choose your team and players. You can select from different countries, such as India, Australia, England, Pakistan, South Africa, etc. You can also create your own custom team with your favorite players. You can edit their names, skills, appearances, etc.
-
You can also unlock all the players in the game, including legendary cricketers like Sachin Tendulkar, Virat Kohli, MS Dhoni, AB de Villiers, and more. You can also create your own dream team with your favorite players.
-
Play different modes and tournaments
-
The next thing you need to do is to play different modes and tournaments in the game. You can choose from different options, such as Quick Match, World Cup, IPL, PSL, BBL, CPL, and more. You can also play online with your friends or other players from around the world.
-
You can also customize your match settings, such as overs, difficulty level, toss, pitch condition, weather, etc. You can also view your match statistics, such as scorecard, wagon wheel, man of the match, etc.
-
Unlock new stadiums and rewards
-
The last thing you need to do is to unlock new stadiums and rewards as you progress in the game. You can play in different venues like Eden Gardens, Wankhede Stadium, Lord's, MCG, SCG, etc. You can also win trophies, medals, badges, and other prizes.
-
You can also unlock new features and items in the game store using your unlimited coins. You can buy new bats, balls, gloves, helmets, shoes, etc. You can also upgrade your skills and abilities using your coins.
-
Enjoy realistic graphics and sound effects
-
The best thing about Cricket League Mod APK is that it has realistic 3D graphics and sound effects that make you feel like you are playing in a real cricket match. You can also customize your camera angles, graphics settings, sound effects, etc. You can also enjoy the commentary and crowd cheering that add to the excitement of the game.
-
Conclusion
-
Cricket League Mod APK is a great game for cricket lovers who want to enjoy the game with all the features unlocked. You can download and install the modded file on your Android device easily and safely, and play the game with unlimited coins, all players unlocked, no ads, and other premium features. You can also play different modes and tournaments, unlock new stadiums and rewards, and enjoy realistic graphics and sound effects.
-
If you are looking for a fun and realistic cricket game on your Android device, you should definitely try Cricket League Mod APK. It is one of the best cricket games on the Google Play Store, and it will give you hours of entertainment and enjoyment.
-
FAQs
-
Here are some frequently asked questions about Cricket League Mod APK:
-
Q: Is Cricket League Mod APK safe to download and install?
-
A: Yes, Cricket League Mod APK is safe to download and install, as long as you get it from a reliable source. However, you should always be careful when downloading apps from unknown sources, as they may contain viruses or malware that can harm your device. You should also scan the file with an antivirus app before installing it.
-
Q: Do I need to root my device to use Cricket League Mod APK?
-
A: No, you do not need to root your device to use Cricket League Mod APK. The modded file works on both rooted and non-rooted devices. However, some features may require root access, such as changing the IMEI number or spoofing your location.
-
Q: Will I get banned from playing online if I use Cricket League Mod APK?
-
A: No, you will not get banned from playing online if you use Cricket League Mod APK. The modded file has an anti-ban feature that prevents the game server from detecting your modded file. However, you should not abuse the modded features or cheat in online matches, as that may ruin the fun for other players.
-
Q: How can I update Cricket League Mod APK?
-
A: You can update Cricket League Mod APK by downloading the latest version of the modded file from the same website where you got it. You can also check for updates within the game settings. However, you should always backup your game data before updating, as some updates may cause compatibility issues or data loss.
-
Q: How can I uninstall Cricket League Mod APK?
-
A: You can uninstall Cricket League Mod APK by following these steps:
-
-
Go to your device settings and tap on apps or applications.
-
Find and tap on Cricket League Mod APK.
-
Tap on uninstall and confirm your action.
-
Wait for the app to be uninstalled from your device.
¿Te gustan los juegos musicales? ¿Te gusta coleccionar y criar monstruos lindos y divertidos? ¿Quieres crear tu propia isla llena de criaturas cantantes? Si respondiste sí a cualquiera de estas preguntas, entonces definitivamente deberías descargar My Singing Monsters, un juego gratuito para dispositivos Android, iOS y Steam. En este artículo, te mostraremos cómo descargar My Singing Monsters en diferentes dispositivos y plataformas, así como algunos consejos y trucos para aprovechar al máximo tu experiencia con monstruos.
Si tienes un teléfono o tableta Android, la forma más fácil de descargar My Singing Monsters es desde Google Play Store. Estos son los pasos que debes seguir:
-
-
Abra la aplicación Play Store en su dispositivo o vaya a play.google.com en su navegador.
-
Buscar "Mis monstruos cantando" o usar esto enlace directo.
-
Toque en el título de la aplicación y comprobar las calificaciones de estrellas, el número de descargas, y los comentarios para asegurarse de que es confiable y seguro.
-
Toque en "Instalar" (para aplicaciones gratuitas) o el precio de la aplicación (para aplicaciones de pago) y aceptar los permisos.
-
Espere a que la aplicación se descargue e instale en su dispositivo.
-
¡Abre la aplicación y disfruta!
-
-
Descarga desde App Store
-
Si tienes un iPhone o iPad, puedes descargar My Singing Monsters desde la App Store. Estos son los pasos que debes seguir:
-
-
Abra la aplicación App Store en su dispositivo o vaya a apps.apple.com en su navegador.
-
Buscar "Mis monstruos cantando" o usar esto enlace directo.
-
Toque en el título de la aplicación y comprobar las calificaciones de estrellas, el número de descargas, y los comentarios para asegurarse de que es confiable y seguro.
-
Toque en "Obtener" (para aplicaciones gratuitas) o el precio de la aplicación (para aplicaciones de pago) e ingrese su contraseña de Apple ID o use Touch ID o Face ID.
-
-
¡Abre la aplicación y disfruta!
-
-
Descargar desde Steam
-
Si tienes un PC o Mac, puedes descargar My Singing Monsters de Steam, una popular plataforma de juegos. Estos son los pasos que debes seguir:
Crea una cuenta de Steam o inicia sesión con la existente.
-
Buscar "Mis monstruos cantando" o usar esto enlace directo.
-
Haga clic en "Jugar juego" (para juegos gratis) o "Añadir al carrito" (para juegos de pago) y siga las instrucciones.
-
Espere a que el juego se descargue e instale en su computadora.
-
Lanza Steam y abre el juego desde tu biblioteca.
-
Disfruta!
-
-
Descarga desde otras fuentes
-
Riesgos y precauciones
-
Si bien descargar aplicaciones de las fuentes oficiales suele ser seguro y fácil, es posible que desee descargar My Singing Monsters de otras fuentes por varias razones. Por ejemplo, es posible que tenga un dispositivo antiguo que no sea compatible con la última versión de la aplicación, o que desee acceder a algunas funciones que no están disponibles en su región. Sin embargo, descargar aplicaciones de fuentes desconocidas también puede plantear algunos riesgos, como:
-
-
-
Malware: Algunas aplicaciones pueden contener software malicioso que puede dañar su dispositivo o robar su información personal.
-
Virus: Algunas aplicaciones pueden infectar su dispositivo con virus que pueden dañar sus archivos o ralentizar su rendimiento.
-
Spyware: Algunas aplicaciones pueden monitorear su actividad o recopilar sus datos sin su consentimiento.
-
Adware: Algunas aplicaciones pueden mostrar anuncios molestos o inapropiados en su dispositivo.
-
Estafas: Algunas aplicaciones pueden engañar a pagar por algo que no es lo que esperaba o no vale la pena el precio.
-
-
Para evitar estos riesgos, siempre debe tener cuidado y precaución al descargar aplicaciones de otras fuentes. Aquí hay algunas precauciones que puede tomar:
-
-
-
Descargar aplicaciones solo desde sitios o plataformas confiables y verificados.
-
Escanear la aplicación con un antivirus fiable o software anti-malware antes de instalarla.
-
Lea los permisos y términos de servicio de la aplicación cuidadosamente y solo aceptarlos si está de acuerdo con ellos.
-
Copia de seguridad de su dispositivo y datos regularmente en caso de que algo salga mal.
-
-
Cómo cargar los APK
-
Si quieres descargar My Singing Monsters desde una fuente distinta de Google Play Store, tendrás que cargar un archivo APK. APK significa Android Package Kit, y es el formato de archivo que Android utiliza para distribuir e instalar aplicaciones. Sideload significa instalar una aplicación desde una fuente distinta de la oficial. Estos son los pasos que debes seguir para cargar un archivo APK:
-
-
Encuentra un sitio de buena reputación que ofrece archivos APK para mis monstruos cantando, como apkpure.com o apkmonk.com.
-
Descargar el archivo APK a su dispositivo o transferirlo desde su computadora a través de un cable USB o Bluetooth.
-
Habilita la opción de instalar aplicaciones de fuentes desconocidas en tu dispositivo. Puede hacer esto yendo a Configuración > Seguridad > Fuentes desconocidas y activando.
-
Localice el archivo APK en su dispositivo utilizando una aplicación de administrador de archivos o la carpeta Descargas.
-
Toque en el archivo APK y siga las instrucciones para instalarlo.
-
¡Abre la aplicación y disfruta!
-
-
Conclusión
-
-
Preguntas frecuentes
-
Aquí hay algunas preguntas y respuestas frecuentes sobre la descarga de My Singing Monsters:
-
Q: ¿Cuánto espacio ocupa My Singing Monsters en mi dispositivo?
-
A: El tamaño de My Singing Monsters varía según el dispositivo y la plataforma, pero suele ser de unos 100 MB. Sin embargo, podría requerir más espacio a medida que avanzas en el juego y desbloqueas más contenido.
-
Q: ¿Puedo jugar mis monstruos cantando offline?
-
A: No, necesitas una conexión a Internet para jugar a My Singing Monsters, ya que es un juego online que requiere una comunicación constante con los servidores. También necesita una conexión a Internet para acceder a algunas funciones, como interacciones sociales, almacenamiento en la nube y actualizaciones.
-
Q: ¿Puedo jugar mis monstruos cantando en múltiples dispositivos?
-
A: Sí, puedes jugar My Singing Monsters en varios dispositivos usando la misma cuenta. Solo necesita vincular su cuenta a una dirección de correo electrónico o una cuenta de Facebook y luego iniciar sesión con ella en cualquier dispositivo. También puede sincronizar su progreso entre dispositivos utilizando la función de almacenamiento en la nube.
-
Q: ¿Cómo puedo actualizar mis monstruos cantando?
-
A: Si has descargado My Singing Monsters de las fuentes oficiales, recibirás notificaciones cuando haya una actualización disponible para la aplicación. A continuación, puede actualizarlo desde la Play Store, la App Store o Steam, dependiendo de su dispositivo y plataforma. Si has descargado My Singing Monsters de otras fuentes, tendrás que comprobar el sitio donde lo conseguiste y descargar la última versión del archivo APK. A continuación, puede instalarlo sobre la aplicación existente sin perder sus datos.
-
Q: ¿Cómo puedo contactar a los desarrolladores de My Singing Monsters?
64aa2da5cf
-
-
\ No newline at end of file
diff --git a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/utils/egg_link.py b/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/utils/egg_link.py
deleted file mode 100644
index eb57ed1519f82adb79a3d2377e1f286df9d8ef6b..0000000000000000000000000000000000000000
--- a/spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/utils/egg_link.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import os
-import re
-import sys
-from typing import List, Optional
-
-from pip._internal.locations import site_packages, user_site
-from pip._internal.utils.virtualenv import (
- running_under_virtualenv,
- virtualenv_no_global,
-)
-
-__all__ = [
- "egg_link_path_from_sys_path",
- "egg_link_path_from_location",
-]
-
-
-def _egg_link_name(raw_name: str) -> str:
- """
- Convert a Name metadata value to a .egg-link name, by applying
- the same substitution as pkg_resources's safe_name function.
- Note: we cannot use canonicalize_name because it has a different logic.
- """
- return re.sub("[^A-Za-z0-9.]+", "-", raw_name) + ".egg-link"
-
-
-def egg_link_path_from_sys_path(raw_name: str) -> Optional[str]:
- """
- Look for a .egg-link file for project name, by walking sys.path.
- """
- egg_link_name = _egg_link_name(raw_name)
- for path_item in sys.path:
- egg_link = os.path.join(path_item, egg_link_name)
- if os.path.isfile(egg_link):
- return egg_link
- return None
-
-
-def egg_link_path_from_location(raw_name: str) -> Optional[str]:
- """
- Return the path for the .egg-link file if it exists, otherwise, None.
-
- There's 3 scenarios:
- 1) not in a virtualenv
- try to find in site.USER_SITE, then site_packages
- 2) in a no-global virtualenv
- try to find in site_packages
- 3) in a yes-global virtualenv
- try to find in site_packages, then site.USER_SITE
- (don't look in global location)
-
- For #1 and #3, there could be odd cases, where there's an egg-link in 2
- locations.
-
- This method will just return the first one found.
- """
- sites: List[str] = []
- if running_under_virtualenv():
- sites.append(site_packages)
- if not virtualenv_no_global() and user_site:
- sites.append(user_site)
- else:
- if user_site:
- sites.append(user_site)
- sites.append(site_packages)
-
- egg_link_name = _egg_link_name(raw_name)
- for site in sites:
- egglink = os.path.join(site, egg_link_name)
- if os.path.isfile(egglink):
- return egglink
- return None
diff --git a/spaces/CVPR/LIVE/diffvg.cpp b/spaces/CVPR/LIVE/diffvg.cpp
deleted file mode 100644
index 7346d24b758b135bdd402fdb67ea412f48419eb3..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/diffvg.cpp
+++ /dev/null
@@ -1,1792 +0,0 @@
-#include "diffvg.h"
-#include "aabb.h"
-#include "shape.h"
-#include "sample_boundary.h"
-#include "atomic.h"
-#include "cdf.h"
-#include "compute_distance.h"
-#include "cuda_utils.h"
-#include "edge_query.h"
-#include "filter.h"
-#include "matrix.h"
-#include "parallel.h"
-#include "pcg.h"
-#include "ptr.h"
-#include "scene.h"
-#include "vector.h"
-#include "winding_number.h"
-#include "within_distance.h"
-#include
-#include
-#include
-#include
-#include
-
-namespace py = pybind11;
-
-struct Command {
- int shape_group_id;
- int shape_id;
- int point_id; // Only used by path
-};
-
-DEVICE
-bool is_inside(const SceneData &scene_data,
- int shape_group_id,
- const Vector2f &pt,
- EdgeQuery *edge_query) {
- const ShapeGroup &shape_group = scene_data.shape_groups[shape_group_id];
- // pt is in canvas space, transform it to shape's local space
- auto local_pt = xform_pt(shape_group.canvas_to_shape, pt);
- const auto &bvh_nodes = scene_data.shape_groups_bvh_nodes[shape_group_id];
- const AABB &bbox = bvh_nodes[2 * shape_group.num_shapes - 2].box;
- if (!inside(bbox, local_pt)) {
- return false;
- }
- auto winding_number = 0;
- // Traverse the shape group BVH
- constexpr auto max_bvh_stack_size = 64;
- int bvh_stack[max_bvh_stack_size];
- auto stack_size = 0;
- bvh_stack[stack_size++] = 2 * shape_group.num_shapes - 2;
- while (stack_size > 0) {
- const BVHNode &node = bvh_nodes[bvh_stack[--stack_size]];
- if (node.child1 < 0) {
- // leaf
- auto shape_id = node.child0;
- auto w = compute_winding_number(
- scene_data.shapes[shape_id], scene_data.path_bvhs[shape_id], local_pt);
- winding_number += w;
- if (edge_query != nullptr) {
- if (edge_query->shape_group_id == shape_group_id &&
- edge_query->shape_id == shape_id) {
- if ((shape_group.use_even_odd_rule && abs(w) % 2 == 1) ||
- (!shape_group.use_even_odd_rule && w != 0)) {
- edge_query->hit = true;
- }
- }
- }
- } else {
- assert(node.child0 >= 0 && node.child1 >= 0);
- const AABB &b0 = bvh_nodes[node.child0].box;
- if (inside(b0, local_pt)) {
- bvh_stack[stack_size++] = node.child0;
- }
- const AABB &b1 = bvh_nodes[node.child1].box;
- if (inside(b1, local_pt)) {
- bvh_stack[stack_size++] = node.child1;
- }
- assert(stack_size <= max_bvh_stack_size);
- }
- }
- if (shape_group.use_even_odd_rule) {
- return abs(winding_number) % 2 == 1;
- } else {
- return winding_number != 0;
- }
-}
-
-DEVICE void accumulate_boundary_gradient(const Shape &shape,
- float contrib,
- float t,
- const Vector2f &normal,
- const BoundaryData &boundary_data,
- Shape &d_shape,
- const Matrix3x3f &shape_to_canvas,
- const Vector2f &local_boundary_pt,
- Matrix3x3f &d_shape_to_canvas) {
- assert(isfinite(contrib));
- assert(isfinite(normal));
- // According to Reynold transport theorem,
- // the Jacobian of the boundary integral is dot(velocity, normal),
- // where the velocity depends on the variable being differentiated with.
- if (boundary_data.is_stroke) {
- auto has_path_thickness = false;
- if (shape.type == ShapeType::Path) {
- const Path &path = *(const Path *)shape.ptr;
- has_path_thickness = path.thickness != nullptr;
- }
- // differentiate stroke width: velocity is the same as normal
- if (has_path_thickness) {
- Path *d_p = (Path*)d_shape.ptr;
- auto base_point_id = boundary_data.path.base_point_id;
- auto point_id = boundary_data.path.point_id;
- auto t = boundary_data.path.t;
- const Path &path = *(const Path *)shape.ptr;
- if (path.num_control_points[base_point_id] == 0) {
- // Straight line
- auto i0 = point_id;
- auto i1 = (point_id + 1) % path.num_points;
- // r = r0 + t * (r1 - r0)
- atomic_add(&d_p->thickness[i0], (1 - t) * contrib);
- atomic_add(&d_p->thickness[i1], ( t) * contrib);
- } else if (path.num_control_points[base_point_id] == 1) {
- // Quadratic Bezier curve
- auto i0 = point_id;
- auto i1 = point_id + 1;
- auto i2 = (point_id + 2) % path.num_points;
- // r = (1-t)^2r0 + 2(1-t)t r1 + t^2 r2
- atomic_add(&d_p->thickness[i0], square(1 - t) * contrib);
- atomic_add(&d_p->thickness[i1], (2*(1-t)*t) * contrib);
- atomic_add(&d_p->thickness[i2], (t*t) * contrib);
- } else if (path.num_control_points[base_point_id] == 2) {
- auto i0 = point_id;
- auto i1 = point_id + 1;
- auto i2 = point_id + 2;
- auto i3 = (point_id + 3) % path.num_points;
- // r = (1-t)^3r0 + 3*(1-t)^2tr1 + 3*(1-t)t^2r2 + t^3r3
- atomic_add(&d_p->thickness[i0], cubic(1 - t) * contrib);
- atomic_add(&d_p->thickness[i1], 3 * square(1 - t) * t * contrib);
- atomic_add(&d_p->thickness[i2], 3 * (1 - t) * t * t * contrib);
- atomic_add(&d_p->thickness[i3], t * t * t * contrib);
- } else {
- assert(false);
- }
- } else {
- atomic_add(&d_shape.stroke_width, contrib);
- }
- }
- switch (shape.type) {
- case ShapeType::Circle: {
- Circle *d_p = (Circle*)d_shape.ptr;
- // velocity for the center is (1, 0) for x and (0, 1) for y
- atomic_add(&d_p->center[0], normal * contrib);
- // velocity for the radius is the same as the normal
- atomic_add(&d_p->radius, contrib);
- break;
- } case ShapeType::Ellipse: {
- Ellipse *d_p = (Ellipse*)d_shape.ptr;
- // velocity for the center is (1, 0) for x and (0, 1) for y
- atomic_add(&d_p->center[0], normal * contrib);
- // velocity for the radius:
- // x = center.x + r.x * cos(2pi * t)
- // y = center.y + r.y * sin(2pi * t)
- // for r.x: (cos(2pi * t), 0)
- // for r.y: (0, sin(2pi * t))
- atomic_add(&d_p->radius.x, cos(2 * float(M_PI) * t) * normal.x * contrib);
- atomic_add(&d_p->radius.y, sin(2 * float(M_PI) * t) * normal.y * contrib);
- break;
- } case ShapeType::Path: {
- Path *d_p = (Path*)d_shape.ptr;
- auto base_point_id = boundary_data.path.base_point_id;
- auto point_id = boundary_data.path.point_id;
- auto t = boundary_data.path.t;
- const Path &path = *(const Path *)shape.ptr;
- if (path.num_control_points[base_point_id] == 0) {
- // Straight line
- auto i0 = point_id;
- auto i1 = (point_id + 1) % path.num_points;
- // pt = p0 + t * (p1 - p0)
- // velocity for p0.x: (1 - t, 0)
- // p0.y: ( 0, 1 - t)
- // p1.x: ( t, 0)
- // p1.y: ( 0, t)
- atomic_add(&d_p->points[2 * i0 + 0], (1 - t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i0 + 1], (1 - t) * normal.y * contrib);
- atomic_add(&d_p->points[2 * i1 + 0], ( t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i1 + 1], ( t) * normal.y * contrib);
- } else if (path.num_control_points[base_point_id] == 1) {
- // Quadratic Bezier curve
- auto i0 = point_id;
- auto i1 = point_id + 1;
- auto i2 = (point_id + 2) % path.num_points;
- // pt = (1-t)^2p0 + 2(1-t)t p1 + t^2 p2
- // velocity for p0.x: ((1-t)^2, 0)
- // p0.y: ( 0, (1-t)^2)
- // p1.x: (2(1-t)t, 0)
- // p1.y: ( 0, 2(1-t)t)
- // p1.x: ( t^2, 0)
- // p1.y: ( 0, t^2)
- atomic_add(&d_p->points[2 * i0 + 0], square(1 - t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i0 + 1], square(1 - t) * normal.y * contrib);
- atomic_add(&d_p->points[2 * i1 + 0], (2*(1-t)*t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i1 + 1], (2*(1-t)*t) * normal.y * contrib);
- atomic_add(&d_p->points[2 * i2 + 0], (t*t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i2 + 1], (t*t) * normal.y * contrib);
- } else if (path.num_control_points[base_point_id] == 2) {
- auto i0 = point_id;
- auto i1 = point_id + 1;
- auto i2 = point_id + 2;
- auto i3 = (point_id + 3) % path.num_points;
- // pt = (1-t)^3p0 + 3*(1-t)^2tp1 + 3*(1-t)t^2p2 + t^3p3
- // velocity for p0.x: ( (1-t)^3, 0)
- // p0.y: ( 0, (1-t)^3)
- // p1.x: (3*(1-t)^2t, 0)
- // p1.y: ( 0, 3*(1-t)^2t)
- // p2.x: (3*(1-t)t^2, 0)
- // p2.y: ( 0, 3*(1-t)t^2)
- // p2.x: ( t^3, 0)
- // p2.y: ( 0, t^3)
- atomic_add(&d_p->points[2 * i0 + 0], cubic(1 - t) * normal.x * contrib);
- atomic_add(&d_p->points[2 * i0 + 1], cubic(1 - t) * normal.y * contrib);
- atomic_add(&d_p->points[2 * i1 + 0], 3 * square(1 - t) * t * normal.x * contrib);
- atomic_add(&d_p->points[2 * i1 + 1], 3 * square(1 - t) * t * normal.y * contrib);
- atomic_add(&d_p->points[2 * i2 + 0], 3 * (1 - t) * t * t * normal.x * contrib);
- atomic_add(&d_p->points[2 * i2 + 1], 3 * (1 - t) * t * t * normal.y * contrib);
- atomic_add(&d_p->points[2 * i3 + 0], t * t * t * normal.x * contrib);
- atomic_add(&d_p->points[2 * i3 + 1], t * t * t * normal.y * contrib);
- } else {
- assert(false);
- }
- break;
- } case ShapeType::Rect: {
- Rect *d_p = (Rect*)d_shape.ptr;
- // The velocity depends on the position of the boundary
- if (normal == Vector2f{-1, 0}) {
- // left
- // velocity for p_min is (1, 0) for x and (0, 0) for y
- atomic_add(&d_p->p_min.x, -contrib);
- } else if (normal == Vector2f{1, 0}) {
- // right
- // velocity for p_max is (1, 0) for x and (0, 0) for y
- atomic_add(&d_p->p_max.x, contrib);
- } else if (normal == Vector2f{0, -1}) {
- // top
- // velocity for p_min is (0, 0) for x and (0, 1) for y
- atomic_add(&d_p->p_min.y, -contrib);
- } else if (normal == Vector2f{0, 1}) {
- // bottom
- // velocity for p_max is (0, 0) for x and (0, 1) for y
- atomic_add(&d_p->p_max.y, contrib);
- } else {
- // incorrect normal assignment?
- assert(false);
- }
- break;
- } default: {
- assert(false);
- break;
- }
- }
- // for shape_to_canvas we have the following relationship:
- // boundary_pt = xform_pt(shape_to_canvas, local_pt)
- // the velocity is the derivative of boundary_pt with respect to shape_to_canvas
- // we can use reverse-mode AD to compute the dot product of the velocity and the Jacobian
- // by passing the normal in d_xform_pt
- auto d_shape_to_canvas_ = Matrix3x3f();
- auto d_local_boundary_pt = Vector2f{0, 0};
- d_xform_pt(shape_to_canvas,
- local_boundary_pt,
- normal * contrib,
- d_shape_to_canvas_,
- d_local_boundary_pt);
- atomic_add(&d_shape_to_canvas(0, 0), d_shape_to_canvas_);
-}
-
-DEVICE
-Vector4f sample_color(const ColorType &color_type,
- void *color,
- const Vector2f &pt) {
- switch (color_type) {
- case ColorType::Constant: {
- auto c = (const Constant*)color;
- assert(isfinite(c->color));
- return c->color;
- } case ColorType::LinearGradient: {
- auto c = (const LinearGradient*)color;
- // Project pt to (c->begin, c->end)
- auto beg = c->begin;
- auto end = c->end;
- auto t = dot(pt - beg, end - beg) / max(dot(end - beg, end - beg), 1e-3f);
- // Find the correponding stop:
- if (t < c->stop_offsets[0]) {
- return Vector4f{c->stop_colors[0],
- c->stop_colors[1],
- c->stop_colors[2],
- c->stop_colors[3]};
- }
- for (int i = 0; i < c->num_stops - 1; i++) {
- auto offset_curr = c->stop_offsets[i];
- auto offset_next = c->stop_offsets[i + 1];
- assert(offset_next > offset_curr);
- if (t >= offset_curr && t < offset_next) {
- auto color_curr = Vector4f{
- c->stop_colors[4 * i + 0],
- c->stop_colors[4 * i + 1],
- c->stop_colors[4 * i + 2],
- c->stop_colors[4 * i + 3]};
- auto color_next = Vector4f{
- c->stop_colors[4 * (i + 1) + 0],
- c->stop_colors[4 * (i + 1) + 1],
- c->stop_colors[4 * (i + 1) + 2],
- c->stop_colors[4 * (i + 1) + 3]};
- auto tt = (t - offset_curr) / (offset_next - offset_curr);
- assert(isfinite(tt));
- assert(isfinite(color_curr));
- assert(isfinite(color_next));
- return color_curr * (1 - tt) + color_next * tt;
- }
- }
- return Vector4f{c->stop_colors[4 * (c->num_stops - 1) + 0],
- c->stop_colors[4 * (c->num_stops - 1) + 1],
- c->stop_colors[4 * (c->num_stops - 1) + 2],
- c->stop_colors[4 * (c->num_stops - 1) + 3]};
- } case ColorType::RadialGradient: {
- auto c = (const RadialGradient*)color;
- // Distance from pt to center
- auto offset = pt - c->center;
- auto normalized_offset = offset / c->radius;
- auto t = length(normalized_offset);
- // Find the correponding stop:
- if (t < c->stop_offsets[0]) {
- return Vector4f{c->stop_colors[0],
- c->stop_colors[1],
- c->stop_colors[2],
- c->stop_colors[3]};
- }
- for (int i = 0; i < c->num_stops - 1; i++) {
- auto offset_curr = c->stop_offsets[i];
- auto offset_next = c->stop_offsets[i + 1];
- assert(offset_next > offset_curr);
- if (t >= offset_curr && t < offset_next) {
- auto color_curr = Vector4f{
- c->stop_colors[4 * i + 0],
- c->stop_colors[4 * i + 1],
- c->stop_colors[4 * i + 2],
- c->stop_colors[4 * i + 3]};
- auto color_next = Vector4f{
- c->stop_colors[4 * (i + 1) + 0],
- c->stop_colors[4 * (i + 1) + 1],
- c->stop_colors[4 * (i + 1) + 2],
- c->stop_colors[4 * (i + 1) + 3]};
- auto tt = (t - offset_curr) / (offset_next - offset_curr);
- assert(isfinite(tt));
- assert(isfinite(color_curr));
- assert(isfinite(color_next));
- return color_curr * (1 - tt) + color_next * tt;
- }
- }
- return Vector4f{c->stop_colors[4 * (c->num_stops - 1) + 0],
- c->stop_colors[4 * (c->num_stops - 1) + 1],
- c->stop_colors[4 * (c->num_stops - 1) + 2],
- c->stop_colors[4 * (c->num_stops - 1) + 3]};
- } default: {
- assert(false);
- }
- }
- return Vector4f{};
-}
-
-DEVICE
-void d_sample_color(const ColorType &color_type,
- void *color_ptr,
- const Vector2f &pt,
- const Vector4f &d_color,
- void *d_color_ptr,
- float *d_translation) {
- switch (color_type) {
- case ColorType::Constant: {
- auto d_c = (Constant*)d_color_ptr;
- atomic_add(&d_c->color[0], d_color);
- return;
- } case ColorType::LinearGradient: {
- auto c = (const LinearGradient*)color_ptr;
- auto d_c = (LinearGradient*)d_color_ptr;
- // Project pt to (c->begin, c->end)
- auto beg = c->begin;
- auto end = c->end;
- auto t = dot(pt - beg, end - beg) / max(dot(end - beg, end - beg), 1e-3f);
- // Find the correponding stop:
- if (t < c->stop_offsets[0]) {
- atomic_add(&d_c->stop_colors[0], d_color);
- return;
- }
- for (int i = 0; i < c->num_stops - 1; i++) {
- auto offset_curr = c->stop_offsets[i];
- auto offset_next = c->stop_offsets[i + 1];
- assert(offset_next > offset_curr);
- if (t >= offset_curr && t < offset_next) {
- auto color_curr = Vector4f{
- c->stop_colors[4 * i + 0],
- c->stop_colors[4 * i + 1],
- c->stop_colors[4 * i + 2],
- c->stop_colors[4 * i + 3]};
- auto color_next = Vector4f{
- c->stop_colors[4 * (i + 1) + 0],
- c->stop_colors[4 * (i + 1) + 1],
- c->stop_colors[4 * (i + 1) + 2],
- c->stop_colors[4 * (i + 1) + 3]};
- auto tt = (t - offset_curr) / (offset_next - offset_curr);
- // return color_curr * (1 - tt) + color_next * tt;
- auto d_color_curr = d_color * (1 - tt);
- auto d_color_next = d_color * tt;
- auto d_tt = sum(d_color * (color_next - color_curr));
- auto d_offset_next = -d_tt * tt / (offset_next - offset_curr);
- auto d_offset_curr = d_tt * ((tt - 1.f) / (offset_next - offset_curr));
- auto d_t = d_tt / (offset_next - offset_curr);
- assert(isfinite(d_tt));
- atomic_add(&d_c->stop_colors[4 * i], d_color_curr);
- atomic_add(&d_c->stop_colors[4 * (i + 1)], d_color_next);
- atomic_add(&d_c->stop_offsets[i], d_offset_curr);
- atomic_add(&d_c->stop_offsets[i + 1], d_offset_next);
- // auto t = dot(pt - beg, end - beg) / max(dot(end - beg, end - beg), 1e-6f);
- // l = max(dot(end - beg, end - beg), 1e-3f)
- // t = dot(pt - beg, end - beg) / l;
- auto l = max(dot(end - beg, end - beg), 1e-3f);
- auto d_beg = d_t * (-(pt - beg)-(end - beg)) / l;
- auto d_end = d_t * (pt - beg) / l;
- auto d_l = -d_t * t / l;
- if (dot(end - beg, end - beg) > 1e-3f) {
- d_beg += 2 * d_l * (beg - end);
- d_end += 2 * d_l * (end - beg);
- }
- atomic_add(&d_c->begin[0], d_beg);
- atomic_add(&d_c->end[0], d_end);
- if (d_translation != nullptr) {
- atomic_add(d_translation, (d_beg + d_end));
- }
- return;
- }
- }
- atomic_add(&d_c->stop_colors[4 * (c->num_stops - 1)], d_color);
- return;
- } case ColorType::RadialGradient: {
- auto c = (const RadialGradient*)color_ptr;
- auto d_c = (RadialGradient*)d_color_ptr;
- // Distance from pt to center
- auto offset = pt - c->center;
- auto normalized_offset = offset / c->radius;
- auto t = length(normalized_offset);
- // Find the correponding stop:
- if (t < c->stop_offsets[0]) {
- atomic_add(&d_c->stop_colors[0], d_color);
- return;
- }
- for (int i = 0; i < c->num_stops - 1; i++) {
- auto offset_curr = c->stop_offsets[i];
- auto offset_next = c->stop_offsets[i + 1];
- assert(offset_next > offset_curr);
- if (t >= offset_curr && t < offset_next) {
- auto color_curr = Vector4f{
- c->stop_colors[4 * i + 0],
- c->stop_colors[4 * i + 1],
- c->stop_colors[4 * i + 2],
- c->stop_colors[4 * i + 3]};
- auto color_next = Vector4f{
- c->stop_colors[4 * (i + 1) + 0],
- c->stop_colors[4 * (i + 1) + 1],
- c->stop_colors[4 * (i + 1) + 2],
- c->stop_colors[4 * (i + 1) + 3]};
- auto tt = (t - offset_curr) / (offset_next - offset_curr);
- assert(isfinite(tt));
- // return color_curr * (1 - tt) + color_next * tt;
- auto d_color_curr = d_color * (1 - tt);
- auto d_color_next = d_color * tt;
- auto d_tt = sum(d_color * (color_next - color_curr));
- auto d_offset_next = -d_tt * tt / (offset_next - offset_curr);
- auto d_offset_curr = d_tt * ((tt - 1.f) / (offset_next - offset_curr));
- auto d_t = d_tt / (offset_next - offset_curr);
- assert(isfinite(d_t));
- atomic_add(&d_c->stop_colors[4 * i], d_color_curr);
- atomic_add(&d_c->stop_colors[4 * (i + 1)], d_color_next);
- atomic_add(&d_c->stop_offsets[i], d_offset_curr);
- atomic_add(&d_c->stop_offsets[i + 1], d_offset_next);
- // offset = pt - c->center
- // normalized_offset = offset / c->radius
- // t = length(normalized_offset)
- auto d_normalized_offset = d_length(normalized_offset, d_t);
- auto d_offset = d_normalized_offset / c->radius;
- auto d_radius = -d_normalized_offset * offset / (c->radius * c->radius);
- auto d_center = -d_offset;
- atomic_add(&d_c->center[0], d_center);
- atomic_add(&d_c->radius[0], d_radius);
- if (d_translation != nullptr) {
- atomic_add(d_translation, d_center);
- }
- }
- }
- atomic_add(&d_c->stop_colors[4 * (c->num_stops - 1)], d_color);
- return;
- } default: {
- assert(false);
- }
- }
-}
-
-struct Fragment {
- Vector3f color;
- float alpha;
- int group_id;
- bool is_stroke;
-};
-
-struct PrefilterFragment {
- Vector3f color;
- float alpha;
- int group_id;
- bool is_stroke;
- int shape_id;
- float distance;
- Vector2f closest_pt;
- ClosestPointPathInfo path_info;
- bool within_distance;
-};
-
-DEVICE
-Vector4f sample_color(const SceneData &scene,
- const Vector4f *background_color,
- const Vector2f &screen_pt,
- const Vector4f *d_color = nullptr,
- EdgeQuery *edge_query = nullptr,
- Vector4f *d_background_color = nullptr,
- float *d_translation = nullptr) {
- if (edge_query != nullptr) {
- edge_query->hit = false;
- }
-
- // screen_pt is in screen space ([0, 1), [0, 1)),
- // need to transform to canvas space
- auto pt = screen_pt;
- pt.x *= scene.canvas_width;
- pt.y *= scene.canvas_height;
- constexpr auto max_hit_shapes = 256;
- constexpr auto max_bvh_stack_size = 64;
- Fragment fragments[max_hit_shapes];
- int bvh_stack[max_bvh_stack_size];
- auto stack_size = 0;
- auto num_fragments = 0;
- bvh_stack[stack_size++] = 2 * scene.num_shape_groups - 2;
- while (stack_size > 0) {
- const BVHNode &node = scene.bvh_nodes[bvh_stack[--stack_size]];
- if (node.child1 < 0) {
- // leaf
- auto group_id = node.child0;
- const ShapeGroup &shape_group = scene.shape_groups[group_id];
- if (shape_group.stroke_color != nullptr) {
- if (within_distance(scene, group_id, pt, edge_query)) {
- auto color_alpha = sample_color(shape_group.stroke_color_type,
- shape_group.stroke_color,
- pt);
- Fragment f;
- f.color = Vector3f{color_alpha[0], color_alpha[1], color_alpha[2]};
- f.alpha = color_alpha[3];
- f.group_id = group_id;
- f.is_stroke = true;
- assert(num_fragments < max_hit_shapes);
- fragments[num_fragments++] = f;
- }
- }
- if (shape_group.fill_color != nullptr) {
- if (is_inside(scene, group_id, pt, edge_query)) {
- auto color_alpha = sample_color(shape_group.fill_color_type,
- shape_group.fill_color,
- pt);
- Fragment f;
- f.color = Vector3f{color_alpha[0], color_alpha[1], color_alpha[2]};
- f.alpha = color_alpha[3];
- f.group_id = group_id;
- f.is_stroke = false;
- assert(num_fragments < max_hit_shapes);
- fragments[num_fragments++] = f;
- }
- }
- } else {
- assert(node.child0 >= 0 && node.child1 >= 0);
- const AABB &b0 = scene.bvh_nodes[node.child0].box;
- if (inside(b0, pt, scene.bvh_nodes[node.child0].max_radius)) {
- bvh_stack[stack_size++] = node.child0;
- }
- const AABB &b1 = scene.bvh_nodes[node.child1].box;
- if (inside(b1, pt, scene.bvh_nodes[node.child1].max_radius)) {
- bvh_stack[stack_size++] = node.child1;
- }
- assert(stack_size <= max_bvh_stack_size);
- }
- }
- if (num_fragments <= 0) {
- if (background_color != nullptr) {
- if (d_background_color != nullptr) {
- *d_background_color = *d_color;
- }
- return *background_color;
- }
- return Vector4f{0, 0, 0, 0};
- }
- // Sort the fragments from back to front (i.e. increasing order of group id)
- // https://github.com/frigaut/yorick-imutil/blob/master/insort.c#L37
- for (int i = 1; i < num_fragments; i++) {
- auto j = i;
- auto temp = fragments[j];
- while (j > 0 && fragments[j - 1].group_id > temp.group_id) {
- fragments[j] = fragments[j - 1];
- j--;
- }
- fragments[j] = temp;
- }
- // Blend the color
- Vector3f accum_color[max_hit_shapes];
- float accum_alpha[max_hit_shapes];
- // auto hit_opaque = false;
- auto first_alpha = 0.f;
- auto first_color = Vector3f{0, 0, 0};
- if (background_color != nullptr) {
- first_alpha = background_color->w;
- first_color = Vector3f{background_color->x,
- background_color->y,
- background_color->z};
- }
- for (int i = 0; i < num_fragments; i++) {
- const Fragment &fragment = fragments[i];
- auto new_color = fragment.color;
- auto new_alpha = fragment.alpha;
- auto prev_alpha = i > 0 ? accum_alpha[i - 1] : first_alpha;
- auto prev_color = i > 0 ? accum_color[i - 1] : first_color;
- if (edge_query != nullptr) {
- // Do we hit the target shape?
- if (new_alpha >= 1.f && edge_query->hit) {
- // A fully opaque shape in front of the target occludes it
- edge_query->hit = false;
- }
- if (edge_query->shape_group_id == fragment.group_id) {
- edge_query->hit = true;
- }
- }
- // prev_color is alpha premultiplied, don't need to multiply with
- // prev_alpha
- accum_color[i] = prev_color * (1 - new_alpha) + new_alpha * new_color;
- accum_alpha[i] = prev_alpha * (1 - new_alpha) + new_alpha;
- }
- auto final_color = accum_color[num_fragments - 1];
- auto final_alpha = accum_alpha[num_fragments - 1];
- if (final_alpha > 1e-6f) {
- final_color /= final_alpha;
- }
- assert(isfinite(final_color));
- assert(isfinite(final_alpha));
- if (d_color != nullptr) {
- // Backward pass
- auto d_final_color = Vector3f{(*d_color)[0], (*d_color)[1], (*d_color)[2]};
- auto d_final_alpha = (*d_color)[3];
- auto d_curr_color = d_final_color;
- auto d_curr_alpha = d_final_alpha;
- if (final_alpha > 1e-6f) {
- // final_color = curr_color / final_alpha
- d_curr_color = d_final_color / final_alpha;
- d_curr_alpha -= sum(d_final_color * final_color) / final_alpha;
- }
- assert(isfinite(*d_color));
- assert(isfinite(d_curr_color));
- assert(isfinite(d_curr_alpha));
- for (int i = num_fragments - 1; i >= 0; i--) {
- // color[n] = prev_color * (1 - new_alpha) + new_alpha * new_color;
- // alpha[n] = prev_alpha * (1 - new_alpha) + new_alpha;
- auto prev_alpha = i > 0 ? accum_alpha[i - 1] : first_alpha;
- auto prev_color = i > 0 ? accum_color[i - 1] : first_color;
- auto d_prev_alpha = d_curr_alpha * (1.f - fragments[i].alpha);
- auto d_alpha_i = d_curr_alpha * (1.f - prev_alpha);
- d_alpha_i += sum(d_curr_color * (fragments[i].color - prev_color));
- auto d_prev_color = d_curr_color * (1 - fragments[i].alpha);
- auto d_color_i = d_curr_color * fragments[i].alpha;
- auto group_id = fragments[i].group_id;
- if (fragments[i].is_stroke) {
- d_sample_color(scene.shape_groups[group_id].stroke_color_type,
- scene.shape_groups[group_id].stroke_color,
- pt,
- Vector4f{d_color_i[0], d_color_i[1], d_color_i[2], d_alpha_i},
- scene.d_shape_groups[group_id].stroke_color,
- d_translation);
- } else {
- d_sample_color(scene.shape_groups[group_id].fill_color_type,
- scene.shape_groups[group_id].fill_color,
- pt,
- Vector4f{d_color_i[0], d_color_i[1], d_color_i[2], d_alpha_i},
- scene.d_shape_groups[group_id].fill_color,
- d_translation);
- }
- d_curr_color = d_prev_color;
- d_curr_alpha = d_prev_alpha;
- }
- if (d_background_color != nullptr) {
- d_background_color->x += d_curr_color.x;
- d_background_color->y += d_curr_color.y;
- d_background_color->z += d_curr_color.z;
- d_background_color->w += d_curr_alpha;
- }
- }
- return Vector4f{final_color[0], final_color[1], final_color[2], final_alpha};
-}
-
-DEVICE
-float sample_distance(const SceneData &scene,
- const Vector2f &screen_pt,
- float weight,
- const float *d_dist = nullptr,
- float *d_translation = nullptr) {
- // screen_pt is in screen space ([0, 1), [0, 1)),
- // need to transform to canvas space
- auto pt = screen_pt;
- pt.x *= scene.canvas_width;
- pt.y *= scene.canvas_height;
- // for each shape
- auto min_group_id = -1;
- auto min_distance = 0.f;
- auto min_shape_id = -1;
- auto closest_pt = Vector2f{0, 0};
- auto min_path_info = ClosestPointPathInfo{-1, -1, 0};
- for (int group_id = scene.num_shape_groups - 1; group_id >= 0; group_id--) {
- auto s = -1;
- auto p = Vector2f{0, 0};
- ClosestPointPathInfo local_path_info;
- auto d = infinity();
- if (compute_distance(scene, group_id, pt, infinity(), &s, &p, &local_path_info, &d)) {
- if (min_group_id == -1 || d < min_distance) {
- min_distance = d;
- min_group_id = group_id;
- min_shape_id = s;
- closest_pt = p;
- min_path_info = local_path_info;
- }
- }
- }
- if (min_group_id == -1) {
- return min_distance;
- }
- min_distance *= weight;
- auto inside = false;
- const ShapeGroup &shape_group = scene.shape_groups[min_group_id];
- if (shape_group.fill_color != nullptr) {
- inside = is_inside(scene,
- min_group_id,
- pt,
- nullptr);
- if (inside) {
- min_distance = -min_distance;
- }
- }
- assert((min_group_id >= 0 && min_shape_id >= 0) || scene.num_shape_groups == 0);
- if (d_dist != nullptr) {
- auto d_abs_dist = inside ? -(*d_dist) : (*d_dist);
- const ShapeGroup &shape_group = scene.shape_groups[min_group_id];
- const Shape &shape = scene.shapes[min_shape_id];
- ShapeGroup &d_shape_group = scene.d_shape_groups[min_group_id];
- Shape &d_shape = scene.d_shapes[min_shape_id];
- d_compute_distance(shape_group.canvas_to_shape,
- shape_group.shape_to_canvas,
- shape,
- pt,
- closest_pt,
- min_path_info,
- d_abs_dist,
- d_shape_group.shape_to_canvas,
- d_shape,
- d_translation);
- }
- return min_distance;
-}
-
-// Gather d_color from d_image inside the filter kernel, normalize by
-// weight_image.
-DEVICE
-Vector4f gather_d_color(const Filter &filter,
- const float *d_color_image,
- const float *weight_image,
- int width,
- int height,
- const Vector2f &pt) {
- auto x = int(pt.x);
- auto y = int(pt.y);
- auto radius = filter.radius;
- assert(radius > 0);
- auto ri = (int)ceil(radius);
- auto d_color = Vector4f{0, 0, 0, 0};
- for (int dy = -ri; dy <= ri; dy++) {
- for (int dx = -ri; dx <= ri; dx++) {
- auto xx = x + dx;
- auto yy = y + dy;
- if (xx >= 0 && xx < width && yy >= 0 && yy < height) {
- auto xc = xx + 0.5f;
- auto yc = yy + 0.5f;
- auto filter_weight =
- compute_filter_weight(filter, xc - pt.x, yc - pt.y);
- // pixel = \sum weight * color / \sum weight
- auto weight_sum = weight_image[yy * width + xx];
- if (weight_sum > 0) {
- d_color += (filter_weight / weight_sum) * Vector4f{
- d_color_image[4 * (yy * width + xx) + 0],
- d_color_image[4 * (yy * width + xx) + 1],
- d_color_image[4 * (yy * width + xx) + 2],
- d_color_image[4 * (yy * width + xx) + 3],
- };
- }
- }
- }
- }
- return d_color;
-}
-
-DEVICE
-float smoothstep(float d) {
- auto t = clamp((d + 1.f) / 2.f, 0.f, 1.f);
- return t * t * (3 - 2 * t);
-}
-
-DEVICE
-float d_smoothstep(float d, float d_ret) {
- if (d < -1.f || d > 1.f) {
- return 0.f;
- }
- auto t = (d + 1.f) / 2.f;
- // ret = t * t * (3 - 2 * t)
- // = 3 * t * t - 2 * t * t * t
- auto d_t = d_ret * (6 * t - 6 * t * t);
- return d_t / 2.f;
-}
-
-DEVICE
-Vector4f sample_color_prefiltered(const SceneData &scene,
- const Vector4f *background_color,
- const Vector2f &screen_pt,
- const Vector4f *d_color = nullptr,
- Vector4f *d_background_color = nullptr,
- float *d_translation = nullptr) {
- // screen_pt is in screen space ([0, 1), [0, 1)),
- // need to transform to canvas space
- auto pt = screen_pt;
- pt.x *= scene.canvas_width;
- pt.y *= scene.canvas_height;
- constexpr auto max_hit_shapes = 64;
- constexpr auto max_bvh_stack_size = 64;
- PrefilterFragment fragments[max_hit_shapes];
- int bvh_stack[max_bvh_stack_size];
- auto stack_size = 0;
- auto num_fragments = 0;
- bvh_stack[stack_size++] = 2 * scene.num_shape_groups - 2;
- while (stack_size > 0) {
- const BVHNode &node = scene.bvh_nodes[bvh_stack[--stack_size]];
- if (node.child1 < 0) {
- // leaf
- auto group_id = node.child0;
- const ShapeGroup &shape_group = scene.shape_groups[group_id];
- if (shape_group.stroke_color != nullptr) {
- auto min_shape_id = -1;
- auto closest_pt = Vector2f{0, 0};
- auto local_path_info = ClosestPointPathInfo{-1, -1, 0};
- auto d = infinity();
- compute_distance(scene, group_id, pt, infinity(),
- &min_shape_id, &closest_pt, &local_path_info, &d);
- assert(min_shape_id != -1);
- const auto &shape = scene.shapes[min_shape_id];
- auto w = smoothstep(fabs(d) + shape.stroke_width) -
- smoothstep(fabs(d) - shape.stroke_width);
- if (w > 0) {
- auto color_alpha = sample_color(shape_group.stroke_color_type,
- shape_group.stroke_color,
- pt);
- color_alpha[3] *= w;
-
- PrefilterFragment f;
- f.color = Vector3f{color_alpha[0], color_alpha[1], color_alpha[2]};
- f.alpha = color_alpha[3];
- f.group_id = group_id;
- f.shape_id = min_shape_id;
- f.distance = d;
- f.closest_pt = closest_pt;
- f.is_stroke = true;
- f.path_info = local_path_info;
- f.within_distance = true;
- assert(num_fragments < max_hit_shapes);
- fragments[num_fragments++] = f;
- }
- }
- if (shape_group.fill_color != nullptr) {
- auto min_shape_id = -1;
- auto closest_pt = Vector2f{0, 0};
- auto local_path_info = ClosestPointPathInfo{-1, -1, 0};
- auto d = infinity();
- auto found = compute_distance(scene,
- group_id,
- pt,
- 1.f,
- &min_shape_id,
- &closest_pt,
- &local_path_info,
- &d);
- auto inside = is_inside(scene, group_id, pt, nullptr);
- if (found || inside) {
- if (!inside) {
- d = -d;
- }
- auto w = smoothstep(d);
- if (w > 0) {
- auto color_alpha = sample_color(shape_group.fill_color_type,
- shape_group.fill_color,
- pt);
- color_alpha[3] *= w;
-
- PrefilterFragment f;
- f.color = Vector3f{color_alpha[0], color_alpha[1], color_alpha[2]};
- f.alpha = color_alpha[3];
- f.group_id = group_id;
- f.shape_id = min_shape_id;
- f.distance = d;
- f.closest_pt = closest_pt;
- f.is_stroke = false;
- f.path_info = local_path_info;
- f.within_distance = found;
- assert(num_fragments < max_hit_shapes);
- fragments[num_fragments++] = f;
- }
- }
- }
- } else {
- assert(node.child0 >= 0 && node.child1 >= 0);
- const AABB &b0 = scene.bvh_nodes[node.child0].box;
- if (inside(b0, pt, scene.bvh_nodes[node.child0].max_radius)) {
- bvh_stack[stack_size++] = node.child0;
- }
- const AABB &b1 = scene.bvh_nodes[node.child1].box;
- if (inside(b1, pt, scene.bvh_nodes[node.child1].max_radius)) {
- bvh_stack[stack_size++] = node.child1;
- }
- assert(stack_size <= max_bvh_stack_size);
- }
- }
- if (num_fragments <= 0) {
- if (background_color != nullptr) {
- if (d_background_color != nullptr) {
- *d_background_color = *d_color;
- }
- return *background_color;
- }
- return Vector4f{0, 0, 0, 0};
- }
- // Sort the fragments from back to front (i.e. increasing order of group id)
- // https://github.com/frigaut/yorick-imutil/blob/master/insort.c#L37
- for (int i = 1; i < num_fragments; i++) {
- auto j = i;
- auto temp = fragments[j];
- while (j > 0 && fragments[j - 1].group_id > temp.group_id) {
- fragments[j] = fragments[j - 1];
- j--;
- }
- fragments[j] = temp;
- }
- // Blend the color
- Vector3f accum_color[max_hit_shapes];
- float accum_alpha[max_hit_shapes];
- auto first_alpha = 0.f;
- auto first_color = Vector3f{0, 0, 0};
- if (background_color != nullptr) {
- first_alpha = background_color->w;
- first_color = Vector3f{background_color->x,
- background_color->y,
- background_color->z};
- }
- for (int i = 0; i < num_fragments; i++) {
- const PrefilterFragment &fragment = fragments[i];
- auto new_color = fragment.color;
- auto new_alpha = fragment.alpha;
- auto prev_alpha = i > 0 ? accum_alpha[i - 1] : first_alpha;
- auto prev_color = i > 0 ? accum_color[i - 1] : first_color;
- // prev_color is alpha premultiplied, don't need to multiply with
- // prev_alpha
- accum_color[i] = prev_color * (1 - new_alpha) + new_alpha * new_color;
- accum_alpha[i] = prev_alpha * (1 - new_alpha) + new_alpha;
- }
- auto final_color = accum_color[num_fragments - 1];
- auto final_alpha = accum_alpha[num_fragments - 1];
- if (final_alpha > 1e-6f) {
- final_color /= final_alpha;
- }
- assert(isfinite(final_color));
- assert(isfinite(final_alpha));
- if (d_color != nullptr) {
- // Backward pass
- auto d_final_color = Vector3f{(*d_color)[0], (*d_color)[1], (*d_color)[2]};
- auto d_final_alpha = (*d_color)[3];
- auto d_curr_color = d_final_color;
- auto d_curr_alpha = d_final_alpha;
- if (final_alpha > 1e-6f) {
- // final_color = curr_color / final_alpha
- d_curr_color = d_final_color / final_alpha;
- d_curr_alpha -= sum(d_final_color * final_color) / final_alpha;
- }
- assert(isfinite(*d_color));
- assert(isfinite(d_curr_color));
- assert(isfinite(d_curr_alpha));
- for (int i = num_fragments - 1; i >= 0; i--) {
- // color[n] = prev_color * (1 - new_alpha) + new_alpha * new_color;
- // alpha[n] = prev_alpha * (1 - new_alpha) + new_alpha;
- auto prev_alpha = i > 0 ? accum_alpha[i - 1] : first_alpha;
- auto prev_color = i > 0 ? accum_color[i - 1] : first_color;
- auto d_prev_alpha = d_curr_alpha * (1.f - fragments[i].alpha);
- auto d_alpha_i = d_curr_alpha * (1.f - prev_alpha);
- d_alpha_i += sum(d_curr_color * (fragments[i].color - prev_color));
- auto d_prev_color = d_curr_color * (1 - fragments[i].alpha);
- auto d_color_i = d_curr_color * fragments[i].alpha;
- auto group_id = fragments[i].group_id;
- if (fragments[i].is_stroke) {
- const auto &shape = scene.shapes[fragments[i].shape_id];
- auto d = fragments[i].distance;
- auto abs_d_plus_width = fabs(d) + shape.stroke_width;
- auto abs_d_minus_width = fabs(d) - shape.stroke_width;
- auto w = smoothstep(abs_d_plus_width) -
- smoothstep(abs_d_minus_width);
- if (w != 0) {
- auto d_w = w > 0 ? (fragments[i].alpha / w) * d_alpha_i : 0.f;
- d_alpha_i *= w;
-
- // Backprop to color
- d_sample_color(scene.shape_groups[group_id].stroke_color_type,
- scene.shape_groups[group_id].stroke_color,
- pt,
- Vector4f{d_color_i[0], d_color_i[1], d_color_i[2], d_alpha_i},
- scene.d_shape_groups[group_id].stroke_color,
- d_translation);
-
- auto d_abs_d_plus_width = d_smoothstep(abs_d_plus_width, d_w);
- auto d_abs_d_minus_width = -d_smoothstep(abs_d_minus_width, d_w);
-
- auto d_d = d_abs_d_plus_width + d_abs_d_minus_width;
- if (d < 0) {
- d_d = -d_d;
- }
- auto d_stroke_width = d_abs_d_plus_width - d_abs_d_minus_width;
-
- const auto &shape_group = scene.shape_groups[group_id];
- ShapeGroup &d_shape_group = scene.d_shape_groups[group_id];
- Shape &d_shape = scene.d_shapes[fragments[i].shape_id];
- if (fabs(d_d) > 1e-10f) {
- d_compute_distance(shape_group.canvas_to_shape,
- shape_group.shape_to_canvas,
- shape,
- pt,
- fragments[i].closest_pt,
- fragments[i].path_info,
- d_d,
- d_shape_group.shape_to_canvas,
- d_shape,
- d_translation);
- }
- atomic_add(&d_shape.stroke_width, d_stroke_width);
- }
- } else {
- const auto &shape = scene.shapes[fragments[i].shape_id];
- auto d = fragments[i].distance;
- auto w = smoothstep(d);
- if (w != 0) {
- // color_alpha[3] = color_alpha[3] * w;
- auto d_w = w > 0 ? (fragments[i].alpha / w) * d_alpha_i : 0.f;
- d_alpha_i *= w;
-
- d_sample_color(scene.shape_groups[group_id].fill_color_type,
- scene.shape_groups[group_id].fill_color,
- pt,
- Vector4f{d_color_i[0], d_color_i[1], d_color_i[2], d_alpha_i},
- scene.d_shape_groups[group_id].fill_color,
- d_translation);
-
- // w = smoothstep(d)
- auto d_d = d_smoothstep(d, d_w);
- if (d < 0) {
- d_d = -d_d;
- }
-
- const auto &shape_group = scene.shape_groups[group_id];
- ShapeGroup &d_shape_group = scene.d_shape_groups[group_id];
- Shape &d_shape = scene.d_shapes[fragments[i].shape_id];
- if (fabs(d_d) > 1e-10f && fragments[i].within_distance) {
- d_compute_distance(shape_group.canvas_to_shape,
- shape_group.shape_to_canvas,
- shape,
- pt,
- fragments[i].closest_pt,
- fragments[i].path_info,
- d_d,
- d_shape_group.shape_to_canvas,
- d_shape,
- d_translation);
- }
- }
- }
- d_curr_color = d_prev_color;
- d_curr_alpha = d_prev_alpha;
- }
- if (d_background_color != nullptr) {
- d_background_color->x += d_curr_color.x;
- d_background_color->y += d_curr_color.y;
- d_background_color->z += d_curr_color.z;
- d_background_color->w += d_curr_alpha;
- }
- }
- return Vector4f{final_color[0], final_color[1], final_color[2], final_alpha};
-}
-
-struct weight_kernel {
- DEVICE void operator()(int idx) {
- auto rng_state = init_pcg32(idx, seed);
- // height * width * num_samples_y * num_samples_x
- auto sx = idx % num_samples_x;
- auto sy = (idx / num_samples_x) % num_samples_y;
- auto x = (idx / (num_samples_x * num_samples_y)) % width;
- auto y = (idx / (num_samples_x * num_samples_y * width));
- assert(y < height);
- auto rx = next_pcg32_float(&rng_state);
- auto ry = next_pcg32_float(&rng_state);
- if (use_prefiltering) {
- rx = ry = 0.5f;
- }
- auto pt = Vector2f{x + ((float)sx + rx) / num_samples_x,
- y + ((float)sy + ry) / num_samples_y};
- auto radius = scene.filter->radius;
- assert(radius >= 0);
- auto ri = (int)ceil(radius);
- for (int dy = -ri; dy <= ri; dy++) {
- for (int dx = -ri; dx <= ri; dx++) {
- auto xx = x + dx;
- auto yy = y + dy;
- if (xx >= 0 && xx < width && yy >= 0 && yy < height) {
- auto xc = xx + 0.5f;
- auto yc = yy + 0.5f;
- auto filter_weight = compute_filter_weight(*scene.filter,
- xc - pt.x,
- yc - pt.y);
- atomic_add(weight_image[yy * width + xx], filter_weight);
- }
- }
- }
- }
-
- SceneData scene;
- float *weight_image;
- int width;
- int height;
- int num_samples_x;
- int num_samples_y;
- uint64_t seed;
- bool use_prefiltering;
-};
-
-// We use a "mega kernel" for rendering
-struct render_kernel {
- DEVICE void operator()(int idx) {
- // height * width * num_samples_y * num_samples_x
- auto pt = Vector2f{0, 0};
- auto x = 0;
- auto y = 0;
- if (eval_positions == nullptr) {
- auto rng_state = init_pcg32(idx, seed);
- auto sx = idx % num_samples_x;
- auto sy = (idx / num_samples_x) % num_samples_y;
- x = (idx / (num_samples_x * num_samples_y)) % width;
- y = (idx / (num_samples_x * num_samples_y * width));
- assert(x < width && y < height);
- auto rx = next_pcg32_float(&rng_state);
- auto ry = next_pcg32_float(&rng_state);
- if (use_prefiltering) {
- rx = ry = 0.5f;
- }
- pt = Vector2f{x + ((float)sx + rx) / num_samples_x,
- y + ((float)sy + ry) / num_samples_y};
- } else {
- pt = Vector2f{eval_positions[2 * idx],
- eval_positions[2 * idx + 1]};
- x = int(pt.x);
- y = int(pt.y);
- }
-
- // normalize pt to [0, 1]
- auto npt = pt;
- npt.x /= width;
- npt.y /= height;
- auto num_samples = num_samples_x * num_samples_y;
- if (render_image != nullptr || d_render_image != nullptr) {
- Vector4f d_color = Vector4f{0, 0, 0, 0};
- if (d_render_image != nullptr) {
- // Gather d_color from d_render_image inside the filter kernel
- // normalize using weight_image
- d_color = gather_d_color(*scene.filter,
- d_render_image,
- weight_image,
- width,
- height,
- pt);
- }
- auto color = Vector4f{0, 0, 0, 0};
- if (use_prefiltering) {
- color = sample_color_prefiltered(scene,
- background_image != nullptr ? (const Vector4f*)&background_image[4 * ((y * width) + x)] : nullptr,
- npt,
- d_render_image != nullptr ? &d_color : nullptr,
- d_background_image != nullptr ? (Vector4f*)&d_background_image[4 * ((y * width) + x)] : nullptr,
- d_translation != nullptr ? &d_translation[2 * (y * width + x)] : nullptr);
- } else {
- color = sample_color(scene,
- background_image != nullptr ? (const Vector4f*)&background_image[4 * ((y * width) + x)] : nullptr,
- npt,
- d_render_image != nullptr ? &d_color : nullptr,
- nullptr,
- d_background_image != nullptr ? (Vector4f*)&d_background_image[4 * ((y * width) + x)] : nullptr,
- d_translation != nullptr ? &d_translation[2 * (y * width + x)] : nullptr);
- }
- assert(isfinite(color));
- // Splat color onto render_image
- auto radius = scene.filter->radius;
- assert(radius >= 0);
- auto ri = (int)ceil(radius);
- for (int dy = -ri; dy <= ri; dy++) {
- for (int dx = -ri; dx <= ri; dx++) {
- auto xx = x + dx;
- auto yy = y + dy;
- if (xx >= 0 && xx < width && yy >= 0 && yy < height &&
- weight_image[yy * width + xx] > 0) {
- auto weight_sum = weight_image[yy * width + xx];
- auto xc = xx + 0.5f;
- auto yc = yy + 0.5f;
- auto filter_weight = compute_filter_weight(*scene.filter,
- xc - pt.x,
- yc - pt.y);
- auto weighted_color = filter_weight * color / weight_sum;
- if (render_image != nullptr) {
- atomic_add(render_image[4 * (yy * width + xx) + 0],
- weighted_color[0]);
- atomic_add(render_image[4 * (yy * width + xx) + 1],
- weighted_color[1]);
- atomic_add(render_image[4 * (yy * width + xx) + 2],
- weighted_color[2]);
- atomic_add(render_image[4 * (yy * width + xx) + 3],
- weighted_color[3]);
- }
- if (d_render_image != nullptr) {
- // Backprop to filter_weight
- // pixel = \sum weight * color / \sum weight
- auto d_pixel = Vector4f{
- d_render_image[4 * (yy * width + xx) + 0],
- d_render_image[4 * (yy * width + xx) + 1],
- d_render_image[4 * (yy * width + xx) + 2],
- d_render_image[4 * (yy * width + xx) + 3],
- };
- auto d_weight =
- (dot(d_pixel, color) * weight_sum -
- filter_weight * dot(d_pixel, color) * (weight_sum - filter_weight)) /
- square(weight_sum);
- d_compute_filter_weight(*scene.filter,
- xc - pt.x,
- yc - pt.y,
- d_weight,
- scene.d_filter);
- }
- }
- }
- }
- }
- if (sdf_image != nullptr || d_sdf_image != nullptr) {
- float d_dist = 0.f;
- if (d_sdf_image != nullptr) {
- if (eval_positions == nullptr) {
- d_dist = d_sdf_image[y * width + x];
- } else {
- d_dist = d_sdf_image[idx];
- }
- }
- auto weight = eval_positions == nullptr ? 1.f / num_samples : 1.f;
- auto dist = sample_distance(scene, npt, weight,
- d_sdf_image != nullptr ? &d_dist : nullptr,
- d_translation != nullptr ? &d_translation[2 * (y * width + x)] : nullptr);
- if (sdf_image != nullptr) {
- if (eval_positions == nullptr) {
- atomic_add(sdf_image[y * width + x], dist);
- } else {
- atomic_add(sdf_image[idx], dist);
- }
- }
- }
- }
-
- SceneData scene;
- float *background_image;
- float *render_image;
- float *weight_image;
- float *sdf_image;
- float *d_background_image;
- float *d_render_image;
- float *d_sdf_image;
- float *d_translation;
- int width;
- int height;
- int num_samples_x;
- int num_samples_y;
- uint64_t seed;
- bool use_prefiltering;
- float *eval_positions;
-};
-
-struct BoundarySample {
- Vector2f pt;
- Vector2f local_pt;
- Vector2f normal;
- int shape_group_id;
- int shape_id;
- float t;
- BoundaryData data;
- float pdf;
-};
-
-struct sample_boundary_kernel {
- DEVICE void operator()(int idx) {
- boundary_samples[idx].pt = Vector2f{0, 0};
- boundary_samples[idx].shape_id = -1;
- boundary_ids[idx] = idx;
- morton_codes[idx] = 0;
-
- auto rng_state = init_pcg32(idx, seed);
- auto u = next_pcg32_float(&rng_state);
- // Sample a shape
- auto sample_id = sample(scene.sample_shapes_cdf,
- scene.num_total_shapes,
- u);
- assert(sample_id >= 0 && sample_id < scene.num_total_shapes);
- auto shape_id = scene.sample_shape_id[sample_id];
- assert(shape_id >= 0 && shape_id < scene.num_shapes);
- auto shape_group_id = scene.sample_group_id[sample_id];
- assert(shape_group_id >= 0 && shape_group_id < scene.num_shape_groups);
- auto shape_pmf = scene.sample_shapes_pmf[shape_id];
- if (shape_pmf <= 0) {
- return;
- }
- // Sample a point on the boundary of the shape
- auto boundary_pdf = 0.f;
- auto normal = Vector2f{0, 0};
- auto t = next_pcg32_float(&rng_state);
- BoundaryData boundary_data;
- const ShapeGroup &shape_group = scene.shape_groups[shape_group_id];
- auto local_boundary_pt = sample_boundary(
- scene, shape_group_id, shape_id,
- t, normal, boundary_pdf, boundary_data);
- if (boundary_pdf <= 0) {
- return;
- }
-
- // local_boundary_pt & normal are in shape's local space,
- // transform them to canvas space
- auto boundary_pt = xform_pt(shape_group.shape_to_canvas, local_boundary_pt);
- normal = xform_normal(shape_group.canvas_to_shape, normal);
- // Normalize boundary_pt to [0, 1)
- boundary_pt.x /= scene.canvas_width;
- boundary_pt.y /= scene.canvas_height;
-
- boundary_samples[idx].pt = boundary_pt;
- boundary_samples[idx].local_pt = local_boundary_pt;
- boundary_samples[idx].normal = normal;
- boundary_samples[idx].shape_group_id = shape_group_id;
- boundary_samples[idx].shape_id = shape_id;
- boundary_samples[idx].t = t;
- boundary_samples[idx].data = boundary_data;
- boundary_samples[idx].pdf = shape_pmf * boundary_pdf;
- TVector2 p_i{boundary_pt.x * 1023, boundary_pt.y * 1023};
- morton_codes[idx] = (expand_bits(p_i.x) << 1u) |
- (expand_bits(p_i.y) << 0u);
- }
-
- SceneData scene;
- uint64_t seed;
- BoundarySample *boundary_samples;
- int *boundary_ids;
- uint32_t *morton_codes;
-};
-
-struct render_edge_kernel {
- DEVICE void operator()(int idx) {
- auto bid = boundary_ids[idx];
- if (boundary_samples[bid].shape_id == -1) {
- return;
- }
- auto boundary_pt = boundary_samples[bid].pt;
- auto local_boundary_pt = boundary_samples[bid].local_pt;
- auto normal = boundary_samples[bid].normal;
- auto shape_group_id = boundary_samples[bid].shape_group_id;
- auto shape_id = boundary_samples[bid].shape_id;
- auto t = boundary_samples[bid].t;
- auto boundary_data = boundary_samples[bid].data;
- auto pdf = boundary_samples[bid].pdf;
-
- const ShapeGroup &shape_group = scene.shape_groups[shape_group_id];
-
- auto bx = int(boundary_pt.x * width);
- auto by = int(boundary_pt.y * height);
- if (bx < 0 || bx >= width || by < 0 || by >= height) {
- return;
- }
-
- // Sample the two sides of the boundary
- auto inside_query = EdgeQuery{shape_group_id, shape_id, false};
- auto outside_query = EdgeQuery{shape_group_id, shape_id, false};
- auto color_inside = sample_color(scene,
- background_image != nullptr ? (const Vector4f *)&background_image[4 * ((by * width) + bx)] : nullptr,
- boundary_pt - 1e-4f * normal,
- nullptr, &inside_query);
- auto color_outside = sample_color(scene,
- background_image != nullptr ? (const Vector4f *)&background_image[4 * ((by * width) + bx)] : nullptr,
- boundary_pt + 1e-4f * normal,
- nullptr, &outside_query);
- if (!inside_query.hit && !outside_query.hit) {
- // occluded
- return;
- }
- if (!inside_query.hit) {
- normal = -normal;
- swap_(inside_query, outside_query);
- swap_(color_inside, color_outside);
- }
- // Boundary point in screen space
- auto sboundary_pt = boundary_pt;
- sboundary_pt.x *= width;
- sboundary_pt.y *= height;
- auto d_color = gather_d_color(*scene.filter,
- d_render_image,
- weight_image,
- width,
- height,
- sboundary_pt);
- // Normalization factor
- d_color /= float(scene.canvas_width * scene.canvas_height);
-
- assert(isfinite(d_color));
- assert(isfinite(pdf) && pdf > 0);
- auto contrib = dot(color_inside - color_outside, d_color) / pdf;
- ShapeGroup &d_shape_group = scene.d_shape_groups[shape_group_id];
- accumulate_boundary_gradient(scene.shapes[shape_id],
- contrib, t, normal, boundary_data, scene.d_shapes[shape_id],
- shape_group.shape_to_canvas, local_boundary_pt, d_shape_group.shape_to_canvas);
- // Don't need to backprop to filter weights:
- // \int f'(x) g(x) dx doesn't contain discontinuities
- // if f is continuous, even if g is discontinuous
- if (d_translation != nullptr) {
- // According to Reynold transport theorem,
- // the Jacobian of the boundary integral is dot(velocity, normal)
- // The velocity of the object translating x is (1, 0)
- // The velocity of the object translating y is (0, 1)
- atomic_add(&d_translation[2 * (by * width + bx) + 0], normal.x * contrib);
- atomic_add(&d_translation[2 * (by * width + bx) + 1], normal.y * contrib);
- }
- }
-
- SceneData scene;
- const float *background_image;
- const BoundarySample *boundary_samples;
- const int *boundary_ids;
- float *weight_image;
- float *d_render_image;
- float *d_translation;
- int width;
- int height;
- int num_samples_x;
- int num_samples_y;
-};
-
-void render(std::shared_ptr scene,
- ptr background_image,
- ptr render_image,
- ptr render_sdf,
- int width,
- int height,
- int num_samples_x,
- int num_samples_y,
- uint64_t seed,
- ptr d_background_image,
- ptr d_render_image,
- ptr d_render_sdf,
- ptr d_translation,
- bool use_prefiltering,
- ptr eval_positions,
- int num_eval_positions) {
-#ifdef __NVCC__
- int old_device_id = -1;
- if (scene->use_gpu) {
- checkCuda(cudaGetDevice(&old_device_id));
- if (scene->gpu_index != -1) {
- checkCuda(cudaSetDevice(scene->gpu_index));
- }
- }
-#endif
- parallel_init();
-
- float *weight_image = nullptr;
- // Allocate and zero the weight image
- if (scene->use_gpu) {
-#ifdef __CUDACC__
- if (eval_positions.get() == nullptr) {
- checkCuda(cudaMallocManaged(&weight_image, width * height * sizeof(float)));
- cudaMemset(weight_image, 0, width * height * sizeof(float));
- }
-#else
- assert(false);
-#endif
- } else {
- if (eval_positions.get() == nullptr) {
- weight_image = (float*)malloc(width * height * sizeof(float));
- memset(weight_image, 0, width * height * sizeof(float));
- }
- }
-
- if (render_image.get() != nullptr || d_render_image.get() != nullptr ||
- render_sdf.get() != nullptr || d_render_sdf.get() != nullptr) {
- if (weight_image != nullptr) {
- parallel_for(weight_kernel{
- get_scene_data(*scene.get()),
- weight_image,
- width,
- height,
- num_samples_x,
- num_samples_y,
- seed
- }, width * height * num_samples_x * num_samples_y, scene->use_gpu);
- }
-
- auto num_samples = eval_positions.get() == nullptr ?
- width * height * num_samples_x * num_samples_y : num_eval_positions;
- parallel_for(render_kernel{
- get_scene_data(*scene.get()),
- background_image.get(),
- render_image.get(),
- weight_image,
- render_sdf.get(),
- d_background_image.get(),
- d_render_image.get(),
- d_render_sdf.get(),
- d_translation.get(),
- width,
- height,
- num_samples_x,
- num_samples_y,
- seed,
- use_prefiltering,
- eval_positions.get()
- }, num_samples, scene->use_gpu);
- }
-
- // Boundary sampling
- if (!use_prefiltering && d_render_image.get() != nullptr) {
- auto num_samples = width * height * num_samples_x * num_samples_y;
- BoundarySample *boundary_samples = nullptr;
- int *boundary_ids = nullptr; // for sorting
- uint32_t *morton_codes = nullptr; // for sorting
- // Allocate boundary samples
- if (scene->use_gpu) {
-#ifdef __CUDACC__
- checkCuda(cudaMallocManaged(&boundary_samples,
- num_samples * sizeof(BoundarySample)));
- checkCuda(cudaMallocManaged(&boundary_ids,
- num_samples * sizeof(int)));
- checkCuda(cudaMallocManaged(&morton_codes,
- num_samples * sizeof(uint32_t)));
-#else
- assert(false);
- #endif
- } else {
- boundary_samples = (BoundarySample*)malloc(
- num_samples * sizeof(BoundarySample));
- boundary_ids = (int*)malloc(
- num_samples * sizeof(int));
- morton_codes = (uint32_t*)malloc(
- num_samples * sizeof(uint32_t));
- }
-
- // Edge sampling
- // We sort the boundary samples for better thread coherency
- parallel_for(sample_boundary_kernel{
- get_scene_data(*scene.get()),
- seed,
- boundary_samples,
- boundary_ids,
- morton_codes
- }, num_samples, scene->use_gpu);
- if (scene->use_gpu) {
- thrust::sort_by_key(thrust::device, morton_codes, morton_codes + num_samples, boundary_ids);
- } else {
- // Don't need to sort for CPU, we are not using SIMD hardware anyway.
- // thrust::sort_by_key(thrust::host, morton_codes, morton_codes + num_samples, boundary_ids);
- }
- parallel_for(render_edge_kernel{
- get_scene_data(*scene.get()),
- background_image.get(),
- boundary_samples,
- boundary_ids,
- weight_image,
- d_render_image.get(),
- d_translation.get(),
- width,
- height,
- num_samples_x,
- num_samples_y
- }, num_samples, scene->use_gpu);
- if (scene->use_gpu) {
-#ifdef __CUDACC__
- checkCuda(cudaFree(boundary_samples));
- checkCuda(cudaFree(boundary_ids));
- checkCuda(cudaFree(morton_codes));
-#else
- assert(false);
-#endif
- } else {
- free(boundary_samples);
- free(boundary_ids);
- free(morton_codes);
- }
- }
-
- // Clean up weight image
- if (scene->use_gpu) {
-#ifdef __CUDACC__
- checkCuda(cudaFree(weight_image));
-#else
- assert(false);
-#endif
- } else {
- free(weight_image);
- }
-
- if (scene->use_gpu) {
- cuda_synchronize();
- }
-
- parallel_cleanup();
-#ifdef __NVCC__
- if (old_device_id != -1) {
- checkCuda(cudaSetDevice(old_device_id));
- }
-#endif
-}
-
-PYBIND11_MODULE(diffvg, m) {
- m.doc() = "Differential Vector Graphics";
-
- py::class_>(m, "void_ptr")
- .def(py::init())
- .def("as_size_t", &ptr::as_size_t);
- py::class_>(m, "float_ptr")
- .def(py::init());
- py::class_>(m, "int_ptr")
- .def(py::init());
-
- py::class_(m, "Vector2f")
- .def(py::init())
- .def_readwrite("x", &Vector2f::x)
- .def_readwrite("y", &Vector2f::y);
-
- py::class_(m, "Vector3f")
- .def(py::init())
- .def_readwrite("x", &Vector3f::x)
- .def_readwrite("y", &Vector3f::y)
- .def_readwrite("z", &Vector3f::z);
-
- py::class_(m, "Vector4f")
- .def(py::init())
- .def_readwrite("x", &Vector4f::x)
- .def_readwrite("y", &Vector4f::y)
- .def_readwrite("z", &Vector4f::z)
- .def_readwrite("w", &Vector4f::w);
-
- py::enum_(m, "ShapeType")
- .value("circle", ShapeType::Circle)
- .value("ellipse", ShapeType::Ellipse)
- .value("path", ShapeType::Path)
- .value("rect", ShapeType::Rect);
-
- py::class_(m, "Circle")
- .def(py::init())
- .def("get_ptr", &Circle::get_ptr)
- .def_readonly("radius", &Circle::radius)
- .def_readonly("center", &Circle::center);
-
- py::class_(m, "Ellipse")
- .def(py::init())
- .def("get_ptr", &Ellipse::get_ptr)
- .def_readonly("radius", &Ellipse::radius)
- .def_readonly("center", &Ellipse::center);
-
- py::class_(m, "Path")
- .def(py::init, ptr, ptr, int, int, bool, bool>())
- .def("get_ptr", &Path::get_ptr)
- .def("has_thickness", &Path::has_thickness)
- .def("copy_to", &Path::copy_to)
- .def_readonly("num_points", &Path::num_points);
-
- py::class_(m, "Rect")
- .def(py::init())
- .def("get_ptr", &Rect::get_ptr)
- .def_readonly("p_min", &Rect::p_min)
- .def_readonly("p_max", &Rect::p_max);
-
- py::enum_(m, "ColorType")
- .value("constant", ColorType::Constant)
- .value("linear_gradient", ColorType::LinearGradient)
- .value("radial_gradient", ColorType::RadialGradient);
-
- py::class_(m, "Constant")
- .def(py::init())
- .def("get_ptr", &Constant::get_ptr)
- .def_readonly("color", &Constant::color);
-
- py::class_(m, "LinearGradient")
- .def(py::init, ptr>())
- .def("get_ptr", &LinearGradient::get_ptr)
- .def("copy_to", &LinearGradient::copy_to)
- .def_readonly("begin", &LinearGradient::begin)
- .def_readonly("end", &LinearGradient::end)
- .def_readonly("num_stops", &LinearGradient::num_stops);
-
- py::class_(m, "RadialGradient")
- .def(py::init, ptr>())
- .def("get_ptr", &RadialGradient::get_ptr)
- .def("copy_to", &RadialGradient::copy_to)
- .def_readonly("center", &RadialGradient::center)
- .def_readonly("radius", &RadialGradient::radius)
- .def_readonly("num_stops", &RadialGradient::num_stops);
-
- py::class_(m, "Shape")
- .def(py::init, float>())
- .def("as_circle", &Shape::as_circle)
- .def("as_ellipse", &Shape::as_ellipse)
- .def("as_path", &Shape::as_path)
- .def("as_rect", &Shape::as_rect)
- .def_readonly("type", &Shape::type)
- .def_readonly("stroke_width", &Shape::stroke_width);
-
- py::class_(m, "ShapeGroup")
- .def(py::init,
- int,
- ColorType,
- ptr,
- ColorType,
- ptr,
- bool,
- ptr>())
- .def("fill_color_as_constant", &ShapeGroup::fill_color_as_constant)
- .def("fill_color_as_linear_gradient", &ShapeGroup::fill_color_as_linear_gradient)
- .def("fill_color_as_radial_gradient", &ShapeGroup::fill_color_as_radial_gradient)
- .def("stroke_color_as_constant", &ShapeGroup::stroke_color_as_constant)
- .def("stroke_color_as_linear_gradient", &ShapeGroup::stroke_color_as_linear_gradient)
- .def("stroke_color_as_radial_gradient", &ShapeGroup::fill_color_as_radial_gradient)
- .def("has_fill_color", &ShapeGroup::has_fill_color)
- .def("has_stroke_color", &ShapeGroup::has_stroke_color)
- .def("copy_to", &ShapeGroup::copy_to)
- .def_readonly("fill_color_type", &ShapeGroup::fill_color_type)
- .def_readonly("stroke_color_type", &ShapeGroup::stroke_color_type);
-
- py::enum_(m, "FilterType")
- .value("box", FilterType::Box)
- .value("tent", FilterType::Tent)
- .value("parabolic", FilterType::RadialParabolic)
- .value("hann", FilterType::Hann);
-
- py::class_(m, "Filter")
- .def(py::init());
-
- py::class_>(m, "Scene")
- .def(py::init &,
- const std::vector &,
- const Filter &,
- bool,
- int>())
- .def("get_d_shape", &Scene::get_d_shape)
- .def("get_d_shape_group", &Scene::get_d_shape_group)
- .def("get_d_filter_radius", &Scene::get_d_filter_radius)
- .def_readonly("num_shapes", &Scene::num_shapes)
- .def_readonly("num_shape_groups", &Scene::num_shape_groups);
-
- m.def("render", &render, "");
-}
diff --git a/spaces/CVPR/LIVE/thrust/thrust/detail/complex/stream.h b/spaces/CVPR/LIVE/thrust/thrust/detail/complex/stream.h
deleted file mode 100644
index 9d87bbd548974a745da11521302d27524703f4a0..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/detail/complex/stream.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2008-2013 NVIDIA Corporation
- * Copyright 2013 Filipe RNC Maia
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include
-
-namespace thrust
-{
-template
-std::basic_ostream& operator<<(std::basic_ostream& os, const complex& z)
-{
- os << '(' << z.real() << ',' << z.imag() << ')';
- return os;
-}
-
-template
-std::basic_istream&
-operator>>(std::basic_istream& is, complex& z)
-{
- ValueType re, im;
-
- charT ch;
- is >> ch;
-
- if(ch == '(')
- {
- is >> re >> ch;
- if (ch == ',')
- {
- is >> im >> ch;
- if (ch == ')')
- {
- z = complex(re, im);
- }
- else
- {
- is.setstate(std::ios_base::failbit);
- }
- }
- else if (ch == ')')
- {
- z = re;
- }
- else
- {
- is.setstate(std::ios_base::failbit);
- }
- }
- else
- {
- is.putback(ch);
- is >> re;
- z = re;
- }
- return is;
-}
-
-} // namespace thrust
diff --git a/spaces/CVPR/LIVE/thrust/thrust/system/omp/pointer.h b/spaces/CVPR/LIVE/thrust/thrust/system/omp/pointer.h
deleted file mode 100644
index 36b6bed12ac65b117242c291debb9e1ec9deae7d..0000000000000000000000000000000000000000
--- a/spaces/CVPR/LIVE/thrust/thrust/system/omp/pointer.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright 2008-2018 NVIDIA Corporation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*! \file thrust/system/omp/memory.h
- * \brief Managing memory associated with Thrust's OpenMP system.
- */
-
-#pragma once
-
-#include
-#include
-#include
-#include
-#include
-
-namespace thrust
-{
-namespace system
-{
-namespace omp
-{
-
-template class pointer;
-
-} // end omp
-} // end system
-} // end thrust
-
-
-/*! \cond
- */
-
-// specialize thrust::iterator_traits to avoid problems with the name of
-// pointer's constructor shadowing its nested pointer type
-// do this before pointer is defined so the specialization is correctly
-// used inside the definition
-namespace thrust
-{
-
-template
- struct iterator_traits >
-{
- private:
- typedef thrust::system::omp::pointer ptr;
-
- public:
- typedef typename ptr::iterator_category iterator_category;
- typedef typename ptr::value_type value_type;
- typedef typename ptr::difference_type difference_type;
- typedef ptr pointer;
- typedef typename ptr::reference reference;
-}; // end iterator_traits
-
-} // end thrust
-
-/*! \endcond
- */
-
-
-namespace thrust
-{
-namespace system
-{
-
-/*! \addtogroup system_backends Systems
- * \ingroup system
- * \{
- */
-
-/*! \namespace thrust::system::omp
- * \brief \p thrust::system::omp is the namespace containing functionality for allocating, manipulating,
- * and deallocating memory available to Thrust's OpenMP backend system.
- * The identifiers are provided in a separate namespace underneath thrust::system
- * for import convenience but are also aliased in the top-level thrust::omp
- * namespace for easy access.
- *
- */
-namespace omp
-{
-
-// forward declaration of reference for pointer
-template class reference;
-
-/*! \cond
- */
-
-// XXX nvcc + msvc have trouble instantiating reference below
-// this is a workaround
-namespace detail
-{
-
-template
- struct reference_msvc_workaround
-{
- typedef thrust::system::omp::reference type;
-}; // end reference_msvc_workaround
-
-} // end detail
-
-/*! \endcond
- */
-
-
-/*! \p pointer stores a pointer to an object allocated in memory available to the omp system.
- * This type provides type safety when dispatching standard algorithms on ranges resident
- * in omp memory.
- *
- * \p pointer has pointer semantics: it may be dereferenced and manipulated with pointer arithmetic.
- *
- * \p pointer can be created with the function \p omp::malloc, or by explicitly calling its constructor
- * with a raw pointer.
- *
- * The raw pointer encapsulated by a \p pointer may be obtained by eiter its get member function
- * or the \p raw_pointer_cast function.
- *
- * \note \p pointer is not a "smart" pointer; it is the programmer's responsibility to deallocate memory
- * pointed to by \p pointer.
- *
- * \tparam T specifies the type of the pointee.
- *
- * \see omp::malloc
- * \see omp::free
- * \see raw_pointer_cast
- */
-template
- class pointer
- : public thrust::pointer<
- T,
- thrust::system::omp::tag,
- thrust::system::omp::reference,
- thrust::system::omp::pointer
- >
-{
- /*! \cond
- */
-
- private:
- typedef thrust::pointer<
- T,
- thrust::system::omp::tag,
- //thrust::system::omp::reference,
- typename detail::reference_msvc_workaround::type,
- thrust::system::omp::pointer
- > super_t;
-
- /*! \endcond
- */
-
- public:
- // note that omp::pointer's member functions need __host__ __device__
- // to interoperate with nvcc + iterators' dereference member function
-
- /*! \p pointer's no-argument constructor initializes its encapsulated pointer to \c 0.
- */
- __host__ __device__
- pointer() : super_t() {}
-
- #if THRUST_CPP_DIALECT >= 2011
- // NOTE: This is needed so that Thrust smart pointers can be used in
- // `std::unique_ptr`.
- __host__ __device__
- pointer(decltype(nullptr)) : super_t(nullptr) {}
- #endif
-
- /*! This constructor allows construction of a pointer from a T*.
- *
- * \param ptr A raw pointer to copy from, presumed to point to a location in memory
- * accessible by the \p omp system.
- * \tparam OtherT \p OtherT shall be convertible to \p T.
- */
- template
- __host__ __device__
- explicit pointer(OtherT *ptr) : super_t(ptr) {}
-
- /*! This constructor allows construction from another pointer-like object with related type.
- *
- * \param other The \p OtherPointer to copy.
- * \tparam OtherPointer The system tag associated with \p OtherPointer shall be convertible
- * to \p thrust::system::omp::tag and its element type shall be convertible to \p T.
- */
- template
- __host__ __device__
- pointer(const OtherPointer &other,
- typename thrust::detail::enable_if_pointer_is_convertible<
- OtherPointer,
- pointer
- >::type * = 0) : super_t(other) {}
-
- /*! This constructor allows construction from another pointer-like object with \p void type.
- *
- * \param other The \p OtherPointer to copy.
- * \tparam OtherPointer The system tag associated with \p OtherPointer shall be convertible
- * to \p thrust::system::omp::tag and its element type shall be \p void.
- */
- template
- __host__ __device__
- explicit
- pointer(const OtherPointer &other,
- typename thrust::detail::enable_if_void_pointer_is_system_convertible<
- OtherPointer,
- pointer
- >::type * = 0) : super_t(other) {}
-
- /*! Assignment operator allows assigning from another pointer-like object with related type.
- *
- * \param other The other pointer-like object to assign from.
- * \tparam OtherPointer The system tag associated with \p OtherPointer shall be convertible
- * to \p thrust::system::omp::tag and its element type shall be convertible to \p T.
- */
- template
- __host__ __device__
- typename thrust::detail::enable_if_pointer_is_convertible<
- OtherPointer,
- pointer,
- pointer &
- >::type
- operator=(const OtherPointer &other)
- {
- return super_t::operator=(other);
- }
-
- #if THRUST_CPP_DIALECT >= 2011
- // NOTE: This is needed so that Thrust smart pointers can be used in
- // `std::unique_ptr`.
- __host__ __device__
- pointer& operator=(decltype(nullptr))
- {
- super_t::operator=(nullptr);
- return *this;
- }
- #endif
-}; // end pointer
-
-
-/*! \p reference is a wrapped reference to an object stored in memory available to the \p omp system.
- * \p reference is the type of the result of dereferencing a \p omp::pointer.
- *
- * \tparam T Specifies the type of the referenced object.
- */
-template
- class reference
- : public thrust::reference<
- T,
- thrust::system::omp::pointer,
- thrust::system::omp::reference
- >
-{
- /*! \cond
- */
-
- private:
- typedef thrust::reference<
- T,
- thrust::system::omp::pointer,
- thrust::system::omp::reference
- > super_t;
-
- /*! \endcond
- */
-
- public:
- /*! \cond
- */
-
- typedef typename super_t::value_type value_type;
- typedef typename super_t::pointer pointer;
-
- /*! \endcond
- */
-
- /*! This constructor initializes this \p reference to refer to an object
- * pointed to by the given \p pointer. After this \p reference is constructed,
- * it shall refer to the object pointed to by \p ptr.
- *
- * \param ptr A \p pointer to copy from.
- */
- __host__ __device__
- explicit reference(const pointer &ptr)
- : super_t(ptr)
- {}
-
- /*! This constructor accepts a const reference to another \p reference of related type.
- * After this \p reference is constructed, it shall refer to the same object as \p other.
- *
- * \param other A \p reference to copy from.
- * \tparam OtherT The element type of the other \p reference.
- *
- * \note This constructor is templated primarily to allow initialization of reference
- * from reference.
- */
- template
- __host__ __device__
- reference(const reference &other,
- typename thrust::detail::enable_if_convertible<
- typename reference::pointer,
- pointer
- >::type * = 0)
- : super_t(other)
- {}
-
- /*! Copy assignment operator copy assigns from another \p reference of related type.
- *
- * \param other The other \p reference to assign from.
- * \return *this
- * \tparam OtherT The element type of the other \p reference.
- */
- template
- reference &operator=(const reference &other);
-
- /*! Assignment operator assigns from a \p value_type.
- *
- * \param x The \p value_type to assign from.
- * \return *this
- */
- reference &operator=(const value_type &x);
-}; // end reference
-
-/*! Exchanges the values of two objects referred to by \p reference.
- * \p x The first \p reference of interest.
- * \p y The second \p reference of interest.
- */
-template
-__host__ __device__
-void swap(reference x, reference y);
-
-} // end omp
-
-/*! \}
- */
-
-} // end system
-
-/*! \namespace thrust::omp
- * \brief \p thrust::omp is a top-level alias for thrust::system::omp.
- */
-namespace omp
-{
-
-using thrust::system::omp::pointer;
-using thrust::system::omp::reference;
-
-} // end omp
-
-} // end thrust
-
-#include
-
diff --git a/spaces/CVPR/MonoScene/monoscene/unet3d_nyu.py b/spaces/CVPR/MonoScene/monoscene/unet3d_nyu.py
deleted file mode 100644
index e9e3b3718999248efa1b2925658465ba59801b13..0000000000000000000000000000000000000000
--- a/spaces/CVPR/MonoScene/monoscene/unet3d_nyu.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# encoding: utf-8
-import torch
-import torch.nn as nn
-import torch.nn.functional as F
-import numpy as np
-from monoscene.CRP3D import CPMegaVoxels
-from monoscene.modules import (
- Process,
- Upsample,
- Downsample,
- SegmentationHead,
- ASPP,
-)
-
-
-class UNet3D(nn.Module):
- def __init__(
- self,
- class_num,
- norm_layer,
- feature,
- full_scene_size,
- n_relations=4,
- project_res=[],
- context_prior=True,
- bn_momentum=0.1,
- ):
- super(UNet3D, self).__init__()
- self.business_layer = []
- self.project_res = project_res
-
- self.feature_1_4 = feature
- self.feature_1_8 = feature * 2
- self.feature_1_16 = feature * 4
-
- self.feature_1_16_dec = self.feature_1_16
- self.feature_1_8_dec = self.feature_1_8
- self.feature_1_4_dec = self.feature_1_4
-
- self.process_1_4 = nn.Sequential(
- Process(self.feature_1_4, norm_layer, bn_momentum, dilations=[1, 2, 3]),
- Downsample(self.feature_1_4, norm_layer, bn_momentum),
- )
- self.process_1_8 = nn.Sequential(
- Process(self.feature_1_8, norm_layer, bn_momentum, dilations=[1, 2, 3]),
- Downsample(self.feature_1_8, norm_layer, bn_momentum),
- )
- self.up_1_16_1_8 = Upsample(
- self.feature_1_16_dec, self.feature_1_8_dec, norm_layer, bn_momentum
- )
- self.up_1_8_1_4 = Upsample(
- self.feature_1_8_dec, self.feature_1_4_dec, norm_layer, bn_momentum
- )
- self.ssc_head_1_4 = SegmentationHead(
- self.feature_1_4_dec, self.feature_1_4_dec, class_num, [1, 2, 3]
- )
-
- self.context_prior = context_prior
- size_1_16 = tuple(np.ceil(i / 4).astype(int) for i in full_scene_size)
-
- if context_prior:
- self.CP_mega_voxels = CPMegaVoxels(
- self.feature_1_16,
- size_1_16,
- n_relations=n_relations,
- bn_momentum=bn_momentum,
- )
-
- #
- def forward(self, input_dict):
- res = {}
-
- x3d_1_4 = input_dict["x3d"]
- x3d_1_8 = self.process_1_4(x3d_1_4)
- x3d_1_16 = self.process_1_8(x3d_1_8)
-
- if self.context_prior:
- ret = self.CP_mega_voxels(x3d_1_16)
- x3d_1_16 = ret["x"]
- for k in ret.keys():
- res[k] = ret[k]
-
- x3d_up_1_8 = self.up_1_16_1_8(x3d_1_16) + x3d_1_8
- x3d_up_1_4 = self.up_1_8_1_4(x3d_up_1_8) + x3d_1_4
-
- ssc_logit_1_4 = self.ssc_head_1_4(x3d_up_1_4)
-
- res["ssc_logit"] = ssc_logit_1_4
-
- return res
diff --git a/spaces/CikeyQI/Yunzai/Yunzai/plugins/ws-plugin/resources/admin/index.html b/spaces/CikeyQI/Yunzai/Yunzai/plugins/ws-plugin/resources/admin/index.html
deleted file mode 100644
index 4daa4f5b2759b16e919dd9b0a018aae1b856d81b..0000000000000000000000000000000000000000
--- a/spaces/CikeyQI/Yunzai/Yunzai/plugins/ws-plugin/resources/admin/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-{{extend defaultLayout}}
-{{block 'css'}}
-
-{{/block}}
-{{block 'main'}}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spaces/DragGan/DragGan-Inversion/stylegan_human/torch_utils/ops/fma.py b/spaces/DragGan/DragGan-Inversion/stylegan_human/torch_utils/ops/fma.py
deleted file mode 100644
index a934ea1137d2ade6caefcbdb0476fca40fed8f0c..0000000000000000000000000000000000000000
--- a/spaces/DragGan/DragGan-Inversion/stylegan_human/torch_utils/ops/fma.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (c) SenseTime Research. All rights reserved.
-
-# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
-#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
-
-"""Fused multiply-add, with slightly faster gradients than `torch.addcmul()`."""
-
-import torch
-
-# ----------------------------------------------------------------------------
-
-
-def fma(a, b, c): # => a * b + c
- return _FusedMultiplyAdd.apply(a, b, c)
-
-# ----------------------------------------------------------------------------
-
-
-class _FusedMultiplyAdd(torch.autograd.Function): # a * b + c
- @staticmethod
- def forward(ctx, a, b, c): # pylint: disable=arguments-differ
- out = torch.addcmul(c, a, b)
- ctx.save_for_backward(a, b)
- ctx.c_shape = c.shape
- return out
-
- @staticmethod
- def backward(ctx, dout): # pylint: disable=arguments-differ
- a, b = ctx.saved_tensors
- c_shape = ctx.c_shape
- da = None
- db = None
- dc = None
-
- if ctx.needs_input_grad[0]:
- da = _unbroadcast(dout * b, a.shape)
-
- if ctx.needs_input_grad[1]:
- db = _unbroadcast(dout * a, b.shape)
-
- if ctx.needs_input_grad[2]:
- dc = _unbroadcast(dout, c_shape)
-
- return da, db, dc
-
-# ----------------------------------------------------------------------------
-
-
-def _unbroadcast(x, shape):
- extra_dims = x.ndim - len(shape)
- assert extra_dims >= 0
- dim = [i for i in range(x.ndim) if x.shape[i] > 1 and (
- i < extra_dims or shape[i - extra_dims] == 1)]
- if len(dim):
- x = x.sum(dim=dim, keepdim=True)
- if extra_dims:
- x = x.reshape(-1, *x.shape[extra_dims+1:])
- assert x.shape == shape
- return x
-
-# ----------------------------------------------------------------------------
diff --git a/spaces/ECCV2022/bytetrack/exps/example/mot/yolox_x_ch.py b/spaces/ECCV2022/bytetrack/exps/example/mot/yolox_x_ch.py
deleted file mode 100644
index 0e4765ef92fdfe61c9a28c4a384f156302523e24..0000000000000000000000000000000000000000
--- a/spaces/ECCV2022/bytetrack/exps/example/mot/yolox_x_ch.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# encoding: utf-8
-import os
-import random
-import torch
-import torch.nn as nn
-import torch.distributed as dist
-
-from yolox.exp import Exp as MyExp
-from yolox.data import get_yolox_datadir
-
-class Exp(MyExp):
- def __init__(self):
- super(Exp, self).__init__()
- self.num_classes = 1
- self.depth = 1.33
- self.width = 1.25
- self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0]
- self.train_ann = "train.json"
- self.val_ann = "val_half.json"
- self.input_size = (800, 1440)
- self.test_size = (800, 1440)
- self.random_size = (18, 32)
- self.max_epoch = 80
- self.print_interval = 20
- self.eval_interval = 5
- self.test_conf = 0.1
- self.nmsthre = 0.7
- self.no_aug_epochs = 10
- self.basic_lr_per_img = 0.001 / 64.0
- self.warmup_epochs = 1
-
- def get_data_loader(self, batch_size, is_distributed, no_aug=False):
- from yolox.data import (
- MOTDataset,
- TrainTransform,
- YoloBatchSampler,
- DataLoader,
- InfiniteSampler,
- MosaicDetection,
- )
-
- dataset = MOTDataset(
- data_dir=os.path.join(get_yolox_datadir(), "ch_all"),
- json_file=self.train_ann,
- name='',
- img_size=self.input_size,
- preproc=TrainTransform(
- rgb_means=(0.485, 0.456, 0.406),
- std=(0.229, 0.224, 0.225),
- max_labels=500,
- ),
- )
-
- dataset = MosaicDetection(
- dataset,
- mosaic=not no_aug,
- img_size=self.input_size,
- preproc=TrainTransform(
- rgb_means=(0.485, 0.456, 0.406),
- std=(0.229, 0.224, 0.225),
- max_labels=1000,
- ),
- degrees=self.degrees,
- translate=self.translate,
- scale=self.scale,
- shear=self.shear,
- perspective=self.perspective,
- enable_mixup=self.enable_mixup,
- )
-
- self.dataset = dataset
-
- if is_distributed:
- batch_size = batch_size // dist.get_world_size()
-
- sampler = InfiniteSampler(
- len(self.dataset), seed=self.seed if self.seed else 0
- )
-
- batch_sampler = YoloBatchSampler(
- sampler=sampler,
- batch_size=batch_size,
- drop_last=False,
- input_dimension=self.input_size,
- mosaic=not no_aug,
- )
-
- dataloader_kwargs = {"num_workers": self.data_num_workers, "pin_memory": True}
- dataloader_kwargs["batch_sampler"] = batch_sampler
- train_loader = DataLoader(self.dataset, **dataloader_kwargs)
-
- return train_loader
-
- def get_eval_loader(self, batch_size, is_distributed, testdev=False):
- from yolox.data import MOTDataset, ValTransform
-
- valdataset = MOTDataset(
- data_dir=os.path.join(get_yolox_datadir(), "mot"),
- json_file=self.val_ann,
- img_size=self.test_size,
- name='train',
- preproc=ValTransform(
- rgb_means=(0.485, 0.456, 0.406),
- std=(0.229, 0.224, 0.225),
- ),
- )
-
- if is_distributed:
- batch_size = batch_size // dist.get_world_size()
- sampler = torch.utils.data.distributed.DistributedSampler(
- valdataset, shuffle=False
- )
- else:
- sampler = torch.utils.data.SequentialSampler(valdataset)
-
- dataloader_kwargs = {
- "num_workers": self.data_num_workers,
- "pin_memory": True,
- "sampler": sampler,
- }
- dataloader_kwargs["batch_size"] = batch_size
- val_loader = torch.utils.data.DataLoader(valdataset, **dataloader_kwargs)
-
- return val_loader
-
- def get_evaluator(self, batch_size, is_distributed, testdev=False):
- from yolox.evaluators import COCOEvaluator
-
- val_loader = self.get_eval_loader(batch_size, is_distributed, testdev=testdev)
- evaluator = COCOEvaluator(
- dataloader=val_loader,
- img_size=self.test_size,
- confthre=self.test_conf,
- nmsthre=self.nmsthre,
- num_classes=self.num_classes,
- testdev=testdev,
- )
- return evaluator
diff --git a/spaces/ECCV2022/bytetrack/yolox/utils/logger.py b/spaces/ECCV2022/bytetrack/yolox/utils/logger.py
deleted file mode 100644
index 4bd51d9ec6569c452b34c1cf60ff03044842c2ee..0000000000000000000000000000000000000000
--- a/spaces/ECCV2022/bytetrack/yolox/utils/logger.py
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding:utf-8 -*-
-# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
-
-from loguru import logger
-
-import inspect
-import os
-import sys
-
-
-def get_caller_name(depth=0):
- """
- Args:
- depth (int): Depth of caller conext, use 0 for caller depth. Default value: 0.
-
- Returns:
- str: module name of the caller
- """
- # the following logic is a little bit faster than inspect.stack() logic
- frame = inspect.currentframe().f_back
- for _ in range(depth):
- frame = frame.f_back
-
- return frame.f_globals["__name__"]
-
-
-class StreamToLoguru:
- """
- stream object that redirects writes to a logger instance.
- """
-
- def __init__(self, level="INFO", caller_names=("apex", "pycocotools")):
- """
- Args:
- level(str): log level string of loguru. Default value: "INFO".
- caller_names(tuple): caller names of redirected module.
- Default value: (apex, pycocotools).
- """
- self.level = level
- self.linebuf = ""
- self.caller_names = caller_names
-
- def write(self, buf):
- full_name = get_caller_name(depth=1)
- module_name = full_name.rsplit(".", maxsplit=-1)[0]
- if module_name in self.caller_names:
- for line in buf.rstrip().splitlines():
- # use caller level log
- logger.opt(depth=2).log(self.level, line.rstrip())
- else:
- sys.__stdout__.write(buf)
-
- def flush(self):
- pass
-
-
-def redirect_sys_output(log_level="INFO"):
- redirect_logger = StreamToLoguru(log_level)
- sys.stderr = redirect_logger
- sys.stdout = redirect_logger
-
-
-def setup_logger(save_dir, distributed_rank=0, filename="log.txt", mode="a"):
- """setup logger for training and testing.
- Args:
- save_dir(str): location to save log file
- distributed_rank(int): device rank when multi-gpu environment
- filename (string): log save name.
- mode(str): log file write mode, `append` or `override`. default is `a`.
-
- Return:
- logger instance.
- """
- loguru_format = (
- "{time:YYYY-MM-DD HH:mm:ss} | "
- "{level: <8} | "
- "{name}:{line} - {message}"
- )
-
- logger.remove()
- save_file = os.path.join(save_dir, filename)
- if mode == "o" and os.path.exists(save_file):
- os.remove(save_file)
- # only keep logger in rank0 process
- if distributed_rank == 0:
- logger.add(
- sys.stderr,
- format=loguru_format,
- level="INFO",
- enqueue=True,
- )
- logger.add(save_file)
-
- # redirect stdout/stderr to loguru
- redirect_sys_output("INFO")
diff --git a/spaces/FarziBuilder/Last/README.md b/spaces/FarziBuilder/Last/README.md
deleted file mode 100644
index ae5d60daa9170df2095461229573a50c5c2e03e5..0000000000000000000000000000000000000000
--- a/spaces/FarziBuilder/Last/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: Last
-emoji: 📚
-colorFrom: pink
-colorTo: green
-sdk: gradio
-sdk_version: 3.8.2
-app_file: app.py
-pinned: false
-license: apache-2.0
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/FridaZuley/RVC_HFKawaii/easy_infer.py b/spaces/FridaZuley/RVC_HFKawaii/easy_infer.py
deleted file mode 100644
index 81a70d3648c38120f908cdaf2ea3bd15af9dec26..0000000000000000000000000000000000000000
--- a/spaces/FridaZuley/RVC_HFKawaii/easy_infer.py
+++ /dev/null
@@ -1,1383 +0,0 @@
-import subprocess
-import os
-import sys
-import errno
-import shutil
-import yt_dlp
-from mega import Mega
-import datetime
-import unicodedata
-import torch
-import glob
-import gradio as gr
-import gdown
-import zipfile
-import traceback
-import json
-import mdx
-from mdx_processing_script import get_model_list,id_to_ptm,prepare_mdx,run_mdx
-import requests
-import wget
-import ffmpeg
-import hashlib
-now_dir = os.getcwd()
-sys.path.append(now_dir)
-from unidecode import unidecode
-import re
-import time
-from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
-from infer.modules.vc.pipeline import Pipeline
-VC = Pipeline
-from lib.infer_pack.models import (
- SynthesizerTrnMs256NSFsid,
- SynthesizerTrnMs256NSFsid_nono,
- SynthesizerTrnMs768NSFsid,
- SynthesizerTrnMs768NSFsid_nono,
-)
-from MDXNet import MDXNetDereverb
-from configs.config import Config
-from infer_uvr5 import _audio_pre_, _audio_pre_new
-from huggingface_hub import HfApi, list_models
-from huggingface_hub import login
-from i18n import I18nAuto
-i18n = I18nAuto()
-from bs4 import BeautifulSoup
-from sklearn.cluster import MiniBatchKMeans
-from dotenv import load_dotenv
-load_dotenv()
-config = Config()
-tmp = os.path.join(now_dir, "TEMP")
-shutil.rmtree(tmp, ignore_errors=True)
-os.environ["TEMP"] = tmp
-weight_root = os.getenv("weight_root")
-weight_uvr5_root = os.getenv("weight_uvr5_root")
-index_root = os.getenv("index_root")
-audio_root = "audios"
-names = []
-for name in os.listdir(weight_root):
- if name.endswith(".pth"):
- names.append(name)
-index_paths = []
-
-global indexes_list
-indexes_list = []
-
-audio_paths = []
-for root, dirs, files in os.walk(index_root, topdown=False):
- for name in files:
- if name.endswith(".index") and "trained" not in name:
- index_paths.append("%s\\%s" % (root, name))
-
-for root, dirs, files in os.walk(audio_root, topdown=False):
- for name in files:
- audio_paths.append("%s/%s" % (root, name))
-
-uvr5_names = []
-for name in os.listdir(weight_uvr5_root):
- if name.endswith(".pth") or "onnx" in name:
- uvr5_names.append(name.replace(".pth", ""))
-
-def calculate_md5(file_path):
- hash_md5 = hashlib.md5()
- with open(file_path, "rb") as f:
- for chunk in iter(lambda: f.read(4096), b""):
- hash_md5.update(chunk)
- return hash_md5.hexdigest()
-
-def format_title(title):
- formatted_title = re.sub(r'[^\w\s-]', '', title)
- formatted_title = formatted_title.replace(" ", "_")
- return formatted_title
-
-def silentremove(filename):
- try:
- os.remove(filename)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-def get_md5(temp_folder):
- for root, subfolders, files in os.walk(temp_folder):
- for file in files:
- if not file.startswith("G_") and not file.startswith("D_") and file.endswith(".pth") and not "_G_" in file and not "_D_" in file:
- md5_hash = calculate_md5(os.path.join(root, file))
- return md5_hash
-
- return None
-
-def find_parent(search_dir, file_name):
- for dirpath, dirnames, filenames in os.walk(search_dir):
- if file_name in filenames:
- return os.path.abspath(dirpath)
- return None
-
-def find_folder_parent(search_dir, folder_name):
- for dirpath, dirnames, filenames in os.walk(search_dir):
- if folder_name in dirnames:
- return os.path.abspath(dirpath)
- return None
-
-
-
-def download_from_url(url):
- parent_path = find_folder_parent(".", "pretrained_v2")
- zips_path = os.path.join(parent_path, 'zips')
-
- if url != '':
- print(i18n("Downloading the file: ") + f"{url}")
- if "drive.google.com" in url:
- if "file/d/" in url:
- file_id = url.split("file/d/")[1].split("/")[0]
- elif "id=" in url:
- file_id = url.split("id=")[1].split("&")[0]
- else:
- return None
-
- if file_id:
- os.chdir('./zips')
- result = subprocess.run(["gdown", f"https://drive.google.com/uc?id={file_id}", "--fuzzy"], capture_output=True, text=True, encoding='utf-8')
- if "Too many users have viewed or downloaded this file recently" in str(result.stderr):
- return "too much use"
- if "Cannot retrieve the public link of the file." in str(result.stderr):
- return "private link"
- print(result.stderr)
-
- elif "/blob/" in url:
- os.chdir('./zips')
- url = url.replace("blob", "resolve")
- response = requests.get(url)
- if response.status_code == 200:
- file_name = url.split('/')[-1]
- with open(os.path.join(zips_path, file_name), "wb") as newfile:
- newfile.write(response.content)
- else:
- os.chdir(parent_path)
- elif "mega.nz" in url:
- if "#!" in url:
- file_id = url.split("#!")[1].split("!")[0]
- elif "file/" in url:
- file_id = url.split("file/")[1].split("/")[0]
- else:
- return None
- if file_id:
- m = Mega()
- m.download_url(url, zips_path)
- elif "/tree/main" in url:
- response = requests.get(url)
- soup = BeautifulSoup(response.content, 'html.parser')
- temp_url = ''
- for link in soup.find_all('a', href=True):
- if link['href'].endswith('.zip'):
- temp_url = link['href']
- break
- if temp_url:
- url = temp_url
- url = url.replace("blob", "resolve")
- if "huggingface.co" not in url:
- url = "https://huggingface.co" + url
-
- wget.download(url)
- else:
- print("No .zip file found on the page.")
- elif "cdn.discordapp.com" in url:
- file = requests.get(url)
- if file.status_code == 200:
- name = url.split('/')
- with open(os.path.join(zips_path, name[len(name)-1]), "wb") as newfile:
- newfile.write(file.content)
- else:
- return None
- elif "pixeldrain.com" in url:
- try:
- file_id = url.split("pixeldrain.com/u/")[1]
- os.chdir('./zips')
- print(file_id)
- response = requests.get(f"https://pixeldrain.com/api/file/{file_id}")
- if response.status_code == 200:
- file_name = response.headers.get("Content-Disposition").split('filename=')[-1].strip('";')
- if not os.path.exists(zips_path):
- os.makedirs(zips_path)
- with open(os.path.join(zips_path, file_name), "wb") as newfile:
- newfile.write(response.content)
- os.chdir(parent_path)
- return "downloaded"
- else:
- os.chdir(parent_path)
- return None
- except Exception as e:
- print(e)
- os.chdir(parent_path)
- return None
- else:
- os.chdir('./zips')
- wget.download(url)
-
- os.chdir(parent_path)
- print(i18n("Full download"))
- return "downloaded"
- else:
- return None
-
-class error_message(Exception):
- def __init__(self, mensaje):
- self.mensaje = mensaje
- super().__init__(mensaje)
-
-def get_vc(sid, to_return_protect0, to_return_protect1):
- global n_spk, tgt_sr, net_g, vc, cpt, version
- if sid == "" or sid == []:
- global hubert_model
- if hubert_model is not None:
- print("clean_empty_cache")
- del net_g, n_spk, vc, hubert_model, tgt_sr
- hubert_model = net_g = n_spk = vc = hubert_model = tgt_sr = None
- if torch.cuda.is_available():
- torch.cuda.empty_cache()
- if_f0 = cpt.get("f0", 1)
- version = cpt.get("version", "v1")
- if version == "v1":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs256NSFsid(
- *cpt["config"], is_half=config.is_half
- )
- else:
- net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
- elif version == "v2":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs768NSFsid(
- *cpt["config"], is_half=config.is_half
- )
- else:
- net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
- del net_g, cpt
- if torch.cuda.is_available():
- torch.cuda.empty_cache()
- cpt = None
- return (
- {"visible": False, "__type__": "update"},
- {"visible": False, "__type__": "update"},
- {"visible": False, "__type__": "update"},
- )
- person = "%s/%s" % (weight_root, sid)
- print("loading %s" % person)
- cpt = torch.load(person, map_location="cpu")
- tgt_sr = cpt["config"][-1]
- cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0]
- if_f0 = cpt.get("f0", 1)
- if if_f0 == 0:
- to_return_protect0 = to_return_protect1 = {
- "visible": False,
- "value": 0.5,
- "__type__": "update",
- }
- else:
- to_return_protect0 = {
- "visible": True,
- "value": to_return_protect0,
- "__type__": "update",
- }
- to_return_protect1 = {
- "visible": True,
- "value": to_return_protect1,
- "__type__": "update",
- }
- version = cpt.get("version", "v1")
- if version == "v1":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs256NSFsid(*cpt["config"], is_half=config.is_half)
- else:
- net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
- elif version == "v2":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs768NSFsid(*cpt["config"], is_half=config.is_half)
- else:
- net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
- del net_g.enc_q
- print(net_g.load_state_dict(cpt["weight"], strict=False))
- net_g.eval().to(config.device)
- if config.is_half:
- net_g = net_g.half()
- else:
- net_g = net_g.float()
- vc = VC(tgt_sr, config)
- n_spk = cpt["config"][-3]
- return (
- {"visible": True, "maximum": n_spk, "__type__": "update"},
- to_return_protect0,
- to_return_protect1,
- )
-
-def load_downloaded_model(url):
- parent_path = find_folder_parent(".", "pretrained_v2")
- try:
- infos = []
- logs_folders = ['0_gt_wavs','1_16k_wavs','2a_f0','2b-f0nsf','3_feature256','3_feature768']
- zips_path = os.path.join(parent_path, 'zips')
- unzips_path = os.path.join(parent_path, 'unzips')
- weights_path = os.path.join(parent_path, 'weights')
- logs_dir = ""
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(unzips_path):
- shutil.rmtree(unzips_path)
-
- os.mkdir(zips_path)
- os.mkdir(unzips_path)
-
- download_file = download_from_url(url)
- if not download_file:
- print(i18n("The file could not be downloaded."))
- infos.append(i18n("The file could not be downloaded."))
- yield "\n".join(infos)
- elif download_file == "downloaded":
- print(i18n("It has been downloaded successfully."))
- infos.append(i18n("It has been downloaded successfully."))
- yield "\n".join(infos)
- elif download_file == "too much use":
- raise Exception(i18n("Too many users have recently viewed or downloaded this file"))
- elif download_file == "private link":
- raise Exception(i18n("Cannot get file from this private link"))
-
- for filename in os.listdir(zips_path):
- if filename.endswith(".zip"):
- zipfile_path = os.path.join(zips_path,filename)
- print(i18n("Proceeding with the extraction..."))
- infos.append(i18n("Proceeding with the extraction..."))
- shutil.unpack_archive(zipfile_path, unzips_path, 'zip')
- model_name = os.path.basename(zipfile_path)
- logs_dir = os.path.join(parent_path,'logs', os.path.normpath(str(model_name).replace(".zip","")))
- yield "\n".join(infos)
- else:
- print(i18n("Unzip error."))
- infos.append(i18n("Unzip error."))
- yield "\n".join(infos)
-
- index_file = False
- model_file = False
- D_file = False
- G_file = False
-
- for path, subdirs, files in os.walk(unzips_path):
- for item in files:
- item_path = os.path.join(path, item)
- if not 'G_' in item and not 'D_' in item and item.endswith('.pth'):
- model_file = True
- model_name = item.replace(".pth","")
- logs_dir = os.path.join(parent_path,'logs', model_name)
- if os.path.exists(logs_dir):
- shutil.rmtree(logs_dir)
- os.mkdir(logs_dir)
- if not os.path.exists(weights_path):
- os.mkdir(weights_path)
- if os.path.exists(os.path.join(weights_path, item)):
- os.remove(os.path.join(weights_path, item))
- if os.path.exists(item_path):
- shutil.move(item_path, weights_path)
-
- if not model_file and not os.path.exists(logs_dir):
- os.mkdir(logs_dir)
- for path, subdirs, files in os.walk(unzips_path):
- for item in files:
- item_path = os.path.join(path, item)
- if item.startswith('added_') and item.endswith('.index'):
- index_file = True
- if os.path.exists(item_path):
- if os.path.exists(os.path.join(logs_dir, item)):
- os.remove(os.path.join(logs_dir, item))
- shutil.move(item_path, logs_dir)
- if item.startswith('total_fea.npy') or item.startswith('events.'):
- if os.path.exists(item_path):
- if os.path.exists(os.path.join(logs_dir, item)):
- os.remove(os.path.join(logs_dir, item))
- shutil.move(item_path, logs_dir)
-
-
- result = ""
- if model_file:
- if index_file:
- print(i18n("The model works for inference, and has the .index file."))
- infos.append("\n" + i18n("The model works for inference, and has the .index file."))
- yield "\n".join(infos)
- else:
- print(i18n("The model works for inference, but it doesn't have the .index file."))
- infos.append("\n" + i18n("The model works for inference, but it doesn't have the .index file."))
- yield "\n".join(infos)
-
- if not index_file and not model_file:
- print(i18n("No relevant file was found to upload."))
- infos.append(i18n("No relevant file was found to upload."))
- yield "\n".join(infos)
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(unzips_path):
- shutil.rmtree(unzips_path)
- os.chdir(parent_path)
- return result
- except Exception as e:
- os.chdir(parent_path)
- if "too much use" in str(e):
- print(i18n("Too many users have recently viewed or downloaded this file"))
- yield i18n("Too many users have recently viewed or downloaded this file")
- elif "private link" in str(e):
- print(i18n("Cannot get file from this private link"))
- yield i18n("Cannot get file from this private link")
- else:
- print(e)
- yield i18n("An error occurred downloading")
- finally:
- os.chdir(parent_path)
-
-def load_dowloaded_dataset(url):
- parent_path = find_folder_parent(".", "pretrained_v2")
- infos = []
- try:
- zips_path = os.path.join(parent_path, 'zips')
- unzips_path = os.path.join(parent_path, 'unzips')
- datasets_path = os.path.join(parent_path, 'datasets')
- audio_extenions =['wav', 'mp3', 'flac', 'ogg', 'opus',
- 'm4a', 'mp4', 'aac', 'alac', 'wma',
- 'aiff', 'webm', 'ac3']
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(unzips_path):
- shutil.rmtree(unzips_path)
-
- if not os.path.exists(datasets_path):
- os.mkdir(datasets_path)
-
- os.mkdir(zips_path)
- os.mkdir(unzips_path)
-
- download_file = download_from_url(url)
-
- if not download_file:
- print(i18n("An error occurred downloading"))
- infos.append(i18n("An error occurred downloading"))
- yield "\n".join(infos)
- raise Exception(i18n("An error occurred downloading"))
- elif download_file == "downloaded":
- print(i18n("It has been downloaded successfully."))
- infos.append(i18n("It has been downloaded successfully."))
- yield "\n".join(infos)
- elif download_file == "too much use":
- raise Exception(i18n("Too many users have recently viewed or downloaded this file"))
- elif download_file == "private link":
- raise Exception(i18n("Cannot get file from this private link"))
-
- zip_path = os.listdir(zips_path)
- foldername = ""
- for file in zip_path:
- if file.endswith('.zip'):
- file_path = os.path.join(zips_path, file)
- print("....")
- foldername = file.replace(".zip","").replace(" ","").replace("-","_")
- dataset_path = os.path.join(datasets_path, foldername)
- print(i18n("Proceeding with the extraction..."))
- infos.append(i18n("Proceeding with the extraction..."))
- yield "\n".join(infos)
- shutil.unpack_archive(file_path, unzips_path, 'zip')
- if os.path.exists(dataset_path):
- shutil.rmtree(dataset_path)
-
- os.mkdir(dataset_path)
-
- for root, subfolders, songs in os.walk(unzips_path):
- for song in songs:
- song_path = os.path.join(root, song)
- if song.endswith(tuple(audio_extenions)):
- formatted_song_name = format_title(os.path.splitext(song)[0])
- extension = os.path.splitext(song)[1]
- new_song_path = os.path.join(dataset_path, f"{formatted_song_name}{extension}")
- shutil.move(song_path, new_song_path)
- else:
- print(i18n("Unzip error."))
- infos.append(i18n("Unzip error."))
- yield "\n".join(infos)
-
-
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(unzips_path):
- shutil.rmtree(unzips_path)
-
- print(i18n("The Dataset has been loaded successfully."))
- infos.append(i18n("The Dataset has been loaded successfully."))
- yield "\n".join(infos)
- except Exception as e:
- os.chdir(parent_path)
- if "too much use" in str(e):
- print(i18n("Too many users have recently viewed or downloaded this file"))
- yield i18n("Too many users have recently viewed or downloaded this file")
- elif "private link" in str(e):
- print(i18n("Cannot get file from this private link"))
- yield i18n("Cannot get file from this private link")
- else:
- print(e)
- yield i18n("An error occurred downloading")
- finally:
- os.chdir(parent_path)
-
-def save_model(modelname, save_action):
-
- parent_path = find_folder_parent(".", "pretrained_v2")
- zips_path = os.path.join(parent_path, 'zips')
- dst = os.path.join(zips_path,modelname)
- logs_path = os.path.join(parent_path, 'logs', modelname)
- weights_path = os.path.join(parent_path, 'weights', f"{modelname}.pth")
- save_folder = parent_path
- infos = []
-
- try:
- if not os.path.exists(logs_path):
- raise Exception("No model found.")
-
- if not 'content' in parent_path:
- save_folder = os.path.join(parent_path, 'RVC_Backup')
- else:
- save_folder = '/content/drive/MyDrive/RVC_Backup'
-
- infos.append(i18n("Save model"))
- yield "\n".join(infos)
-
- if not os.path.exists(save_folder):
- os.mkdir(save_folder)
- if not os.path.exists(os.path.join(save_folder, 'ManualTrainingBackup')):
- os.mkdir(os.path.join(save_folder, 'ManualTrainingBackup'))
- if not os.path.exists(os.path.join(save_folder, 'Finished')):
- os.mkdir(os.path.join(save_folder, 'Finished'))
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
-
- os.mkdir(zips_path)
- added_file = glob.glob(os.path.join(logs_path, "added_*.index"))
- d_file = glob.glob(os.path.join(logs_path, "D_*.pth"))
- g_file = glob.glob(os.path.join(logs_path, "G_*.pth"))
-
- if save_action == i18n("Choose the method"):
- raise Exception("No method choosen.")
-
- if save_action == i18n("Save all"):
- print(i18n("Save all"))
- save_folder = os.path.join(save_folder, 'ManualTrainingBackup')
- shutil.copytree(logs_path, dst)
- else:
- if not os.path.exists(dst):
- os.mkdir(dst)
-
- if save_action == i18n("Save D and G"):
- print(i18n("Save D and G"))
- save_folder = os.path.join(save_folder, 'ManualTrainingBackup')
- if len(d_file) > 0:
- shutil.copy(d_file[0], dst)
- if len(g_file) > 0:
- shutil.copy(g_file[0], dst)
-
- if len(added_file) > 0:
- shutil.copy(added_file[0], dst)
- else:
- infos.append(i18n("Saved without index..."))
-
- if save_action == i18n("Save voice"):
- print(i18n("Save voice"))
- save_folder = os.path.join(save_folder, 'Finished')
- if len(added_file) > 0:
- shutil.copy(added_file[0], dst)
- else:
- infos.append(i18n("Saved without index..."))
-
- yield "\n".join(infos)
- if not os.path.exists(weights_path):
- infos.append(i18n("Saved without inference model..."))
- else:
- shutil.copy(weights_path, dst)
-
- yield "\n".join(infos)
- infos.append("\n" + i18n("This may take a few minutes, please wait..."))
- yield "\n".join(infos)
-
- shutil.make_archive(os.path.join(zips_path,f"{modelname}"), 'zip', zips_path)
- shutil.move(os.path.join(zips_path,f"{modelname}.zip"), os.path.join(save_folder, f'{modelname}.zip'))
-
- shutil.rmtree(zips_path)
- infos.append("\n" + i18n("Model saved successfully"))
- yield "\n".join(infos)
-
- except Exception as e:
- print(e)
- if "No model found." in str(e):
- infos.append(i18n("The model you want to save does not exist, be sure to enter the correct name."))
- else:
- infos.append(i18n("An error occurred saving the model"))
-
- yield "\n".join(infos)
-
-def load_downloaded_backup(url):
- parent_path = find_folder_parent(".", "pretrained_v2")
- try:
- infos = []
- logs_folders = ['0_gt_wavs','1_16k_wavs','2a_f0','2b-f0nsf','3_feature256','3_feature768']
- zips_path = os.path.join(parent_path, 'zips')
- unzips_path = os.path.join(parent_path, 'unzips')
- weights_path = os.path.join(parent_path, 'weights')
- logs_dir = os.path.join(parent_path, 'logs')
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(unzips_path):
- shutil.rmtree(unzips_path)
-
- os.mkdir(zips_path)
- os.mkdir(unzips_path)
-
- download_file = download_from_url(url)
- if not download_file:
- print(i18n("The file could not be downloaded."))
- infos.append(i18n("The file could not be downloaded."))
- yield "\n".join(infos)
- elif download_file == "downloaded":
- print(i18n("It has been downloaded successfully."))
- infos.append(i18n("It has been downloaded successfully."))
- yield "\n".join(infos)
- elif download_file == "too much use":
- raise Exception(i18n("Too many users have recently viewed or downloaded this file"))
- elif download_file == "private link":
- raise Exception(i18n("Cannot get file from this private link"))
-
- for filename in os.listdir(zips_path):
- if filename.endswith(".zip"):
- zipfile_path = os.path.join(zips_path,filename)
- zip_dir_name = os.path.splitext(filename)[0]
- unzip_dir = unzips_path
- print(i18n("Proceeding with the extraction..."))
- infos.append(i18n("Proceeding with the extraction..."))
- shutil.unpack_archive(zipfile_path, unzip_dir, 'zip')
-
- if os.path.exists(os.path.join(unzip_dir, zip_dir_name)):
- shutil.move(os.path.join(unzip_dir, zip_dir_name), logs_dir)
- else:
- new_folder_path = os.path.join(logs_dir, zip_dir_name)
- os.mkdir(new_folder_path)
- for item_name in os.listdir(unzip_dir):
- item_path = os.path.join(unzip_dir, item_name)
- if os.path.isfile(item_path):
- shutil.move(item_path, new_folder_path)
- elif os.path.isdir(item_path):
- shutil.move(item_path, new_folder_path)
-
- yield "\n".join(infos)
- else:
- print(i18n("Unzip error."))
- infos.append(i18n("Unzip error."))
- yield "\n".join(infos)
-
- result = ""
-
- for filename in os.listdir(unzips_path):
- if filename.endswith(".zip"):
- silentremove(filename)
-
- if os.path.exists(zips_path):
- shutil.rmtree(zips_path)
- if os.path.exists(os.path.join(parent_path, 'unzips')):
- shutil.rmtree(os.path.join(parent_path, 'unzips'))
- print(i18n("The Backup has been uploaded successfully."))
- infos.append("\n" + i18n("The Backup has been uploaded successfully."))
- yield "\n".join(infos)
- os.chdir(parent_path)
- return result
- except Exception as e:
- os.chdir(parent_path)
- if "too much use" in str(e):
- print(i18n("Too many users have recently viewed or downloaded this file"))
- yield i18n("Too many users have recently viewed or downloaded this file")
- elif "private link" in str(e):
- print(i18n("Cannot get file from this private link"))
- yield i18n("Cannot get file from this private link")
- else:
- print(e)
- yield i18n("An error occurred downloading")
- finally:
- os.chdir(parent_path)
-
-def save_to_wav(record_button):
- if record_button is None:
- pass
- else:
- path_to_file=record_button
- new_name = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")+'.wav'
- new_path='./audios/'+new_name
- shutil.move(path_to_file,new_path)
- return new_name
-
-
-def change_choices2():
- audio_paths=[]
- for filename in os.listdir("./audios"):
- if filename.endswith(('wav', 'mp3', 'flac', 'ogg', 'opus',
- 'm4a', 'mp4', 'aac', 'alac', 'wma',
- 'aiff', 'webm', 'ac3')):
- audio_paths.append(os.path.join('./audios',filename).replace('\\', '/'))
- return {"choices": sorted(audio_paths), "__type__": "update"}, {"__type__": "update"}
-
-
-
-
-
-def uvr(input_url, output_path, model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format0, architecture):
- carpeta_a_eliminar = "yt_downloads"
- if os.path.exists(carpeta_a_eliminar) and os.path.isdir(carpeta_a_eliminar):
- for archivo in os.listdir(carpeta_a_eliminar):
- ruta_archivo = os.path.join(carpeta_a_eliminar, archivo)
- if os.path.isfile(ruta_archivo):
- os.remove(ruta_archivo)
- elif os.path.isdir(ruta_archivo):
- shutil.rmtree(ruta_archivo)
-
-
-
- ydl_opts = {
- 'no-windows-filenames': True,
- 'restrict-filenames': True,
- 'extract_audio': True,
- 'format': 'bestaudio',
- 'quiet': True,
- 'no-warnings': True,
- }
-
- try:
- print(i18n("Downloading audio from the video..."))
- with yt_dlp.YoutubeDL(ydl_opts) as ydl:
- info_dict = ydl.extract_info(input_url, download=False)
- formatted_title = format_title(info_dict.get('title', 'default_title'))
- formatted_outtmpl = output_path + '/' + formatted_title + '.wav'
- ydl_opts['outtmpl'] = formatted_outtmpl
- ydl = yt_dlp.YoutubeDL(ydl_opts)
- ydl.download([input_url])
- print(i18n("Audio downloaded!"))
- except Exception as error:
- print(i18n("An error occurred:"), error)
-
- actual_directory = os.path.dirname(__file__)
-
- vocal_directory = os.path.join(actual_directory, save_root_vocal)
- instrumental_directory = os.path.join(actual_directory, save_root_ins)
-
- vocal_formatted = f"vocal_{formatted_title}.wav.reformatted.wav_10.wav"
- instrumental_formatted = f"instrument_{formatted_title}.wav.reformatted.wav_10.wav"
-
- vocal_audio_path = os.path.join(vocal_directory, vocal_formatted)
- instrumental_audio_path = os.path.join(instrumental_directory, instrumental_formatted)
-
- vocal_formatted_mdx = f"{formatted_title}_vocal_.wav"
- instrumental_formatted_mdx = f"{formatted_title}_instrument_.wav"
-
- vocal_audio_path_mdx = os.path.join(vocal_directory, vocal_formatted_mdx)
- instrumental_audio_path_mdx = os.path.join(instrumental_directory, instrumental_formatted_mdx)
-
- if architecture == "VR":
- try:
- print(i18n("Starting audio conversion... (This might take a moment)"))
- inp_root, save_root_vocal, save_root_ins = [x.strip(" ").strip('"').strip("\n").strip('"').strip(" ") for x in [inp_root, save_root_vocal, save_root_ins]]
- usable_files = [os.path.join(inp_root, file)
- for file in os.listdir(inp_root)
- if file.endswith(tuple(sup_audioext))]
-
-
- pre_fun = MDXNetDereverb(15) if model_name == "onnx_dereverb_By_FoxJoy" else (_audio_pre_ if "DeEcho" not in model_name else _audio_pre_new)(
- agg=int(agg),
- model_path=os.path.join(weight_uvr5_root, model_name + ".pth"),
- device=config.device,
- is_half=config.is_half,
- )
-
- try:
- if paths != None:
- paths = [path.name for path in paths]
- else:
- paths = usable_files
-
- except:
- traceback.print_exc()
- paths = usable_files
- print(paths)
- for path in paths:
- inp_path = os.path.join(inp_root, path)
- need_reformat, done = 1, 0
-
- try:
- info = ffmpeg.probe(inp_path, cmd="ffprobe")
- if info["streams"][0]["channels"] == 2 and info["streams"][0]["sample_rate"] == "44100":
- need_reformat = 0
- pre_fun._path_audio_(inp_path, save_root_ins, save_root_vocal, format0)
- done = 1
- except:
- traceback.print_exc()
-
- if need_reformat:
- tmp_path = f"{tmp}/{os.path.basename(inp_path)}.reformatted.wav"
- os.system(f"ffmpeg -i {inp_path} -vn -acodec pcm_s16le -ac 2 -ar 44100 {tmp_path} -y")
- inp_path = tmp_path
-
- try:
- if not done:
- pre_fun._path_audio_(inp_path, save_root_ins, save_root_vocal, format0)
- print(f"{os.path.basename(inp_path)}->Success")
- except:
- print(f"{os.path.basename(inp_path)}->{traceback.format_exc()}")
- except:
- traceback.print_exc()
- finally:
- try:
- if model_name == "onnx_dereverb_By_FoxJoy":
- del pre_fun.pred.model
- del pre_fun.pred.model_
- else:
- del pre_fun.model
-
- del pre_fun
- return i18n("Finished"), vocal_audio_path, instrumental_audio_path
- except: traceback.print_exc()
-
- if torch.cuda.is_available(): torch.cuda.empty_cache()
-
- elif architecture == "MDX":
- try:
- print(i18n("Starting audio conversion... (This might take a moment)"))
- inp_root, save_root_vocal, save_root_ins = [x.strip(" ").strip('"').strip("\n").strip('"').strip(" ") for x in [inp_root, save_root_vocal, save_root_ins]]
-
- usable_files = [os.path.join(inp_root, file)
- for file in os.listdir(inp_root)
- if file.endswith(tuple(sup_audioext))]
- try:
- if paths != None:
- paths = [path.name for path in paths]
- else:
- paths = usable_files
-
- except:
- traceback.print_exc()
- paths = usable_files
- print(paths)
- invert=True
- denoise=True
- use_custom_parameter=True
- dim_f=2048
- dim_t=256
- n_fft=7680
- use_custom_compensation=True
- compensation=1.025
- suffix = "vocal_" #@param ["Vocals", "Drums", "Bass", "Other"]{allow-input: true}
- suffix_invert = "instrument_" #@param ["Instrumental", "Drumless", "Bassless", "Instruments"]{allow-input: true}
- print_settings = True # @param{type:"boolean"}
- onnx = id_to_ptm(model_name)
- compensation = compensation if use_custom_compensation or use_custom_parameter else None
- mdx_model = prepare_mdx(onnx,use_custom_parameter, dim_f, dim_t, n_fft, compensation=compensation)
-
-
- for path in paths:
- #inp_path = os.path.join(inp_root, path)
- suffix_naming = suffix if use_custom_parameter else None
- diff_suffix_naming = suffix_invert if use_custom_parameter else None
- run_mdx(onnx, mdx_model, path, format0, diff=invert,suffix=suffix_naming,diff_suffix=diff_suffix_naming,denoise=denoise)
-
- if print_settings:
- print()
- print('[MDX-Net_Colab settings used]')
- print(f'Model used: {onnx}')
- print(f'Model MD5: {mdx.MDX.get_hash(onnx)}')
- print(f'Model parameters:')
- print(f' -dim_f: {mdx_model.dim_f}')
- print(f' -dim_t: {mdx_model.dim_t}')
- print(f' -n_fft: {mdx_model.n_fft}')
- print(f' -compensation: {mdx_model.compensation}')
- print()
- print('[Input file]')
- print('filename(s): ')
- for filename in paths:
- print(f' -{filename}')
- print(f"{os.path.basename(filename)}->Success")
- except:
- traceback.print_exc()
- finally:
- try:
- del mdx_model
- return i18n("Finished"), vocal_audio_path_mdx, instrumental_audio_path_mdx
- except: traceback.print_exc()
-
- print("clean_empty_cache")
-
- if torch.cuda.is_available(): torch.cuda.empty_cache()
-sup_audioext = {'wav', 'mp3', 'flac', 'ogg', 'opus',
- 'm4a', 'mp4', 'aac', 'alac', 'wma',
- 'aiff', 'webm', 'ac3'}
-
-def load_downloaded_audio(url):
- parent_path = find_folder_parent(".", "pretrained_v2")
- try:
- infos = []
- audios_path = os.path.join(parent_path, 'audios')
- zips_path = os.path.join(parent_path, 'zips')
-
- if not os.path.exists(audios_path):
- os.mkdir(audios_path)
-
- download_file = download_from_url(url)
- if not download_file:
- print(i18n("The file could not be downloaded."))
- infos.append(i18n("The file could not be downloaded."))
- yield "\n".join(infos)
- elif download_file == "downloaded":
- print(i18n("It has been downloaded successfully."))
- infos.append(i18n("It has been downloaded successfully."))
- yield "\n".join(infos)
- elif download_file == "too much use":
- raise Exception(i18n("Too many users have recently viewed or downloaded this file"))
- elif download_file == "private link":
- raise Exception(i18n("Cannot get file from this private link"))
-
- for filename in os.listdir(zips_path):
- item_path = os.path.join(zips_path, filename)
- if item_path.split('.')[-1] in sup_audioext:
- if os.path.exists(item_path):
- shutil.move(item_path, audios_path)
-
- result = ""
- print(i18n("Audio files have been moved to the 'audios' folder."))
- infos.append(i18n("Audio files have been moved to the 'audios' folder."))
- yield "\n".join(infos)
-
- os.chdir(parent_path)
- return result
- except Exception as e:
- os.chdir(parent_path)
- if "too much use" in str(e):
- print(i18n("Too many users have recently viewed or downloaded this file"))
- yield i18n("Too many users have recently viewed or downloaded this file")
- elif "private link" in str(e):
- print(i18n("Cannot get file from this private link"))
- yield i18n("Cannot get file from this private link")
- else:
- print(e)
- yield i18n("An error occurred downloading")
- finally:
- os.chdir(parent_path)
-
-
-class error_message(Exception):
- def __init__(self, mensaje):
- self.mensaje = mensaje
- super().__init__(mensaje)
-
-def get_vc(sid, to_return_protect0, to_return_protect1):
- global n_spk, tgt_sr, net_g, vc, cpt, version
- if sid == "" or sid == []:
- global hubert_model
- if hubert_model is not None:
- print("clean_empty_cache")
- del net_g, n_spk, vc, hubert_model, tgt_sr
- hubert_model = net_g = n_spk = vc = hubert_model = tgt_sr = None
- if torch.cuda.is_available():
- torch.cuda.empty_cache()
- if_f0 = cpt.get("f0", 1)
- version = cpt.get("version", "v1")
- if version == "v1":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs256NSFsid(
- *cpt["config"], is_half=config.is_half
- )
- else:
- net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
- elif version == "v2":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs768NSFsid(
- *cpt["config"], is_half=config.is_half
- )
- else:
- net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
- del net_g, cpt
- if torch.cuda.is_available():
- torch.cuda.empty_cache()
- cpt = None
- return (
- {"visible": False, "__type__": "update"},
- {"visible": False, "__type__": "update"},
- {"visible": False, "__type__": "update"},
- )
- person = "%s/%s" % (weight_root, sid)
- print("loading %s" % person)
- cpt = torch.load(person, map_location="cpu")
- tgt_sr = cpt["config"][-1]
- cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0]
- if_f0 = cpt.get("f0", 1)
- if if_f0 == 0:
- to_return_protect0 = to_return_protect1 = {
- "visible": False,
- "value": 0.5,
- "__type__": "update",
- }
- else:
- to_return_protect0 = {
- "visible": True,
- "value": to_return_protect0,
- "__type__": "update",
- }
- to_return_protect1 = {
- "visible": True,
- "value": to_return_protect1,
- "__type__": "update",
- }
- version = cpt.get("version", "v1")
- if version == "v1":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs256NSFsid(*cpt["config"], is_half=config.is_half)
- else:
- net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
- elif version == "v2":
- if if_f0 == 1:
- net_g = SynthesizerTrnMs768NSFsid(*cpt["config"], is_half=config.is_half)
- else:
- net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
- del net_g.enc_q
- print(net_g.load_state_dict(cpt["weight"], strict=False))
- net_g.eval().to(config.device)
- if config.is_half:
- net_g = net_g.half()
- else:
- net_g = net_g.float()
- vc = VC(tgt_sr, config)
- n_spk = cpt["config"][-3]
- return (
- {"visible": True, "maximum": n_spk, "__type__": "update"},
- to_return_protect0,
- to_return_protect1,
- )
-
-def update_model_choices(select_value):
- model_ids = get_model_list()
- model_ids_list = list(model_ids)
- if select_value == "VR":
- return {"choices": uvr5_names, "__type__": "update"}
- elif select_value == "MDX":
- return {"choices": model_ids_list, "__type__": "update"}
-
-def download_model():
- gr.Markdown(value="# " + i18n("Download Model"))
- gr.Markdown(value=i18n("It is used to download your inference models."))
- with gr.Row():
- model_url=gr.Textbox(label=i18n("Url:"))
- with gr.Row():
- download_model_status_bar=gr.Textbox(label=i18n("Status:"))
- with gr.Row():
- download_button=gr.Button(i18n("Download"))
- download_button.click(fn=load_downloaded_model, inputs=[model_url], outputs=[download_model_status_bar])
-
-def download_backup():
- gr.Markdown(value="# " + i18n("Download Backup"))
- gr.Markdown(value=i18n("It is used to download your training backups."))
- with gr.Row():
- model_url=gr.Textbox(label=i18n("Url:"))
- with gr.Row():
- download_model_status_bar=gr.Textbox(label=i18n("Status:"))
- with gr.Row():
- download_button=gr.Button(i18n("Download"))
- download_button.click(fn=load_downloaded_backup, inputs=[model_url], outputs=[download_model_status_bar])
-
-def update_dataset_list(name):
- new_datasets = []
- for foldername in os.listdir("./datasets"):
- if "." not in foldername:
- new_datasets.append(os.path.join(find_folder_parent(".","pretrained"),"datasets",foldername))
- return gr.Dropdown.update(choices=new_datasets)
-
-def download_dataset(trainset_dir4):
- gr.Markdown(value="# " + i18n("Download Dataset"))
- gr.Markdown(value=i18n("Download the dataset with the audios in a compatible format (.wav/.flac) to train your model."))
- with gr.Row():
- dataset_url=gr.Textbox(label=i18n("Url:"))
- with gr.Row():
- load_dataset_status_bar=gr.Textbox(label=i18n("Status:"))
- with gr.Row():
- load_dataset_button=gr.Button(i18n("Download"))
- load_dataset_button.click(fn=load_dowloaded_dataset, inputs=[dataset_url], outputs=[load_dataset_status_bar])
- load_dataset_status_bar.change(update_dataset_list, dataset_url, trainset_dir4)
-
-def download_audio():
- gr.Markdown(value="# " + i18n("Download Audio"))
- gr.Markdown(value=i18n("Download audios of any format for use in inference (recommended for mobile users)."))
- with gr.Row():
- audio_url=gr.Textbox(label=i18n("Url:"))
- with gr.Row():
- download_audio_status_bar=gr.Textbox(label=i18n("Status:"))
- with gr.Row():
- download_button2=gr.Button(i18n("Download"))
- download_button2.click(fn=load_downloaded_audio, inputs=[audio_url], outputs=[download_audio_status_bar])
-
-def youtube_separator():
- gr.Markdown(value="# " + i18n("Separate YouTube tracks"))
- gr.Markdown(value=i18n("Download audio from a YouTube video and automatically separate the vocal and instrumental tracks"))
- with gr.Row():
- input_url = gr.inputs.Textbox(label=i18n("Enter the YouTube link:"))
- output_path = gr.Textbox(
- label=i18n("Enter the path of the audio folder to be processed (copy it from the address bar of the file manager):"),
- value=os.path.abspath(os.getcwd()).replace('\\', '/') + "/yt_downloads",
- visible=False,
- )
- advanced_settings_checkbox = gr.Checkbox(
- value=False,
- label=i18n("Advanced Settings"),
- interactive=True,
- )
- with gr.Row(label = i18n("Advanced Settings"), visible=False, variant='compact') as advanced_settings:
- with gr.Column():
- model_select = gr.Radio(
- label=i18n("Model Architecture:"),
- choices=["VR", "MDX"],
- value="VR",
- interactive=True,
- )
- model_choose = gr.Dropdown(label=i18n("Model: (Be aware that in some models the named vocal will be the instrumental)"),
- choices=uvr5_names,
- value="HP5_only_main_vocal"
- )
- with gr.Row():
- agg = gr.Slider(
- minimum=0,
- maximum=20,
- step=1,
- label=i18n("Vocal Extraction Aggressive"),
- value=10,
- interactive=True,
- )
- with gr.Row():
- opt_vocal_root = gr.Textbox(
- label=i18n("Specify the output folder for vocals:"), value="audios",
- )
- opt_ins_root = gr.Textbox(
- label=i18n("Specify the output folder for accompaniment:"), value="audio-others",
- )
- dir_wav_input = gr.Textbox(
- label=i18n("Enter the path of the audio folder to be processed:"),
- value=((os.getcwd()).replace('\\', '/') + "/yt_downloads"),
- visible=False,
- )
- format0 = gr.Radio(
- label=i18n("Export file format"),
- choices=["wav", "flac", "mp3", "m4a"],
- value="wav",
- visible=False,
- interactive=True,
- )
- wav_inputs = gr.File(
- file_count="multiple", label=i18n("You can also input audio files in batches. Choose one of the two options. Priority is given to reading from the folder."),
- visible=False,
- )
- model_select.change(
- fn=update_model_choices,
- inputs=model_select,
- outputs=model_choose,
- )
- with gr.Row():
- vc_output4 = gr.Textbox(label=i18n("Status:"))
- vc_output5 = gr.Audio(label=i18n("Vocal"), type='filepath')
- vc_output6 = gr.Audio(label=i18n("Instrumental"), type='filepath')
- with gr.Row():
- but2 = gr.Button(i18n("Download and Separate"))
- but2.click(
- uvr,
- [
- input_url,
- output_path,
- model_choose,
- dir_wav_input,
- opt_vocal_root,
- wav_inputs,
- opt_ins_root,
- agg,
- format0,
- model_select
- ],
- [vc_output4, vc_output5, vc_output6],
- )
- def toggle_advanced_settings(checkbox):
- return {"visible": checkbox, "__type__": "update"}
-
- advanced_settings_checkbox.change(
- fn=toggle_advanced_settings,
- inputs=[advanced_settings_checkbox],
- outputs=[advanced_settings]
- )
-
-
-def get_bark_voice():
- mensaje = """
-v2/en_speaker_0 English Male
-v2/en_speaker_1 English Male
-v2/en_speaker_2 English Male
-v2/en_speaker_3 English Male
-v2/en_speaker_4 English Male
-v2/en_speaker_5 English Male
-v2/en_speaker_6 English Male
-v2/en_speaker_7 English Male
-v2/en_speaker_8 English Male
-v2/en_speaker_9 English Female
-v2/zh_speaker_0 Chinese (Simplified) Male
-v2/zh_speaker_1 Chinese (Simplified) Male
-v2/zh_speaker_2 Chinese (Simplified) Male
-v2/zh_speaker_3 Chinese (Simplified) Male
-v2/zh_speaker_4 Chinese (Simplified) Female
-v2/zh_speaker_5 Chinese (Simplified) Male
-v2/zh_speaker_6 Chinese (Simplified) Female
-v2/zh_speaker_7 Chinese (Simplified) Female
-v2/zh_speaker_8 Chinese (Simplified) Male
-v2/zh_speaker_9 Chinese (Simplified) Female
-v2/fr_speaker_0 French Male
-v2/fr_speaker_1 French Female
-v2/fr_speaker_2 French Female
-v2/fr_speaker_3 French Male
-v2/fr_speaker_4 French Male
-v2/fr_speaker_5 French Female
-v2/fr_speaker_6 French Male
-v2/fr_speaker_7 French Male
-v2/fr_speaker_8 French Male
-v2/fr_speaker_9 French Male
-v2/de_speaker_0 German Male
-v2/de_speaker_1 German Male
-v2/de_speaker_2 German Male
-v2/de_speaker_3 German Female
-v2/de_speaker_4 German Male
-v2/de_speaker_5 German Male
-v2/de_speaker_6 German Male
-v2/de_speaker_7 German Male
-v2/de_speaker_8 German Female
-v2/de_speaker_9 German Male
-v2/hi_speaker_0 Hindi Female
-v2/hi_speaker_1 Hindi Female
-v2/hi_speaker_2 Hindi Male
-v2/hi_speaker_3 Hindi Female
-v2/hi_speaker_4 Hindi Female
-v2/hi_speaker_5 Hindi Male
-v2/hi_speaker_6 Hindi Male
-v2/hi_speaker_7 Hindi Male
-v2/hi_speaker_8 Hindi Male
-v2/hi_speaker_9 Hindi Female
-v2/it_speaker_0 Italian Male
-v2/it_speaker_1 Italian Male
-v2/it_speaker_2 Italian Female
-v2/it_speaker_3 Italian Male
-v2/it_speaker_4 Italian Male
-v2/it_speaker_5 Italian Male
-v2/it_speaker_6 Italian Male
-v2/it_speaker_7 Italian Female
-v2/it_speaker_8 Italian Male
-v2/it_speaker_9 Italian Female
-v2/ja_speaker_0 Japanese Female
-v2/ja_speaker_1 Japanese Female
-v2/ja_speaker_2 Japanese Male
-v2/ja_speaker_3 Japanese Female
-v2/ja_speaker_4 Japanese Female
-v2/ja_speaker_5 Japanese Female
-v2/ja_speaker_6 Japanese Male
-v2/ja_speaker_7 Japanese Female
-v2/ja_speaker_8 Japanese Female
-v2/ja_speaker_9 Japanese Female
-v2/ko_speaker_0 Korean Female
-v2/ko_speaker_1 Korean Male
-v2/ko_speaker_2 Korean Male
-v2/ko_speaker_3 Korean Male
-v2/ko_speaker_4 Korean Male
-v2/ko_speaker_5 Korean Male
-v2/ko_speaker_6 Korean Male
-v2/ko_speaker_7 Korean Male
-v2/ko_speaker_8 Korean Male
-v2/ko_speaker_9 Korean Male
-v2/pl_speaker_0 Polish Male
-v2/pl_speaker_1 Polish Male
-v2/pl_speaker_2 Polish Male
-v2/pl_speaker_3 Polish Male
-v2/pl_speaker_4 Polish Female
-v2/pl_speaker_5 Polish Male
-v2/pl_speaker_6 Polish Female
-v2/pl_speaker_7 Polish Male
-v2/pl_speaker_8 Polish Male
-v2/pl_speaker_9 Polish Female
-v2/pt_speaker_0 Portuguese Male
-v2/pt_speaker_1 Portuguese Male
-v2/pt_speaker_2 Portuguese Male
-v2/pt_speaker_3 Portuguese Male
-v2/pt_speaker_4 Portuguese Male
-v2/pt_speaker_5 Portuguese Male
-v2/pt_speaker_6 Portuguese Male
-v2/pt_speaker_7 Portuguese Male
-v2/pt_speaker_8 Portuguese Male
-v2/pt_speaker_9 Portuguese Male
-v2/ru_speaker_0 Russian Male
-v2/ru_speaker_1 Russian Male
-v2/ru_speaker_2 Russian Male
-v2/ru_speaker_3 Russian Male
-v2/ru_speaker_4 Russian Male
-v2/ru_speaker_5 Russian Female
-v2/ru_speaker_6 Russian Female
-v2/ru_speaker_7 Russian Male
-v2/ru_speaker_8 Russian Male
-v2/ru_speaker_9 Russian Female
-v2/es_speaker_0 Spanish Male
-v2/es_speaker_1 Spanish Male
-v2/es_speaker_2 Spanish Male
-v2/es_speaker_3 Spanish Male
-v2/es_speaker_4 Spanish Male
-v2/es_speaker_5 Spanish Male
-v2/es_speaker_6 Spanish Male
-v2/es_speaker_7 Spanish Male
-v2/es_speaker_8 Spanish Female
-v2/es_speaker_9 Spanish Female
-v2/tr_speaker_0 Turkish Male
-v2/tr_speaker_1 Turkish Male
-v2/tr_speaker_2 Turkish Male
-v2/tr_speaker_3 Turkish Male
-v2/tr_speaker_4 Turkish Female
-v2/tr_speaker_5 Turkish Female
-v2/tr_speaker_6 Turkish Male
-v2/tr_speaker_7 Turkish Male
-v2/tr_speaker_8 Turkish Male
-v2/tr_speaker_9 Turkish Male
- """
-# Dividir el mensaje en líneas
- lineas = mensaje.split("\n")
- datos_deseados = []
- for linea in lineas:
- partes = linea.split("\t")
- if len(partes) == 3:
- clave, _, genero = partes
- datos_deseados.append(f"{clave}-{genero}")
-
- return datos_deseados
-
-
-def get_edge_voice():
- completed_process = subprocess.run(['edge-tts',"-l"], capture_output=True, text=True)
- lines = completed_process.stdout.strip().split("\n")
- data = []
- current_entry = {}
- for line in lines:
- if line.startswith("Name: "):
- if current_entry:
- data.append(current_entry)
- current_entry = {"Name": line.split(": ")[1]}
- elif line.startswith("Gender: "):
- current_entry["Gender"] = line.split(": ")[1]
- if current_entry:
- data.append(current_entry)
- tts_voice = []
- for entry in data:
- name = entry["Name"]
- gender = entry["Gender"]
- formatted_entry = f'{name}-{gender}'
- tts_voice.append(formatted_entry)
- return tts_voice
-
-
-#print(set_tts_voice)
diff --git a/spaces/FritsLyneborg/kunstnerfrits/Makefile b/spaces/FritsLyneborg/kunstnerfrits/Makefile
deleted file mode 100644
index e418a64d4986ed7fc6401781b9b2743fcc7d85c6..0000000000000000000000000000000000000000
--- a/spaces/FritsLyneborg/kunstnerfrits/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-.PHONY: style
-
-style:
- black .
- isort .
\ No newline at end of file
diff --git a/spaces/GIZ/embedding_visualisation/apps/sdg_pd.py b/spaces/GIZ/embedding_visualisation/apps/sdg_pd.py
deleted file mode 100644
index 5f0affa96bdd6645a076b921ef723cb5395ba428..0000000000000000000000000000000000000000
--- a/spaces/GIZ/embedding_visualisation/apps/sdg_pd.py
+++ /dev/null
@@ -1,45 +0,0 @@
-import plotly.express as px
-import streamlit as st
-from sentence_transformers import SentenceTransformer
-import umap.umap_ as umap
-import pandas as pd
-import os
-
-def app():
- st.title("SDG Embedding Visualisation")
- with st.expander("ℹ️ - About this app", expanded=True):
-
- st.write(
- """
- Information cartography - Get your word/phrase/sentence/paragraph embedded and visualized.
- The (English) sentence-transformers model "all-MiniLM-L6-v2" maps sentences & paragraphs to a 384 dimensional dense vector space This is normally used for tasks like clustering or semantic search, but in this case, we use it to place your text to a 3D map. Before plotting, the dimension needs to be reduced to three so we can actually plot it, but preserve as much information as possible. For this, we use a technology called umap.
-
- On this page, you find thousands of text excerpts that were labelled by the community volunteers with respect to Sustainable Development Goals, a project by OSDG.ai, embedded as described. Ready to explore.
- """)
-
- with st.spinner("👑 load data"):
- df_osdg = pd.read_csv("sdg_umap.csv", sep = "|")
-
- #labels = [_lab_dict[lab] for lab in df_osdg['label'] ]
- keys = list(df_osdg['keys'])
- #docs = list(df_osdg['text'])
-
- agree = st.checkbox('add labels')
-
- if agree:
- with st.spinner("👑 create visualisation"):
- fig = px.scatter_3d(
- df_osdg, x='coord_x', y='coord_y', z='coord_z',
- color='labels',
- opacity = .5, hover_data=[keys])
- fig.update_scenes(xaxis_visible=False, yaxis_visible=False,zaxis_visible=False )
- fig.update_traces(marker_size=4)
- st.plotly_chart(fig)
- else:
- with st.spinner("👑 create visualisation"):
- fig = px.scatter_3d(
- df_osdg, x='coord_x', y='coord_y', z='coord_z',
- opacity = .5, hover_data=[keys])
- fig.update_scenes(xaxis_visible=False, yaxis_visible=False,zaxis_visible=False )
- fig.update_traces(marker_size=4)
- st.plotly_chart(fig)
\ No newline at end of file
diff --git a/spaces/GMFTBY/PandaGPT/model/ImageBind/models/multimodal_preprocessors.py b/spaces/GMFTBY/PandaGPT/model/ImageBind/models/multimodal_preprocessors.py
deleted file mode 100644
index 44de961053601fd288c5c92c56b799d5762b8b4c..0000000000000000000000000000000000000000
--- a/spaces/GMFTBY/PandaGPT/model/ImageBind/models/multimodal_preprocessors.py
+++ /dev/null
@@ -1,687 +0,0 @@
-#!/usr/bin/env python3
-# Portions Copyright (c) Meta Platforms, Inc. and affiliates.
-# All rights reserved.
-
-# This source code is licensed under the license found in the
-# LICENSE file in the root directory of this source tree.
-
-import gzip
-import html
-import io
-import math
-from functools import lru_cache
-from typing import Callable, List, Optional
-
-import ftfy
-
-import numpy as np
-import regex as re
-import torch
-import torch.nn as nn
-from iopath.common.file_io import g_pathmgr
-from timm.models.layers import trunc_normal_
-
-from .helpers import cast_if_src_dtype, VerboseNNModule
-
-
-def get_sinusoid_encoding_table(n_position, d_hid):
- """Sinusoid position encoding table"""
-
- # TODO: make it with torch instead of numpy
- def get_position_angle_vec(position):
- return [
- position / np.power(10000, 2 * (hid_j // 2) / d_hid)
- for hid_j in range(d_hid)
- ]
-
- sinusoid_table = np.array(
- [get_position_angle_vec(pos_i) for pos_i in range(n_position)]
- )
- sinusoid_table[:, 0::2] = np.sin(sinusoid_table[:, 0::2]) # dim 2i
- sinusoid_table[:, 1::2] = np.cos(sinusoid_table[:, 1::2]) # dim 2i+1
-
- return torch.FloatTensor(sinusoid_table).unsqueeze(0)
-
-
-def interpolate_pos_encoding_2d(target_spatial_size, pos_embed):
- N = pos_embed.shape[1]
- if N == target_spatial_size:
- return pos_embed
- dim = pos_embed.shape[-1]
- # nn.functional.interpolate doesn't work with bfloat16 so we cast to float32
- pos_embed, updated = cast_if_src_dtype(pos_embed, torch.bfloat16, torch.float32)
- pos_embed = nn.functional.interpolate(
- pos_embed.reshape(1, int(math.sqrt(N)), int(math.sqrt(N)), dim).permute(
- 0, 3, 1, 2
- ),
- scale_factor=math.sqrt(target_spatial_size / N),
- mode="bicubic",
- )
- if updated:
- pos_embed, _ = cast_if_src_dtype(pos_embed, torch.float32, torch.bfloat16)
- pos_embed = pos_embed.permute(0, 2, 3, 1).view(1, -1, dim)
- return pos_embed
-
-
-def interpolate_pos_encoding(
- npatch_per_img,
- pos_embed,
- patches_layout,
- input_shape=None,
- first_patch_idx=1,
-):
- assert first_patch_idx == 0 or first_patch_idx == 1, "there is 1 CLS token or none"
- N = pos_embed.shape[1] - first_patch_idx # since it's 1 if cls_token exists
- if npatch_per_img == N:
- return pos_embed
-
- assert (
- patches_layout[-1] == patches_layout[-2]
- ), "Interpolation of pos embed not supported for non-square layouts"
-
- class_emb = pos_embed[:, :first_patch_idx]
- pos_embed = pos_embed[:, first_patch_idx:]
-
- if input_shape is None or patches_layout[0] == 1:
- # simple 2D pos embedding, no temporal component
- pos_embed = interpolate_pos_encoding_2d(npatch_per_img, pos_embed)
- elif patches_layout[0] > 1:
- # pos embed has a temporal component
- assert len(input_shape) == 4, "temporal interpolation not supported"
- # we only support 2D interpolation in this case
- num_frames = patches_layout[0]
- num_spatial_tokens = patches_layout[1] * patches_layout[2]
- pos_embed = pos_embed.view(1, num_frames, num_spatial_tokens, -1)
- # interpolate embedding for zeroth frame
- pos_embed = interpolate_pos_encoding_2d(
- npatch_per_img, pos_embed[0, 0, ...].unsqueeze(0)
- )
- else:
- raise ValueError("This type of interpolation isn't implemented")
-
- return torch.cat((class_emb, pos_embed), dim=1)
-
-
-def _get_pos_embedding(
- npatch_per_img,
- pos_embed,
- patches_layout,
- input_shape,
- first_patch_idx=1,
-):
- pos_embed = interpolate_pos_encoding(
- npatch_per_img,
- pos_embed,
- patches_layout,
- input_shape=input_shape,
- first_patch_idx=first_patch_idx,
- )
- return pos_embed
-
-
-class PatchEmbedGeneric(nn.Module):
- """
- PatchEmbed from Hydra
- """
-
- def __init__(self, proj_stem, norm_layer: Optional[nn.Module] = None):
- super().__init__()
-
- if len(proj_stem) > 1:
- self.proj = nn.Sequential(*proj_stem)
- else:
- # Special case to be able to load pre-trained models that were
- # trained with a standard stem
- self.proj = proj_stem[0]
- self.norm_layer = norm_layer
-
- def get_patch_layout(self, img_size):
- with torch.no_grad():
- dummy_img = torch.zeros(
- [
- 1,
- ]
- + img_size
- )
- dummy_out = self.proj(dummy_img)
- embed_dim = dummy_out.shape[1]
- patches_layout = tuple(dummy_out.shape[2:])
- num_patches = np.prod(patches_layout)
- return patches_layout, num_patches, embed_dim
-
- def forward(self, x):
- x = self.proj(x)
- # B C (T) H W -> B (T)HW C
- x = x.flatten(2).transpose(1, 2)
- if self.norm_layer is not None:
- x = self.norm_layer(x)
- return x
-
-
-class SpatioTemporalPosEmbeddingHelper(VerboseNNModule):
- def __init__(
- self,
- patches_layout: List,
- num_patches: int,
- num_cls_tokens: int,
- embed_dim: int,
- learnable: bool,
- ) -> None:
- super().__init__()
- self.num_cls_tokens = num_cls_tokens
- self.patches_layout = patches_layout
- self.num_patches = num_patches
- self.num_tokens = num_cls_tokens + num_patches
- self.learnable = learnable
- if self.learnable:
- self.pos_embed = nn.Parameter(torch.zeros(1, self.num_tokens, embed_dim))
- trunc_normal_(self.pos_embed, std=0.02)
- else:
- self.register_buffer(
- "pos_embed", get_sinusoid_encoding_table(self.num_tokens, embed_dim)
- )
-
- def get_pos_embedding(self, vision_input, all_vision_tokens):
- input_shape = vision_input.shape
- pos_embed = _get_pos_embedding(
- all_vision_tokens.size(1) - self.num_cls_tokens,
- pos_embed=self.pos_embed,
- patches_layout=self.patches_layout,
- input_shape=input_shape,
- first_patch_idx=self.num_cls_tokens,
- )
- return pos_embed
-
-
-class RGBDTPreprocessor(VerboseNNModule):
- def __init__(
- self,
- rgbt_stem: PatchEmbedGeneric,
- depth_stem: PatchEmbedGeneric,
- img_size: List = (3, 224, 224),
- num_cls_tokens: int = 1,
- pos_embed_fn: Callable = None,
- use_type_embed: bool = False,
- init_param_style: str = "openclip",
- ) -> None:
- super().__init__()
- stem = rgbt_stem if rgbt_stem is not None else depth_stem
- (
- self.patches_layout,
- self.num_patches,
- self.embed_dim,
- ) = stem.get_patch_layout(img_size)
- self.rgbt_stem = rgbt_stem
- self.depth_stem = depth_stem
- self.use_pos_embed = pos_embed_fn is not None
- self.use_type_embed = use_type_embed
- self.num_cls_tokens = num_cls_tokens
-
- if self.use_pos_embed:
- self.pos_embedding_helper = pos_embed_fn(
- patches_layout=self.patches_layout,
- num_cls_tokens=num_cls_tokens,
- num_patches=self.num_patches,
- embed_dim=self.embed_dim,
- )
- if self.num_cls_tokens > 0:
- self.cls_token = nn.Parameter(
- torch.zeros(1, self.num_cls_tokens, self.embed_dim)
- )
- if self.use_type_embed:
- self.type_embed = nn.Parameter(torch.zeros(1, 1, self.embed_dim))
-
- self.init_parameters(init_param_style)
-
- @torch.no_grad()
- def init_parameters(self, init_param_style):
- if init_param_style == "openclip":
- # OpenCLIP style initialization
- scale = self.embed_dim**-0.5
- if self.use_pos_embed:
- nn.init.normal_(self.pos_embedding_helper.pos_embed)
- self.pos_embedding_helper.pos_embed *= scale
-
- if self.num_cls_tokens > 0:
- nn.init.normal_(self.cls_token)
- self.cls_token *= scale
- elif init_param_style == "vit":
- self.cls_token.data.fill_(0)
- else:
- raise ValueError(f"Unknown init {init_param_style}")
-
- if self.use_type_embed:
- nn.init.normal_(self.type_embed)
-
- def tokenize_input_and_cls_pos(self, input, stem, mask):
- # tokens is of shape B x L x D
- tokens = stem(input)
- assert tokens.ndim == 3
- assert tokens.shape[2] == self.embed_dim
- B = tokens.shape[0]
- if self.num_cls_tokens > 0:
- class_tokens = self.cls_token.expand(
- B, -1, -1
- ) # stole class_tokens impl from Phil Wang, thanks
- tokens = torch.cat((class_tokens, tokens), dim=1)
- if self.use_pos_embed:
- pos_embed = self.pos_embedding_helper.get_pos_embedding(input, tokens)
- tokens = tokens + pos_embed
- if self.use_type_embed:
- tokens = tokens + self.type_embed.expand(B, -1, -1)
- return tokens
-
- def forward(self, vision=None, depth=None, patch_mask=None):
- if patch_mask is not None:
- raise NotImplementedError()
-
- if vision is not None:
- vision_tokens = self.tokenize_input_and_cls_pos(
- vision, self.rgbt_stem, patch_mask
- )
-
- if depth is not None:
- depth_tokens = self.tokenize_input_and_cls_pos(
- depth, self.depth_stem, patch_mask
- )
-
- # aggregate tokens
- if vision is not None and depth is not None:
- final_tokens = vision_tokens + depth_tokens
- else:
- final_tokens = vision_tokens if vision is not None else depth_tokens
- return_dict = {
- "trunk": {
- "tokens": final_tokens,
- },
- "head": {},
- }
- return return_dict
-
-
-class AudioPreprocessor(RGBDTPreprocessor):
- def __init__(self, audio_stem: PatchEmbedGeneric, **kwargs) -> None:
- super().__init__(rgbt_stem=audio_stem, depth_stem=None, **kwargs)
-
- def forward(self, audio=None):
- return super().forward(vision=audio)
-
-
-class ThermalPreprocessor(RGBDTPreprocessor):
- def __init__(self, thermal_stem: PatchEmbedGeneric, **kwargs) -> None:
- super().__init__(rgbt_stem=thermal_stem, depth_stem=None, **kwargs)
-
- def forward(self, thermal=None):
- return super().forward(vision=thermal)
-
-
-def build_causal_attention_mask(context_length):
- # lazily create causal attention mask, with full attention between the vision tokens
- # pytorch uses additive attention mask; fill with -inf
- mask = torch.empty(context_length, context_length, requires_grad=False)
- mask.fill_(float("-inf"))
- mask.triu_(1) # zero out the lower diagonal
- return mask
-
-
-class TextPreprocessor(VerboseNNModule):
- def __init__(
- self,
- vocab_size: int,
- context_length: int,
- embed_dim: int,
- causal_masking: bool,
- supply_seq_len_to_head: bool = True,
- num_cls_tokens: int = 0,
- init_param_style: str = "openclip",
- ) -> None:
- super().__init__()
- self.vocab_size = vocab_size
- self.context_length = context_length
- self.token_embedding = nn.Embedding(vocab_size, embed_dim)
- self.pos_embed = nn.Parameter(
- torch.empty(1, self.context_length + num_cls_tokens, embed_dim)
- )
- self.causal_masking = causal_masking
- if self.causal_masking:
- mask = build_causal_attention_mask(self.context_length)
- # register the mask as a buffer so it can be moved to the right device
- self.register_buffer("mask", mask)
-
- self.supply_seq_len_to_head = supply_seq_len_to_head
- self.num_cls_tokens = num_cls_tokens
- self.embed_dim = embed_dim
- if num_cls_tokens > 0:
- assert self.causal_masking is False, "Masking + CLS token isn't implemented"
- self.cls_token = nn.Parameter(
- torch.zeros(1, self.num_cls_tokens, embed_dim)
- )
-
- self.init_parameters(init_param_style)
-
- @torch.no_grad()
- def init_parameters(self, init_param_style="openclip"):
- # OpenCLIP style initialization
- nn.init.normal_(self.token_embedding.weight, std=0.02)
- nn.init.normal_(self.pos_embed, std=0.01)
-
- if init_param_style == "openclip":
- # OpenCLIP style initialization
- scale = self.embed_dim**-0.5
- if self.num_cls_tokens > 0:
- nn.init.normal_(self.cls_token)
- self.cls_token *= scale
- elif init_param_style == "vit":
- self.cls_token.data.fill_(0)
- else:
- raise ValueError(f"Unknown init {init_param_style}")
-
- def forward(self, text):
- # text tokens are of shape B x L x D
- text_tokens = self.token_embedding(text)
- # concat CLS tokens if any
- if self.num_cls_tokens > 0:
- B = text_tokens.shape[0]
- class_tokens = self.cls_token.expand(
- B, -1, -1
- ) # stole class_tokens impl from Phil Wang, thanks
- text_tokens = torch.cat((class_tokens, text_tokens), dim=1)
- text_tokens = text_tokens + self.pos_embed
- return_dict = {
- "trunk": {
- "tokens": text_tokens,
- },
- "head": {},
- }
- # Compute sequence length after adding CLS tokens
- if self.supply_seq_len_to_head:
- text_lengths = text.argmax(dim=-1)
- return_dict["head"] = {
- "seq_len": text_lengths,
- }
- if self.causal_masking:
- return_dict["trunk"].update({"attn_mask": self.mask})
- return return_dict
-
-
-class Im2Video(nn.Module):
- """Convert an image into a trivial video."""
-
- def __init__(self, time_dim=2):
- super().__init__()
- self.time_dim = time_dim
-
- def forward(self, x):
- if x.ndim == 4:
- # B, C, H, W -> B, C, T, H, W
- return x.unsqueeze(self.time_dim)
- elif x.ndim == 5:
- return x
- else:
- raise ValueError(f"Dimension incorrect {x.shape}")
-
-
-class PadIm2Video(Im2Video):
- def __init__(self, ntimes, pad_type, time_dim=2):
- super().__init__(time_dim=time_dim)
- assert ntimes > 0
- assert pad_type in ["zero", "repeat"]
- self.ntimes = ntimes
- self.pad_type = pad_type
-
- def forward(self, x):
- x = super().forward(x)
- if x.shape[self.time_dim] == 1:
- if self.pad_type == "repeat":
- new_shape = [1] * len(x.shape)
- new_shape[self.time_dim] = self.ntimes
- x = x.repeat(new_shape)
- elif self.pad_type == "zero":
- padarg = [0, 0] * len(x.shape)
- padarg[2 * self.time_dim + 1] = self.ntimes - x.shape[self.time_dim]
- x = nn.functional.pad(x, padarg)
- return x
-
-
-# Modified from github.com/openai/CLIP
-@lru_cache()
-def bytes_to_unicode():
- """
- Returns list of utf-8 byte and a corresponding list of unicode strings.
- The reversible bpe codes work on unicode strings.
- This means you need a large # of unicode characters in your vocab if you want to avoid UNKs.
- When you're at something like a 10B token dataset you end up needing around 5K for decent coverage.
- This is a signficant percentage of your normal, say, 32K bpe vocab.
- To avoid that, we want lookup tables between utf-8 bytes and unicode strings.
- And avoids mapping to whitespace/control characters the bpe code barfs on.
- """
- bs = (
- list(range(ord("!"), ord("~") + 1))
- + list(range(ord("¡"), ord("¬") + 1))
- + list(range(ord("®"), ord("ÿ") + 1))
- )
- cs = bs[:]
- n = 0
- for b in range(2**8):
- if b not in bs:
- bs.append(b)
- cs.append(2**8 + n)
- n += 1
- cs = [chr(n) for n in cs]
- return dict(zip(bs, cs))
-
-
-def get_pairs(word):
- """Return set of symbol pairs in a word.
- Word is represented as tuple of symbols (symbols being variable-length strings).
- """
- pairs = set()
- prev_char = word[0]
- for char in word[1:]:
- pairs.add((prev_char, char))
- prev_char = char
- return pairs
-
-
-def basic_clean(text):
- text = ftfy.fix_text(text)
- text = html.unescape(html.unescape(text))
- return text.strip()
-
-
-def whitespace_clean(text):
- text = re.sub(r"\s+", " ", text)
- text = text.strip()
- return text
-
-
-class SimpleTokenizer(object):
- def __init__(self, bpe_path: str, context_length=77):
- self.byte_encoder = bytes_to_unicode()
- self.byte_decoder = {v: k for k, v in self.byte_encoder.items()}
-
- with g_pathmgr.open(bpe_path, "rb") as fh:
- bpe_bytes = io.BytesIO(fh.read())
- merges = gzip.open(bpe_bytes).read().decode("utf-8").split("\n")
- merges = merges[1 : 49152 - 256 - 2 + 1]
- merges = [tuple(merge.split()) for merge in merges]
- vocab = list(bytes_to_unicode().values())
- vocab = vocab + [v + "" for v in vocab]
- for merge in merges:
- vocab.append("".join(merge))
- vocab.extend(["<|startoftext|>", "<|endoftext|>"])
- self.encoder = dict(zip(vocab, range(len(vocab))))
- self.decoder = {v: k for k, v in self.encoder.items()}
- self.bpe_ranks = dict(zip(merges, range(len(merges))))
- self.cache = {
- "<|startoftext|>": "<|startoftext|>",
- "<|endoftext|>": "<|endoftext|>",
- }
- self.pat = re.compile(
- r"""<\|startoftext\|>|<\|endoftext\|>|'s|'t|'re|'ve|'m|'ll|'d|[\p{L}]+|[\p{N}]|[^\s\p{L}\p{N}]+""",
- re.IGNORECASE,
- )
- self.context_length = context_length
-
- def bpe(self, token):
- if token in self.cache:
- return self.cache[token]
- word = tuple(token[:-1]) + (token[-1] + "",)
- pairs = get_pairs(word)
-
- if not pairs:
- return token + ""
-
- while True:
- bigram = min(pairs, key=lambda pair: self.bpe_ranks.get(pair, float("inf")))
- if bigram not in self.bpe_ranks:
- break
- first, second = bigram
- new_word = []
- i = 0
- while i < len(word):
- try:
- j = word.index(first, i)
- new_word.extend(word[i:j])
- i = j
- except:
- new_word.extend(word[i:])
- break
-
- if word[i] == first and i < len(word) - 1 and word[i + 1] == second:
- new_word.append(first + second)
- i += 2
- else:
- new_word.append(word[i])
- i += 1
- new_word = tuple(new_word)
- word = new_word
- if len(word) == 1:
- break
- else:
- pairs = get_pairs(word)
- word = " ".join(word)
- self.cache[token] = word
- return word
-
- def encode(self, text):
- bpe_tokens = []
- text = whitespace_clean(basic_clean(text)).lower()
- for token in re.findall(self.pat, text):
- token = "".join(self.byte_encoder[b] for b in token.encode("utf-8"))
- bpe_tokens.extend(
- self.encoder[bpe_token] for bpe_token in self.bpe(token).split(" ")
- )
- return bpe_tokens
-
- def decode(self, tokens):
- text = "".join([self.decoder[token] for token in tokens])
- text = (
- bytearray([self.byte_decoder[c] for c in text])
- .decode("utf-8", errors="replace")
- .replace("", " ")
- )
- return text
-
- def __call__(self, texts, context_length=None):
- if not context_length:
- context_length = self.context_length
-
- if isinstance(texts, str):
- texts = [texts]
-
- sot_token = self.encoder["<|startoftext|>"]
- eot_token = self.encoder["<|endoftext|>"]
- all_tokens = [[sot_token] + self.encode(text) + [eot_token] for text in texts]
- result = torch.zeros(len(all_tokens), context_length, dtype=torch.long)
-
- for i, tokens in enumerate(all_tokens):
- tokens = tokens[:context_length]
- result[i, : len(tokens)] = torch.tensor(tokens)
-
- if len(result) == 1:
- return result[0]
- return result
-
-
-class IMUPreprocessor(VerboseNNModule):
- def __init__(
- self,
- kernel_size: int,
- imu_stem: PatchEmbedGeneric,
- embed_dim: int,
- img_size: List = (6, 2000),
- num_cls_tokens: int = 1,
- pos_embed_fn: Callable = None,
- init_param_style: str = "openclip",
- ) -> None:
- super().__init__()
- stem = imu_stem
- self.imu_stem = imu_stem
- self.embed_dim = embed_dim
- self.use_pos_embed = pos_embed_fn is not None
- self.num_cls_tokens = num_cls_tokens
- self.kernel_size = kernel_size
- self.pos_embed = nn.Parameter(
- torch.empty(1, (img_size[1] // kernel_size) + num_cls_tokens, embed_dim)
- )
-
- if self.num_cls_tokens > 0:
- self.cls_token = nn.Parameter(
- torch.zeros(1, self.num_cls_tokens, self.embed_dim)
- )
-
- self.init_parameters(init_param_style)
-
- @torch.no_grad()
- def init_parameters(self, init_param_style):
- nn.init.normal_(self.pos_embed, std=0.01)
-
- if init_param_style == "openclip":
- # OpenCLIP style initialization
- scale = self.embed_dim**-0.5
-
- if self.num_cls_tokens > 0:
- nn.init.normal_(self.cls_token)
- self.cls_token *= scale
- elif init_param_style == "vit":
- self.cls_token.data.fill_(0)
- else:
- raise ValueError(f"Unknown init {init_param_style}")
-
- def tokenize_input_and_cls_pos(self, input, stem):
- # tokens is of shape B x L x D
- tokens = stem.norm_layer(stem.proj(input))
- assert tokens.ndim == 3
- assert tokens.shape[2] == self.embed_dim
- B = tokens.shape[0]
- if self.num_cls_tokens > 0:
- class_tokens = self.cls_token.expand(
- B, -1, -1
- ) # stole class_tokens impl from Phil Wang, thanks
- tokens = torch.cat((class_tokens, tokens), dim=1)
- if self.use_pos_embed:
- tokens = tokens + self.pos_embed
- return tokens
-
- def forward(self, imu):
- # Patchify
- imu = imu.unfold(
- -1,
- self.kernel_size,
- self.kernel_size,
- ).permute(0, 2, 1, 3)
- imu = imu.reshape(imu.size(0), imu.size(1), -1)
-
- imu_tokens = self.tokenize_input_and_cls_pos(
- imu,
- self.imu_stem,
- )
-
- return_dict = {
- "trunk": {
- "tokens": imu_tokens,
- },
- "head": {},
- }
- return return_dict
diff --git a/spaces/GT4SD/paccmann_gp/model_cards/description.md b/spaces/GT4SD/paccmann_gp/model_cards/description.md
deleted file mode 100644
index b1e73da3c077cc3eadd3782250812fc05f81cd8c..0000000000000000000000000000000000000000
--- a/spaces/GT4SD/paccmann_gp/model_cards/description.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-[PaccMannGP](https://github.com/PaccMann/paccmann_gp) is a language-based Variational Autoencoder that is coupled with a GaussianProcess for controlled sampling. For details of the methodology, please see [Born et al., (2022), *Journal of Chemical Information & Modeling*](https://pubs.acs.org/doi/10.1021/acs.jcim.1c00889).
-
-For **examples** and **documentation** of the model parameters, please see below.
-Moreover, we provide a **model card** ([Mitchell et al. (2019)](https://dl.acm.org/doi/abs/10.1145/3287560.3287596?casa_token=XD4eHiE2cRUAAAAA:NL11gMa1hGPOUKTAbtXnbVQBDBbjxwcjGECF_i-WC_3g1aBgU1Hbz_f2b4kI_m1in-w__1ztGeHnwHs)) at the bottom of this page.
diff --git a/spaces/GaenKoki/voicevox/voicevox_engine/metas/Metas.py b/spaces/GaenKoki/voicevox/voicevox_engine/metas/Metas.py
deleted file mode 100644
index 58c42f06765c3554a138471d83fc90800e6a8540..0000000000000000000000000000000000000000
--- a/spaces/GaenKoki/voicevox/voicevox_engine/metas/Metas.py
+++ /dev/null
@@ -1,83 +0,0 @@
-from enum import Enum
-from typing import List, Optional
-
-from pydantic import BaseModel, Field
-
-
-class SpeakerStyle(BaseModel):
- """
- スピーカーのスタイル情報
- """
-
- name: str = Field(title="スタイル名")
- id: int = Field(title="スタイルID")
-
-
-class SpeakerSupportPermittedSynthesisMorphing(str, Enum):
- ALL = "ALL" # 全て許可
- SELF_ONLY = "SELF_ONLY" # 同じ話者内でのみ許可
- NOTHING = "NOTHING" # 全て禁止
-
- @classmethod
- def _missing_(cls, value: object) -> "SpeakerSupportPermittedSynthesisMorphing":
- return SpeakerSupportPermittedSynthesisMorphing.ALL
-
-
-class SpeakerSupportedFeatures(BaseModel):
- """
- 話者の対応機能の情報
- """
-
- permitted_synthesis_morphing: SpeakerSupportPermittedSynthesisMorphing = Field(
- title="モーフィング機能への対応", default=SpeakerSupportPermittedSynthesisMorphing(None)
- )
-
-
-class CoreSpeaker(BaseModel):
- """
- コアに含まれるスピーカー情報
- """
-
- name: str = Field(title="名前")
- speaker_uuid: str = Field(title="スピーカーのUUID")
- styles: List[SpeakerStyle] = Field(title="スピーカースタイルの一覧")
- version: str = Field("スピーカーのバージョン")
-
-
-class EngineSpeaker(BaseModel):
- """
- エンジンに含まれるスピーカー情報
- """
-
- supported_features: SpeakerSupportedFeatures = Field(
- title="スピーカーの対応機能", default_factory=SpeakerSupportedFeatures
- )
-
-
-class Speaker(CoreSpeaker, EngineSpeaker):
- """
- スピーカー情報
- """
-
- pass
-
-
-class StyleInfo(BaseModel):
- """
- スタイルの追加情報
- """
-
- id: int = Field(title="スタイルID")
- icon: str = Field(title="当該スタイルのアイコンをbase64エンコードしたもの")
- portrait: Optional[str] = Field(title="当該スタイルのportrait.pngをbase64エンコードしたもの")
- voice_samples: List[str] = Field(title="voice_sampleのwavファイルをbase64エンコードしたもの")
-
-
-class SpeakerInfo(BaseModel):
- """
- 話者の追加情報
- """
-
- policy: str = Field(title="policy.md")
- portrait: str = Field(title="portrait.pngをbase64エンコードしたもの")
- style_infos: List[StyleInfo] = Field(title="スタイルの追加情報")
diff --git a/spaces/Gen-Sim/Gen-Sim/scripts/traintest_scripts/train_test_multi_task_finetune_goal.sh b/spaces/Gen-Sim/Gen-Sim/scripts/traintest_scripts/train_test_multi_task_finetune_goal.sh
deleted file mode 100644
index 82c556954a88623308d6c27f9e1cd3acce4dfe6f..0000000000000000000000000000000000000000
--- a/spaces/Gen-Sim/Gen-Sim/scripts/traintest_scripts/train_test_multi_task_finetune_goal.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-DATA_DIR=$1
-TRAINTASK=${2-'[rainbow-stack,bowl-ball-placement]'}
-TESTTASK=${3-'[rainbow-stack,bowl-ball-placement]'}
-TASKNAME=${4-'mix-two'}
-STEPS=${5-'10000'}
-DISP=False
-
-echo "Training multi-task dataset... Folder: $DATA_DIR Task $TRAINTASK"
-
-# You can parallelize these depending on how much resources you have
-
-#############################
-## Language-Conditioned Tasks
-# [align-rope,assembling-kits-seq-seen-colors,assembling-kits-seq-unseen-colors,packing-shapes,stack-block-pyramid-seq-unseen-colors,
-# separating-piles-seen-colors,separating-piles-unseen-colors,towers-of-hanoi-seq-seen-colors,towers-of-hanoi-seq-unseen-colors]
-
-# example: sh scripts/traintest_scripts/train_test_multi_task_indistribution.sh data "[align-rope,sweeping-piles,align-box-corner,block-insertion,manipulating-rope,place-red-in-green]" 6taskindomain
-# sh scripts/traintest_scripts/train_test_multi_task_goal.sh data "[align-rope,sweeping-piles,align-box-corner,block-insertion,manipulating-rope,place-red-in-green]" "[towers-of-hanoi]" 6taskgen
-# sh scripts/traintest_scripts/train_test_multi_task_goal.sh data "[align-rope,sweeping-piles,align-box-corner]" "[towers-of-hanoi]" 3taskgen
-# sh scripts/traintest_scripts/train_test_multi_task_goal.sh data "[align-rope]" "[towers-of-hanoi]" 1taskgen
-# sh scripts/traintest_scripts/train_test_multi_task_goal.sh data "[align-rope,sweeping-piles,align-box-corner,block-insertion,manipulating-rope,place-red-in-green]" "[towers-of-hanoi]" 10taskgen
-
-trap "kill 0" SIGINT
-
-python cliport/train.py train.task=$TRAINTASK \
- train.agent=cliport \
- train.model_task=$TASKNAME \
- train.attn_stream_fusion_type=add \
- train.trans_stream_fusion_type=conv \
- train.lang_fusion_type=mult \
- train.n_demos=200 \
- train.n_steps=$STEPS \
- dataset.cache=True \
- train.exp_folder=exps/exp-$TASKNAME \
- dataset.type=multi \
- train.load_from_last_ckpt=False
-
-
-# finetuning. todo: check if model loading is done properly.
-# check if smaller lr is necessary.
-python cliport/train.py train.task=$TESTTASK \
- train.agent=cliport \
- train.model_task=$TASKNAME \
- train.attn_stream_fusion_type=add \
- train.trans_stream_fusion_type=conv \
- train.lang_fusion_type=mult \
- train.n_demos=10 \
- train.lr=1e-5 \
- dataset.cache=True \
- train.exp_folder=exps/exp-$TASKNAME \
- dataset.type=multi
-
-
-
-# Convert Python list to Bash array
-bash_array=$(python3 -c "import sys; print(' '.join((sys.argv[1])[1:-1].split(',')))" "$TESTTASK")
-
-# Convert the space-separated string to a bash array
-echo "Testing multi-task dataset... Folder: $DATA_DIR Task $TESTTASK"
-
-
-for task in $bash_array
- do
- echo "Testing $task"
- # TEST
- bash scripts/generate_gpt_datasets.sh data $task
-
- python cliport/eval.py model_task=$TASKNAME \
- eval_task=$task \
- agent=cliport \
- mode=test \
- n_demos=100 \
- train_demos=200 \
- checkpoint_type=test_best \
- type=single \
- exp_folder=exps/exp-$TASKNAME \
- update_results=True &
- done
-wait
-
-python notebooks/print_results.py -r=exps/exp-$TASKNAME
-
-echo "Finished Training."
\ No newline at end of file
diff --git a/spaces/Gradio-Blocks/EDSR/README.md b/spaces/Gradio-Blocks/EDSR/README.md
deleted file mode 100644
index 227547321a05da19cc51856f78ffea6e11bc7413..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/EDSR/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: EDSR Keras
-emoji: 🚀
-colorFrom: pink
-colorTo: yellow
-sdk: gradio
-sdk_version: 3.18.0
-python_version: 3.10.9
-app_file: app.py
-pinned: false
-license: mit
----
-
-This space is the demo for the EDSR (Enhanced Deep Residual Networks for Single Image Super-Resolution) model. This model surpassed the performace of the current available SOTA models.
-
-Paper Link - https://arxiv.org/pdf/1707.02921
-
-Keras Example link - https://keras.io/examples/vision/edsr/
-
-
-TODO:
-
-Hack to make this work for any image size. Currently the model takes input of image size 150 x 150.
-We pad the input image with transparant pixels so that it is a square image, which is a multiple of 150 x 150
-Then we chop the image into multiple 150 x 150 sub images
-Upscale it and stich it together.
-
-The output image might look a bit off, because each sub-image dosent have data about other sub-images.
-This approach assumes that the subimage has enough data about its surroundings
diff --git a/spaces/Gradio-Blocks/magnificento/README.md b/spaces/Gradio-Blocks/magnificento/README.md
deleted file mode 100644
index 8fcd510a2a9ee716473c964d125543af041ae193..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/magnificento/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: Magnificento
-emoji: 🗣
-colorFrom: blue
-colorTo: yellow
-sdk: gradio
-sdk_version: 3.0.2
-app_file: app.py
-pinned: false
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces#reference
diff --git a/spaces/Gradio-Blocks/uniformer_image_detection/configs/ssd/ssd512_coco.py b/spaces/Gradio-Blocks/uniformer_image_detection/configs/ssd/ssd512_coco.py
deleted file mode 100644
index 44d2920f4289c351c27e0d70dc03de0deb064a54..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/uniformer_image_detection/configs/ssd/ssd512_coco.py
+++ /dev/null
@@ -1,71 +0,0 @@
-_base_ = 'ssd300_coco.py'
-input_size = 512
-model = dict(
- backbone=dict(input_size=input_size),
- bbox_head=dict(
- in_channels=(512, 1024, 512, 256, 256, 256, 256),
- anchor_generator=dict(
- type='SSDAnchorGenerator',
- scale_major=False,
- input_size=input_size,
- basesize_ratio_range=(0.1, 0.9),
- strides=[8, 16, 32, 64, 128, 256, 512],
- ratios=[[2], [2, 3], [2, 3], [2, 3], [2, 3], [2], [2]])))
-# dataset settings
-dataset_type = 'CocoDataset'
-data_root = 'data/coco/'
-img_norm_cfg = dict(mean=[123.675, 116.28, 103.53], std=[1, 1, 1], to_rgb=True)
-train_pipeline = [
- dict(type='LoadImageFromFile', to_float32=True),
- dict(type='LoadAnnotations', with_bbox=True),
- dict(
- type='PhotoMetricDistortion',
- brightness_delta=32,
- contrast_range=(0.5, 1.5),
- saturation_range=(0.5, 1.5),
- hue_delta=18),
- dict(
- type='Expand',
- mean=img_norm_cfg['mean'],
- to_rgb=img_norm_cfg['to_rgb'],
- ratio_range=(1, 4)),
- dict(
- type='MinIoURandomCrop',
- min_ious=(0.1, 0.3, 0.5, 0.7, 0.9),
- min_crop_size=0.3),
- dict(type='Resize', img_scale=(512, 512), keep_ratio=False),
- dict(type='Normalize', **img_norm_cfg),
- dict(type='RandomFlip', flip_ratio=0.5),
- dict(type='DefaultFormatBundle'),
- dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
-]
-test_pipeline = [
- dict(type='LoadImageFromFile'),
- dict(
- type='MultiScaleFlipAug',
- img_scale=(512, 512),
- flip=False,
- transforms=[
- dict(type='Resize', keep_ratio=False),
- dict(type='Normalize', **img_norm_cfg),
- dict(type='ImageToTensor', keys=['img']),
- dict(type='Collect', keys=['img']),
- ])
-]
-data = dict(
- samples_per_gpu=8,
- workers_per_gpu=3,
- train=dict(
- _delete_=True,
- type='RepeatDataset',
- times=5,
- dataset=dict(
- type=dataset_type,
- ann_file=data_root + 'annotations/instances_train2017.json',
- img_prefix=data_root + 'train2017/',
- pipeline=train_pipeline)),
- val=dict(pipeline=test_pipeline),
- test=dict(pipeline=test_pipeline))
-# optimizer
-optimizer = dict(type='SGD', lr=2e-3, momentum=0.9, weight_decay=5e-4)
-optimizer_config = dict(_delete_=True)
diff --git a/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/assigners/atss_assigner.py b/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/assigners/atss_assigner.py
deleted file mode 100644
index d4fe9d0e3c8704bd780d493eff20a5505dbe9580..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/assigners/atss_assigner.py
+++ /dev/null
@@ -1,178 +0,0 @@
-import torch
-
-from ..builder import BBOX_ASSIGNERS
-from ..iou_calculators import build_iou_calculator
-from .assign_result import AssignResult
-from .base_assigner import BaseAssigner
-
-
-@BBOX_ASSIGNERS.register_module()
-class ATSSAssigner(BaseAssigner):
- """Assign a corresponding gt bbox or background to each bbox.
-
- Each proposals will be assigned with `0` or a positive integer
- indicating the ground truth index.
-
- - 0: negative sample, no assigned gt
- - positive integer: positive sample, index (1-based) of assigned gt
-
- Args:
- topk (float): number of bbox selected in each level
- """
-
- def __init__(self,
- topk,
- iou_calculator=dict(type='BboxOverlaps2D'),
- ignore_iof_thr=-1):
- self.topk = topk
- self.iou_calculator = build_iou_calculator(iou_calculator)
- self.ignore_iof_thr = ignore_iof_thr
-
- # https://github.com/sfzhang15/ATSS/blob/master/atss_core/modeling/rpn/atss/loss.py
-
- def assign(self,
- bboxes,
- num_level_bboxes,
- gt_bboxes,
- gt_bboxes_ignore=None,
- gt_labels=None):
- """Assign gt to bboxes.
-
- The assignment is done in following steps
-
- 1. compute iou between all bbox (bbox of all pyramid levels) and gt
- 2. compute center distance between all bbox and gt
- 3. on each pyramid level, for each gt, select k bbox whose center
- are closest to the gt center, so we total select k*l bbox as
- candidates for each gt
- 4. get corresponding iou for the these candidates, and compute the
- mean and std, set mean + std as the iou threshold
- 5. select these candidates whose iou are greater than or equal to
- the threshold as positive
- 6. limit the positive sample's center in gt
-
-
- Args:
- bboxes (Tensor): Bounding boxes to be assigned, shape(n, 4).
- num_level_bboxes (List): num of bboxes in each level
- gt_bboxes (Tensor): Groundtruth boxes, shape (k, 4).
- gt_bboxes_ignore (Tensor, optional): Ground truth bboxes that are
- labelled as `ignored`, e.g., crowd boxes in COCO.
- gt_labels (Tensor, optional): Label of gt_bboxes, shape (k, ).
-
- Returns:
- :obj:`AssignResult`: The assign result.
- """
- INF = 100000000
- bboxes = bboxes[:, :4]
- num_gt, num_bboxes = gt_bboxes.size(0), bboxes.size(0)
-
- # compute iou between all bbox and gt
- overlaps = self.iou_calculator(bboxes, gt_bboxes)
-
- # assign 0 by default
- assigned_gt_inds = overlaps.new_full((num_bboxes, ),
- 0,
- dtype=torch.long)
-
- if num_gt == 0 or num_bboxes == 0:
- # No ground truth or boxes, return empty assignment
- max_overlaps = overlaps.new_zeros((num_bboxes, ))
- if num_gt == 0:
- # No truth, assign everything to background
- assigned_gt_inds[:] = 0
- if gt_labels is None:
- assigned_labels = None
- else:
- assigned_labels = overlaps.new_full((num_bboxes, ),
- -1,
- dtype=torch.long)
- return AssignResult(
- num_gt, assigned_gt_inds, max_overlaps, labels=assigned_labels)
-
- # compute center distance between all bbox and gt
- gt_cx = (gt_bboxes[:, 0] + gt_bboxes[:, 2]) / 2.0
- gt_cy = (gt_bboxes[:, 1] + gt_bboxes[:, 3]) / 2.0
- gt_points = torch.stack((gt_cx, gt_cy), dim=1)
-
- bboxes_cx = (bboxes[:, 0] + bboxes[:, 2]) / 2.0
- bboxes_cy = (bboxes[:, 1] + bboxes[:, 3]) / 2.0
- bboxes_points = torch.stack((bboxes_cx, bboxes_cy), dim=1)
-
- distances = (bboxes_points[:, None, :] -
- gt_points[None, :, :]).pow(2).sum(-1).sqrt()
-
- if (self.ignore_iof_thr > 0 and gt_bboxes_ignore is not None
- and gt_bboxes_ignore.numel() > 0 and bboxes.numel() > 0):
- ignore_overlaps = self.iou_calculator(
- bboxes, gt_bboxes_ignore, mode='iof')
- ignore_max_overlaps, _ = ignore_overlaps.max(dim=1)
- ignore_idxs = ignore_max_overlaps > self.ignore_iof_thr
- distances[ignore_idxs, :] = INF
- assigned_gt_inds[ignore_idxs] = -1
-
- # Selecting candidates based on the center distance
- candidate_idxs = []
- start_idx = 0
- for level, bboxes_per_level in enumerate(num_level_bboxes):
- # on each pyramid level, for each gt,
- # select k bbox whose center are closest to the gt center
- end_idx = start_idx + bboxes_per_level
- distances_per_level = distances[start_idx:end_idx, :]
- selectable_k = min(self.topk, bboxes_per_level)
- _, topk_idxs_per_level = distances_per_level.topk(
- selectable_k, dim=0, largest=False)
- candidate_idxs.append(topk_idxs_per_level + start_idx)
- start_idx = end_idx
- candidate_idxs = torch.cat(candidate_idxs, dim=0)
-
- # get corresponding iou for the these candidates, and compute the
- # mean and std, set mean + std as the iou threshold
- candidate_overlaps = overlaps[candidate_idxs, torch.arange(num_gt)]
- overlaps_mean_per_gt = candidate_overlaps.mean(0)
- overlaps_std_per_gt = candidate_overlaps.std(0)
- overlaps_thr_per_gt = overlaps_mean_per_gt + overlaps_std_per_gt
-
- is_pos = candidate_overlaps >= overlaps_thr_per_gt[None, :]
-
- # limit the positive sample's center in gt
- for gt_idx in range(num_gt):
- candidate_idxs[:, gt_idx] += gt_idx * num_bboxes
- ep_bboxes_cx = bboxes_cx.view(1, -1).expand(
- num_gt, num_bboxes).contiguous().view(-1)
- ep_bboxes_cy = bboxes_cy.view(1, -1).expand(
- num_gt, num_bboxes).contiguous().view(-1)
- candidate_idxs = candidate_idxs.view(-1)
-
- # calculate the left, top, right, bottom distance between positive
- # bbox center and gt side
- l_ = ep_bboxes_cx[candidate_idxs].view(-1, num_gt) - gt_bboxes[:, 0]
- t_ = ep_bboxes_cy[candidate_idxs].view(-1, num_gt) - gt_bboxes[:, 1]
- r_ = gt_bboxes[:, 2] - ep_bboxes_cx[candidate_idxs].view(-1, num_gt)
- b_ = gt_bboxes[:, 3] - ep_bboxes_cy[candidate_idxs].view(-1, num_gt)
- is_in_gts = torch.stack([l_, t_, r_, b_], dim=1).min(dim=1)[0] > 0.01
- is_pos = is_pos & is_in_gts
-
- # if an anchor box is assigned to multiple gts,
- # the one with the highest IoU will be selected.
- overlaps_inf = torch.full_like(overlaps,
- -INF).t().contiguous().view(-1)
- index = candidate_idxs.view(-1)[is_pos.view(-1)]
- overlaps_inf[index] = overlaps.t().contiguous().view(-1)[index]
- overlaps_inf = overlaps_inf.view(num_gt, -1).t()
-
- max_overlaps, argmax_overlaps = overlaps_inf.max(dim=1)
- assigned_gt_inds[
- max_overlaps != -INF] = argmax_overlaps[max_overlaps != -INF] + 1
-
- if gt_labels is not None:
- assigned_labels = assigned_gt_inds.new_full((num_bboxes, ), -1)
- pos_inds = torch.nonzero(
- assigned_gt_inds > 0, as_tuple=False).squeeze()
- if pos_inds.numel() > 0:
- assigned_labels[pos_inds] = gt_labels[
- assigned_gt_inds[pos_inds] - 1]
- else:
- assigned_labels = None
- return AssignResult(
- num_gt, assigned_gt_inds, max_overlaps, labels=assigned_labels)
diff --git a/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/fcn/fcn_d6_r50-d16_512x1024_80k_cityscapes.py b/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/fcn/fcn_d6_r50-d16_512x1024_80k_cityscapes.py
deleted file mode 100644
index e4b623aca9ce1138baa259cbdd02920a47765f8d..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/fcn/fcn_d6_r50-d16_512x1024_80k_cityscapes.py
+++ /dev/null
@@ -1,8 +0,0 @@
-_base_ = [
- '../_base_/models/fcn_r50-d8.py', '../_base_/datasets/cityscapes.py',
- '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py'
-]
-model = dict(
- backbone=dict(dilations=(1, 1, 1, 2), strides=(1, 2, 2, 1)),
- decode_head=dict(dilation=6),
- auxiliary_head=dict(dilation=6))
diff --git a/spaces/Gradio-Blocks/uniformer_image_segmentation/mmseg/models/necks/__init__.py b/spaces/Gradio-Blocks/uniformer_image_segmentation/mmseg/models/necks/__init__.py
deleted file mode 100644
index 9b9d3d5b3fe80247642d962edd6fb787537d01d6..0000000000000000000000000000000000000000
--- a/spaces/Gradio-Blocks/uniformer_image_segmentation/mmseg/models/necks/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from .fpn import FPN
-from .multilevel_neck import MultiLevelNeck
-
-__all__ = ['FPN', 'MultiLevelNeck']
diff --git a/spaces/GrandaddyShmax/AudioCraft_Plus/scripts/templates/index.html b/spaces/GrandaddyShmax/AudioCraft_Plus/scripts/templates/index.html
deleted file mode 100644
index 7bd3afe9d933271bb922c1a0a534dd6b86fe67bc..0000000000000000000000000000000000000000
--- a/spaces/GrandaddyShmax/AudioCraft_Plus/scripts/templates/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-{% extends "base.html" %}
-{% block content %}
-
-
- Welcome {{session['user']}} to the internal MOS assistant for AudioCraft.
- You can create custom surveys between your models, that you can
- evaluate yourself, or with the help of your teammates, by simply
- sharing a link!
-