Comments (4)
I stuck this code in the nodes.py file:
class ConstFloat:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"n": ("FLOAT", {"multiline": True, "dynamic_prompt": True, "default": 1.0, "min": -512.0, "max": 512.0})}}
RETURN_TYPES = ("FLOAT",)
FUNCTION = "set_float"
CATEGORY = "Constants"
def set_float(self, n):
return (n,)
class ConstInt:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"n": ("INT", {"multiline": True, "dynamic_prompt": True, "default": 1, "min": -512, "max": 512})}}
RETURN_TYPES = ("INT",)
FUNCTION = "set_int"
CATEGORY = "Constants"
def set_int(self, n):
return (n,)
class ConstString:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"n": ("STRING", {"multiline": True, "dynamic_prompt": True, "default": ""})}}
RETURN_TYPES = ("STRING",)
FUNCTION = "set_string"
CATEGORY = "Constants"
def set_string(self, n):
return (n,)
I stuck it in just above this "NODE_CLASS_MAPPINGS = { "KSampler": KSampler,...".
Then at the bottom of the NODE_CLASS_MAPPINGS list, I extended it with these:
"ConstFloat": ConstFloat,
"ConstInt": ConstInt,
"ConstString": ConstString,
They seem to work fine so far. Likely my hacked together code could be improved, but this should get you started.
from comfyui.
Piggybacking on this idea, it would be great if these nodes had inputs and outputs for parameters like seed
. That way, one sampler could generate a random seed and pass that on to additional samplers.
from comfyui.
Piggybacking on this idea, it would be great if these nodes had inputs and outputs for parameters like
seed
. That way, one sampler could generate a random seed and pass that on to additional samplers.
Yeah this is a important feature for like HR fix workflows to retain the overall theme without it going too rogue on HR pass.
from comfyui.
Fixed with: #243
from comfyui.
Related Issues (20)
- input folder deduplication HOT 2
- Improve user experience: find nodes more conveniently
- Layer Diffuse not working with controlnet HOT 4
- Feather mask has no effect,In the mask menu HOT 2
- error with py-cpuinfo HOT 8
- Beware - Exploit CustomNode for Crypto Mining Bot Farm HOT 8
- Updated now lost my text box. HOT 3
- How can i remove an uploaded image? HOT 5
- close image file after loading? HOT 2
- error and crash <asyncio.locks.Lock object at 0x00000247270ADED0 [unlocked, waiters:1]> is bound to a different event loop
- Warning message (Your inference package version 0.9.13, SupervisionWarnings) HOT 2
- Some kind of type mismatch occurring, possibly related to DoRA HOT 3
- Can we get support for the new model called HunyuanDiT
- CUDA / Pytorch issue
- --dont-upcast-attention missing HOT 2
- Add file format option to Save Image
- Updated ComfyUi and I cannot edit text. HOT 3
- after update: all text nodes don't work anymore
- Closed due to others with same issue opened, was Text boxes in nodes not showing. HOT 1
- Dora not working correctly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comfyui.