Dynamic assignment of output folder based on username #13687
Replies: 2 comments
-
Looking around in the code, I have found that the outdir variables seem to be settable using the override_settings schema, as described in this post. I have personally used the override_settings object in the API but never as part of an extension or script, so I don't know how this would work. I am looking for a way to hook to the preprocess so that I can set the output folder for the job that is received from a user sending a request to the server + port that is listening, so I would need to be able to access the user that is logged in and ideally also the Output folder settings in the webui so I can perform a substitution on the path before the job starts. The idea is that 3 different users on 3 different ports of the same machine would be able to write to different folders, and users sending requests sequentially would all have their files routed properly. Anyone have any ideas? Apologies, I'm new to tinkering with the core code of A1111, so my questions may be a bit unclear. Thanks! |
Beta Was this translation helpful? Give feedback.
-
So I have successfully accomplished in a proof-of-concept what I want by doing some hardcoding in the processing.py file in A1111. It would be great to be able to do this as an AlwaysOn extension -- I've never written one of those. Any suggestions on how I might do the same as what you see here? def process_images(p: StableDiffusionProcessing) -> Processed:
|
Beta Was this translation helpful? Give feedback.
-
Hi there.
I'm working on a cloud server deployment of a1111 in listen mode (also with API access), and I'd like to be able to dynamically assign the output folder of any given job by using the user making the request -- so for instance, Jane and I both hit the same server, but my files will be saved in ..\stable-diffusion\Marc\txt2img, and Jane's go to ..\stable-diffusion\Jane\txt2img, etc
I expect to do some coding on a custom solution, such as an extension or script, and I'm assuming I won't have to fork the repo for this, but would love any thoughts anyone might have before I jump in and get started.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions