https://github.com/Comfy-Org/ComfyUI/issues/new/choose
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 1/100
Research direction
The report contains a Google Colab video-generation script, but does not describe a change to ComfyUI or identify any project files or tests. Start by clarifying the intended behavior and how it relates to ComfyUI; there is no actionable completion criterion in the issue as written.
Written by the indexing model from the issue text.
Description
Custom Node Testing
- I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Expected Behavior
Free auto video maker: AI images (Pollinations) + AI voice (edge-tts) + zoom + captions
Run in Google Colab. First cell:
!pip -q install edge-tts "moviepy==1.0.3" pillow requests nest_asyncio
import asyncio, io, os, time, requests, numpy as np
import nest_asyncio
from urllib.parse import quote
from PIL import Image, ImageDraw, ImageFont
import edge_tts
from moviepy.editor import VideoClip, AudioFileClip, concatenate_videoclips
nest_asyncio.apply() # lets asyncio.run work inside Colab
W, H = 1280, 720
STYLE = "anime style, 90s cel-shaded, vibrant colors, cinematic, no text, no watermark, no logo"
VOICE = "en-US-GuyNeural"
OUTPUT = "ninja_boy_video.mp4"
(narration, image prompt). Edit these to change the video.
SCENES = [
("A boy with no family. A village that avoids him.",
"lonely spiky-haired blond ninja boy in orange outfit on a swing at sunset, village behind him"),
("And a monster sealed inside him.",
"glowing red chakra energy swirling behind a boy's silhouette, dramatic dark sky"),
("He is determined to become the greatest ninja in the village.",
"young ninja classroom, blond kid grinning proudly while others look away"),
("Along the way he finds rivals, mentors, and friends who become his family.",
"two rival ninja boys clashing mid-air above a waterfall, speed lines"),
("Then the stakes explode: huge wars, painful losses, and betrayals that hit hard.",
"vast dawn battlefield, hundreds of ninjas charging, dust and explosions, epic wide shot"),
("He never gives up, and he never breaks a promise. Start watching today.",
"blond ninja on a rooftop at sunrise, forehead protector glinting, confident smile"),
]
os.makedirs("work", exist_ok=True)
def fallback_image():
g = np.linspace(20, 200, H).astype("uint8")[:, None, None] * np.ones((1, W, 3), "uint8")
return Image.fromarray(g.astype("uint8"))
def get_image(prompt, i):
url = (f"https://image.pollinations.ai/prompt/{quote(prompt + ', ' + STYLE)}"
f"?width={W}&height={H}&nologo=true&seed={i + 7}")
for attempt in range(4):
try:
r = requests.get(url, timeout=120)
r.raise_for_status()
return Image.open(io.BytesIO(r.content)).convert("RGB").resize((W, H))
except Exception as e:
print(f" Image attempt {attempt + 1} failed: {e}")
time.sleep(5 * (attempt + 1))
print(" Using gradient fallback")
return fallback_image()
def add_caption(img, text):
img = img.copy()
d = ImageDraw.Draw(img, "RGBA")
try:
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 38)
except Exception:
font = ImageFont.load_default()
lines, cur = [], ""
for word in text.split():
if d.textlength((cur + " " + word).strip(), font=font) > W - 160:
lines.append(cur.strip())
cur = word
else:
cur += " " + word
lines.append(cur.strip())
h = len(lines) * 50 + 30
d.rectangle([0, H - h - 30, W, H], fill=(0, 0, 0, 150))
for k, line in enumerate(lines):
tw = d.textlength(line, font=font)
d.text(((W - tw) / 2, H - h - 10 + k * 50), line, font=font, fill="white")
return img
def zoom_clip(img, duration, zoom_in=True):
def frame(t):
p = min(t / duration, 1.0)
s = 1 + 0.12 * (p if zoom_in else 1 - p)
cw, ch = int(W / s), int(H / s)
x, y = (W - cw) // 2, (H - ch) // 2
return np.array(img.crop((x, y, x + cw, y + ch)).resize((W, H), Image.BILINEAR))
return VideoClip(frame, duration=duration)
async def make_voice(text, path):
await edge_tts.Communicate(text, VOICE, rate="+5%").save(path)
clips = []
for i, (text, prompt) in enumerate(SCENES):
print(f"Scene {i + 1}/{len(SCENES)}")
ap = f"work/v{i}.mp3"
asyncio.run(make_voice(text, ap))
audio = AudioFileClip(ap)
audio = audio.subclip(0, max(audio.duration - 0.05, 0.1)) # avoid read-past-end errors
img = add_caption(get_image(prompt, i), text)
clip = zoom_clip(img, audio.duration + 0.4, zoom_in=(i % 2 == 0)).set_audio(audio)
clips.append(clip)
time.sleep(3) # be gentle with the image API
final = concatenate_videoclips(clips, method="compose").fadein(0.5).fadeout(0.8)
final.write_videofile(OUTPUT, fps=24, codec="libx264", audio_codec="aac")
print(f"Done: {OUTPUT}")
Actual Behavior
Kind behavior to his family
Steps to Reproduce
Powerful
Debug Logs
# Free auto video maker: AI images (Pollinations) + AI voice (edge-tts) + zoom + captions
# Run in Google Colab. First cell:
# !pip -q install edge-tts "moviepy==1.0.3" pillow requests nest_asyncio
import asyncio, io, os, time, requests, numpy as np
import nest_asyncio
from urllib.parse import quote
from PIL import Image, ImageDraw, ImageFont
import edge_tts
from moviepy.editor import VideoClip, AudioFileClip, concatenate_videoclips
nest_asyncio.apply() # lets asyncio.run work inside Colab
W, H = 1280, 720
STYLE = "anime style, 90s cel-shaded, vibrant colors, cinematic, no text, no watermark, no logo"
VOICE = "en-US-GuyNeural"
OUTPUT = "ninja_boy_video.mp4"
# (narration, image prompt). Edit these to change the video.
SCENES = [
("A boy with no family. A village that avoids him.",
"lonely spiky-haired blond ninja boy in orange outfit on a swing at sunset, village behind him"),
("And a monster sealed inside him.",
"glowing red chakra energy swirling behind a boy's silhouette, dramatic dark sky"),
("He is determined to become the greatest ninja in the village.",
"young ninja classroom, blond kid grinning proudly while others look away"),
("Along the way he finds rivals, mentors, and friends who become his family.",
"two rival ninja boys clashing mid-air above a waterfall, speed lines"),
("Then the stakes explode: huge wars, painful losses, and betrayals that hit hard.",
"vast dawn battlefield, hundreds of ninjas charging, dust and explosions, epic wide shot"),
("He never gives up, and he never breaks a promise. Start watching today.",
"blond ninja on a rooftop at sunrise, forehead protector glinting, confident smile"),
]
os.makedirs("work", exist_ok=True)
def fallback_image():
g = np.linspace(20, 200, H).astype("uint8")[:, None, None] * np.ones((1, W, 3), "uint8")
return Image.fromarray(g.astype("uint8"))
def get_image(prompt, i):
url = (f"https://image.pollinations.ai/prompt/{quote(prompt + ', ' + STYLE)}"
f"?width={W}&height={H}&nologo=true&seed={i + 7}")
for attempt in range(4):
try:
r = requests.get(url, timeout=120)
r.raise_for_status()
return Image.open(io.BytesIO(r.content)).convert("RGB").resize((W, H))
except Exception as e:
print(f" Image attempt {attempt + 1} failed: {e}")
time.sleep(5 * (attempt + 1))
print(" Using gradient fallback")
return fallback_image()
def add_caption(img, text):
img = img.copy()
d = ImageDraw.Draw(img, "RGBA")
try:
font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 38)
except Exception:
font = ImageFont.load_default()
lines, cur = [], ""
for word in text.split():
if d.textlength((cur + " " + word).strip(), font=font) > W - 160:
lines.append(cur.strip())
cur = word
else:
cur += " " + word
lines.append(cur.strip())
h = len(lines) * 50 + 30
d.rectangle([0, H - h - 30, W, H], fill=(0, 0, 0, 150))
for k, line in enumerate(lines):
tw = d.textlength(line, font=font)
d.text(((W - tw) / 2, H - h - 10 + k * 50), line, font=font, fill="white")
return img
def zoom_clip(img, duration, zoom_in=True):
def frame(t):
p = min(t / duration, 1.0)
s = 1 + 0.12 * (p if zoom_in else 1 - p)
cw, ch = int(W / s), int(H / s)
x, y = (W - cw) // 2, (H - ch) // 2
return np.array(img.crop((x, y, x + cw, y + ch)).resize((W, H), Image.BILINEAR))
return VideoClip(frame, duration=duration)
async def make_voice(text, path):
await edge_tts.Communicate(text, VOICE, rate="+5%").save(path)
clips = []
for i, (text, prompt) in enumerate(SCENES):
print(f"Scene {i + 1}/{len(SCENES)}")
ap = f"work/v{i}.mp3"
asyncio.run(make_voice(text, ap))
audio = AudioFileClip(ap)
audio = audio.subclip(0, max(audio.duration - 0.05, 0.1)) # avoid read-past-end errors
img = add_caption(get_image(prompt, i), text)
clip = zoom_clip(img, audio.duration + 0.4, zoom_in=(i % 2 == 0)).set_audio(audio)
clips.append(clip)
time.sleep(3) # be gentle with the image API
final = concatenate_videoclips(clips, method="compose").fadein(0.5).fadeout(0.8)
final.write_videofile(OUTPUT, fps=24, codec="libx264", audio_codec="aac")
print(f"Done: {OUTPUT}")
Other
Hero of the village
- Dominant language
- Python
- Stars
- 150k
- Forks
- 17.9k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 181
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/ComfyUI
-
UnboundLocalError on a dangling symlink in custom_nodesPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Feature
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
ModelMergeSimple and all merge nodes are O(N²)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Comfy-Org/ComfyUI#17823 · 1 reaction ·
Maintainers usually reply within 1 day
-
[Ascend NPU] Trellis2 shape stage aborts: aten::max.dim has no INT32 kernel (EZ1001)Possibly taken @harmehak0173 claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
All issues in Comfy-Org/ComfyUI
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day