-
Notifications
You must be signed in to change notification settings - Fork 25
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
Simplify for newbies #3
Comments
For example? These methods are one-to-one mappings of ComfyUI nodes. If one wants some all-in-one methods, many custom node packs are available. |
For example all that noise, vae encoding/decoding and sampling bs can be just one node (or just one method), same for controlnets (load controlnet,apply controlnet) |
This can be simply done by defining functions: def sample(model_name: CheckpointLoader.ckpt_name, pos: str, neg: str, seed: int = 0, steps: int = 20) -> Image:
model, clip, vae = CheckpointLoaderSimple(model_name)
latent = EmptyLatentImage(512, 512, 1)
latent = KSampler(model, seed, steps, 8, 'euler', 'normal', CLIPTextEncode(pos, clip), CLIPTextEncode(neg, clip), latent, 1)
return VAEDecode(latent, vae)
with Workflow():
pos = 'beautiful scenery nature glass bottle landscape, , purple galaxy bottle,'
neg = 'text, watermark'
image = sample(model_name=CheckpointLoader.ckpt_name.v1_5_pruned_emaonly, pos=pos, neg=neg, seed=123)
SaveImage(image, f'test') But I'm hesitant to introduce things like this, because they can be very personal. If a person doesn't know how to code the workflow, he can just copy someone else's workflow and use it; if he does know, he may not need these as much because they're not flexible enough. If you are interested in this, you can create a repository and put your utility functions there. I'll add a link to it in the readme, or just make it installed by default. |
I might fork it if only it has a separate unified comfy core, not a bunch of scripts |
Please abstract/merge some of the methods for newbies.
The text was updated successfully, but these errors were encountered: