mirror of
https://github.com/Stability-AI/generative-models.git
synced 2026-02-02 04:14:27 +01:00
update helpers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user