Package: nicheimage
NicheImage - Image Generating SubnetIntroductionWelcome to the Image Generating Subnet project. This README provides an overview of the project's structure and example usage for both validators and miners.The Incentivized InternetDiscordNetworkResearchProject Structureniche_image_subnet: Contains base, feature functions, and utilities for validators and miners.neurons: Contains the validator and miner loop.services: Includes servers forprompt_generation,rewarding, andminer_endpoint.InstallationInstall as a package using pip.pipinstallnicheimageExample UsageBefore running the following commands, make sure to replace the placeholder arguments with appropriate values.Start MinerBefore running the following commands, make sure to replace the placeholder arguments with appropriate values.First you need to start an image generation API on a gpu server that your miners can use. A RTX 3090 GPU is enough for several miners.python-mnicheimage.services.miner_endpoint.app--port<port>--model_name<model_name>You can also run with pm2. For example like this for SDXLTurbo:pm2startpython--name"image_generation_endpoint_SDXLTurbo"---mnicheimage.services.miner_endpoint.app--port10006--model_nameSDXLTurboOr, you can start the RealisticVision model like this:pm2startpython--name"image_generation_endpoint_RealisticVision"---mnicheimage.services.miner_endpoint.app--port10006--model_nameRealisticVisionThen you can run several miners using the image generation API:pm2startpython--name"miner"\--\-mnicheimage.neurons.miner.miner\--netuid<netuid>\--wallet.name<wallet_name>--wallet.hotkey<wallet_hotkey>\--subtensor.network<network>\--generate_endpoint<your_miner_endpoint>/generate\--info_endpoint<your_miner_endpoint>/info\--axon.port<your_public_port>\You can also start with pm2, here is an example:pm2startpython--name"miner"---mnicheimage.neurons.miner.miner--netuid23--wallet.name<wallet_name>--wallet.hotkey<wallet_hotkey>--subtensor.networkfinney--generate_endpointhttp://127.0.0.1:10006/generate--info_endpointhttp://127.0.0.1:10006/info--axon.port10010View logspm2logsminerStart ValidatorRequirements: A validator only needs a cpu server to validate by using our free to use APIs for checking image generation. This is the default setting and requires no configuration.However, it is possible to run your own image checking APIs if you prefer. This does require a GPU with min 20 GB of ram. You can see how to do thishere.If validators opt in to share their request capacity they will get paid for each image they generate. Opt in is done by specifying --proxy.port
If passed, a proxy server will start that allows us to query through their validator, and the validator will get paid weekly for the images they provide.Start Validator with Default Settingspm2startpython--name"validator_nicheimage"\---mnicheimage.neurons.validator.validator\--netuid<netuid>\--wallet.name<wallet_name>--wallet.hotkey<wallet_hotkey>\--subtensor.network<network>\--axon.port<your_public_port>\--proxy.port<other_public_port># Optional, pass only if you want allow queries through your validator and get paidView logspm2logsvalidator_nicheimageSchedule update and restart validatorPull the latest code from github and restart the validator every hour.Notice, the validator must be named validator_nicheimage for the auto-updates to restart the process, so do not change the name from validator_nicheimage.pm2startpython-mnicheimage.auto_update--name"auto-update"RoadmapWe will release updates on Tuesdays, in order to make it predictable for when changes to the network will be introduced. Furhter we will do our best to share updates in advance.Here is the current roadmap for the subnet:9th of January:Launch of stable version of repo, simple demo frontend released.16th of January:Release paid API for buying images from the network, profit directly distributed to validators. Additional model introduced to the network.23rd of January:Launch improved frontend.February:Add categories where miners can compete with any model of their choice, and incentive is calculated based on how well their images compares to other miners. We will add categories such as "realistic photographs". This will allow the network to always have the best available models in each category, and incentivize people to create even better image generation models.