update helpers

This commit is contained in:
Stephan Auerhahn
2023-08-10 12:45:37 -07:00
parent b3866d1218
commit 88395261d8

View File

@@ -24,14 +24,14 @@ from sgm.inference.helpers import embed_watermark, CudaModelManager
@st.cache_resource()
def init_st(spec: SamplingSpec, load_ckpt=True, load_filter=True) -> Dict[str, Any]:
def init_st(
spec: SamplingSpec, load_ckpt=True, load_filter=True, lowvram_mode=True
) -> Dict[str, Any]:
state: Dict[str, Any] = dict()
if not "model" in state:
config = spec.config
ckpt = spec.ckpt
lowvram_mode = st.checkbox("Low VRAM mode", value=False)
if lowvram_mode:
pipeline = SamplingPipeline(
model_spec=spec,