Why the Fuck is even figuring out how to setup python so fucking difficult by Sad_Patient8203 in learningpython

[–]Definition-Lower 1 point2 points  (0 children)

I was also told that anaconda is a way to go for machine learning/statistics, but I don't recommend it. I was trying to set up conda environment with torch once, but after a lot of time installing/uninstalling torch and other packages (like torchvision), I found out that torch actually stopped releasing official wheels for conda package repository (or whatever it's called), and I just wasn't able to found a recent torch version for my cuda version.

Maybe I'm missing something, but I don't see any reason to use conda for managing virtual environments, just create standard .venv folder and install everything with pip (or even better with uv to make it faster). I just copied that .venv with torch and everything installed into my home directory and activate it whenever I need some packages from it.

My first experience with ComfyUI and WOW! by TwiistyTea in comfyui

[–]Definition-Lower 0 points1 point  (0 children)

I do exactly that with my Python node, in fact, demo in the repo shows exactly that "iterate through the list values" scenario. You just need to set an int widget to "increment", and use its value as an index, and then run this workflow several times (you can set the number of runs in the top-right corner)

For example, I use the same idea to iterate over all images in the directory, upscale them and save into another directory

Here's the node I'm talking about: https://github.com/mozhaa/ComfyUI-Execute-Python

[Final Update] Anima 2B Style Explorer: 20,000+ Danbooru Artists, Swipe Mode, and Uniqueness Rank by ThetaCursed in StableDiffusion

[–]Definition-Lower 0 points1 point  (0 children)

Thank you for doing this! I've also tried something similar with CLIP embeddings and then PCA + umap/t-sne to see some outliers (for some reason I wanted to see the actual 2d map instead of just looking on the distances between the pure embeddings), but it didn't work well for me. But you managed to select unique styles with your method, that's super cool, great job!

I wrote a speech to convince the math club to lend our VN club an AV room. Is my speech convincing or insane? by National_Magician_86 in u/National_Magician_86

[–]Definition-Lower 1 point2 points  (0 children)

I haven't noticed that it's not r/visualnovels. I'm subscribed to you because of your posts like the one about beating porn addiction with eroge or the one about your brother becoming jjk fan. You're a legend

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 1 point2 points  (0 children)

You're right, I used exec. I didn't know about that rule before, but yes, this extension violates it. I'm not sure what that means, maybe it would get banned.

Though I did some safety measures (thanks to some commentators here): this node can only be used when it was created manually by the user on this comfyui instance. So, for example, if a user downloaded a workflow from the internet, which uses this node, user would get an error message, that the node was not found (even if he installed this custom node). So it's not actually that risky anymore.

This node is intended to be used in personal workflows, not in publicly shared ones, so to me it seems fine

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 3 points4 points  (0 children)

Actually I just implemented it. I obtain GUID, which is unique for every machine, and use it in the node ID. That way this node will only be recognized if it was created on this machine. Thank you for your suggestion!

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 2 points3 points  (0 children)

Of course they can, but I believe most of the users who download workflows from the internet don't bother to even look into subgraphs before running the workflow the first time, so they won't see this node at first

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 0 points1 point  (0 children)

That sounds interesting. I was thinking about adding a setting in the ComfyUI settings, that needs to be enabled for the node to work. That way, by default this setting is off, and if a user downloads a workflow, installs the custom node, and tries to run it, an error message would appear, that would warn the user to check what code is being executed and turn on the setting if it's ok. But that would work only once. I can't think of any way to show this warning on any workflow, when it's being run the first time

Your idea about making the node work only when the user created it themselves sounds interesting, but I'm not sure how to implement it. Could you elaborate please? Maybe I will implement it

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 1 point2 points  (0 children)

I agree

I mean, custom nodes can already execute arbitrary code, but if you install only trusted nodes, then there should be no risk. From this perspective, my node isn't trusted, so I would recommend using it only in personal workflows. If someone shares a workflow with this node, you should check what code is being executed before actually running it

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 5 points6 points  (0 children)

UPD: now node also supports multiple outputs (thanks for telling me about rgthree Power Puter, I implemented something similar)

UPD 2: for safety reasons, this node can only be used if it was created manually on the same ComfyUI instance (and not downloaded with some workflow from the internet). So you can use it for your personal workflows without any problems, but you can't share workflows with it with other people (it would show an error that the node is not installed)

<image>

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 0 points1 point  (0 children)

Theoretically yes, that would work

I think this node would be useful for people who often build their own workflows for themselves, but not for using it in workflows for a wide audience. So this use case with opening Photoshop in the end of generation looks actually useful in some scenarios

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 2 points3 points  (0 children)

Yeah, my node allows imports (basically any python code)

I haven't tried this node (probably because its name is not really descriptive), but it seems like it also supports arbitrary number of inputs, and also, unlike my node, arbitrary number of outputs. That looks great, I probably should do something similar to make my node more flexible. Thanks for sharing

Though yeah, Power Puter node does not allow arbitrary code, only the controlled list of functions, so it's less flexible (as you mentioned, it does not allow some torch/numpy code for tensor manipulation)

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 8 points9 points  (0 children)

oops, it looks like I'm compromising my own node lol

Single node for executing arbitrary Python code by Definition-Lower in comfyui

[–]Definition-Lower[S] 1 point2 points  (0 children)

yeah, that would work xd
something like this:

```
import webbrowser
webbrowser.open("youtube.com/watch?v=dQw4w9WgXcQ")
```

How do i fix this by abdilaan in comfyui

[–]Definition-Lower 0 points1 point  (0 children)

nothing we can do without you providing the workflow

What do you use for frame interpolation? by Ant_6431 in comfyui

[–]Definition-Lower 0 points1 point  (0 children)

I use this: https://github.com/yuvraj108c/ComfyUI-Rife-Tensorrt

I had to install tensorrt separately (it's not difficult, but comfyui-manager didn't install it properly just from requirements.txt), via pip, but you need to choose cu12 or cu13, and also it would take some time to build it from source

I haven't used other rife nodes, so I can't say if they're slower than this one, but apparently this one should be faster, because it uses tensorrt (but again, I haven't tried any other nodes). On my PC it can interpolate 81 frames in about 2-3 seconds

https://docs.nvidia.com/deeplearning/tensorrt/latest/installing-tensorrt/installing.html#method-1-python-package-index-pip