{"slug": "one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at", "title": "One more measured note for diffusers — an img2img run can be given no timesteps at all", "summary": "A reproduction against Diffusers 0.43.0 found that 34 of 78 comparable scheduler selection cases produce genuinely empty timestep schedules, while 38 return a zero count, with four nonempty PNDM cases (skip_prk_steps=True) accounting for the gap. Testing a CPU tiny SDXL pipeline with randomly initialized weights, the author reported that rejecting only an actually empty slice preserved all eight valid outputs with a maximum absolute difference of 0 and rejected all four empty cases before latent preparation, whereas rejecting any returned count below one also rejected two previously functioning PNDM rows. Hugging Face issue #11092 remained open on November 29, 2026, with the SDXL img2img source on main matching 0.43.0, and no adopted fix is implied.", "body_md": "I also checked this using actual schedulers:\n\nThanks for making this easy to check. I reproduce the 266/800 zero-count result on the same arithmetic grid. With actual schedulers, there is an important additional distinction: **the returned step count, the length of the selected timestep tensor, and the number of model evaluations need not be equal.**\n\nI used installed [Diffusers 0.43.0](https://github.com/huggingface/diffusers/releases/tag/v0.43.0), the actual schedulers and SDXL img2img selector, plus a CPU tiny SDXL pipeline with randomly initialized weights. The pipeline tests compare policies with the same inputs and seeds, not production image quality.\n\nSummary:\n\n| Check | Observation | \n|---|---|\n| Original arithmetic grid | 266/800 have a zero adjusted count | \n| 78 comparable scheduler selection cases | 34 actually empty; 38 with a zero returned count | \n| Difference between those two counts | Four nonempty PNDM cases ( `skip_prk_steps=True` ) | \n| Tiny SDXL pipeline, stock implementation | Eight valid-batch outputs and four empty-schedule outcomes, counting the two output types separately | \n| Reject only an actually empty slice | All eight valid outputs preserved, maximum absolute difference 0; all four empty cases rejected before latent preparation | \n| Reject a returned count below one | Also rejects two previously functioning PNDM rows | \n| Guarantee at least one adjusted step for positive strength | Produces nonempty outputs for the four empty pipeline rows, but changes two previously functioning PNDM rows | \n\nRepresentative stock pipeline results:\n\n| Scheduler | Requested steps | Strength | Returned count | Selected timesteps | UNet calls | Result | \n|---|---|---|---|---|---|---|\n| Euler | 1 | 0.8 | 0 | `[]` | 0 | Decode error / empty latent | \n| Euler | 10 | 0.05 | 0 | `[]` | 0 | Decode error / empty latent | \n| PNDM, skip PRK | 10 | 0.05 | 0 | `[0]` | 1 | Valid output batch | \n| PNDM, skip PRK | 10 | 0.1 | 1 | `[100, 0]` | 2 | Valid output batch | \n\nPNDM at 10/0.05 is the key control: a minimum changes `[0]` to `[100, 0]` and changes the output; the actual-empty guard preserves it.\n\nThis supports the earlier [SD CPU reproduction](https://github.com/huggingface/diffusers/issues/11092#issuecomment-6247854056), [tiny SDXL and PNDM reproduction](https://github.com/huggingface/diffusers/issues/11092#issuecomment-6339814147), and [actual-empty proposal](https://github.com/huggingface/diffusers/issues/11092#issuecomment-7118331097). My addition is the policy comparison. On November 29, 2026, [#11092](https://github.com/huggingface/diffusers/issues/11092) was open and the SDXL img2img source file on main matched 0.43.0. No adopted fix is implied.\n\nFor SDXL-Turbo, the [usage guide](https://huggingface.co/docs/diffusers/main/en/using-diffusers/sdxl_turbo) and [model card](https://huggingface.co/stabilityai/sdxl-turbo) recommend `num_inference_steps * strength >= 1` for img2img. The guide uses two requested steps, strength 0.5 and guidance scale 0.0. Keep the checkpoint’s intended scheduler configuration. One-step text-to-image support is not arbitrary-strength one-step img2img support.\n\nStrength 1 may defeat a subtle edit; increasing steps changes the grid. The product condition is guidance for ordinary Turbo img2img, not a universal guarantee.\n\nDepending on the goal:\n\nInspect the import version, pipeline/scheduler class and config, steps/strength, initial and selected timesteps, returned count and begin index. For full execution, check model calls and output batch. Selector checks need no weights.\n\nFrom the arithmetic census to actual scheduler timelines\nThe arithmetic census locates a useful boundary; actual timestep and valid-batch checks distinguish a genuinely empty schedule from a functioning zero-count case. That distinction helps preserve working inputs.", "url": "https://wpnews.pro/news/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at", "canonical_source": "https://discuss.huggingface.co/t/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at-all/192465#post_2", "published_at": "2026-11-29 11:16:07+00:00", "updated_at": "2026-11-29 12:15:12.409451+00:00", "lang": "en", "topics": ["generative-ai", "machine-learning", "ai-research"], "entities": ["Diffusers", "Hugging Face", "Stability AI", "SDXL", "SDXL-Turbo", "PNDM", "Euler"], "also_reported_by": [], "takeaway": "Guard img2img schedulers against an actually empty selected-timestep slice rather than a zero returned count: in 78 scheduler cases, 34 were truly empty but 38 returned zero, and the narrower guard preserved all eight valid tiny-SDXL outputs at zero difference while the count-based guard broke two w", "recommendation": {"advice": "When validating img2img timestep schedules, reject only an actually empty selected-timestep tensor, not a zero returned count, and keep num_inference_steps * strength >= 1 for SDXL-Turbo.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at", "markdown": "https://wpnews.pro/news/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at.md", "text": "https://wpnews.pro/news/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at.txt", "jsonld": "https://wpnews.pro/news/one-more-measured-note-for-diffusers-an-img2img-run-can-be-given-no-timesteps-at.jsonld"}}