MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / enhance_t2v

Function enhance_t2v

gemma_encoder.py:451–466  ·  view source on GitHub ↗

Enhance a text prompt for T2V generation.

(
    processor: Gemma3Processor,
    model: Gemma3ForConditionalGeneration,
    prompt: str,
    system_prompt: str,
    max_new_tokens: int = 512,
    seed: int = 42,
)

Source from the content-addressed store, hash-verified

449
450
451def enhance_t2v(
452 processor: Gemma3Processor,
453 model: Gemma3ForConditionalGeneration,
454 prompt: str,
455 system_prompt: str,
456 max_new_tokens: int = 512,
457 seed: int = 42,
458) -> str:
459 """Enhance a text prompt for T2V generation."""
460 messages = [
461 {"role": "system", "content": system_prompt},
462 {"role": "user", "content": f"User Raw Input Prompt: {prompt}."},
463 ]
464 return _enhance(
465 processor, model, messages, max_new_tokens=max_new_tokens, seed=seed
466 )
467
468
469def enhance_i2v(

Callers 1

enhanceMethod · 0.85

Calls 1

_enhanceFunction · 0.85

Tested by

no test coverage detected