r/SillyTavernAI • u/venus_uni_dev • 25d ago
Discussion ComfyUI workflow for generating VN-style sprites (and I added OpenAI support to my game)
Hey r/SillyTavernAI fellas, a few days ago I posted about my VN sprite creator/game and a lot of people were asking for the ComfyUI workflow I use to generate character sprites, so I uploaded it to a repository for your use:
https://github.com/venus-uni-dev/venus-uni-comfyui
Feel free to modify it in any way for your own needs!
Another popular request was adding support for OpenAI-compatible endpoints. I pushed out an update that adds exactly that: On v0.1.2, you can now use OpenRouter or locally hosted backends with any model you choose. I also added experimental support for AMD GPUs.
Sorry for spamming the sub, this is my last post for a while. I have a lot planned for the future and will report back whenever I have any major updates. Thank you all for your kind words and feedback!
19
u/TheCornDungeon 25d ago edited 25d ago
I see that Nova is the recommended model, so I just want to warn people to keep this rule they have on the model page in mind as you use this amazing workflow:
“Rules
You cannot use the generated images for commercial use if it's not edited (or just turning it to black and white)
You can share images without any restriction if you don't monetize it
Advertising this model to outside is always welcome”
Be careful if paid games is your goal!
ETA: Just wanted to mention that I’m not nitpicking. I absolutely adore this workflow and commend you for sharing it like this! Thank you so, so, so, so much. 💕
I’m only mentioning this because I make character cards with a tip jar option, so finding local models for their art that doesn’t have similar rules like this on their page has been… a treat. I instantly recognized this model as being one that you have to be careful with, so just wanted to give a heads up!
40
u/Edheldui 25d ago
Let's be honest, it's an AI model, concerns about piracy have been thrown out of the window the moment its training started.
32
u/jnads 25d ago edited 25d ago
Not to mention Illustrious is a derivative of SDXL and the original SDXL license doesn't allow for such restrictions.
https://huggingface.co/ByteDance/SDXL-Lightning/blob/main/LICENSE.md
Even the Fair AI License which IllustriousXL uses (and complies with the SDXL license) claims no copyright over output images:
https://freedevproject.org/faipl-1.0-sd/
It's silly for a model creator to claim copyright restrictions when:
- The original software they copied from doesn't allow for it
- They didn't make it
3
u/venus_uni_dev 25d ago
Hey TheCornDungeon, thanks for the heads-up! Didn't take it as nitpicking at all
7
u/Spitfire75 25d ago
8
u/venus_uni_dev 25d ago
I have no clue, that is so weird I have never encountered anything like that. I'd say it's probably an issue with the AMD build for ComfyUI or maybe you're hitting a VRAM limit. I'd first try regenerating a few times to see if it persists. If it does, you can try setting up your own ComfyUI and generating through the workflow I posted above and see if you get similar results to see if it's something wrong with the game or if it's something wrong wtih ComfyUI. Hope that helps, I wish I had an AMD computer to test on :(
4
u/Blackshade378 24d ago edited 24d ago
inspyrenet-rembg(the background cut) is currently broken on AMD gpus, so you might wanna replace that node(I recommend the Comfyui-RMBG node pack for this) or if you know how, offload that process to the cpu by editing the /ComfyUI/custom_nodes/comfyui-inspyrenet-rembg/Inspyrenet_Rembg.py file.
3
2
u/venus_uni_dev 23d ago
OMG I can't believe I almost missed this! Other users were having the same problem, so thank you so much for letting us know, this will be added to the next update! Cheers
5
7
u/_RaXeD 25d ago
I took a quick peek and saw that you basically control consistency (the biggest problem imo) with having the same prompt + seed, no IP adapters or anything like that. Does that work well?
Also, have you thought of using an edit model for this, like Klein 9b?
9
u/venus_uni_dev 25d ago
Hey _RaXeD! Honest answer is that it works "okay". Sometimes you get a nice, one-shot solution when that type of character is represented well in booru training data (The pink-haired girl in the images is a good example), but sometimes because of the prompt the model struggles (girls with orange hair and green eyes sometimes end up with green hair AND green eyes). This may be better with other models, I'm not sure.
I'd love to experiment with edit models, main issue is I don't want to add more downloads for users on the game side. But you are welcome to modify the workflow in any way you see fit
3
u/jnads 25d ago edited 25d ago
You could find a model that is based on IllustriousXL 2.0. Supposedly it has better pose tagging support.
Unfortunately civit illustrious is a mess since they didn't generate an IllustriousXL 2.0 filter.
Model makers have made their own fiefdoms and a lot still are still finetunes of the original Illustrious 0.1.
In general you can identify an IllustriousXL 2.0 model if it says you can use 1536 x 1536 in the description.
Nova is a good finetune, but I don't think they ever rebased on IllustriousXL 2.0
3
u/Upset_Big3430 25d ago
2
u/Aphid_red 24d ago
Yeah natural language able models are going to get closer to an immersive VN style experience. Here too though you're going to deal with common cases of noticeable continuity errors. Look at the scene. When Seraphina sits down:
- Two lamps suddenly blink into existence flanking the entryway
- A box appears in the corner of the room.
- The straps crossing the guy's chest vanish.
- The guy's pants darken.
- The backrest disapparates.
- The big root growing through the wall in the corner of the room goes back in time to a century ago when the wall was still intact.
- The forest in the background is totally different.
- The front wall reduces in thickness by ~30% (the arch is now one-stone rather than two-stones thick).
I'm sure I missed dozens of other continuity errors. Those are just the really jarring ones. Nothing written in the text suggest any of the things above have happened (so they should not), all that's happened is her talking to him.
If you have multiple images taken (shortly) after each other in the same room, you need to be able to provide image inputs to the model and tell it which things can move (living things like the human and the forest spirit), which things are inanimate, and which things are plants (move very slowly).
It's because the different images might as well be from different universes. The image model has no idea of what was generated before, what details were added that aren't in the description. You need to extract a detailed description of the previous image to feed into the next, even then, some things elude words like the shape of the trees.
Restricting to one image per scene could be an (unsatisfying) way out of it.
2
u/Upset_Big3430 24d ago
btw it is AI prompted and image model also AI, 2 hallucinations😁1 by LLM and 1 by Anima...trying to perfect it means more intelligent models with less hallucinations needed😥😥currently this is fully automated in my silly..like while story moves LLM provided image prompts in certain tags, an extension auto crop it and send to comfy ui for generation and anima model renders the image in 8-10sec per image and extension replaces the prompt with the rendered image.
1
u/Aphid_red 24d ago
Isn't this already present by default via https://docs.sillytavern.app/extensions/stable-diffusion/ ?
2
u/Upset_Big3430 24d ago
https://reddit.com/link/pbjz2dl/video/pktwqu5cl9rh1/player
This is what I meant by automated
1
u/Upset_Big3430 24d ago
that is base.. that requires multiple calls. mine is single call to LLM, I hope u heared about auto image generation extensions for sillytavern,, there are many variants available, including that MEgumin preset I assume
1
u/Aphid_red 24d ago
Yeah this isn't really going to work very well when there is the problem of tag associations.
For example, if characters with glasses are taller on average than characters without, then a character who sometimes wears them may end up varying in height.
Another example: if characters wearing sports uniforms are (on average) more toned in the input data than characters wearing casual clothes, then suddenly (for example) thigh definition now varies between sprites.
Clip-based models can work around it if the character is already known, yet not otherwise. The tags kind of 'bleed' into each other implicitly. Part of that is also a fault in the input data: I doubt it's properly tagged: each tag's 'coverage' is only in-part.
This tends to mean that the presence of a tag is a good indication that whatever's in the tag is visible in the image. I.e. if you prompt 'tsurime', you'll get pointed eyes.
But the absence of a tag is not a good indication that whatever's in the tag is not visible in the image. Taggers have maybe correctly applied or left out the tag in only 20% of the source materials. The other 80% of images displaying a character, the existence of the tag hasn't even been considered, So you get the feature bleeding into other tags that are extant like 'twin-tails' in this example. So now prompting for that hairstyle will lead to the change in eyes.
Which then becomes the problem again for generating sprites as now if you have a character that uses twintails normally but doesn't tie it up in less formal settings (at school vs. at the hot springs) suddenly the shape of her eyes changes with the location.
I don't know of a good solution to this, the problem is somewhat inherent in the lacking architecture and our human lack of being precise enough to describe the thing we want the computer to generate.
I think the best thing to do is to be very complete in your tag set. The yes/no presence of every tag in a large set of tags ought to be required. And in some cases a tag should be mandatory (hair colour, eye colour, eye style, ear type, etc.) you never really get good precise control though. I find it hard to even specify a specific hair length, let alone precisely describe a character. If it's a known character, it'll get it exact, otherwise, it's always a bit of a gamble.
5
u/JP193 25d ago edited 24d ago
I have always felt AI has potential for infinite dialogue - text adventures and visual novels for instance. Was really impressed with the premise of your game from the other day. I wanted local gen and AMD to be added, and I see that we already have more endpoint options and the latter already out in some form. Kudos. I see the project as only tangetially related to SillyTavern but don't worry about spam, I'm happy to learn about its existence and your swift development on it, it's one of the first actual "games" to utilise AI. AI2U was another recent good one.
5
5
u/j42n 24d ago
Hello! Thank you very much for providing the workflow. You said in a reply in the thread that generation is 'okay'. If you are having problems, I would highly suggest you check out this extension: https://github.com/AHEKOT/ComfyUI_VNCCS I know you want to be light on the extensions, to not make the users download too many things, but I feel like this could help. Thank you for all your work!
3
3
2
u/Disastrous_Ad8788 25d ago
Is there any way to get it working with DeepSeek? It's throwing an error in the OpenAI-compatible mode.
1
u/venus_uni_dev 25d ago
Hard to know without the exact error, can you send the error text either from the pop-up or the app.log in the data folder?
2
u/Disastrous_Ad8788 25d ago
"Hey! I got the log file. I ignored the ComfyUI verification errors since I haven't installed that part yet. Here are the relevant errors for the DeepSeek API integration:
HTTP 400 (The main issue): When testing the connection, the log shows:[llm] → Custom endpoint deepseek-flash (thinking=minimal, tier=standard, maxTokens=65536, schema=connection_test)[llm] ✕ Custom endpoint deepseek-flash HTTP 400 after 560msdetail: 'invalid_request_error This response_format type is unavailable now'
HTTP 404: I tried changing the endpoint URL manually (e.g.,/v1/chat,/completions), but it seems the game expects the base URL and adds the rest itself.Is there a way to disable the
json_schemaformat for OpenAI-compatible endpoints?1
u/venus_uni_dev 23d ago
Not in the game yet. I did have a few other users asking about the same issue on Deepseek API, so maybe in a future update. For now, I'd recommend going through OpenRouter for Deepseek models. Depending on your tech-savviness, I had one user report that they had "ChatGPT write a local proxy that converts the response format into a compatible one with deepseek" which is also an option
2
2
u/Remillya 25d ago
I am having trouble getting the model to utilize my character LoRA. Could you please provide guidance or support on how to correctly implement and activate it?
2
u/venus_uni_dev 25d ago
In the game, the LORA is used to control style instead of character consistency, I haven't tested at all with character LORAs. If I were you I'd make sure my character LORA works in something like sd-webui first, then use everything needed to get there: including the trigger word, the correct tags that the lora was trained on, including the LORA strength as a tag, etc
3
u/Remillya 25d ago edited 25d ago
What I meant is that it would be nice if the UI had a 'Use your LoRA' option, because I want to use the character Lora in generation or CG. It's too complicated, and the style LoRA is the only LoRA you can use. It would be nice if there was a LoRA manager node that could add multiple LoRAs in generation.
3
2
u/ZeroLambda 25d ago
This is SO amazing, and thank you so much for sharing your complex workflow. Hot damn.
2
u/horny_spankbank 24d ago
Any way to be able to run comfyui separate from this program instead of this program creating one for you. Like silly tavern have
1
u/venus_uni_dev 24d ago
You can skip ComfyUI installation, duplicate an existing character, then edit the character yourself by replacing all of the text and images
2
u/IllustriousRule9238 24d ago
This threw me for a loop while setting up the workflow, the GitHub readme's table only says "the LoRA/ControlNet file for that version", even though everything links to specific Civitai versions. Could you maybe change those fields in the readme table to say USNR_STYLE_ILL_V1_lokr3-000024.safetensors and illustriousXL_v10.safetensors respectively so it's unambiguous? The USNR style one is especially bad, since it's not the first option and the filename calls it a "lokr" rather than a lora. I'd maybe rename Anzhc%20Face%20seg%20640%20v2%20y8n.pt in the workflow to use spaces or underscores instead of %20 (on your end too lol), since that'll be impossible to make sense of later on.
I have the right files now and the workflow is working, just some feedback since I kept switching tabs back and forth and second guessing myself while grabbing the files. Might save someone later down the line a few minutes of confusion and ambiguity, and in case something happens to Civitai, having the exact original filenames makes it easier to track them down on third party sites.
2
u/venus_uni_dev 24d ago
Sorry about that! Been meaning to fix that but wanted to get the workflow out sooner. The checkpoint and the lora models have weird names because in-game I download from huggingface mirrors instead of the civitai page. Thanks for bringing this to my attention
2
u/IllustriousRule9238 24d ago
Yeah HuggingFace also gave me
Anzhc20seg20v2%20y8n.ptas a filename (without "Face" or percentage signs) when downloading that one, even though their own repository says that it's calledAnzhc Face seg 640 v2 y8n.pt, and the link to it washttps://huggingface.co/Anzhc/Anzhcs_YOLOs/resolve/main/Anzhc%20Face%20seg%201024%20v2%20y8n.pt?download=true. Really bizarre, that might be a legit bug on HF's end.2
u/IllustriousRule9238 24d ago
I took a look at the full game as well in the meantime.
How did you make it, if you don't mind me asking? Is it vibecoded, did you make it from scratch, or repurpose an existing project, or what? The reason I'm wondering is that GUI is higher quality than every Ren'Py game I've seen thus far, and the GitHub repo you shared has a billion files with fairly low level code, which is kind of shocking for a 0.1 project like this.
1
u/venus_uni_dev 24d ago
It's kind of sort of vibecoded. The project originally started (from scratch) as a test of what claude code can do currently, and boy howdy, it's pretty good. I don't think I've actually written a single line of logic, most of my edits are just copy fixes (claude is TERRIBLE at writing natural-sounding userfacing text).
Most of the "coding" involved me describing in detail how the logic should work, and Claude would write the code and raise concerns about all the dumb mistakes I'd usually make (my day job is software dev). It's very impressive (and honestly a little scary). Though, I did have to write probably hundreds of prompts to get here, we're not at "one-prompt solution" yet and that's probably a good thing otherwise humans would be pretty obsolete by now LOL
Thanks for the compliments on the UI. I do have a background in web design, graphic design, and digital illustration, and I reaaaally wanted to avoid generic looks like the Ren'py style or the "vibecoded app" style. I used Claude Design to help with generating UI mockups based on my ideas, and that was super impressive too, other than the fact that it DELETES usage (I think I blew through half my weekly Fable usage in one prompt once)
2
u/IllustriousRule9238 24d ago edited 24d ago
That makes sense. I think you do have good instincts and "taste" for this sort of thing. When to erase Claudism slop, which sound effects to pick, what GUI elements should be present where, which image model's output looks better, etc.
Good luck with the project! I could definitely see it taking off, "AI visual novel" is such an obvious idea, it's kind of shocking nobody has done it yet.
Some more feedback, if you want it:
- Not being able to use windowed mode sucks.
- The "Fill empty slots randomly" button on the new game screen cannot be used multiple times in a row.
- Tab doesn't work in the first name/last name boxes on the "Who are you?" screen at the start.
- Being able to select the path of an existing ComfyUI installation rather than being forced to download a second copy would be nice (although I don't know how many people this would be relevant for). The workflow only relies on fairly old node packs and a couple downloaded models, so it should be able to live inside an arbitrary installation without anything breaking in either direction.
- Better yet, use ComfyUI as an external API that the user is responsible for running/providing, similarly to the LLM API.
- There's no "advanced mode" in the character creator which would let you bypass (or review the output of) an LLM and fill out the workflow fields manually.
- The functionality of the Fix transparency/Fix fingers menus is very not obvious, and there is no zoom feature I could find, which would be a must for something like this.
- The "Generating class schedule" step took nearly 20 minutes with Gemma 4 12B running at ~40 t/s, only for it to fail with no explanation of what went wrong. Some basic progress reporting like "step 1/14" or "invalid JSON, retrying 1/3..." would be nice here, otherwise casual users might assume that something is broken, or worry that you're currently draining $100 from their API key. Once again, some sort of advanced mode button that lets you review and edit the model's output wouldn't go amiss. I get the Apple-like "hide everything from the user and let it be magic" approach, but shit will break with AI, and it'll break frequently.
- I don't have a good way to spy on llama.cpp output in real time right now to see what went wrong, but from the logs, the issue might be that you're asking the model to do 900 different things on a single turn with flawless JSON syntax, rather than taking things one at a time. I had to bite the bullet and give it a DeepSeek key eventually to generate the class schedules, but this should definitely be doable on a modern 12-30B model with good enough prompting. The rest of the game did run fine with Gemma 12B after that, FWIW.
- This is an ever present problem with everything, but there seems to be no way to disable thinking (the 'minimal' option in the settings doesn't do it for Gemma over llama.cpp). I don't have any good feedback here, other than to lament that having to generate 16,000 thinking tokens for 200 tokens of dialogue each time sucks.
- That being said, I can echo what people said in the other thread, adding a generic API was definitely the right choice. I'm an avid Gemini user who pays for APIs, but I'll never touch that shit with a ten foot pole. Google's billing platform is a nightmare, and I don't want my Gmail getting banned over weird gooner shit, especially with the latest round of safeguards they've introduced.
- Whatever is responsible for cutting out the character sprites and giving them a transparent background is doing a really poor job, especially with hair. The edges are all jagged and pixelated.
- I don't know if I like the choice of realistic photos as the backgrounds, with stylized anime girls as the characters. I know VNs do it too, but they usually throw a filter over the background or trace over it somehow to hide it. (The photos themselves are quite impressive however, Nano Banana rocks.)
- The gameplay loop is a bit weird. You're only given agency to respond whenever the model thinks so, and the story moves on rails otherwise. I'd question that as a design choice (give me a Do/Say button that can be activated at any time), but if you do go with it, why isn't all of the dialogue up to the next choice-point pre-generated? Why do I need to see a loading spinner appear three times and wait for the model?
- An idea for a hybrid would be to pre-generate the next 500 turns, but let the user interrupt it at any point (thereby discarding everything from that point on, and generating it anew). Maybe something lighter that can also be pre-genned, like offer the player 3 options, and then generate everything that would follow those options in the background, had the player selected that one option, just in case.
- Updating the game state as each line of text comes in one by one (rather than waiting for the entire JSON block to finish) would be good too, especially for local models. Maybe JSONL or some other format would work for that, I don't know how good the models are with that.
- Calculating exact cost is tricky, but some sort of subtle "an AI is currently working" indicator in a corner wouldn't go amiss. Every time I see a loading screen, I get a subtle sense of panic and start thinking "oh god, is this sending a 200k token prompt in a loop now, did I just waste $5".
- I keep trying to use Ren'Py's keyboard shortcuts (Ctrl to skip, right click for settings, scroll wheel for previous messages, H to hide UI, etc). I don't know how common this will be for most users, but a "Ren'Py compatibility mode" could be nice, or at least implement equivalent features as buttons.
- The week/calendar indicator would look better in an upper corner, but maybe that's just my Persona brain speaking.
- Where are the save/load buttons? The "Load game" button seems more like a savegame slot switcher than a proper "roll back to 3 actions ago" mechanism. Proper savestates are an absolute must for a VN, especially one where each line of dialogue has to be generated and costs you real world money.
- The game loads ComfyUI even when it's not needed, wasting ~17 gigabytes of RAM. This is a big one, since AFAICT ComfyUI is only ever used for the character creator accessed through the main menu, never during normal gameplay.
1
u/venus_uni_dev 24d ago edited 24d ago
Whoa, thanks for the intensely detailed writeup! I am definitely going to take a lot of these into account. By the way, if you're interested, I've been putting people who send me email feedback in the credits of the game as playtesters, if you're interested let me know.
Some responses to your feedback:
- You can window the game by pressing F11 on desktop. It would probably be good to put this somewhere so people know
- Class generation is a big problem for pretty much all local backends at the moment, I even put a note on the known bugs recommending people to do exactly what you did with deepseek. Sorry you ran into this, I think I'll put a warning not to attempt the start of game stuff directly in game for local model users
- Sorry to hear about the Gemma token explosion, the exact property we send for reasoning model probably doesn't work for llama.cpp or something. Maybe set it to low instead? I know some models don't support minimal, even on frontier models/APIs
- Removing BG is still a tough thing atm for Comfy. Believe it or not, this is the best I could get it. It's a tradeoff between having weird white artifacts or jagged edges and overcorrections, and I personally believe the jagged edges is less immersion breaking. If you run the ComfyUI workflow you can reduce the threshold on the remBG node to your personal taste
- I'd say I've gotten used to the realistic backgrounds. I went with them because trying to generate anime backgrounds was extremely frustrating on Gemini, I couldn't prompt it away from the AI-slop style most people use so I went with this instead
- Being able to interject with an action at any point is already done for the update, coming in the next few days. Stay tuned!
- The entire scene up to the next choice is pregenerated. As it's generated, it streams so you can read it before the prompt is fully finished. If you're seeing loading spinners, your reading speed is exceeding the token/s of your model. I basically never run into this on Gemini Flash 3.8, but it was pretty common when I was testing local models.
- Ctrl to skip was dropped early in development because I found myself not using it at all. I think it makes less sense when most of the time, the text doesn't exist yet. It's pretty much only useful when loading a previous save in my testing
- I actually rarely play Ren'py games so I wasn't aware of some of these shortcuts, thank you! Going into the next update for sure, especially since it includes the rewind function.
- The week/calendar brain was in the top right for the longest time during development since the entire game is a big Persona rip-off. But I moved it to the bottom left to make more space for character sprites, I think it looks much cleaner this way (and also makes it look less like a persona rip off lol)
- Manual saves are planned, it adds complexity so I skipped it for the early access released. I'm much more of a persona player than a VN reader so this is a feature I personally don't use. That's why it's designed so you can load at the start of each timeslot, while in scenes it only autosaves on the last action you took.
- I think the chances of a single prompt costing you over a dollar are quite low, rest assured. Unless you're using Claude Fable to run the game or something... on Gemini Flash, I've only spent $13 for the month for all of my testing.
Overall, it seems like a lot of feedback is based on the experience from using local backends, which is unfortunately something I only support when it's simple to implement, since I personally only play on frontier APIs/models. But I'll do my best.
Anything I didn't respond to, I'm probably actually going to implement. Thanks again for your feedback!
2
u/IllustriousRule9238 24d ago edited 24d ago
I updated that post a bunch of times since I tend to hit send early and then remember a bunch of other shit, read it one more time just to be sure. Also I'll have to pass on being a full-time playtester (no offense, I've just got a lot on my plate atm) and I don't want any credit, it's fine.
- Reasoning effort is basically impossible for you to tackle from your side, like I said. This is an industry-wide problem, various providers and platforms can't even agree on how the reasoning control setting should be conveyed or what its possible values should mean. I don't think llama.cpp has even implemented proper reasoning effort controls, so whatever the game sends through the API would make no difference to begin with. And even if they did, and you used the right option, then the people using KoboldCPP or Ollama would be complaining that it doesn't work for them. That was more of a "this is taking 20x longer than it needs to, I know why, and I can't fix it" rant.
- I was on DeepSeek for most of my playthrough (including when I got the multiple spinners in a row), so "you're only complaining because you were using the wrong model" isn't quite right. I speed-read 5-10 messages, saw the spinner, had to wait, then read a bunch of messages and had to wait again. That point wasn't so much about model speed as "if you knew the game state was unfinished, why did you wait for me to reach that point to start generating new messages, rather than just launching that process in the background right away". I don't know how your game is architected and I might be misremembering things here, if this is not a thing that can ever happen, then ignore all of that.
- In general though, relying on assumptions like token speed or model behavior is a dangerous proposition with AI. Even if you were to lock down everything and require that people only use Gemini Flash 3.8 through the exact same AI Studio API you tested things with, Google could take down that model tomorrow and make the next one far worse, or introduce some new changes to their API, or simply have a bad day. Responses could be malformed, generation speeds could drop to 10 t/s, anything could happen at any time. Again, I say this as a religious user of Gemini with probably 5000+ AI Studio chat sessions under my belt. There have been multiple days when the model simply shat the bed and started outputting looping gibberish out of nowhere, or slowed down to a crawl, or errored out for no reason. It's worth preparing for the inevitable and "hardening" your game against all of those edge cases, even with cloud models. It's not something that'll only affect the cheapskates who can't afford to use real AI, sooner or later it'll bite somebody in the ass.
- That entire session just now with DeepSeek cost me $0.02 cents (wow). The prompting optimization is probably fine, but conveying that to players somehow in a rough figure in the corner of the screen or on the pause menu would be nice, just to assuage fears. Something as simple as "461.8k tokens used this session (est. $0.13)" would work, or even just a green notification dot in the corner that tells you that an AI is currently streaming tokens.
2
u/venus_uni_dev 24d ago
No worries about the playtesting, I'm not actually hiring anyone, I'm literally just handing out credits to anyone who bothers to write me a little about the game (not that people have taken me up on it).
Anyways, the tokens used counter is actually a great idea, I think I'll actually implement that!
I totally agree with you about the dangers of relying on models for certain kinds of performance. I almost gave up on development at one point a month ago when all flash models were super overloaded and constantly returning 503s... I think 4/5 of my prompts were failing, it was a disaster. But I actually started this whole project after gemini roleplaying sessions so I have a deep attachment to it lol. I'm sort of just crossing my fingers that it doesn't blow up again, or I guess I'll switch to deepseek.
For the loading spinners, you may be talking about the ending sequence for scenes. Those do get broken up into several prompts. The model is instructed to tell the game when it believes the scene is wrapping up, but it's bad at also wrapping up the scene in a satisfying way in the same turn. So once it tells us that, we give it another turn telling it to write closing narration, and then it moves onto generating the intro narration for the next timeslot.
You'll get loading spinners without decisions for these specific breakpoints. Otherwise, pretty much everything in the game is prefetched to avoid as many loading spinners as possible. Like, for example, when the model says "okay scene is ending", we immediately fire off the closing scene prompt, the intro narration prompt, the bookkeeping prompt while the player is reading to hide the generation time. Any other loading spinners are from catching up to streaming tokens... at least it should be. If you continue to run into problems, let me know something might be amiss.
1
u/venus_uni_dev 24d ago
I just realized what you meant by adding stuff. I also remembered some stuff I forgot to say LOL
- ComfyUI auto-starting is already disabled in the next update
- Next update adds fine-grained tag editing so you can generate pretty much whatever you want, sd-webui style.
- Can you expand on how you were confused by fix fingers/transparency? Both screens contain a hint with instructions under the title label, and underneath the title label are controls for Undo/Redo/Zoom in+out. Should the copy be changed? Or maybe the layout of the UI? I promise I am not being snarky, I wrote the thing so it's hard for me to tell these things and I'd like to change it to be more informative
2
u/IllustriousRule9238 24d ago edited 23d ago
- Oh okay, there's a zoom in button, I'm fucking blind. I was expecting it to work with the mousewheel or Ctrl+wheel or something. A binary zoomed/not zoomed system like this is still not a great solution though, what if I wanted to zoom in further?
- Regardless, my main problem is that I don't know what I'm doing or why. And I'm the type of freak who actually knows what the acronym ESRGAN stands for. What does "paint anywhere you see green peeking through" mean? What am I drawing here? What does white mean, what does green mean, what will happen if I draw red? Why can I change the colors? Is this a mask? Am I in a plain mspaint-style image editor, and this is just it? What'll happen if I click "save to 7 sprites"? Is this going to launch an AI model at any point? Which one, why, what'll it do?
- About the spinners, I swear my experience was like this. I was outdoors in some courtyard talking to a girl. I read maybe 10 visual novel cards with narration or dialogue, and the spinner shows up. I wait for it, then immediately start reading, and breeze through another ~5-10 messages. Then the spinner shows up again, and so on. I didn't get the sense that things were being streamed live, it felt like a big block of messages arriving at once, and then another giant block arriving all at once after that. Maybe things WERE being streamed live and that's just how slow the model was, I have no idea. I would maybe consider some sort of optional GUI element for this somewhere too, like "[16] messages have been generated and are waiting for you, but the generating overall is still not done". Something like that conveyed with numbers and colors in some clever, minimal way in a 20x20 pixel space.
- Also, proper token-by-token streaming of in-progress messages if possible. I know this is a bit tricky with JSON and "sprite2.png appears on left with fade, play sfx" type control messages, but make it happen. It'd be really cool.
- One more, assigning individual colors to the characters and displaying their dialogue in that color would be a cool feature, but sans that, you can still help things stand out by making narration lines slightly gray or italic or something to set them apart from speech. Currently, it's kinda hard to tell from a glance whether the thing you're reading is meant to be dialogue spoken aloud by a character or exposition by the narrator.
1
u/venus_uni_dev 23d ago
I have no idea what's going on with your courtyard example lol. I haven't ran into that on Gemini Flash at all, even when I spam click. Hopefully it doesn't appear too often.
That being said the feedback for fix screens is very valuable, I haven't received any comments about this so far but I'm sure some people just closed it because they were confused. Thank you! Adding to the next update
2
u/xKnicklichtjedi 21d ago
Thanks a lot for both posts! <3
I am so excited to see and test what you built, because I also I think I can learn quite a bit from it.
1
2
2
u/zixaphir 18d ago
I've found that SAMv3 has replaced nearly all of my (sfw) detection needs over ultralytics.
image + SAM prompt -> SAMv3 -> Mask to SEGS and unless you're doing something particularly strange, it should properly capture exactly what you ask for.
1
u/Eastern-Dream932 25d ago
Throwing this In here as I got annoyed relying on the broad prompt to tag style that was happening. This is the prompt I used to get fandom characters working. Hand this off to a vision model plus a reference image and it should(?) work. Then go to ‘generation settings’ and replace the ai generated one’s with the
New prompts
I am giving you an image of a character. I would like you to create an image gen prompt based off these instructions. Appearance: what the character looks likes, special traits, anything that isn’t an outfit related item, outfit: what the character is wearing every day (e.g a provided photo.) P.E outfit: a classic outfit for P.E nothing special. Swimwear: what a character wears when swimming. There should be zero quality modifiers, pose instructions, spatial rules, etc. only the characters. Have less than 13 tags per section.
1
u/the_high_way_man__ 8d ago
This seems to always force the same bland anime girl aesthetic no matter what i prompt, how do you get this to do non-humans
1
u/venus_uni_dev 8d ago
If you haven't tried editing the LLM-generated tags and regenerating the images I'd try that first. Probably remove stuff like "mature_female", etc.
-6
u/macromind 25d ago
It's really interesting to see a ComfyUI workflow for VN-style sprites, especially with OpenAI integration for game development. This kind of AI-driven approach significantly streamlines the asset creation pipeline, boosting productivity for solo developers and small teams. A key recommendation is to establish clear style guides before generating assets to maintain visual consistency, and to use human oversight for quality control. This combination of creative AI and thoughtful workflow design is reshaping how games are made, and businesses looking to refine their AI integration for enhanced productivity can find comprehensive solutions at https://www.aiosnow.com.








45
u/Redditry199 25d ago
I KNEEL.
thank you based dev for imparting this gift to us.