Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ci-demos
wan2.1
Commits
981040df
Commit
981040df
authored
Jan 24, 2026
by
jerrrrry
Browse files
Update wan_t2v_14B_1_gpu.py
parent
adf369ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
wan_t2v_14B_1_gpu.py
wan_t2v_14B_1_gpu.py
+12
-13
No files found.
wan_t2v_14B_1_gpu.py
View file @
981040df
import
json
from
urllib
import
request
import
argparse
#This is the ComfyUI api prompt format.
#If you want it for a specific workflow you can "enable dev mode options"
#in the settings of the UI (gear beside the "Queue Size: ") this will enable
#a button on the UI to save workflows in api format.
#keep in mind ComfyUI is pre alpha software so this format will change a bit.
# 解析命令行参数
parser
=
argparse
.
ArgumentParser
(
description
=
'Run ComfyUI API with custom seed'
)
parser
.
add_argument
(
'--seed'
,
type
=
int
,
default
=
2675441231
,
help
=
'Seed for generation'
)
args
=
parser
.
parse_args
()
#this is the one for the default workflow
#This is the ComfyUI api prompt format.
# (你的原始prompt_text保持不变)
prompt_text
=
"""
{
"3": {
"inputs": {
"seed": 267544
64254711,
"seed": 267544
1231, // 这个值会被下面的代码替换
"steps": 20,
"cfg": 6,
"sampler_name": "uni_pc",
...
...
@@ -175,14 +174,14 @@ def queue_prompt(prompt):
prompt
=
json
.
loads
(
prompt_text
)
# 使用命令行参数中的seed值替换默认值
prompt
[
"3"
][
"inputs"
][
"seed"
]
=
args
.
seed
#set the text prompt for our positive CLIPTextEncode
#prompt["6"]["inputs"]["text"] = "masterpiece best quality man"
#set the seed for our KSampler node
#prompt["3"]["inputs"]["seed"] = 5
print
(
f
"Running with seed:
{
args
.
seed
}
"
)
queue_prompt
(
prompt
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment