Spaces:
Sleeping
Sleeping
Fix ZeroGPU loading
Browse filesFiles changed (2)
- app.py+5-4
- requirements.txt-1
12 unmodified lines1314151617181920212212 unmodified linesADAPTER = "MaestroYan/JEMM"MAX_PIXELS = 1280 * 800# .to("cuda") rather than device_map, so ZeroGPU can pack the weights at startupbase = Qwen3_5ForConditionalGeneration.from_pretrained(BASE, dtype=torch.bfloat16, attn_implementation="sdpa").to("cuda")model = DecisionModel(PeftModel.from_pretrained(base, ADAPTER, is_trainable=False), AutoTokenizer.from_pretrained(BASE),name="JEMM", processor=AutoProcessor.from_pretrained(BASE), **_decision_config(ADAPTER))def fit(image: Image.Image) -> Image.Image:12 unmodified lines131415161718192021222312 unmodified linesADAPTER = "MaestroYan/JEMM"MAX_PIXELS = 1280 * 800# Attach the adapter on CPU, then .to("cuda") once, so ZeroGPU can pack all weights at startupbase = Qwen3_5ForConditionalGeneration.from_pretrained(BASE, dtype=torch.bfloat16, attn_implementation="sdpa")peft_model = PeftModel.from_pretrained(base, ADAPTER, is_trainable=False).to("cuda")model = DecisionModel(peft_model, AutoTokenizer.from_pretrained(BASE), name="JEMM",processor=AutoProcessor.from_pretrained(BASE), **_decision_config(ADAPTER))def fit(image: Image.Image) -> Image.Image:
3 unmodified lines45673 unmodified linestorchvisionnumpypillowflash-linear-attention>=0.5.23 unmodified lines4563 unmodified linestorchvisionnumpypillow
app.py+5-4
requirements.txt-1