Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to write .json files _all_external and _external flags #219

Open
3 tasks done
magicbot42 opened this issue Nov 23, 2023 · 1 comment
Open
3 tasks done

unable to write .json files _all_external and _external flags #219

magicbot42 opened this issue Nov 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@magicbot42
Copy link

Due diligence

  • I checked for similar issues and couldn't find any.
  • My WebUI and Unprompted are both up-to-date.
  • I disabled my other extensions but the problem persists.

Describe the bug

I would like to write out external variables, and read them back in as a solution to an issue where with the same seed and prompt in img2txt and in img2img I am having issues with img2img not using the same variable for the same side as was used in txt2img. I think this other issue may be related to a previous post about unprompted becoming non-deterministic at some point. I wanted to work around it with the new _external and _all_external optiosn you added recently, but I can't get them to work. I get the traceback below:

I tried both:
[set animal _external="F:\SD\stable-diffusion-webui\extensions_unprompted\templates\x\data.json"]cat[/set]

and:
[set animal]cat[/set]
[sets _all_external="F:\SD\stable-diffusion-webui\extensions_unprompted\templates\x\data.json"]

For both of these, I'm getting this same traceback:
image

Prompt

I tried both:
[set animal _external="F:\SD\stable-diffusion-webui\extensions_unprompted\templates\x\data.json"]cat[/set]

and:
[set animal]cat[/set]
[sets _all_external="F:\SD\stable-diffusion-webui\extensions_unprompted\templates\x\data.json"]

Log output

No response

Unprompted version

latest as of today: 10.4.2

WebUI version

Dev branch: v1.6.0-372-g8aa51f68  

Other comments

Thanks again for this amazing tool.

@magicbot42 magicbot42 added the bug Something isn't working label Nov 23, 2023
@ThereforeGames
Copy link
Owner

ThereforeGames commented Nov 26, 2023

Hi @magicbot42,

I can confirm that you're using the correct syntax - both of your examples write to the data.json file on my machine.

I'm wondering if it's tripping on the initial loading of an empty JSON file. Could you try making the file manually and adding {"anything": "here"}, save it, then running your example prompt again? Let me know if that changes anything, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants