mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-23 12:17:02 +08:00
showcase how to use set_maximum_caching in the example script.
This commit is contained in:
parent
f03a095678
commit
632c87bd92
@ -106,6 +106,11 @@ def queue_prompt(prompt):
|
|||||||
req = request.Request("http://127.0.0.1:8188/prompt", data=data)
|
req = request.Request("http://127.0.0.1:8188/prompt", data=data)
|
||||||
request.urlopen(req)
|
request.urlopen(req)
|
||||||
|
|
||||||
|
def set_maximum_caching(use_maximum_caching):
|
||||||
|
p = {"use_maximum_caching": use_maximum_caching}
|
||||||
|
data = json.dumps(p).encode('utf-8')
|
||||||
|
req = request.Request("http://127.0.0.1:8188/set_maximum_caching", data=data)
|
||||||
|
request.urlopen(req)
|
||||||
|
|
||||||
prompt = json.loads(prompt_text)
|
prompt = json.loads(prompt_text)
|
||||||
#set the text prompt for our positive CLIPTextEncode
|
#set the text prompt for our positive CLIPTextEncode
|
||||||
@ -114,7 +119,7 @@ prompt["6"]["inputs"]["text"] = "masterpiece best quality man"
|
|||||||
#set the seed for our KSampler node
|
#set the seed for our KSampler node
|
||||||
prompt["3"]["inputs"]["seed"] = 5
|
prompt["3"]["inputs"]["seed"] = 5
|
||||||
|
|
||||||
|
set_maximum_caching(True)
|
||||||
queue_prompt(prompt)
|
queue_prompt(prompt)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user