File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
BlazorDiffusion.ServiceInterface Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public class CreativeService : Service
29
29
public const int DefaultImages = 4 ;
30
30
public const int DefaultSteps = 25 ;
31
31
32
- public const int DefaultModeratorImages = 4 ;
32
+ public const int DefaultModeratorImages = 8 ;
33
33
public const int DefaultModeratorSteps = 25 ;
34
34
35
35
public const int DefaultMaxWidth = 1280 ;
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ public async Task<ImageGenerationResponse> GenerateImageAsync(ImageGeneration re
18
18
{
19
19
var req = request . ToComfy ( ) ;
20
20
var res = await Client . PostAsync ( req ) ;
21
+ if ( res == null )
22
+ throw new Exception ( "Failed to generate image." ) ;
21
23
var now = DateTime . UtcNow ;
22
24
var key = $ "{ now : yyyy/MM/dd} /{ ( long ) now . TimeOfDay . TotalMilliseconds } ";
23
25
24
26
var results = new List < ImageGenerationResult > ( ) ;
25
- var seed = ( res . Request . Seed ?? 0 ) . ConvertTo < uint > ( ) ;
27
+ var seed = ( res ? . Request ? . Seed ?? 0 ) . ConvertTo < uint > ( ) ;
26
28
foreach ( var item in res . Images )
27
29
{
28
30
var artifactUrl = $ "{ Client . BaseUri . TrimEnd ( '/' ) } /uploads{ item . Url } ";
You can’t perform that action at this time.
0 commit comments