* Add random source that matches PyTorch
This added random source that matches PyTorch on CPU. In particular, it
matches: `torch.randn([], dtype=torch.float)` result.
PyTorch's RNG is a bit convoluted and not claimed to be version-stable
(will open a separate issue in PyTorch repo on this). However, the
current implementation on CPU is fairly straightforward^*.
1. If it is less than 16 elements, it uses Gaussian distribution sampled
from MT19937 for double + Box-Muller transformation.
2. If it is more than 16 (16 included), it first do uniform sampling
with whatever the resulting data type would be (in this case, torch.float),
and then apply Box-Muller transformation over 16-element segment at a
type, treating the first floating-point and the 8th as a pair, so on
so forth.
3. If it is not a multiple of 16, trace back from the end for 16
elements and redo step 2.
* Update with configuration available in SwiftDiffusionCLI
* Fix the RNG is not passed into pipelineConfig.
* Image2Image Encoder
Encoder
* Scheduler and pipeline
* fix scheduler
* cli
* remove CLI comment
* disable dpm multistep solver with image2image
* clamp initial timestamp
* Store timesteps in reverse order for consistency.
* Report actual number of steps.
* uint32
* PRComments
* remove old initializer
* pr comments
* change name and add error handling
also fix 512 hard coded
* Add fix for Jpegs
---------
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
* Synced to main branch and minimizes line changes
* Adds negative prompt argument to CLI
Co-authored-by: Wanaldino Antimonio <carlosmm31093@gmail.com>