Skip to content

Commit

Permalink
update helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
palp committed Aug 10, 2023
1 parent b3866d1 commit 8839526
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/demo/streamlit_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@


@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,
Expand Down

0 comments on commit 8839526

Please sign in to comment.