PostImage2X
Auto-post your ComfyUI renders to X (and the API hassle that comes with it)
- images
PostImage2X is the "post your result to X (formerly Twitter)" node from the RequestsPoster pack. Wire an image in, type a caption, queue, and it tweets. That's the dream anyway. The reality is that half of this node's difficulty is the node, and the other half is X's developer portal, which is a genuinely miserable place to set up an account.
Fair warning up front: this is the fiddliest node in the pack, and it's the one whose setup can go stale because X keeps changing its API terms. If you just want notifications, use PostText or PostImage2Discord instead. If you genuinely want your renders to auto-post to X, read on.
How it works
It's a tweepy wrapper. The node builds a tweepy.OAuthHandler from your four keys, uploads your image with the v1 api.media_upload() endpoint, then posts the tweet with the v2 Client.create_tweet(), passing media_ids and your message text. The image is saved to ComfyUI's output folder first (using filename_prefix), then uploaded from disk.
Two important consequences come out of that:
- You must install tweepy yourself. It's in the pack's
requirements.txt, but the README is explicit that ComfyUI Manager's install won't necessarily drop it into your environment - you have topip install tweepyinto the exact Python environment ComfyUI runs on. - X's API is a moving target. The author wrote this in 2024 against a free-tier X API that had reasonable posting limits. Those terms have churned since. If your tweet silently fails one day, check X's current API policy before you blame ComfyUI.
The inputs that matter
images- required IMAGE input, same as the Discord node.text_message- the tweet text. Multiline, so threads or long captions are fine.text_consumer_key,text_consumer_secret,text_access_token,text_access_token_secret- your four X API keys, pasted in. The README walks you through generating all of them in the developer portal (Project & Apps → Keys and tokens). There is no way around doing that onboarding; the author even includes the 250-character "what are you using this API for" essay you'll need to submit.fsfo- "for super followers only." Toggles X'sfor_super_followers_onlyparam. In practice: leave it off. It's a niche feature most people will never touch.execute- master switch.
No outputs. Terminal node.
Installing it
Same pack as everything else - Manager search "requests" → ComfyUI-RequestPoster, or:
cd ComfyUI/custom_nodes
git clone https://github.com/aburahamu/ComfyUI-RequestsPoster.git
Then the part the README hammers on - tweepy, into ComfyUI's actual Python environment:
# activate ComfyUI's venv first, then:
pip install tweepy
If ComfyUI runs from a venv and you install into system Python instead, the node will throw an import error on startup. That mismatch is the number one way this breaks.
Common issues
ModuleNotFoundError: tweepy - you installed tweepy into the wrong Python. Find the venv ComfyUI actually uses and install there. (Also: the old v1-only tweepy 3.x can't do the v2 tweet - this node needs tweepy 4+, so pip install "tweepy>=4" if pip grabs something ancient.)
Tweet never appears, no error - X API free-tier rate limits and policy changes. This is where the README's warnings pay off: the X developer onboarding is a filter that weeds out casual users on purpose.
"Read only" permissions error - you generated your keys with App permissions set to Read only. You need Read and write, and if you regenerate keys you must paste the new ones into the node - old keys die instantly on regeneration.
Your keys leaked. They sit in the workflow JSON, which gets baked into every saved PNG. A key with write access in a shared workflow is a one-way ticket to your account posting spam. Rotate immediately if you've shared one.
Set it up right and it's a lovely little automation: renders drop themselves onto X while you sleep. But budget an afternoon for the developer portal, and keep PostText as your fallback for the days X decides to change the rules.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | PostImage2X | — |
| text_message | STRING | Image generation is complete. | — |
| text_consumer_key | STRING | — | |
| text_consumer_secret | STRING | — | |
| text_access_token | STRING | — | |
| text_access_token_secret | STRING | — | |
| fsfo | BOOLEAN | false | — |
| execute | BOOLEAN | true | — |
Outputs (0)
No outputs