Connect RenPy with Stable Diffusion(Сonfetti)

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Andredron
Miko-Class Veteran
Posts: 719
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Connect RenPy with Stable Diffusion(Сonfetti)

#1 Post by Andredron »

Connect RenPy with Stable Diffusion via ComfyUI

https://github.com/unLomTrois/Confetti


It is a Python script to connect your RenPy visual novels to Stable Diffusion via ComfyUI workflows

What is a "workflow"? It is a file with step-by-step instructions for Stable Diffusion on what image you want to generate

The idea is simple:

You prepare workflows for ComfyUI, put them in the game/workflows directory
Then in your renpy script files you call the generate function with the name of this workflow in a background thread
Confetti sends this workflow to the ComfyUI server (local or global)
ComfyUI generates image and sends it back
Confetti stores this image in the game/images folder
You show this image to a player
You need websocket-client
This script uses websocket-client package to communicate with ComfyUI server. So you need to pack this package in your game:

pip install --target game/python-packages websocket-client

Post Reply

Who is online

Users browsing this forum: No registered users