Nekochu commited on
Commit
c9b2c0d
·
1 Parent(s): 4393113

revert to 8-step Q5_0 GGUF (4-step OOMs during build conversion)

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -11
  2. app.py +3 -3
Dockerfile CHANGED
@@ -39,20 +39,15 @@ RUN chmod +x /app/sd-cli
39
 
40
  RUN mkdir -p /app/models
41
 
42
- # Download Z-Anime distill 4-step BF16 (~12.3GB), convert to Q5_K_M GGUF, delete source
43
- RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/z-anime-distill-4step-bf16.safetensors \
44
- "https://huggingface.co/SeeSee21/Z-Anime/resolve/main/diffusion_models/z-anime-distill-4step-bf16.safetensors" \
45
- && /app/sd-cli -M convert \
46
- -m /app/models/z-anime-distill-4step-bf16.safetensors \
47
- -o /app/models/z-anime-distill-4step-Q5_0.gguf \
48
- --type q5_0 \
49
- && rm /app/models/z-anime-distill-4step-bf16.safetensors
50
-
51
- # Download Qwen3-4B text encoder Q8_0 GGUF (~4.28GB)
52
  RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/qwen3_4b_q8_0.gguf \
53
  "https://huggingface.co/worstplayer/Z-Image_Qwen_3_4b_text_encoder_GGUF/resolve/main/Qwen_3_4b-Q8_0.gguf"
54
 
55
- # Download VAE (~168MB)
56
  RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/ae.safetensors \
57
  "https://huggingface.co/SeeSee21/Z-Anime/resolve/main/vae/ae.safetensors"
58
 
 
39
 
40
  RUN mkdir -p /app/models
41
 
42
+ # Z-Anime distill 8-step Q5_0 GGUF (~4.51GB)
43
+ RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/z-anime-8steps-q5_0.gguf \
44
+ "https://huggingface.co/DaNS2025/Z-Anime_8-steps.GGUF/resolve/main/Z-Anime-8steps.q5_0.gguf"
45
+
46
+ # Qwen3-4B text encoder Q8_0 GGUF (~4.28GB)
 
 
 
 
 
47
  RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/qwen3_4b_q8_0.gguf \
48
  "https://huggingface.co/worstplayer/Z-Image_Qwen_3_4b_text_encoder_GGUF/resolve/main/Qwen_3_4b-Q8_0.gguf"
49
 
50
+ # VAE (~168MB)
51
  RUN curl -fL --retry 3 --retry-delay 5 -o /app/models/ae.safetensors \
52
  "https://huggingface.co/SeeSee21/Z-Anime/resolve/main/vae/ae.safetensors"
53
 
app.py CHANGED
@@ -7,12 +7,12 @@ import gradio as gr
7
  # ---------------------------------------------------------------------------
8
  # Model paths (downloaded at build time)
9
  # ---------------------------------------------------------------------------
10
- DIFFUSION = "/app/models/z-anime-distill-4step-Q5_0.gguf"
11
  LLM = "/app/models/qwen3_4b_q8_0.gguf"
12
  VAE = "/app/models/ae.safetensors"
13
 
14
  RESOLUTIONS = ["512x512", "768x512", "512x768"]
15
- STEPS = 4
16
  CFG = 1.0
17
  TIMEOUT = 10800
18
 
@@ -122,7 +122,7 @@ with gr.Blocks(title="Z-Anime (CPU)") as demo:
122
  res_input = gr.Dropdown(choices=RESOLUTIONS, value="512x512",
123
  label="Resolution")
124
  seed_input = gr.Number(value=-1, label="Seed (-1=random)", precision=0)
125
- gen_btn = gr.Button("Generate (4 steps, CFG 1)", variant="primary", size="lg")
126
  with gr.Column():
127
  output_img = gr.Image(type="pil", label="Output")
128
  status_box = gr.Textbox(label="Status", interactive=False)
 
7
  # ---------------------------------------------------------------------------
8
  # Model paths (downloaded at build time)
9
  # ---------------------------------------------------------------------------
10
+ DIFFUSION = "/app/models/z-anime-8steps-q5_0.gguf"
11
  LLM = "/app/models/qwen3_4b_q8_0.gguf"
12
  VAE = "/app/models/ae.safetensors"
13
 
14
  RESOLUTIONS = ["512x512", "768x512", "512x768"]
15
+ STEPS = 8
16
  CFG = 1.0
17
  TIMEOUT = 10800
18
 
 
122
  res_input = gr.Dropdown(choices=RESOLUTIONS, value="512x512",
123
  label="Resolution")
124
  seed_input = gr.Number(value=-1, label="Seed (-1=random)", precision=0)
125
+ gen_btn = gr.Button("Generate (8 steps, CFG 1)", variant="primary", size="lg")
126
  with gr.Column():
127
  output_img = gr.Image(type="pil", label="Output")
128
  status_box = gr.Textbox(label="Status", interactive=False)