Skip to content

concat a super resolution model after the stable diffusion model. #48

@jjwang13

Description

@jjwang13

Hi,

Thank you so much for this amazing lib!

I was able to successfully reproduce your example at https://replicate.com/docs/get-started/swiftui. In the next steps section, you suggested we can concat a super resolution model after the stable diffusion model. I was wondering if you could show some code snippet on how to modify the example for this please. I found a hard time to implement it in a nice way. What I tried was something like below. The problem is that SuperResolutionView would be redrawn too many times. What we need is to only draw it once.

...
case .succeeded:
if let url = prediction.output?.first {
SuperResolutionView(url)
}
...

Best,
Jeff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions