papuSpartan / stable-diffusion-webui-distributed

Chains stable-diffusion-webui instances together to facilitate faster image generation.
181 stars 14 forks source link

about distributed-config.json #19

Closed terracottahaniwa closed 11 months ago

terracottahaniwa commented 1 year ago

This is a summary from DISCORD.

Configuration of remote workers is now done using distributed-config.json in the root of this extension directory instead of from command-line arguments.

if just empty json, throw ERROR config is corrupt or invalid JSON, unable to load

JSON example is as like as follow

{
   "workers": [
      {
         "master": {
            "avg_ipm": 18.7014339699366,
            "master": true,
            "address": "localhost",
            "port": 7860,
            "eta_percent_error": [],
            "tls": false,
            "state": 1
         }
      },
      {
         "laptop": {
            "avg_ipm": 19.332550555969075,
            "master": false,
            "address": "192.168.1.83",
            "port": 7861,
            "eta_percent_error": [
               -6.019789958534711,
               -0.9360936846472658,
               7.7202976971435096,
               2.5322154055319075,
               -53.415720437075485
            ],
            "tls": true,
            "state": 1
         }
      }
   ],
   "benchmark_payload": {
      "prompt": "A herd of cows grazing at the bottom of a sunny valley",
      "negative_prompt": "",
      "steps": 20,
      "width": 512,
      "height": 512,
      "batch_size": 1
   },
   "job_timeout": 6
}
papuSpartan commented 11 months ago

If possible, use the UI to configure and add workers instead of editing the configuration file manually. Eventually I should have an actual json schema posted for it so it's less of an issue. I'll keep this pinned for now.